On April 4th, 2017 a major WooCommerce version was released. Version 3.0.0 or WooCommerce “Bionic Butterfly”, brought in some great features for developers, store managers, and even clients. While version 2.7 had existed for a while, it was decided to “jump” directly to WooCommerce 3.0.0 because of the major leap the software has taken when compared to the previous 2.6 version.
What’s new in WooCommerce 3.0.x
With its 3.0.x version, WooCommerce introduced great changes and new features both store managers and developers are going to love. Let’s see what they are!
Woo
New product gallery
The first thing you may notice is the new product gallery. It now has zoom-in functionality on mouse hover and you can also enlarge the image to be displayed in full-screen just by clicking on it. This has been a long-requested improvement that now also works great on mobile devices. However, your theme needs to support this feature eventually, so do not be surprised if it is not enabled in your case. If you’re seeing blurry or defective images, read about these common image errors and how to fix them.
Speed and performance
Noticeable improvements have been also deployed on the speed and performance of the software. Specifically, DB queries have been reduced, order emails have been delayed on purpose, some DB data has been removed, while other has been added. All these changes were done with performance improvements in mind and, I can tell you, they worked! You may not see any changes on the UI, but these are crucial improvements that work “under the hood”.
New logging system
There’s also a new logging system in WooCommerce 3.0, where you can find more detailed information related to actions performed within your eCommerce store. This is very useful since it gives handy insights that may help you, for example, to stop wondering about the status of an order, whether an email has been sent, and much more.
The new logging system can also help third-party plugin developers to log data in, hence provide more information when support is requested.
The latest major release of WooCommerce has also some juicy stuff that may tickle a developer’s interest. The most significant are listed below.
New CRUD classes
In WooCommerce 3.0 new CRUD (Create, Read, Update, Delete) objects and data-storage have been implemented for Products, Customers, Orders, Order Items, and Coupons. This way it’ll be harder for you to mess with products meta or do any custom DB queries.
In order to get the data, new methods are in place. For example, you should not get the id, or the price, directly by the product object variables; you’d need to get them by their get_id and get_price methods instead. In addition, new methods have been added to store the data, as set_sku, set_price etc. For more details, please check WooCommerce API Docs.
New CLI
A new WooCommerce CLI (command-line user interface) is now available. Powered by the REST API, the new CLI provides a lot more commands, better future compatibility (commands will always be current via the REST API), and less code to maintain.
Top common issues after you upgrade to WooCommerce 3.0
All the above changes are great news for WooCommerce users because there’s been a lot of progress in every major area. However, this new major release had some drawbacks for users who did the upgrade in the early hours.
1. Broken compatibility with legacy plugins and themes
WooCommerce sure is a great foundation for your eCommerce store, but as your business grows and changes, it might be the case that you wanted to add some additional features to your “original” install, maybe something to handle VAT in Europe, or a more robust payment gateway. Anything, really. Your problem now will be: are you sure that all these plugins and add-ons you installed in the past are working as they should with WooCommerce 3.0? How can you check that?
2. Broken compatibility with legacy themes
Same thing happens when it comes to themes not directly developed by WooThemes, no matter if free or commercial. You remember it perfectly: you bought your theme on a famous marketplace, it features all the main elements you’ve always wanted but now, with the major release of WooCommerce, will it be compatible or not?
All in all, most of the plugins and themes weren’t ready for WooCommerce 3.0 and they resulted into WSOD, broken functionalities, and so on.
3. Issues caused directly by WooCommerce 3.0
When it comes to upgrading to WooCommerce 3.0, not all of the issues are caused by plugins or themes you already have. Some issues were in fact caused by WooCommerce 3.0 itself, such as:
- Shortcodes are not executed in variation descriptions
- Variation attributes are missing from some orders
- Billing and shipping fields are not in the right place during checkout
- Emails are being sent more than once
- You get a redirect loop when trying to reach your site
The above issues (and much more) have been fixed via the next minor release WooCommerce 3.0.1 made available 2 days later. Here you can read the huge list of fixes.
Then again, on April 12th, Woocommerce 3.0.2 was released to address new issues and many other will follow to make the software better.
Broken compatibility, issues that might directly affect your business, and frequent updates are the main reasons we don’t urge you to upgrade the very first days a new plugin is out unless it’s matter of security.
In this specific case, I’d suggest to directly upgrade to Woocommerce 3.0.2 and here’s how to do it.
Looking for an experienced developer who could help you with your WooCommerce website? Hire Spyros Vlachopoulos and start working with him in no time!
How to upgrade your website directly to WooCommerce 3.0.2
We’ve covered the right steps involved in upgrading your WordPress website and you should now know that this is the right process to follow:
- Do a backup of everything, files, and database.
- Create a staging site. Some hosting providers allow you to easily create one with a one-click action
- Upgrade all plugins and theme first
- Upgrade WordPress core files
- Check the result
- Upgrade Woocommerce to version 3.0.2
- Check the result
If everything looks and works fine, then upgrade the live site (do not delete the previous backup). If something isn’t working properly, do not upgrade and focus on resolving that.
Fixing what’s broken after updating to WooCommerce 3.0.2
If what’s breaking your WooCommerce site is not clear, or you’re not able to point out the faulty plugin, theme or code, here are some elements that may help you.
The first thing to do is to create a new staging site or just overwrite the existing one from the live site. Now, try upgrading WordPress and see what happens. Then upgrade one plugin at a time and check the staging site. It is a time-consuming procedure but it provides a lot more information. If your site is broken there’s a high chance the last plugin you upgraded is the one causing the issue.
Once you find out the plugin or theme having the issue, you should then contact the plugin authors and report the issue to them. Check if they have made any announcement about the WooCommerce version 3.0 compatibility and wait for them to reply or to release a new version. When the issue is resolved, continue by upgrading the rest of the plugins one by one. Be aware that there may be more plugins that aren’t WooCommerce 3.0-compliant yet!
If all plugins are good, then try upgrading your theme last. Again, if things break, you will have to contact the theme author or wait for a new theme release. To be sure that it’s the theme “to blame”, try switching to a WooThemes theme, like Storefront. Now you can check and compare the results.
Minor issues you should be aware of when upgrading to WooCommerce 3.0.x
Some of the major issues are pretty hard to resolve if you are not an experienced web developer. There are however some cases that can be easily resolved, so read below to find out how.
Deprecated notifications
WooCommerce 3.0 deprecated a lot of coding practices, resulting in PHP notice messages popping up on your site more frequently than you think. Their role is to inform you that some code is already deprecated or that this is not the way some parts should have been coded. As informative as they could be, they still are a bit annoying to some. The easiest way to remove those notices is to turn WP debug off. You can do this by editing the wp-config.php as:
[code lang='php'] define( 'WP_DEBUG', false ); [/code]
This is not a fix, I know. Errors are still there, but at least aren’t displayed in your dashboards or front-end, and they are not vital for your eCommerce to run correctly.
Deprecated theme templates
One more place you should definitely check after upgrading is WP-admin -> WooCommerce -> System Status and scroll further down. Do you see any warnings about your WooCommerce template files being outdated? This is because some new template versions were introduced on WooCommerce 3.0.
WooCommerce comes with its own templates in order to create some pages, for example, the Cart page, the Checkout page, Product lists, etc. Most of the themes are overriding some of these templates in order to match their design. Most of the times this is not something to worry about, however, it’s best that those files should be updated or at least get a compatibility check.
To be sure about it, you should compare your original WooCommerce 3.0 template files and your current theme’s WooCommerce template files. Specifically, this comparison would provide you with insights, and changes related to:
- Code structure
- New or deprecated methods
- New or removed functionalities
- File splits
- Added hooks (filters and actions)
- (more)
The list could go on and on because there are some many possibilities here involved, all related to your current theme features.
If the theme templates need to be updated, then the only way to override them is via a child theme. Do not change the template files of your third-party theme directly. This would break future theme updates.
A little warning here: when performing such activities, be sure to have a recent backup handy and be aware of what you’re doing. If you lack some technical knowledge, or just don’t feel comfortable doing this, reach out to some WordPress experts who will help you out. This will save you from a lot of future frustration.
Broken permalinks
If you experience broken permalinks, then your best bet about fixing this is to go to wp-admin -> Settings -> Permalinks and click on the Save changes button. If this will not work, you may try changing the file to the WP default .htaccess.
Emails are not being sent
WooCommerce 3.0 is using cron to send some emails. Make sure that wp-cron is activated and running. Edit your wp-config.php file and check for:
[code lang='php'] define('DISABLE_WP_CRON', 'true'); [/code]
If it is there, comment out the line and save your wp-config.php or just setup a manual cron job. You may ask help about it to your web hosting provider.
Need help fixing your WooCommerce issues? Hire Spyros Vlachopoulos and let him take care of them all!
Final thoughts
WooCommerce version 3.0 is a great release. And if you run and manage an eCommerce store on it, you should be 100% upgrading to it. As you saw, there are several areas and elements you’ll need to take care of to perform the update smoothly, mostly without affecting your sales numbers.
You should already know this but it’s worth repeating: back everything up and be cautious. If you don’t feel comfortable doing this (or don’t have in-house resources), ask for help from a professional.
All in all, though, be prepared: some issues might occur. If I have one last tip to share with you, it’s this: don’t let them discourage and disappoint you, for this kind of problems there’s always a solution.