wc_order_is_editable
Checks if an order can be edited, specifically for use on the Edit Order screen.
Использование
add_filter( 'wc_order_is_editable', 'wp_kama_wc_order_is_editable_filter', 10, 2 ); /** * Function for `wc_order_is_editable` filter-hook. * * @param $in_array * @param $that * * @return */ function wp_kama_wc_order_is_editable_filter( $in_array, $that ){ // filter... return $in_array; }
- $in_array
- -
- $that
- -
Где вызывается хук
wc_order_is_editable
woocommerce/includes/class-wc-order.php 1604
return apply_filters( 'wc_order_is_editable', in_array( $this->get_status(), array( 'pending', 'on-hold', 'auto-draft' ), true ), $this );