Documentation

Learn how to set up, customize, and expand the functionality of WooCommerce

General Snippets


Documents

  • Display product weight on archive pages

    To display WooCommerce product weight on archive pages, below the title of the product, add this code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Please don’t add custom code directly to your parent theme’s functions.php file as this will be wiped […]

  • Don’t allow PO BOX shipping

    You need to add this code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Please don’t add custom code directly to your parent theme’s functions.php file as this will be wiped entirely when you update the theme.

  • Hide other shipping methods when “Free Shipping” is available

    Overview By default, WooCommerce will show all shipping methods that match the customer and the cart contents. This means Free Shipping will also show along with Flat Rate and other Shipping Methods. The functionality to hide all other methods and only show Free Shipping requires either custom PHP code or a plugin/extension. If you’d like […]

  • Hide trailing zeros on prices

    The option to show trailing zeros on your prices has been removed in favor of a filter, as of WooCommerce 2.2x. If you want to hide trailing zeros on your prices, add the following code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Avoid […]

  • Minimum Order Amount

    Add code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Avoid adding custom code directly to your parent theme’s functions.php file as this will be wiped entirely when you update the theme. Alternatively, check out the Minimum Order Amount for […]

  • Notify Admin When New Account Is Created

    Add this code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Avoid adding custom code directly to your parent theme’s functions.php file, as this will be wiped entirely when you update the theme. This file contains hidden or bidirectional Unicode […]

  • Send coupons used in an order by email

    This snippet sends by email the list of coupons used in an order. You can customize the “$to” variable and define your own email address, and the “$message” to have your own text. Add this code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as […]

  • States/counties (not in core)

    To add or modify your own states, please use the snippet at: Add/Modify States. United Kingdom WooCommerce UK Counties Plugin by Lee Willis on GitHub

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.