Reputation: 5281
I need to hide the status wc-completed
within the dropdown on the WooCommerce admin orders page. Using CSS is not a good option here but I've found no other way.
The only thing would be to use the wc_order_statuses
to unset this status, but in this case, refunds can't work anymore because wc-completed
is the default status for refunds.
So maybe there are some people who did this before and can help me out?
Upvotes: 0
Views: 1515
Reputation: 5281
I've checked the source code and found no hook or filter to perform this. So my solution is a jQuery function:
jQuery( "#order_status option[value='wc-completed']" ).remove();
You can replace wc-completed with every other status you want to remove from the dropdown. If you want to remove more then one option, you can do this here:
jQuery( "#order_status option[value='wc-completed'], #order_status option[value='wc-pending']" ).remove();
Upvotes: 1
Reputation: 740
I made it before but I tried again for you. In my case, unsetting wc-completed status is enough to remove this status and manually refunding is also working fine.
I tried to find any other solution for you (not CSS), but without working on source code (I mean editing original Woocommerce files) I could not do it.
I think you need wc-completed status for refunding because of your payment system. Maybe it will be better if you manipulate source code of it instead of Woocommerce.
Upvotes: 0