woocommerce_rest_set_order_item

woocommerce_rest_set_order_item

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

do_action('woocommerce_rest_set_order_item') is found 2 times:

  • /includes/rest-api/Controllers/Version1/class-wc-rest-orders-v1-controller.php line 795
    		/**
    		 * 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 1071
    		 * @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();