Solving common issues after updating to WooCommerce 2.1

IMPORTANT: WooCommerce 2.1.3 is now available and fixes a large part of these common issues already. Please make sure you test with this new version before reporting any issues.

This post will be updated as we find new issues. There are not many issues with WooCommerce 2.1 that are caused by the core package, most of the issues are caused by out of date template files bundled with themes. Index of the common issues described in this post:

Finally, there are some helpful resources at the bottom of this document, that will guide you through some of the more complicated parts of getting all these issues resolved.

Comments on this post are disabled on purpose, as this is not the right channel to discuss these issues. This is not a support channel. You can post this kind of questions in our public support forum, or in case you are a WooThemes customer via our support portal.

Variable products won’t add to cart

Because some themes still bundle old files for the add to cart template being used for variable products, adding a variable product to cart fails. This should be solved by the theme developers by updating the template file.

A quick solution is to delete this file from your theme directory:

/woocommerce/single-product/add-to-cart/variable.php

This will make WooCommerce use the new bundled template file and your variable products will add to cart again. Once your theme developer updates your theme, please check if it actually works as that will overwrite this change again.

Ticket reference: #4704

WooCommerce 2.1 update ignores language preference

This issue is now resolved in the WooCommerce 2.1.1 fix release.

We’ve made an error when adding the language files. The country codes didn’t reflect the WordPress standards. We have now fixed this and the 2.1.1 patch release will contain the correct language code.

You can apply a temporary hotfix by renaming the language files for your language, inside the WooCommerce core plugin. It should reflect the correct code as shown in the standards. If you are on the Spanish language for example, you need to rename the ‘woocommerce-admin-es.mo’ and ‘woocommerce-es.mo’ files to include the ‘ES_es’ country code. The correct file names are ‘woocommerce-admin-es_ES.mo’ and ‘woocommerce-es_ES.mo’. These files can be found in the ‘i18n/languages’ folder of the WooCommerce plugin.

Ticket reference: #4708

WooCommerce 2.1 no longer has a setting to disable the CSS

There used to be a setting to disable the CSS bundled with WooCommerce in versions prior to version 2.1. This has been removed now and is completely replaced by the filters, constants and dequeue methods of disabling the CSS files.

Please read our documentation on how to disable the default stylesheet for more information.

Lots of pages 404 error after WooCommerce 2.1 update

This issue is now resolved in the WooCommerce 2.1.1 fix release.

Because we have changed a couple static pages to endpoints in the WooCommerce 2.1 release, the permalinks need to be flushed. This wasn’t done properly in the WooCommerce 2.1 update, therefore you should do this manually in case you have a lot of 404 errors after updating. The upcoming 2.1.1 patch release will fix this issue and no longer requires a manual flush.

Pages included in possible 404 errors are: main shop page, category or tag archives and all of the new endpoints. This also affects conditional functions like is_shop() and that causes plugins relying on that function to no longer function properly.

You can flush the permalinks manually by saving the Settings > Permalinks page, to be found in your WordPress administration panel. After doing this, your pages will work as expected.

Solving get_available_shipping_methods() method errors

The error looks something like this (the full path and line number may be different):

Fatal error: Call to undefined method WC_Shipping::get_available_shipping_methods() in .../wp-content/themes/THEME-NAME/woocommerce/checkout/review-order.php on line 14

This issue is caused by your theme, they are bundling outdated template files in their themes that have been deprecated for a while now. You should contact the theme developer to get this fixed properly. You can delete that specific file from your theme until this issue has been patched by your theme developer for a temporary fix. WooCommerce will fall back on the default template file, bundled with the plugin.

Restoring missing widgets after WooCommerce 2.1 update

Part of the 2.1 refactor saw some of the widget id’s renamed for consistency reasons. For example ‘shopping_cart’, which has potential for conflict, was renamed to ‘woocommerce_widget_cart’. As a result you will need to re-add widgets to your sidebars after upgrading. This isn’t an error.

As well as this, the following widgets were all merged into one new widget called ‘products’ which does everything:

  • Best Sellers
  • Featured
  • Onsale
  • Random
  • Recent

Use the new ‘WooCommerce Products’ widget instead.

Permissions error or WooCommerce pages not loading

This issue is now resolved in the WooCommerce 2.1.2 fix release.

Some people had seemingly random issues with the administration panels and menus of the WooCommerce plugin not loading, or being prompted for not having permission to access the page.

This bug has been fixed in the development version (see pending pull request containing the fix) and will be released in the next fix release (v2.1.2). In some cases, our detection of AJAX requests didn’t work properly because of hosting companies setting wrong headers (in our opinion). The next fix release will rely solely on the DOING_AJAX constant set by WordPress.

Option for hiding weight and dimensions from product details is missing

This option has been removed in favour of a new filter. We are trying to live up to the ‘decisions over options’ standard as in the WordPress philosophy.

The weight and dimensions can now be hidden by using the wc_product_enable_dimensions_display filter, as demonstrated in this example code.

Revert variation price ranges back to the WooCommerce 2.0 format

The variation price labels in WooCommerce 2.1 are shown as a “from $1 to $10” format, while the 2.0 version only showed the lowest price.

You can revert to this traditional format, by using the code in this gist in your (child) themes functions.php.

Category counts are incorrect on frontend

In case the product counts for categories are showing a too high or too low number, after updating to WooCommerce 2.1 there is an easy workaround.

Go to the ‘Tools’ tab inside the WooCommerce > System Status of your WordPress administration panel. Here you first use the ‘Recount terms’ button and after that use the ‘Clear transients’ button. This will force the system to recount all the products the next time a category is loaded.

Helpful resources

These resources can be helpful while debugging your issues after the update:


Keep yourself in the loop!

Sign up for the WooCommerce developer newsletter:
Hidden
Hidden
Hidden