woocommerce_order_has_status
Checks the order status against a passed in status.
Использование
add_filter( 'woocommerce_order_has_status', 'wp_kama_woocommerce_order_has_status_filter', 10, 2 ); /** * Function for `woocommerce_order_has_status` filter-hook. * * @param $status * @param $that * * @return */ function wp_kama_woocommerce_order_has_status_filter( $status, $that ){ // filter... return $status; }
- $status
- -
- $that
- -
Где вызывается хук
woocommerce_order_has_status
woocommerce/includes/abstracts/abstract-wc-order.php 2385
return apply_filters( 'woocommerce_order_has_status', ( is_array( $status ) && in_array( $this->get_status(), $status, true ) ) || $this->get_status() === $status, $this, $status );