When everything is ready, just click “Save Rule” and you’re done

Unite professionals to advance email dataset knowledge globally.
Post Reply
zihadhasan012
Posts: 72
Joined: Thu Dec 26, 2024 5:27 am

When everything is ready, just click “Save Rule” and you’re done

Post by zihadhasan012 »

Feel free to visit the front-end of your store and see the new product badges in action.

If you're using the advanced badge type for sale items, you'll see that it displays both the percentage off and the actual money saved, helping customers quickly identify the best deals.

Example of YITH Badge Management's product badge
Related Post : Looking for more cool tools and strategies physician database to improve your WooCommerce store? Check out our list of the best WooCommerce plugins .

Method 2: Use Custom Code (Free and Simple)
If you don't need the advanced options of the first method, or if you're looking for a completely free option, we have a simple code method that won't cost you anything.

And if you’re not comfortable with code, don’t worry! We’ll be using the WPCode plugin to make this super easy and safe. It allows you to add custom code snippets to WordPress without having to be a developer or risk breaking your website.

We’ll be using the free version of WPCode for this tutorial because it works perfectly for our needs. That said, there is a premium version with cool features like AI code generation and testing mode.

For more information, check out our in-depth WPCode review .

First, you need to install the WordPress plugin in your admin area.

Then go to Code Snippets » + Add Snippet . Hover over the “Add Your Custom Code (New Snippet)” section and then click the “+ Add Custom Snippet” button.

Adding a new custom code snippet in WPCode
Then choose “PHP Snippet” when asked for the code type.

This tells WordPress what type of code is being used.

Choosing PHP snippet in WPCode
Now, you need to give the snippet a name that helps you remember what it does.

Since this code will remove the default WooCommerce sale badge and add new product badges and dynamic discount badges, you can call it something like “Custom WooCommerce Badges”.

Once done, paste the code snippet we provided below into the “Code Preview” box.

This code does something really cool. It automatically calculates discount percentages and displays them on the sales badge. It also adds a “New” badge to products added in the last 7 days.
Post Reply