Here are the steps to add a 100% badge discount on a product using PHP and a plugin called “Code Snippets”
1. Install the Code Snippets plugin on your WordPress website. This plugin allows you to add custom code snippets to your site without modifying the theme’s functions.php file
2. Go to “Snippets” from the WordPress dashboard, and click on the “Add New” button.
3. Give your snippet a name and paste the attached code and customize using attached css.
4. Select the option “Run snippet everywhere” or “Run snippet on specific pages”
5. Click on the “Save Changes” and “Activate” button.
6. Go to your website and check the product that you want to apply the 100% off badge, you should see the badge now.