woocommerce_(order_type)_list_table_prepare_items_query_args хук-фильтрWC 7.3.0

Same as woocommerce_order_list_table_prepare_items_query_args for a specific order type.

Использование

add_filter( 'woocommerce_(order_type)_list_table_prepare_items_query_args', 'wp_kama_woocommerce_order_type_list_table_prepare_items_query_args_filter' );

/**
 * Function for `woocommerce_(order_type)_list_table_prepare_items_query_args` filter-hook.
 * 
 * @param array $query_args Arguments to be passed to `wc_get_orders()`.
 *
 * @return array
 */
function wp_kama_woocommerce_order_type_list_table_prepare_items_query_args_filter( $query_args ){

	// filter...
	return $query_args;
}
$query_args(массив)
Arguments to be passed to wc_get_orders().

Список изменений

С версии 7.3.0 Введена.

Где вызывается хук

ListTable::prepare_items()
woocommerce_(order_type)_list_table_prepare_items_query_args
woocommerce/src/Internal/Admin/Orders/ListTable.php 411
$order_query_args = apply_filters( 'woocommerce_' . $this->order_type . '_list_table_prepare_items_query_args', $order_query_args );

Где используется хук в WooCommerce

Использование не найдено.