woocommerce_rest_set_order_item, $item, $posted
woocommerce_rest_set_order_item, $item, $posted
Appears in: woocommerce.11.0.0
Hook Type: action
Displaying hooks found in version: woocommerce.11.0.0do_action('woocommerce_rest_set_order_item, $item, $posted') is found 2 times:
- /includes/rest-api/Controllers/Version1/class-wc-rest-orders-v1-controller.php line 802
/** * Action hook to adjust item before save. * @since 3.0.0 */ do_action( 'woocommerce_rest_set_order_item', $item, $posted ); // Save or add to order if ( 'create' === $action ) { $order->add_item( $item ); } else { $item->save(); - /includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php line 1076
* @param array $posted The item data. * * @since 4.5.0. */ do_action( 'woocommerce_rest_set_order_item', $item, $posted ); // If creating the order, add the item to it. if ( 'create' === $action ) { $order->add_item( $item ); } else { $item->save();