Woo Developer Blog
The commerce platform for developers
Recent posts
-
WooCommerce payment gateway plugin base
•
This code can be used as a base to create your own simple custom payment gateway for WooCommerce. If not used in a custom plugin, 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 […]
-
Change email subject lines
•
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. https://gist.github.com/woogists/e30b0dd9e449c2b16433b97b0afe140e
-
Allow shortcodes in product excerpts
•
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. https://gist.github.com/woogists/fe7a11074e89130cf794c47837c8fc8f
-
Custom tracking code for the thanks page
•
This snippet is for adding tracking for a separate piece of analytic software you may have installed. The order object contains all the order data you should need, including line items. 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 […]
-
Change number of upsells output
•
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. https://gist.github.com/woogists/f6f2ec75fce3b56cc80b446c50689c7d
-
Change number of related products output
•
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. Please note that it does not work for […]
-
Hide loop read more buttons for out of stock items
•
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. https://gist.github.com/woogists/42265d45b6aa2b7774dd0c6a9c3aa641
-
Show cart contents / total
•
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. To display the cart contents and total […]
-
Display My Account link in a template file
•
Displays a link to the user account section. If the user is not logged in the link will display ‘Login / Register’ and take the use to the login / signup page. If the user is logged in the link will display ‘My account’ and take them directly to their account. https://gist.github.com/woogists/f552b765d9d447dea43be9e9eb07490b
-
Exclude products from a particular category on the shop page
•
As ‘clothing’ is an example in the snippet below, be sure to use a product category slug that exists in your WooCommerce store. Note that this will only work when you have your “Shop Page Display” option set to ‘Show Products’ under your Customizers’ WooCommerce > Product catalog settings. You need to add this code […]