WooCommerce: How to get the Product Name

The Problem In WooCommerce, product details are stored in product objects that hold product data. If you want to get the name of a WooCommerce product then you will first need to create a product object then call the get_name() function on that object to retrieve the product name. You will typically be in one … Read more

WooCommerce: Alter Payment Gateway Instructions on the Thankyou page

The WooCommerce thank you page displays default instructions  for a payment type, here’s an image showing the text that is displayed when an order has been paid using the “Cash on delivery” payment method. If you’re looking to change or remove this text it can be done without changing any code, if you want to … Read more

A Guide to the woocommerce_thankyou Action

Have you ever wanted to add a custom message or some bespoke functionality to the “thank you” WooCommerce page that appears after a customer has paid for and checked out their order? If you have then the woocommerce_thankyou action is probably exactly what you are looking for. In this blog post we’ll take a look … Read more

WooCommerce: Work Out the First Action a Global Variable Can Be Accessed From

WooCommerce uses a number of global variables, if you’ve spent any time looking at code snippets then you’ll often see code like this global $product; Which is used to get a reference to the current product that is being displayed, typically on the shop screen or the single product page. Recently whilst looking through the … Read more