Patrick's Programming Blog

WooCommerce 2.1 Outdated Templates

I got an email today from a local developer who was asking me some questions about the recent WooCommerce 2.1 update. When she updated she got an error related to her shipping methods. With a quick search she was able to discover our recently created WooCommerce 2.1 Issues page which mentions a fix for that error:

…You can delete that specific file from your theme until this issue has been patched by your theme developer for a temporary fix.

The problem is that in this case she's the developer. She created a custom theme for her client and she has to figure out exactly which template has changed and how to change it back. The question is how? What is a more permanent fix?

Checking the Version of Template Files

WooCommerce Template Version Number

The easiest way to check this is to open up the template file in woocommerce -> templates -> {template name} and compare the @version number to the @version number in your overridden file located in your theme: your-theme -> woocommerce -> {template name}. If the version numbers are different then you'll have to update that template.

Update Your Template Files

If you've found templates that are outdated you need to copy over the new templates to your theme and then make any changes you made to the previous template to this new template.

We're aware that doing this can be time consuming. That's why we try not to change our templates. However, sometimes, it's wise to break backwards compatibility.

Let's Do This Automatically!

WooCommerce Template Overrides in the System Status

Since this is a bit of a tedious process we thought it best to add this functionality into our System Status. As of WooCommerce 2.1.1 (which should come out tomorrow) you should have any outdated templates highlighted in the System Status.

Hopefully that explains a how you can update your theme to work with WooCommerce 2.1! Happy updating!

 

 

Exit mobile version