Snippets

Get some of the most helpful Woocommerce snippets that can transform your website into a selling powerhouse. From simple pieces of code to link between products, to changing the add to cart text, this collection of snippets is certain to be one that you will continue to come back to for more.

We have designed these Woocommerce code snippets to be used from the novice user to the more advanced. They are designed in such a way that you’ll understand just why and how they work. I offer an explanation as to possible uses, where to place them and also encourage feedback once they have been placed.

By the time you have completed using all of these pieces of code on your various Woocommerce websites you’ll be more than comfortable to not only place them, but also create them yourself. They are designed to be simple and effective, saving unnecessary plugin additions.

How to Regenerate Thumbnails Without a Plugin in WordPress – 2026

Regenerating thumbnails in WordPress is essential when you add new image sizes or change existing ones. While plugins can handle this task, you might prefer a code-based solution to keep your site lightweight. This guide will show you how to regenerate thumbnails in WordPress without using a plugin. Why Regenerate Thumbnails? When you upload an […]

How to Regenerate Thumbnails Without a Plugin in WordPress – 2026 Read More »

How to Replace Variable Price Range Display with Active Variation Price in WooCommerce – 2026

Displaying the active variation price instead of the variable price range in WooCommerce can enhance the shopping experience by providing clearer pricing information. In this guide, we’ll show you how to achieve this without using any plugins, ensuring a smoother and more user-friendly checkout process. Why Replace the Variable Price Range Display? Replacing the variable

How to Replace Variable Price Range Display with Active Variation Price in WooCommerce – 2026 Read More »

How to Add a Second Product Image to WooCommerce Shop Pages – 2026

Adding a second product image to your WooCommerce shop, search, category, and archive pages can greatly enhance the visual appeal of your store. This feature allows your customers to see another view of the product when they hover over the product image, providing a more interactive and engaging shopping experience. In this guide, we’ll show

How to Add a Second Product Image to WooCommerce Shop Pages – 2026 Read More »

How to Add an Icon to the Add to Cart Buttons in WooCommerce – 2026

Customising the “Add to Cart” button in WooCommerce can significantly enhance the user experience and make your store more visually appealing. One effective way to customise this button is by adding an icon. This guide will cover several methods to add an icon to the “Add to Cart” buttons in WooCommerce using PHP, CSS, HTML

How to Add an Icon to the Add to Cart Buttons in WooCommerce – 2026 Read More »

How to Programmatically Add Product to Cart in WooCommerce on Visit – 2026

Automating certain processes in your WooCommerce store can streamline the shopping experience for your customers and boost sales. One such process is adding a product to the cart automatically when a customer visits your site. This guide will show you how to add a product to the cart programmatically in WooCommerce upon a visit, without

How to Programmatically Add Product to Cart in WooCommerce on Visit – 2026 Read More »

How to Hide Add to Cart If Already Purchased in WooCommerce – 2026

Enhancing the customer experience on your WooCommerce store can lead to increased satisfaction and repeat purchases. One way to personalise the shopping experience is by hiding the “Add to Cart” button for products that customers have already purchased. This guide will show you how to implement this feature without using any plugins. Why Hide the

How to Hide Add to Cart If Already Purchased in WooCommerce – 2026 Read More »

How to Populate WooCommerce Checkout Fields From URL – 2026

Customising the WooCommerce checkout process can significantly enhance user experience and streamline the purchasing journey. One useful technique is to pre-fill checkout fields based on URL parameters. This approach can save customers time and reduce friction during the checkout process. In this guide, we’ll show you how to populate WooCommerce checkout fields from the URL

How to Populate WooCommerce Checkout Fields From URL – 2026 Read More »

How to Selectively Disable Plugins in WordPress – 2026

Managing a WordPress website often involves juggling multiple plugins to achieve the desired functionality. However, running too many plugins can slow down your site. In some cases, you might want to selectively disable certain plugins on specific pages or posts to improve performance. This guide will show you how to selectively disable plugins in WordPress

How to Selectively Disable Plugins in WordPress – 2026 Read More »

How to Display Sale Price End Date at Shop & Single Product Page in WooCommerce – 2026

Displaying the sale price end date on your WooCommerce store can create a sense of urgency, encouraging customers to make a purchase before the discount period ends. This guide will show you how to display the sale price end date on both the shop and single product pages without using a plugin. By implementing this

How to Display Sale Price End Date at Shop & Single Product Page in WooCommerce – 2026 Read More »

How to Count Clicks of the Add to Cart Button in WooCommerce – 2026

Tracking how often customers click the “Add to Cart” button in WooCommerce can provide valuable insights into product performance and customer behaviour. By counting these clicks, you can gauge interest in specific products, identify potential issues with the purchasing process, and improve your store’s overall conversion rate. This guide will show you how to count

How to Count Clicks of the Add to Cart Button in WooCommerce – 2026 Read More »

Scroll to Top
×