// must fill $_POST add_action( 'woocommerce_checkout_phone_order_processed', function ( $order_id, $checkout_data, $order ) { if ( class_exists( "AtumMultiInventory\Models\Inventory" ) ) { $oi_inventory_qty = array(); foreach ( $order->get_items() as $item ) { $inventories = array(); foreach ( AtumMultiInventory\Models\Inventory::get_order_item_inventories( $item->get_id() ) as $inventory ) { $inventories[ $inventory->inventory_id ] = $inventory->qty; } $oi_inventory_qty[ $item->get_id() ] = $inventories; } $_POST['oi_inventory_qty'] = $oi_inventory_qty; } }, 10, 3 );
ATUM Multi-Inventory, by Stock Management Labs Print
Created by: Alex Prokaev
Modified on: Fri, 13 Sep, 2019 at 10:07 AM
Did you find it helpful? Yes No
Send feedbackSorry we couldn't be helpful. Help us improve this article with your feedback.