The WooCommerce team has been hard at work prepping and testing the upcoming version 2.3 ready for the world. With three betas and now the first release candidate tagged in GitHub, we are getting close to a big update for WooCommerce, and this is one that you definitely do not want to just immediately upgrade to without properly testing your site.
For those of you who aren’t familiar: Developers will sometimes make updates to their plugin or theme that ends up breaking code outside of their own product. While ultimately, this is for the betterment of their product and in turn your website, it can cause inconvenience for both devs and non-devs alike who were still using that particular product. Breaking changes aren’t the end of the world, and they are surprisingly easy to avoid on your live site. In this post, I’ll tell you how.
While not many of the major updates to WooCommerce have breaking changes, there have been a few in the past (1.6 and 2.0 come to mind) that broke many sites. There are a few simple things you can do to make sure your site is ready to upgrade to the latest version of WooCommerce when it is released, and reduce your chance of things breaking.
SellwithWP recently wrote a blog post about some of the numbers behind WordPress and e-commerce within it. In this post, Beka digs into the stats of what plugins people are using to sell products on their WordPress sites and of the 505,409 (e-commerce) sites checked, 396,260 of them were running WooCommerce! At 78.4%, that means just over 3 out of every 4 WordPress e-commerce sites are likely running WooCommerce.
With such a large market share and such a large audience making breaking changes in a plugin is a hard decision to make. WordPress is known for its backward compatibility, and this sometimes makes us users a little less worried than we should be about updates. How often do you test the plugins you update on your site separately? My guess is rarely, if ever. When it comes to my personal sites, I am guilty of this as well. While testing updates before pushing them to your live site is important, it is even more important when you are working on a site that makes you money. On e-commerce websites, a broken website can mean losing some (if not all) of your sales for however long it is down. If you can afford to stop making sales, you can stop reading here, but if you use WooCommerce and want to keep making sales be sure to read on!
The WooCommerce team has been kind enough to write regularly on a development blog about the changes being made. When the first beta was released, they wrote a blog post outlining the major changes coming in 2.3 and what may require testing. Below, I’ve taken these points and expanded on what you can do to test this yourself (and if another developer will be testing this for you make sure you send them this post!):
Make sure WP_DEBUG is FALSE in production
WordPress has a “debug” option within its configuration that will hide or show non-site breaking notices for you. As a rule of thumb, this should always be turned off in production so as to not show errors to your live site’s visitors, and should always be on in your testing sites so you know when something isn’t quite right. By doing this consistently, you will not get random bits of text that may appear when extensions or themes use some code that is no longer being used in WooCommerce.
Major UI/UX Beautification
WooCommerce by default had some styles that were a pain to deal with at times. Because of this many “premium” theme developers when building themes that support WooCommerce would not follow the best of practices. One of the most common complaints I heard when someone had issues upgrading WooCommerce was, “It broke my theme.” I won’t get into how to properly style and theme WooCommerce here, but here is what you can do to help make sure WooCommerce 2.3 will not mess with your theme:
Check with your theme’s developer for updates. If they have not released an update recently or made any announcements regarding support or testing for WooCommerce 2.3, they likely did not even test themselves. If you purchased a “premium” theme, ask if they have tested and support WooCommerce 2.3 (assuming it isn’t specifically stated somewhere). If your theme has, in fact, received an update for WooCommerce 2.3, ask the developer if it will work on previous versions of WooCommerce. If it will break your current site because it now disregards past versions of WooCommerce, be sure not to update your theme before you also update to WooCommerce 2.3.
Using a staging version of your site update to WooCommerce 2.3 and browse the front-end of your site. Make sure that all your products and styles look like they should; add a few products to your cart; view your cart; try changing the quantity of a product update your cart (this is important as it will show notices that have had styling changes); proceed through the checkout process. Try during checking purposefully failing by not filling out any forms and trying to place the order; this also will show notices that may have been changed. It is a good idea to make sure when a user makes a mistake on the site, the site also does not break on them. This way they can correct their error without any additional frustrations.
These two simple steps will help catch most of the theme related issues that I have seen in the past with WooCommerce update.
WooCommerce email class has been refactored
Styling emails for email clients today is close to what it is like building websites for browsers in the nineties–building for all the specific clients you want to support. To help ease these issues the way WooCommerce sends and styles emails has been refactored. Unless you (or your theme) have customized your WooCommerce emails, you should be safe. To be sure, in a staging version of your site, go ahead and place a test order to check all your emails just to be sure they look like they should.
Coupons have been tweaked
Coupons have not changed in a major way, but they no longer can be added after tax (this is reportedly illegal and is being removed as an option). This update should not cause your site to break unless maybe you have heavily customized the coupons within WooCommerce. However if certain areas of your templates or certain functions are used, you may see deprecated notices on your site. If you follow my advice regarding WP_DEBUG above, then you should be safe.
Chosen is being replaced with Select2
However, if you use a theme or any extensions that also have advanced drop-downs and did things improperly you may have issues. It will be a rare that this breaks, but just be sure that all your advanced drop-downs work while testing your site, and if you find any broken ones the chances are the issue is going to be related to Chosen being replaced with Select2.
Have you noticed the trend?
At the end of the day, to make sure your site won’t break with WooCommerce 2.3, you simply need to test it. You do not need to be an experienced developer, or have any development skills at all to test. Many web hosts for WordPress now offer simple one click staging environments as well which make it insanely easy to test your site! If you find any issues, then contact the developer of what broke. If the styles are broken, contact your theme’s developer, and if the extensions are broken contact the extensions developer. If anything is broken in staging, don’t update production yet! Your site will still survive if you do not update right away, but you should make a point to get your testing done sooner rather than later.
One final note
Before making any changes to your site, make sure you have a backup. Backup your files and backup your database. Typically WooCommerce updates will run a database update routine when it updates, what this means is that the data from one version to another is sometimes structured differently. If you update to WooCommerce 2.3 and need to go back to 2.2, you must restore your database as well as the plugin files! By only replacing the plugin and not the database backup you may end up corrupting your data causing further damage.
We Can Help
If you are a WooCommerce user, Maintainn can help you transition and update to 2.3 or if you would like to start using WooCommerce, we can help with that, too! Add-on hours are available on all of our plans, however, for eCommerce sites, we normally recommend our Premium Plan. Get started today!
Feel free to contact us if you have any questions or would like more information about our services.