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. However, some settings can be found at WooCommerce > Settings > Orders.

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 order button
  3. The dialog below will open. Input the quantity of each line item that you wish to split out and the shipping total to be moved to the new order. Clear the shipping total box if you do not want a shipping item on the new order.
    Split order modal
  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.

Navigating Your Split Orders

↑ Back to top

Once you have started splitting orders, you may find you need to navigate between the parts of an order. There are several ways you can do this.

Split Parts Panel

↑ Back to top

On all orders that have been split, a meta box lists all the parts that have come from the same original order. This gives an overview so no parts of an order can go missing and makes it easy to navigate between the separate orders.

Meta box showing the split parts

Order Notes

↑ Back to top

Each split is logged in the order notes on both the original order and the split part. These notes can be used to follow the sequence of splits.

Split From Column

↑ Back to top

The original order an order is split from is linked from a column on the orders table. Even if an order gets split and then the parts are split again, this column will always show the original order.

Order list screen with split from column

Settings

↑ Back to top

The settings for the extension can be found at WooCommerce > Settings > Orders.

Plugin settings page

Custom meta fields – Any fields listed in this box will also be included in a split, with the values being copied to the new created order. This can be used to add support for extensions which add their own custom meta data to orders. Some suggested meta fields found on recent orders are displayed beneath the field.

Order status – The option selected in this field will be the status assigned to orders created by a split. Users can also keep the status of the original order by selecting the ‘Same as the original’ option.

Emails

↑ Back to top

An email can optionally be sent to the customer when an order is split. This email is disabled by default and can be enabled from the WooCommerce > Settings > Emails section. The main copy for the email is configurable on the email setting page (screenshot below). 

The email template can be overridden in the same way as other WooCommerce email templates, by making a copy of the template (split-orders/templates/emails/customer-order-split.php) into the theme folder. 

FAQs

↑ Back to top

Are custom order tables (HPOS) supported?

↑ Back to top

Yes, HPOS is fully supported from version 1.6.4 of Split Orders.

What data is copied to a split order?

↑ Back to top

The following data is copied to a split order:

  • The selected line items
  • The selected shipping items
  • Order status (configurable in the settings)
  • Customer
  • Billing address
  • Shipping address
  • Customer note
  • Tax status
  • Customer IP
  • Customer user agent
  • Payment method
  • Transaction ID
  • Order attribution

In addition to the above, any fields listed in the plugin settings at WooCommerce > Settings > Orders > Split Orders, will be copied to the split order. This is useful to add any additional meta data fields that other extensions require on orders.

Note that all meta data on individual line items is automatically copied to the split order.

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
  • Order data added by other plugins will not be copied by default, but these additional fields can be input in the plugin settings to be included in those copied to the split order.

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 temporarily 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 may 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

Each payment gateway handles payments and refunds differently so it’s not possible to guarantee support for automatic refunds for all gateways. However some effort has been made to include support for some of the more common gateways, currently this includes: 

  • WooPayments
  • Stripe
  • Braintree credit card
  • Braintree PayPal
  • PayPal standard

For other gateways, you may need to process the refund manually on the payment provider’s own portal.

If you would like to add automatic refund support yourself for a gateway, this may be possible – you would need to identify the meta data fields the gateway requires to process a refund, then include them in the fields copied as part of a split (using the Additional fields option in the Split Orders settings). This is often all that is needed, but as with any custom behaviour it would be wise to test it out before relying on it in production.

Can authorised payments be captured after splitting?

↑ Back to top

In short, no. We have looked into adding support for this, but none of the main payment gateways support capturing authorised payments in multiple parts. Typically, attempting to do this will either capture the full payment or only capture part of the payment leaving the remaining part unable to be captured. Therefore, it is strongly recommended to capture payments before splitting.

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. With the sequential order numbers extension enabled there is also an additional option in the Split Orders settings (WooCommerce > Settings > Advanced > Split orders) to append your order numbers with a suffix such as “-2” to indicate that it has been split from another order.

What should I do if an error occurs during a split?

↑ Back to top

The splitting process has been carefully designed and thoroughly tested, so errors occurring within the split orders plugin itself are very rare. However, other plugins you may have installed can emit errors while a split is taking place. This typically happens because they are listening for the creation of new orders and their code has been poorly designed for orders created programmatically.

If an error does occur, the split orders extension will catch it and show some critical details about the error. Open a support ticket and include these details in your description, and we will investigate it for you. You should also check for any incomplete order that was created before the error occurred. If this is blank it can be safely removed to keep your reporting tidy.

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. The plugin has been designed to be highly customizable, so if you require additional guidance to tailor the plugin to your workflow, please get in touch by opening a support ticket.

Set default quantity to split

↑ Back to top

When starting a split the default quantity to split is zero “0” 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 );

Clone order date

↑ Back to top

Prior to version 1.5 of Split Orders, the original order date was copied to the split order. This sometimes caused confusion, because the split orders would not appear at the top of the list of orders. Since 1.5, split orders are instead assigned a new date at the point they are created. If you would like to restore the previous behaviour, the following code snippet will do that.

add_filter( 'vibe_split_orders_clone_date_created', '__return_true' );