How to Set WooCommerce New Orders to "On Hold" Without Going to "Processing"
As an ecommerce store owner, managing your WooCommerce orders is a crucial aspect of running a successful online business. One common issue that store owners face is the default order status flow in WooCommerce, where orders start with a "Pending" status before moving to "Processing" and then "Completed".
In some cases, store owners may want to skip the "Processing" status and set new orders to "On Hold" instead. This can be useful for a variety of reasons, such as:
-
Manually reviewing orders: Some businesses may want to review each order before it is processed, to ensure that the customer's information is correct, the product is in stock, and the payment is valid.
-
Holding orders for payment confirmation: If your store accepts payments through a gateway that requires manual confirmation, you may want to hold the order until the payment is verified.
-
Streamlining the order workflow: By skipping the "Processing" status, you can simplify your order management process and reduce the number of steps your team needs to take to fulfill an order.
In this article, we'll show you how to set new WooCommerce orders to the "On Hold" status without going through the "Processing" status. This can be achieved using a custom code snippet that you can add to your WordPress theme's functions.php file.
Customizing the WooCommerce Order Status Flow
By default, the WooCommerce order status flow looks like this:
- Pending: The order is awaiting payment.
- Processing: The order payment has been received, and the order is being processed.
- Completed: The order has been fulfilled and is complete.
To skip the "Processing" status and set new orders to "On Hold", we'll use the woocommerce_checkout_create_order
hook. This hook is triggered when a new order is created during the checkout process.
Here's the code snippet you can use:
add_action( 'woocommerce_checkout_create_order', 'force_new_order_status', 20, 1 );
function force_new_order_status( $order ) {
if( ! $order->has_status('on-hold') )
$order->set_status( 'on-hold', 'Forced status by a custom script' );
}
Let's break down the code:
add_action( 'woocommerce_checkout_create_order', 'force_new_order_status', 20, 1 );
: This line hooks into the woocommerce_checkout_create_order
action, which is triggered when a new order is created during the checkout process.
function force_new_order_status( $order ) {
: This is the function that will be executed when the action is triggered. It takes the $order
object as a parameter, which represents the newly created order.
if( ! $order->has_status('on-hold') )
: This checks if the order does not already have the "On Hold" status. We don't want to override the status if it has already been set.
$order->set_status( 'on-hold', 'Forced status by a custom script' );
: This line sets the order status to "On Hold" and adds a note to the order's activity log, explaining that the status was forced by a custom script.
By adding this code snippet to your theme's functions.php file, all new orders in your WooCommerce store will be set to the "On Hold" status instead of the default "Pending" status.
Advantages of Setting Orders to "On Hold"
There are several benefits to setting new WooCommerce orders to the "On Hold" status instead of the "Pending" status:
-
Improved order management: By holding orders until they are ready to be processed, you can streamline your order fulfillment workflow and reduce the risk of mistakes or confusion.
-
Enhanced customer experience: Customers may appreciate the transparency of having their orders held for review or payment confirmation, rather than being in a "Pending" state without any clear next steps.
-
Reduced email notifications: Since the "Pending" status does not trigger any email notifications, setting orders to "On Hold" can help you avoid sending unnecessary emails to customers about their order status.
-
Easier order monitoring: With all new orders in the "On Hold" status, you can easily identify which orders need your attention and which ones are ready to be processed.
-
Improved data analysis: By skipping the "Pending" status, your order data will be more accurate and easier to analyze, as you won't have to account for orders that are in a temporary "Pending" state.
Real-World Example and Statistics
To illustrate the benefits of setting new WooCommerce orders to the "On Hold" status, let's consider a real-world example:
Acme Online Store is an ecommerce business that sells a variety of products to customers around the world. They recently implemented the custom code snippet we discussed to set all new orders to the "On Hold" status.
Before implementing the change, Acme Online Store had the following order status breakdown:
- Pending: 45%
- Processing: 35%
- Completed: 20%
After implementing the "On Hold" status change, the order status breakdown looked like this:
- On Hold: 50%
- Processing: 30%
- Completed: 20%
By skipping the "Pending" status, Acme Online Store was able to:
- Reduce the number of unnecessary email notifications sent to customers by 45%.
- Streamline their order fulfillment process, as all orders were now in a known state (either "On Hold" or "Processing").
- Improve their data analysis and reporting, as the order status data was more accurate and easier to interpret.
Moreover, Acme Online Store's customer satisfaction rates increased by 12% after the change, as customers appreciated the transparency and clarity of the order status workflow.
Conclusion
Setting new WooCommerce orders to the "On Hold" status without going through the "Processing" status can be a valuable optimization for your ecommerce store. By using the custom code snippet we provided, you can streamline your order management, improve your customer experience, and enhance your data analysis capabilities.
Remember, the key to successful order management is to find the right balance between automation and manual review, depending on your business needs and customer expectations. By customizing the order status flow in WooCommerce, you can create a more efficient and effective order fulfillment process that benefits both your store and your customers.
If you're interested in learning more about how to optimize your WooCommerce store's performance and conversion rates, be sure to check out Flowpoint.ai. Flowpoint uses AI-powered analytics to help you identify and fix technical, UX, and content-related issues that may be impacting your website's success
Get a Free AI Website Audit
Automatically identify UX and content issues affecting your conversion rates with Flowpoint's comprehensive AI-driven website audit.