A client asked me to add a “Free Shipping” notice under each WooCommerce product on the Shop Page. This can increase your click-through rate and hence your sales conversion rate. Here are a couple of PHP and CSS snippets so that you can implement this helpful edit.

WooCommerce: Display a Custom Product Text Badge @ Shop Page

PHP snippet: show “Free Shipping” under each product @ WooCommerce Shop


/**
 * @snippet       Display "Free Shipping" under each product @ WooCommerce Shop
 * @how-to        Get CustomizeWoo.com FREE
 * @source        https://businessbloomer.com/?p=330
 * @author        Rodolfo Melogli
 * @compatible    Woo 3.5.1
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */

add_action( 'woocommerce_after_shop_loop_item', 'bbloomer_show_free_shipping_loop', 5 );

function bbloomer_show_free_shipping_loop() {
	echo '<p class="shop-badge">Free Shipping</p>';
}

“I don’t code – is there a reliable plugin for that?”

As many readers would love to code but don’t feel 100% confident with it, I decided to look for a reliable plugin that achieves the same (or even better) result.

In this case, I recommend the YITH WooCommerce Badge Management plugin. On top of displaying custom text badges (free version), you can also create CSS, image and advanced badges, assign product badges to specific products and/or categories, pick the badge position and much more.

But in case you wish to code, keep reading 🙂

Share:

Leave a Reply