woocommerce_rest_remove_order_item
Allow extensions be notified before the item is removed.
Использование
add_action( 'woocommerce_rest_remove_order_item', 'wp_kama_woocommerce_rest_remove_order_item_action' );
/**
* Function for `woocommerce_rest_remove_order_item` action-hook.
*
* @param WC_Order_Item $item The item object.
*
* @return void
*/
function wp_kama_woocommerce_rest_remove_order_item_action( $item ){
// action...
}
- $item(WC_Order_Item)
- The item object.
Список изменений
| С версии 9.3.0. | Введена. |
Где вызывается хук
woocommerce_rest_remove_order_item
woocommerce_rest_remove_order_item
woocommerce/src/Internal/RestApi/Routes/V4/Orders/UpdateUtils.php 322
do_action( 'woocommerce_rest_remove_order_item', $item );
woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-orders-controller.php 242
do_action( 'woocommerce_rest_remove_order_item', $item );