How to Create and Schedule Revisions for WooCommerce Products

So you want to make changes to your WooCommerce products? Using WooCommerce revisions is the best way to update your products and keep a record of those changes.

Before you do, be careful. By default, revisions are not enabled in WooCommerce. So if you make any mistakes, you won't be able to roll back to a previous version of your product. Fortunately, it is possible to set up WooCommerce revisions successfully with the help of the PublishPress Revisions Pro plugin.


Some background on WooCommerce Revisions #

People have been asking WooCommerce to support revisions for years. This post on the WooCommerce ideas forum was started in 2012 and is still being updated. This Github issue contains feedback from the WooCommerce team and their explanation is that the WordPress core doesn't have enough features.

As a result, if you make changes to a product, you will not see the “Revisions” area you normally see for WordPress posts and pages.

My guess is that the developers decided to hide the “Revisions” feature because it just wasn't very useful.

However, there are some workarounds available. I'll explain how you can almost entirely restore revisions to WooCommerce products.


Let's get the “Revisions” link back. Try adding the code below to your theme’s functions.php file:

add_filter( 'woocommerce_register_post_type_product', 'wpse_modify_product_post_type' );

function wpse_modify_product_post_type( $args ) {
     $args['supports'][] = 'revisions';

     return $args;
}

Once that code is in place, you will now see a “Revisions” area in the “Publish” box when you edit a product. Keep in mind that to see this area, you always need to save changes to an existing product.

Revisions visible in the sidebar of WordPress

If you don't see the Revisions link, check to see whether Revisions are working in other areas of your site. The most common problem is that some hosting companies automatically disable the Revisions feature for your whole site.


What WooCommerce information is stored in revisions? #

After enabling the revisions link, you might be disappointed because of the most data about your products will not be recorded. The default product revisions will only record changes to text boxes such as the Title and Description. The default revisions do not track changes to the Regular price, Sale price, SKU and other fields. This image show the default “Compare” area for WooCommerce revisions.

WooCommerce product changes compared side-by-side

Using PublishPress Revisions Pro #

The PublishPress Revisions Pro plugin has support for meta data, which is what WooCommerce uses to store extra data.

Install PublishPress Revisions Pro into your site. Afterward, if you click the “Browse” button you will still see the WordPress core with revisions with very little data. However, there will now be a “Revisions” link in the sidebar.

  • Edit a WooCommerce product.
  • Check the “Save as Pending Revision” box.
  • Click “Update”.
WooCommerce revisions with the PublishPress Revisions plugin
  • Click “View Revision Queue
  • You can also click “Revisions” in the WordPress admin menu.
Revisions can be accessed using the Revisions menu link in WordPress
  • Click the “Compare” link for a revision.
Using the Compare link for WooCommerce product revisions
  • You can now see almost all of data for your WooCommerce product. PublishPress Revisions Pro has recorded changes to the SKU, the Stock Status, and many other fields:
WooCommerce product revisions showing data side-by-side

PublishPress Revisions can even handle WooCommerce product images:

WooCommerce revisions showing image changes

Please note: PublishPress Revisions Pro is a new product and it's possible that one or two fields from WooCommerce or 3rd party plugin may not be recorded in revisions. If this happens, let us know and we'll fix it for you.