Change a Custom WooCommerce Order Status to “Paid”: Potential Impacts and Considerations

In a recent Business Bloomer Club discussion, a WooCommerce user sought advice on marking a custom order status, “pre-ordered,” as a paid status. Their primary concern was whether this adjustment could inadvertently affect WooCommerce reporting, analytics, or related plugins.

For WooCommerce store owners managing pre-ordered items, marking the “pre-ordered” status as paid enables further automation, especially in tools like FunnelKit, which triggers workflows based on paid orders. This allows for smoother handling of pre-ordered products by integrating them into existing paid status workflows.

Below is a guide to understanding the potential effects of adding a custom status to the array of wc_get_is_paid_statuses().

Implementing the Change: Adding “Pre-Ordered” to Paid Statuses

To add “pre-ordered” as a paid status, include it in the wc_get_is_paid_statuses() array. By defining it this way, WooCommerce and plugins that depend on paid order statuses can recognize “pre-ordered” as a transaction that has been completed financially, which is essential for automated workflows and accurate sales reporting.

Code Example

To define “pre-ordered” as a paid status, use the following code:

add_filter( 'wc_get_is_paid_statuses', function( $paid_statuses ) {
   $paid_statuses[] = 'pre-ordered';
   return $paid_statuses;
});

Key Considerations and Potential Side Effects

1. WooCommerce Analytics

  • WooCommerce Analytics allows you to customize which order statuses are included in your reports via the Analytics Settings page (e.g., /wp-admin/admin.php?page=wc-admin&path=%2Fanalytics%2Fsettings).
  • This addition is unlikely to impact analytics negatively, as the “pre-ordered” status can be managed using checkboxes in settings to ensure accuracy in data collection and reporting.

2. Third-Party Integrations

  • If you’re using external reporting tools like Metorik, these tools typically offer settings to specify which statuses to consider as paid. Ensure that your updated paid statuses are selected within those tools to avoid discrepancies in reporting.

3. Automated Workflows (FunnelKit and Others)

  • As desired, adding “pre-ordered” to paid statuses allows FunnelKit and other automation tools to initiate workflows based on completed (paid) orders. This can streamline processes related to order fulfillment, customer notifications, and more.

4. Impacts on Built-In WooCommerce Functions

  • The function wc_customer_bought_product uses wc_get_is_paid_statuses to check if a user has bought a product based on paid orders. This may affect logic in other functions that track customer purchase history, total spending, and last order information.
  • WooCommerce email notifications also rely on this status; marking “pre-ordered” as paid might trigger transactional emails typically sent for fully paid orders.

5. Potential Custom Code Dependencies

  • If you have existing custom code that references specific statuses (e.g., “processing” or “completed” only), it may need adjustment to incorporate the new “pre-ordered” status where applicable.

Conclusion

By defining the “pre-ordered” status as paid, WooCommerce and related plugins treat pre-ordered items as financially completed transactions, enabling smoother integration into sales analytics, automated workflows, and customer management functions. While WooCommerce offers flexibility in managing paid statuses, it’s important to review reporting tools, analytics settings, and any custom code to ensure the change aligns with your store’s needs.

For more WooCommerce customizations and professional guidance, consider joining the Business Bloomer Club, where WooCommerce experts share insights and solutions.

Related content

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli

Reply

Your email address will not be published. Required fields are marked *