Create individual orders for each item in WooCommerce cart

    Add this to your theme’s functions.php file Keep only 1 product in the original order, delete other products from this order. Place the removed products (each separately) in a new order. function lpj_woocommerce_checkout_order_processed( $order_id, $posted_data, $order ) { // Get order currency $order_currency = $order->get_currency(); // Get order payment method $order_payment_gateway = $order->get_payment_method(); // Address […]

    Read More

    How to add same product to cart twice instead of changing quantity in WooCommerce

      Add this to your theme’s functions.php file function lpj_add_prod_as_separate_cart_item( $cart_item_data, $product_id ) { $unique_cart_item_key = uniqid(); $cart_item_data[‘unique_key’] = $unique_cart_item_key; return $cart_item_data; } add_filter( ‘woocommerce_add_cart_item_data’, ‘lpj_add_prod_as_separate_cart_item’, 10, 2 );

      Read More