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

A Guide to the WooCommerce wc_get_template Function

What Does the WooCommerce wc_get_template Function Do? The wc_get_template function can be used to display the contents of template files. The function allows you to pass values into the templates which can then be displayed as part of the template. The function also allows templates to be over ridden either in themes or plugins. A … Read more

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 the URL above into a browser (changing the host from the I’m using on a Local by Flywheel test site to your site) then you … Read more