Skip to content

Instantly share code, notes, and snippets.

@zorem
Last active October 9, 2020 13:02
Show Gist options
  • Save zorem/d6f3f5e914eea722107bc7e0566ea6ed to your computer and use it in GitHub Desktop.
Save zorem/d6f3f5e914eea722107bc7e0566ea6ed to your computer and use it in GitHub Desktop.
The function is going to add this new custom order status to Orders reports.
<?php
add_filter('woocommerce_reports_order_statuses', 'include_custom_order_status_to_reports', 20, 1);
function include_custom_order_status_to_reports($statuses)
{
// Replace 'my-custom-status' with your custom order status slug
if ($statuses)
$statuses[] = 'my-custom-status';
return $statuses;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment