Skip to content

Blog

How to Add a Customizable Field to a WooCommerce Product

UPDATED 9/29/2019: Noticed some code typos and updated some of the display sections for compatibility with WooCommmerce 3.7. In this WooCommerce tutorial I will be showing you how to add a custom field to the front-end of a WooCommerce product. We’ll be adding a text input that a customer could use to enter some special…

Read More

Create WooCommerce Multicheck Form Field

I’ve expanded on the code I posted in my tutorial on how to customize the WooCommerce Checkout. First you need to register the new checkout fields. This is where I’ve added a current_user_can() to test if the current user has the appropriate capabilities to see these extra fields. I’m using the manage_options capability because it…

Read More

Change the sort order of WooCommerce Grouped Products

WooCommerce has a small army of filters and hooks that you could customize almost every aspect of the plugin. If you have a grouped product the default display method is by menu_order. But recently, someone wanted to display the grouped items by the date they were published. This is very easily accomplished by filtering the…

Read More

Hustling for Handball

When I am not coding WooCommerce-related things, my other career as an international athlete. From a purely logical standpoint it has been a terrible career choice because it tends to pay negatively and has put a lot of wear and tear on my body. There have been times when I’ve seriously considered buying a cane…

Read More

Modifying the WooCommerce Product Query

UPDATE 9/28/2019: Example 2 no longer works as WooCommerce now links the product in a grouped product via meta data instead of via post_parent. I recently answered a few questions on Stack Overflow and they all seemed to related to how to change what products show up in the shop loop… or any other of…

Read More