How To Hide the WooCommerce Refund Button 

One of our customers is using WooCommerce and had a question about configuring the Shop Manager role. They wanted to modify this role so that users in the Shop Manager role had limited ability to modify the orders.

First, we suggested this tutorial to make that happen: “Allow users to view and not edit WooCommerce orders“.

However, for this particular role, the customer did need some specific functionality that is in available with the “edit” capability such as using the “Print” and “PDF” options. So the customer decided to remove only the ability to refund WooCommerce orders.

That is possible thanks to PublishPress Capabilities.


Hiding the WooCommerce Refund Button

If you have PublishPress Capabilities Pro installed, you will have the Admin Features feature. This will allow you to hide features in the WordPress admin area and toolbar. You can decide what users see in your WordPress dashboard.

You can also hide any element by finding the class or ID. That is what we are going to do in this article. 

  • Navigate to “Capabilities” and then “Admin Features”.
  • On the very bottom of this screen, you will find the “Hide CSS Element” area.
  • To hide the refund button on Woocommerce, add this “button.button.refund-items
WooCommerce Refund Button removal
  • Click “Add” then “Save”.

This is the comparison before we hide the refund button.

WooCommerce Refund Button display

And this is when we already hide the button using Admin Features from PublishPress Capabilities.

WooCommerce Refund Button hidden

Author

  • Riza Maulana Ardiyanto

    Riza Maulana Ardiyanto, based in Kudus, Indonesia, is a dedicated support specialist at PublishPress. Outside of work, he’s an enthusiastic mobile gamer, always eager to explore new gaming experiences and challenges.

Leave a Reply

Your email address will not be published. Required fields are marked *