I am trying to add Custom Order Action in WooCommerce Orders Page.
I want to add two new options in Bulk Order Actions Dropdown in WooCommerce
- Mark Refunded
- Mark On- Hold
Any help in this regard is highly appreciated.
I am trying to add Custom Order Action in WooCommerce Orders Page.
I want to add two new options in Bulk Order Actions Dropdown in WooCommerce
Any help in this regard is highly appreciated.
You must be logged in to post a comment.
There are two parts to solve with this objective.
The first part is to get a custom Order Action in the metabox of the individual Orders Page. I was trying to accomplish the same thing, but didn’t find anything definitive on it, so I created a tutorial here:
http://neversettle.it/add-custom-order-action-woocommerce/
The second part is to add a custom order action in the Bulk Actions drop-down of the main Orders page. Skyverge has an excellent tutorial on that here:
http://www.skyverge.com/blog/add-custom-bulk-action/
The only specific thing you will need to take note of is to use the correct
post_type
. For WooCommerce orders you will need to use this in place of the first example on that tutorial:Notice the
shop_order
replaces the post for the condition checking whichpost_type
to add the bulk actions to.But fundamentally, @brasofilo is correct – for the most part WooCommerce uses standard WordPress structures,
post_type
mechanisms, and taxonomies. The process is the same for adding a bulk action to the Orders page as it is to the Posts page.However, you are correct about the custom Order Actions on the individual Orders page – that is WooCommerce only and you’ll need to reference the first tutorial on how to solve that part.