Mehdi
Mehdi

Reputation: 1747

How to add a custom Button in WooCommerce admin orders list with HPOS?

In WooCommerce admin orders page when using High Performance Order Storage (HPOS), I am trying to add a custom button on top of the page as shown in the screenshot below:

enter image description here

I have tried code from this answer thread which works perfectly with WooCommerce legacy orders using WordPress post storage as shown in the screenshot below:

enter image description here

But doesn't work at all when HPOS is enabled.

As far as I have read on this thread, it seems that 'manage_posts_extra_tablenav' action hook is not working anymore with WooCommerce HPOS.

I have looked around but could not find any hook to add this button.Is there any new alternative to that hook?

Upvotes: 0

Views: 103

Answers (1)

Martin G
Martin G

Reputation: 11

I was trying to do the same as you. I found this tutorial How to Delete All WooCommerce Orders

It basically says that the hook 'manage_posts_extra_tablenav' is 'woocommerce_order_list_table_extra_tablenav' for HPOS orders.

If you can figure out how to show the added custom button on mobile (it hides) let me know!

Upvotes: 1

Related Questions