I want to hide order statuses in the WooCommerce order status dropdown under specific scenarios:
- If status is pending payment hide completed
- If status is processing hide pending payment
I still want to display all these order statuses in the order overview list.
All I can find is to unset an order status completely:
function so_39252649_remove_processing_status ($statuses) {
if (isset($statuses['wc-processing'])) {
unset($statuses['wc-processing']);
}
return $statuses;
}
add_filter('wc_order_statuses', 'so_39252649_remove_processing_status');
But this will of course also remove it from the order overview list, I just want to hide it in the dropdown on the order edit page, but I cant find a hook for this.
Is jQuery my only choice for this?