The WPFolks app is out on iPhone and Android. Free, no ads. Download on the App Store Get it on Google Play
Skip to main content
Login Join

WooCommerce

Add a Custom Checkout Field in WooCommerce

You can add your own field to the WooCommerce checkout page, such as Delivery Instructions, Company Name, or GST Number. Steps Open your theme’s functions.php file. Add the code below. Save the file. Open the WooCommerce Checkout page. Done — a new Delivery Instructions field will appear in the checkout form.


Add a Custom Discount Message on the WooCommerce Cart Page

You can automatically show a message on the Cart page when a customer reaches a specific order value. This is useful for promoting discounts, free gifts, or special offers. Steps Open your theme’s functions.php file. Add the code below. Save the file. Add products to your cart and test the message. Done — customers will […]


Change WooCommerce Product Button Text Based on Stock Status

You can customize the Add to Cart button text depending on whether a product is in stock. This is useful for making the shopping experience clearer for customers. Steps Open your theme’s functions.php file. Add the code below. Save the file. Open your Shop or Product page. Done — the button text will change based […]


Add a Custom Text After the WooCommerce Product Price

Want to display extra information like tax details, shipping info, EMI availability, or payment offers directly below the product price? You can easily do this using a WooCommerce action hook. Steps Open your theme’s functions.php file. Add the code below. Save the file. Open any WooCommerce product page. Done — your custom text will appear […]


Add a New Attribute Type to the WooCommerce Attribute Selector

Add a new attribute type to the WooCommerce attribute selector. This is the foundation for creating custom swatch types. Note: After adding this, you also need to handle the attribute selection form in the product editor using the woocommerce_product_option_terms​ hook.


Change WooCommerce “Out of Stock” Text

If you want to replace the default “Out of stock” message with a more customer-friendly message, you can do it using a WooCommerce filter. Steps Open your theme’s functions.php file. Add the code below. Save the file. Open an out-of-stock product. Done — the default stock message will be replaced with your custom text.


Disable WooCommerce Product Image Lightbox

WooCommerce includes a lightbox that opens product images in a larger view when customers click them. If you prefer a simple product gallery without the popup, you can disable it with a small snippet. Steps Open your theme’s functions.php file. Add the code below. Save the file. Clear your website cache and refresh the product […]


Remove WooCommerce Product Breadcrumbs

If you want a cleaner WooCommerce product page, you can remove the default breadcrumb navigation from your product pages with a simple action hook. Steps Open your theme’s functions.php file. Add the code below. Save the file. Refresh your WooCommerce product page. Done — the WooCommerce breadcrumbs will no longer appear on product pages.


Remove WooCommerce Product Reviews Tab

If you want to remove the Reviews tab from all WooCommerce product pages while keeping existing reviews intact, you can use the woocommerce_product_tabs filter. Steps Open your theme’s functions.php file. Add the code below. Save the file. Refresh any WooCommerce product page. Done — the Reviews tab will no longer appear.


Disable WooCommerce Product Reviews for Specific Products

If you want to disable reviews only for selected WooCommerce products instead of disabling them across your entire store, you can use a product ID condition. Steps Open your theme’s functions.php file. Replace 123 with the product ID where you want to disable reviews. Add the code below. Save the file. Done — reviews will […]


Proudly supported by