woocommerce_remove_order_items
Trigger action before removing all order line items. Allows you to track order items.
Использование
add_action( 'woocommerce_remove_order_items', 'wp_kama_woocommerce_remove_order_items_action', 10, 2 ); /** * Function for `woocommerce_remove_order_items` action-hook. * * @param WC_Order $that The current order object. * @param string $type Order item type. * * @return void */ function wp_kama_woocommerce_remove_order_items_action( $that, $type ){ // action... }
- $that(WC_Order)
- The current order object.
- $type(строка)
- Order item type.
По умолчанию: null
Список изменений
С версии 7.8.0 | Введена. |
Где вызывается хук
woocommerce_remove_order_items
woocommerce/includes/abstracts/abstract-wc-order.php 845
do_action( 'woocommerce_remove_order_items', $this, $type );