woocommerce_before_save_order_item

woocommerce_before_save_order_item

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

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

do_action('woocommerce_before_save_order_item') is found 1 times:

  • /includes/admin/wc-admin-functions.php line 381
    			}
    
    			// Allow other plugins to change item object before it is saved.
    			/* phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment */
    			do_action( 'woocommerce_before_save_order_item', $item );
    			/* phpcs: enable */
    
    			$item->save();
    
    			if ( in_array( $order->get_status(), array( 'processing', 'completed', 'on-hold' ), true ) ) {
    				$changed_stock = wc_maybe_adjust_line_item_product_stock( $item );