I have been working on a WooCommerce site and recently updated the plugin to the latest version. At the time of this writing that was release v2.0.10. None of my products have a price since the client is not ready to sell just yet. Prior to this update, there were no “Sale!” icons appearing in my cart. After the update, they appear:
You can see there is a WooCommerce “Sale” icon/badge on every product category. This doesn’t look very good and the client was like WTH man! Here’s what I did to remove them.
Method 1: Filter the “Sale” Icon Out Completely
The following is a simple filter I created to
return false; when WooCommerce calls for the Sale badge:
//Remove Sales Flash
Place this bad boy in your custom functions plugin or theme’s function.php file and you should see the Sale icon disappear.
Now, that’s better! I’m sure the filter above could be modified to conditionally remove the Sale icon.
Method 2: Unhook the Before Single Product Action
This method works in removing the WooCommerce sales flash. I suggest using this only if the method above isn’t working for some reason. I say this because removing the action completely may break another plugin’s functionality if it ties into this action. Thanks to BrakeConnect in the comments for the following code.
If this has helped you or your situation is slightly different please tell is in the comments below!