WooCommerce Office Hours 2014-02-14

In today’s WooCommerce Office Hours I few solo and talked about the new version of WooCommerce that dropped this week. WooCommerce 2.1.0 was made available on Monday and by the end of the week we had a 2.1.2 version with some bug fixes.

Advice on upgrading to WooCommerce 2.1

My main advice for people upgrading was to first do it on a local or development area.  That way if there are any conflicts the issues can be ironed out in a controlled manner instead of frantically trying to get the site back online.  Many managed WordPress hosts like WPEngine and Pressable have the ability to provide a staging area of a site at the click of a button.

If you’re managing your own site you can use a tool like WP Migrate DB Pro to move your database locally and test things out.

What happened to the Thank You page?

A question came in on chat asking “Where can we put pixel tracking code now that the Thank You page is gone?”  WooCommerce has moved to using endpoints for certain pages (Thank You, Pay page, Review Order, and a few My Account pages), but it still uses templates for rendering the pages.  The Thank You page template is located in the  /woocommerce/templates/checkout/thankyou.php file.



This template file can be copied to the theme’s directory and modified.  More information about overriding WooCommerce templates can be found in this documentation page.

One Page Checkout

Next was a question about creating a custom one page checkout and the role that the “Pay” page served in the checkout process.  The WooCommerce checkout process is for the customer to add a product to the cart, then progress through the following pages Cart → Checkout → Pay* → Thank You (*The Pay page is used depending on the payment gateway).

WooCommerce Pay Page
WooCommerce Pay Page is used by Authorize.net DPM

The person asking the question wanted to know if these pages could be combined into one page.  WooCommerce already has what is considered a One Page Checkout when a standard payment gateway is used.  When the Pay page is used this adds a step.  I advised that it would be a hefty customization job to combine all of these forms/options into one page and eliminate the Cart page in the process.

Post meta for Variable Products

I also showed an answer to a question I got on IRC asking about the price post meta for variable products.  A Simple Product will have “_regular_price” and “_price” post meta stored in the database for it.  But a Variable Product’s price is dependent on the variation chosen by the customer.  A Variable Product will have no _regular_price, but we were surprised to see it did have a “_price” meta that was the value of the lowest priced variation.