1. Documentation
  2. Plugins
  3. WooCommerce
  4. Extensions

Split Orders

The Split Orders extension allows you to split orders, moving line items into a new order to process separately. The split order will be assigned to the same customer with shipping and billing details copied from the original order.

Installation and Setup ↑ Back to top

  1. Download the .zip file from your WooCommerce account.
  2. Go to: WordPress Admin > Plugins > Add New and Upload Plugin with the file you downloaded with Choose File.
  3. Install Now and Activate the extension.

More information at: Install and Activate Plugins/Extensions.

After activating the extension, the split order function will be available for use on all orders, no additional configuration is necessary.

Usage ↑ Back to top

To split an order:

  1. Go to WooCommerce > Orders in the WordPress admin, and open the order you wish to split
  2. Click the Split order button, which appears in the action buttons below the list of line items
    Split orders button on order screen
  3. The dialog below will open. Input the quantity of each line item that you wish to split out.
    Split orders modal to choose line item quantities
  4. Click the Complete split button to confirm the split
  5. A new order will be created with the line items you chose to split out and an order note will be added to record the split.

You can now treat each order separately. Make any amendments that are necessary, update the order status, send them to be fulfilled, add tracking information, or any other action you normally perform with your orders.

FAQs ↑ Back to top

What data is copied to a split order? ↑ Back to top

The following data is copied to a split order:

  • The selected line items
  • Order status
  • Customer
  • Billing address
  • Shipping address
  • Customer note
  • Date created
  • Tax status
  • Customer IP
  • Customer user agent

What data is not copied to the split order? ↑ Back to top

  • Coupon codes are not applied to the split order, however any discount granted by a coupon will be maintained in the split
  • Shipping and other fees will remain on the original order only
  • Order metadata added by other plugins will not be copied by default. Support for copying additional items of data can be added in code using the available hooks.

Are customer emails sent when an order is split? ↑ Back to top

To avoid customer confusion, the default WooCommerce emails are prevented from sending during a split. This includes the following:

  • Customer – processing order
  • Customer – completed order
  • Customer – refunded order
  • Customer – on-hold order

The following admin emails are also disabled during a split:

  • Admin – new order
  • Admin – cancelled order
  • Admin – failed order

If you have additional email types added by other plugins, that are triggered by the creation of an order, then they could still be sent.

Does the split order appear in the customer’s order history? ↑ Back to top

The updated original order and the split order will both appear in the customer’s order history, so they have a full list of the items they ordered. Depending on the situation you may want to inform the customer of the reason for the split.

Does this extension support multi-currency? ↑ Back to top

Yes. The currency of an order will be copied when split, even if different to the base currency.

Can I split an order more than once? ↑ Back to top

Yes. As long as there are multiple line items you can split an order.

Can I undo splitting an order? ↑ Back to top

There is no undo operation, however the Merge Orders extension would allow you to combine the orders again.

Are decimal quantities supported? ↑ Back to top

Yes. By default quantities in WooCommerce are integers, but decimals can be enabled using filters. These filters will also enable decimal support in Split Orders without any additional modification.

Can I refund a split order? ↑ Back to top

Because each payment gateway handles payments and refunds differently, it’s not straight-forward to ensure support for automatic refunds for all gateways. For most payment gateways which support automatic refunds, the original order after a split could still be refunded through WooCommerce. However, the new split order would need to be manually refunded at the gateway. In future versions of the extension we hope to build in refund support for the more common gateways.

Does the extension support sequential order numbers? ↑ Back to top

Yes. The plugin supports the Sequential Order Numbers Pro extension, so split orders will be assigned order numbers as defined in your settings for that extension.

Code Snippets ↑ Back to top

These snippets are intended for use by developers. To use them you will need to add the code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin.

Restore emails when splitting ↑ Back to top

By default WooCommerce emails are disabled as part of a split. If you want them to be enabled you can use the following snippet:

add_filter( 'vibe_split_orders_disable_emails', '__return_false' );

Copy additional data to the split order ↑ Back to top

If there are additional fields you want to be copied to the split order, you should do this on the vibe_split_orders_after_order_split hook.

For example:

function split_orders_additional( $split_order, $original_order ) {
    $tracking_number = $original_order->get_meta( 'tracking_number' );
    $split_order->update_meta_data( 'tracking_number', $tracking_number );
    $split_order->save_meta_data();
}
add_action( 'vibe_split_orders_after_order_split', 'split_orders_additional', 10, 2 );

Default quantity to line item quantity ↑ Back to top

When starting a split the default quantity to split is zero (o) and you must update the quantities for those items you wish to split out. If you would like it work the other way around, so the quantities default to splitting the full amount, so you only update those you do not wish to split then you can use this code snippet.

function split_orders_default_quantity( $quantity, $order, $item ) {
    return $item->get_quantity();
}
add_filter( 'vibe_split_orders_default_split_quantity', 'split_orders_default_quantity', 10, 3 );

Copy additional data on the line items ↑ Back to top

If your line items have additional meta data on them, which you would like to preserve after splitting, the following code snippet demonstrates how to do that.

function split_orders_item_meta( $meta, $item ) {
    $meta['my_meta_1'] = $item->get_meta( 'my_meta_1' );
    $meta['my_meta_2'] = $item->get_meta( 'my_meta_2' );
    $meta['my_meta_3'] = $item->get_meta( 'my_meta_3' );

    return $meta;
}
add_filter( 'vibe_split_orders_item_meta', 'split_orders_item_meta', 10, 2 );

WooCommerce - the most customizable eCommerce platform for building your online business.

  • 30 day money back guarantee
  • Support teams across the world
  • Safe & Secure online payment