woocommerce_(order_type)_list_table_request
Allows 3rd parties to filter the initial request vars before defaults and other logic is applied.
Использование
add_filter( 'woocommerce_(order_type)_list_table_request', 'wp_kama_woocommerce_order_type_list_table_request_filter' );
/**
* Function for `woocommerce_(order_type)_list_table_request` filter-hook.
*
* @param array $request Request to be passed to `wc_get_orders()`.
*
* @return array
*/
function wp_kama_woocommerce_order_type_list_table_request_filter( $request ){
// filter...
return $request;
}
- $request(массив)
- Request to be passed to
wc_get_orders().
Список изменений
| С версии 7.3.0 | Введена. |
Где вызывается хук
woocommerce_(order_type)_list_table_request
woocommerce/src/Internal/Admin/Orders/ListTable.php 401
$this->request = apply_filters( 'woocommerce_' . $this->order_type . '_list_table_request', $this->request );