WooCommerce: How to get a Customer Details from an Order
I was asked a question the other day about retrieving a user’s details from an order programmatically, since WooCommerce 3.0 it is reasonably easy to extract a user’s details but…
WordPress/Woocommerce: How To Get The Original Url Before It’s Rewritten
WordPress has it’s own rewrite API which it uses to prettify URLs, to give a specific WooCommerce example the shop URL http://wooexp.local/shop/ can be rewritten as http://wooexp.local/index.php?post_type=product If you type…
WooCommerce: How to Add a Custom Field to a Product
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…
Woocommerce: How to Programmatically Create a Coupon
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…
WooCommerce: Generate Links To Categories and Tag Archives
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…
Detecting Category and Tag Pages in Woocommerce
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…
How to Rename a Tab on the Product Page in WooCommerce
On the WooCommerce single product page there are a number of tabs that are shown by default on each product page. They will typically look similar to the image below…
Using is_single() in WooCommerce
If you’ve ever done any coding in WordPress then you may have used the is_single() function, it’s super useful for finding out if you’re on a specific single post page…
How to add a Code Snippet to WooCommerce
If you’ve thought about modifying your WooComerce store then you’ve probably come across code snippets online, code snippets can be useful and provide the ability to add extra functionality to…
How to use add_filter and apply_filters in WooCommerce
Filters in WordPress allow you to alter content without directly altering core WordPress files, they also allow you to alter dynamically generated content before it is shown to users. As…