Today we’re excited to release WooCommerce 3.1 into the wild! 3.1 has been in development since April, and has had over 1600 commits from 84 contributors.

Read on to find out what’s new!

bionic-butterfly.png

3.1 is a minor update. All changes should be backwards compatible with 3.0.x sites, but we do still recommend ensure extensions and themes are compatible before upgrading, and testing on a staging site or making backups for peace of mind.

CSV Import/Export

Import/export

In the past, moving product data in and out of WooCommerce has required either premium importer plugins, or messing with WordPress XML files. We’ve tried to address this in 3.1 with our new CSV import/export solution which we hope will improve the experience for new users coming to our platform.

Our new importer supports CSV files and all built-in core props, as well as custom meta data if dealing with strings. Extensions can add columns and props of their own or to support more advanced data. Fields can be mapped by the user after uploading the CSV file.

Unlike our old Product CSV Import Suite extension, all product types, including variations, are dealt with in the same CSV file. The importer can also update existing products by ID and SKU (merge), or it can create new products instead.

Importer

The exporter let’s you choose which pieces of information you’d like to export (also includes meta data), and limit the export to certain product types.

Exporter

Both tools use AJAX to prevent timeouts by exporting and importing in batches, and both can be started from the main Products screen.

We have usage and developer documentation on our wiki.

Manage your WooCommerce.com extension licenses in WooCommerce core

key.png
In an effort to improve the user experience for updating extensions purchased from WooCommerce.com, the “helper” (the code responsible for validating licenses and checking for updates) has been merged into WooCommerce core.

in-core.jpg

It’s lightweight and will be added to the already existing “extensions” screen in admin, and should really help our customers ensure that their premium plugins are kept up to date with new functionality.

Search helpers: WC_Order_Query class

search.png
For developers, we’ve added some new search helpers for orders to allow you to query orders by multiple props. Usage is explained here.

As an example, you could query all orders from a specific date range for users named John with the following code:

$orders = wc_get_orders( array(
    'billing_first_name' => 'John',
    'date_paid' => '2016-01-01...2016-12-31`,
) );

Magic!

Everything else

Everything else

  • We’ve made the “terms and conditions” checkbox on the checkout slide out the terms page contents inline, rather than just linking to it.
  • In 3.0.x, when going to pay for an order assigned to a customer you’re presented with a pretty unfriendly “invalid order” message. We’ve improved this in 3.1. Now, you’ll either see a useful message if the order is not yours, or you’ll see a login form if not yet logged in.
  • oEmbeds (e.g. to show videos) were previously non-functional when used in the product short description. With 3.1 they are supported!
  • You can now set stock statuses for variations in bulk from the edit product screen.
  • A small improvement when updating users manually in admin; you can now use the “Copy from billing address” button to populate the shipping address from the billing address in one click.
  • Setup wizard improvements:
    • A domestic shipping zone will be automatically created for your defined base country to make setting up shipping a little more streamlined.
    • If using a non-WooCommerce theme, you’ll have the option to one-click install the Storefront theme if you want it.
      -If you’re in the US you’ll get the option to install the WooCommerce Services extension which provides, amogst other things, USPS rates and shipping labels.

Upgrading to 3.1

3.1 is a minor update and should be compatible with 3.0.x sites. We still recommend testing + backing up prior to upgrading.

Template file changes in 3.1

When editing core template files we bump the version so themes know they need to update custom versions. The following files were updated in 3.1:

  • cart/cart-empty.php – Added a wc_empty_cart_message function to handle the message displayed in a hookable manner.
  • cart/cart-shipping.php – Added a variable so shipping calculator is only shown on the first row when showing multiple packages.
  • cart/cart.php – Use get_max_purchase_quantity and fixed some logic.
  • cart/mini-cart.php – CRUD support.
  • checkout/terms.php – Support added for inline term display.
  • single-product/product-attributes.php – Added make_clickable.
  • single-product/product-image.php – Added data-caption support.
  • single-product/product-thumbnails.php – Added data-caption support.
  • single-product/rating.php – Using new wc_get_rating_html function.
  • single-product/review-rating.php – Using new wc_get_rating_html function.

Deprecated functions and methods in 3.1

The following functions are deprecated (not removed) in 3.1:

  • WC_Order_Data_Store_CPT::get_orders – Use wc_get_orders and the new search helpers.
  • WC_Order_Item_Meta – This class was actually deprecated in 3.0.0 but a notice was not added. wc_display_item_meta should be used instead.

How we tested 3.1

3.1 beta was released May 31st (~4 weeks ago) as was in beta for 2 weeks before we pushed out 2 release candidates. During this time we tried to iron out as many bugs as possible, whilst still maintaining updates for 3.0.x.

Additionally, for the first time, our team did some managed updates for actual customers on staging sites to pick up on any conflicts or bugs before the public release.

Thanks to everyone who helped test 3.1.

A huge thanks for our contributors!

A massive thanks to everyone in the community who have contributed, be that via issue reports, fixes, translation, testing, supporting other users or simply spreading the word!

mikejolley claudiosanches claudiulodro kovshenin rellect jeffstieler
mikejolley claudiosanches claudiulodro kovshenin rellect jeffstieler
dixitadusara crodas bekarice nabsul franticpsyx bor0
dixitadusara crodas bekarice nabsul franticpsyx bor0
josemarques v18 ryelle daigo75 judgej Ninos
josemarques v18 ryelle daigo75 judgej Ninos
rasmusbe emgk justinshreve peterrath Chouby pnpetroff
rasmusbe emgk justinshreve peterrath Chouby pnpetroff
rafsuntaskin ughimire thenbrent mattyza ryanr14 kloon
rafsuntaskin ughimire thenbrent mattyza ryanr14 kloon
mdrahul jobthomas alvinkonda kilbot javorszky WPprodigy
mdrahul jobthomas alvinkonda kilbot javorszky WPprodigy
helgatheviking avinapatel jamesckemp danielhuesken 1do Chunkford
helgatheviking avinapatel jamesckemp danielhuesken 1do Chunkford
nishitlangaliya RamyTalal om4james reescott vinoddalvi tobiasschutter
nishitlangaliya RamyTalal om4james reescott vinoddalvi tobiasschutter
treyrich pixedelic ChaseWiseman pablo-sg-pacheco corsonr YachYaroslav
treyrich pixedelic ChaseWiseman pablo-sg-pacheco corsonr YachYaroslav
ovidiumght rodrigoprimo amansaini davefx gedex umeshnevase
ovidiumght rodrigoprimo amansaini davefx gedex umeshnevase
Ramoonus belcherj lawkwok MaedahBatool atimmer jaumarar
Ramoonus belcherj lawkwok MaedahBatool atimmer jaumarar
jgacuca567 cristiangrama Jon007 AnwerAR SiR-DanieL hussong
jgacuca567 cristiangrama Jon007 AnwerAR SiR-DanieL hussong
mihaigrigori bhubbard faisal-alvi akashsonic rwilliam timelsass
mihaigrigori bhubbard faisal-alvi akashsonic rwilliam timelsass
roykho garethallison davdebcom tivnet psiico kowsar89
roykho garethallison davdebcom tivnet psiico kowsar89