Skip to content
Hard Working Nerd
  • Start Here
  • WooCommerce Book
  • WooCommerce Code Snippet Database
  • Free WooCommerce Course
  • About Us

Month: October 2020

WooCommerce: How to Add a Custom Field to a Product

March 20, 2021October 27, 2020 by Ian

The Problem Adding a custom field to a product in WooCoomerce is a very popular request, and whilst it might seem a little daunting to add a field and then get the data entered into the field to display throughout the cart, order, and back-end order process we can actually accomplish the task using only … Read more

Categories Snippets, WooCommerce Leave a comment

Woocommerce: How to Programmatically Create a Coupon

October 23, 2020 by Ian

The Problem Although WooCommerce provides an admin interface to add coupons, sometimes we might want to create a coupon on the fly in code rather than adding one via the admin interface. In this article we’ll look at how to create WooCommerce coupon programmatically, this will include a reasonably in-depth look at the various options … Read more

Categories Code Snippets, Coupons, WooCommerce Leave a comment

WooCommerce: Generate Links To Categories and Tag Archives

October 24, 2020October 17, 2020 by Ian

Problem Online stores will typically need to link to the categories of products sold in the store, but they may not want to hard code the links into the sites HTML as changes to the URL structure could then break links within the site. One way around this problem is to use PHP code to … Read more

Categories Categories, Code Examples, Tags, WooCommerce Leave a comment

Detecting Category and Tag Pages in Woocommerce

February 17, 2021October 17, 2020 by Ian

The Problem When adding functionality to a WooCommerce store we sometimes want to add features that should only be present on category or tag pages. In this article, we’ll take a look at how we can detect category and tag pages in our WooCommerce code. The Solution This code will detect if the user is … Read more

Categories Code Examples, Code Snippets, Snippets, WooCommerce Leave a comment
© 2025 Hard Working Nerd