woocommerce_removed_order_items action-hookWC 7.8.0

Trigger action after removing all order line items.

Usage

add_action( 'woocommerce_removed_order_items', 'wp_kama_woocommerce_removed_order_items_action', 10, 2 );

/**
 * Function for `woocommerce_removed_order_items` action-hook.
 * 
 * @param WC_Order $that The current order object.
 * @param string   $type Order item type.
 *
 * @return void
 */
function wp_kama_woocommerce_removed_order_items_action( $that, $type ){

	// action...
}
$that(WC_Order)
The current order object.
$type(string)
Order item type.
Default: null

Changelog

Since 7.8.0 Introduced.

Where the hook is called

WC_Abstract_Order::remove_order_items()
woocommerce_removed_order_items
woocommerce/includes/abstracts/abstract-wc-order.php 867
do_action( 'woocommerce_removed_order_items', $this, $type );

Where the hook is used in WooCommerce

Usage not found.