woocommerce_rest_set_order_item action-hookWC 3.0.0

Action hook to adjust item before save.

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  $item   
 * @param  $posted 
 *
 * @return void
 */
function wp_kama_woocommerce_rest_set_order_item_action( $item, $posted ){

	// action...
}
$item
-
$posted
-

Changelog

Since 3.0.0 Introduced.

Where the hook is called

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/includes/rest-api/Controllers/Version1/class-wc-rest-orders-v1-controller.php 790
do_action( 'woocommerce_rest_set_order_item', $item, $posted );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php 981
do_action( 'woocommerce_rest_set_order_item', $item, $posted );

Where the hook is used in WooCommerce

Usage not found.