Last active
October 9, 2020 13:02
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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