woocommerce_ajax_order_items_removed action-hookWC 5.2.0

Fires after order items are removed.

Usage

add_action( 'woocommerce_ajax_order_items_removed', 'wp_kama_woocommerce_ajax_order_items_removed_action', 10, 4 );

/**
 * Function for `woocommerce_ajax_order_items_removed` action-hook.
 * 
 * @param int                           $item_id       WC item ID.
 * @param WC_Order_Item|false           $item          As returned by $order->get_item( $item_id ).
 * @param bool|array|WP_Error           $changed_store Result of wc_maybe_adjust_line_item_product_stock().
 * @param bool|WC_Order|WC_Order_Refund $order         As returned by wc_get_order().
 *
 * @return void
 */
function wp_kama_woocommerce_ajax_order_items_removed_action( $item_id, $item, $changed_store, $order ){

	// action...
}
$item_id(int)
WC item ID.
$item(WC_Order_Item|false)
As returned by $order->get_item( $item_id ).
$changed_store(true|false|array|WP_Error)
Result of wc_maybe_adjust_line_item_product_stock().
$order(true|false|WC_Order|WC_Order_Refund)
As returned by wc_get_order().

Changelog

Since 5.2.0 Introduced.

Where the hook is called

WC_AJAX::remove_order_item()
woocommerce_ajax_order_items_removed
woocommerce/includes/class-wc-ajax.php 1403
do_action( 'woocommerce_ajax_order_items_removed', $item_id ?? 0, $item ?? false, $changed_stock ?? false, $order );

Where the hook is used in WooCommerce

Usage not found.