WooCommerce 4.0 was recently released, and brings with it some huge improvements to the way store owners can keep track of their sales and manage their stores. We’ll give you the lowdown on these changes, and how they will improve the experience for you and your clients.
The WooCommerce 4.0 Back Story
In April 2019, the WooCommerce team released WooCommerce Admin. The plugin was originally developed as a feature plugin which allows users to test new functionality as it’s in development. The WooCommerce Admin feature plugin has over 1+ million active installs, so it provided engineers the opportunity to troubleshoot and test features, accept feedback, and iterate in order to create a solid release. After lots of testing with real stores WooCommerce admin has been merged into WooCommerce itself.
Why We Need These Changes
The old reporting interface in WooCommerce was very basic. This made it hard for store owners to understand where their customers were coming from, what products they were buying, and what they could do to get more sales.
On some large sites users experienced less-than-stellar performance processing orders and other analytics data. The new WooCommerce Admin experience is built on code in WordPress 5.3 to improve reporting within WooCommerce, and make it more efficient.
The New WooCommerce Analytics
The new WooCommerce Analytics includes advanced filters so that you can filter by order status or by products in the analytics results.
Advanced filtering which lets you filter all sorts of data as well as compare a range to previous ranges. So it’s very easy to see how you did Spring of 2020 against Spring 2019 or whatever date you want to look into.
Products reports you can compare products and then compare their sales on the site. This feature used to only be available through a plugin, but now store owners have more data at their fingertips. By having the option to compare products and sales, owners can make actionable marketing decisions to increase revenue.
Action Scheduler Improvements
The action scheduler is a background task runner which WooCommerce uses to execute background processes and database updates. WooCommerce 4.0 includes a new action scheduler with custom database tables for storage instead of using posts and comments. This new storage method greatly improves the performance making it faster & more reliable.
Fun fact: the scheduler is also used by plugins like WooCommerce Subscriptions, so this will not only improve WooCommerce but a few extensions as well.
For the technical reader the Action Scheduler uses the following custom database tables:
- wp_actionscheduler_actions
- wp_actionscheduler_claims
- wp_actionscheduler_groups
- wp_actionscheduler_logs
Other updates and changes
As always, there are minor enhancements that go along with this release.
What to do Before Updating
Before updating, remember that this is a major release, and not everything in the release is backwards compatible. We recommend taking the following actions when upgrading to WooCommerce 4.0.
- Take a look at all currently active plugins that interact with WooCommerce. Make sure that all plugins have been tested with WooCommerce 4.0 and marked as compatible. The plugins that might have issues will be shown in the plugin list page on the site.
- Create a staging environment, upgrade WooCommerce 4.0 and all plugins, and test purchase flows and backend management tools. It’s always a good idea to thoroughly test major updates.
- If you already have the WooCommerce Admin feature plugin: uninstall it via WP-CLI or through your admin.
- The following WP-CLI command can be used to deactivate and delete the plugin.
wp plugin uninstall woocommerce-admin –deactivate - You can also deactivate and delete the WooCommerce Admin plugin from wp-admin.
- The following WP-CLI command can be used to deactivate and delete the plugin.
What to do After Updating
Once you upgrade to WooCommerce 4.0 you’ll be prompted to update the database.
You can do this in one of two ways:
- Via the admin of your site
- Via the WP-CLI
1) WooCommerce Admin
From the admin of your site you’ll see a prompt to update (above). You can start the process by clicking “Update WooCommerce Database”.
If you have a large number of customers and orders, the historical data import for the WooCommerce Admin might take some time.
You do not have to keep the setting page visible as the process will keep running in the background.
Note: To speed things up, select a shorter time frame to import (between 30 – 90 days).
2) WP-CLI
If you have a larger site in terms of the database then the other option you can consider is using WP-CLI to update the site. Here’s the WP-CLI command:
wp wc update
Using the WP-CLI command to update the WooCommerce database will be a much faster way to update the database to the current version.
Either way – once you’re done you can browse your data in the new admin reports. 📊
New WooCommerce Database tables
For the technically minded you’ll notice that WooCommerce 4.0 adds a few new tables to support the new admin functionality:
- wp_wc_admin_notes
- wp_wc_admin_note_actions
- wp_wc_category_lookup
- wp_wc_customer_lookup
- wp_wc_order_coupon_lookup
- wp_wc_order_product_lookup
- wp_wc_order_stats
- wp_wc_order_tax_lookup
Disabling WooCommerce Admin
For many store owners this WooCommerce admin will be incredibly helpful. However, if you already use an external solution for reporting such as Glew.io then you may want to disable the WooCommerce Admin which will speed up your admin load times.
The WooCommerce admin can be disabled using a code snippet on your site:
add_filter( 'woocommerce_admin_disabled', '__return_true' );
If that code snippet is active in a site specific plugin or in a code snippet plugin before WooCommerce is updated to version 4.0 then the WooCommerce Admin related database tables will not be created.
We’re here to help
Have questions about the update? Need help creating a staging environment? Just want to talk about WooCommerce? We’re here to help, 24/7. We have WooCommerce experts on staff ready to advise on new releases, backwards compatibility, and more. That’s the unique value and peace of mind you get by hosting your WooCommerce store with us. Give us a shout!