woocommerce_rest_set_order_item action-hookWC 4.5.0.

Allow extensions be notified before the item is saved.

Usage

add_action( 'woocommerce_rest_set_order_item', 'wp_kama_woocommerce_rest_set_order_item_action', 10, 2 );

/**
 * Function for `woocommerce_rest_set_order_item` action-hook.
 * 
 * @param WC_Order_Item $item         The item object.
 * @param array         $request_data The item data.
 *
 * @return void
 */
function wp_kama_woocommerce_rest_set_order_item_action( $item, $request_data ){

	// action...
}
$item(WC_Order_Item)
The item object.
$request_data(array)
The item data.

Changelog

Since 4.5.0. Introduced.

Where the hook is called

UpdateUtils::update_line_item()
woocommerce_rest_set_order_item
WC_REST_Orders_V1_Controller::set_item()
woocommerce_rest_set_order_item
WC_REST_Orders_V2_Controller::set_item()
woocommerce_rest_set_order_item
woocommerce/src/Internal/RestApi/Routes/V4/Orders/UpdateUtils.php 228
do_action( 'woocommerce_rest_set_order_item', $item, $line_item_data );
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-orders-v1-controller.php 802
do_action( 'woocommerce_rest_set_order_item', $item, $posted );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php 1076
do_action( 'woocommerce_rest_set_order_item', $item, $posted );

Where the hook is used in WooCommerce

Usage not found.