woocommerce_trash_cancelled_orders_query_args
Использование
add_filter( 'woocommerce_trash_cancelled_orders_query_args', 'wp_kama_woocommerce_trash_cancelled_orders_query_args_filter' ); /** * Function for `woocommerce_trash_cancelled_orders_query_args` filter-hook. * * @param $array * * @return */ function wp_kama_woocommerce_trash_cancelled_orders_query_args_filter( $array ){ // filter... return $array; }
- $array
- -
Где вызывается хук
woocommerce_trash_cancelled_orders_query_args
woocommerce/includes/class-wc-privacy.php 238-246
apply_filters( 'woocommerce_trash_cancelled_orders_query_args', array( 'date_created' => '<' . strtotime( '-' . $option['number'] . ' ' . $option['unit'] ), 'limit' => $limit, // Batches of 20. 'status' => 'wc-cancelled', 'type' => 'shop_order', ) )