• Sale percentage
    WooCommerce,  Snippets

    Display discount percentages on sale products on the shop page and single product page.

    Discounts are a great way to increase sales and acquire more customers in your WooCommerce store. Offering discounts in your WooCommerce store on special day campaigns or regular sales, will increase your conversion and boost revenue.WooCommerce has a default setting to show a “Sale” badge if the item is on sale. Now, what about showing the exact discount percentage, instead of just showing the sale badge? Let’s do it without using a plugin. You can add the following snippets to your child theme’s functions.php file. It will display the percentage with the text ‘discount’ on your shop page and also on the single product page. And a bit of CSS to your…

  • WooCommerce,  Snippets,  Tutorial

    How to Disable Out of Stock Variations in WooCommerce Variable Products?

    Customers prefer options while choosing a product. WooCommerce variable products can offer such options. A variable product is a type of product in WooCommerce which allows selecting options, like different colors, sizes, and SKU.  Now, if you are selling variable products, and some of your product is out of stock, you have the option to hide the out-of-stock products. WooCommerce already has a setting to completely remove products/variations products when out of stock. This means they’re no longer visible on shop pages or on product pages for the variations.  Remove Out of Stock Products Go to the WooCommerce > Settings > Products > Inventory settings section. There you’ll find the ‘Out of stock visibility’ checkbox; check the box if you’d want…