Develop WooCommerce

The official WooCommerce development blog

WooCommerce 3.1 has landed — June 28, 2017

WooCommerce 3.1 has landed

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
Dev Chat Summary – June 20th — June 27, 2017

Dev Chat Summary – June 20th

This post summarizes the dev chat meeting from June 20th (agenda, Slack archive).

Questions and feedback related to WooCommerce 3.1 RC

How will the CSV importer work with classes that extend product, e.g. Bookings? will it work out of the box or adjustment will be needed? bor0

By default support any type of product type, and it’s able to handle all meta data, so for most of the 3rd party plugins should work just fine. There’s still a guide about extending the importer/exporter.

One piece of feedback RE exporting products: any thoughts on adding export by category? seems like it may be better for bulk updates than product type bekarice

If it’s something needed we should be happy to include in 3.1. It’s also possible to support this idea on WooCommerce Ideas Board.

So it looks like the export / import isn’t using the asynch processing? bekarice

All import/export processing is done in batching with AJAX, so as long as the windows is open, it will happily import/export all day.

Is WC core a place we can explore a better background processing than cron? pmgarman

For now import/export does not need it, but this is something that we definitely want to look in the future to improve other use cases, like the mailer.

I’ve a question. Has anyone had to do compatibility updates for 3.1, if so, why and was it core at fault? mikejolley

Most of people just had a little work with deprecation notices, e.g with WC_Order_Item_Meta class, but in general no fatal errors or problems like we had in the past.

Welcome to selectWoo

selectWoo is our fork of select2 JavaScript library, where we fixed several accessibility issues and changed the namespace for WooCommerce usage, this should handle incompatibilities caused by different select2 versions too.

WooCommerce 3.1 RC2 — June 24, 2017

WooCommerce 3.1 RC2

WooCommerce 3.1.0 RC2 is available for testing. This includes fixes from 3.0.9, and fixes specific to RC1.

To test WooCommerce 3.1.0 RC2, you can use our WooCommerce Beta Tester plugin or you can download the release candidate here (zip).

Think you’ve found a bug? Please post in detail to Github.

The final version of 3.1 is due for release June 28th 2017. Huge props to everyone who has sent feedback about this release so far or found bugs.

WooCommerce 3.0.9 fix release notes — June 22, 2017

WooCommerce 3.0.9 fix release notes

The WooCommerce 3.0.9 fix release is now available. You can download it from WordPress.org or as an automatic update in your administration panel.

~34 commits made it into this fix release. The full changelog is below.


* Fix - Exclude sale products from category checks if coupon is not valid for sale products in coupon class.
* Fix - Fix missing states in state field when selected country differs from checkout data. Required template modification.
* Fix - Updated woocommerce_email_actions to send email when order status changes from processing to cancelled.
* Fix - Fix undefined variables in terms and legacy order API endpoints.
* Fix - Correctly update variation outofstock term on save.
* Fix - Add a nonce and confirmation message for logging out via the customer my account page.
* Fix - Allow setting grouped_products via the API.
* Fix - Prevent edge case errors in wc_get_product_term_ids.
* Fix - Remove extra escaping to fix saving of special characters in attribute terms.
* Fix - Stricter shipping method matching in COD to prevent conflicts.
* Fix - Recalculate totals after local pickup selection so taxes are recalculated.
* Fix - Add missing nonce to product sales report.
* Fix - Fix webhook save actions and ping the URL to test only once.
* Fix - Fix issue with CLI IDs which overlap with actual data.
* Fix - Normalise emails in coupons so lower/upper case is ignored.
* Fix - Added background color to x button in product gallery edit box.
* Dev - Renamed woocommerce_credit_card_type_labels filter from wocommerce_credit_card_type_labels.

If you spot any further issues, please report them to us in detail on GitHub so the development team can review – comments on this post are closed.

June 20th: Dev chat #6 — June 19, 2017

June 20th: Dev chat #6

It’s time for our 6th dev chat, if you missed something in the last one, you can recap our summary here.

The next chat will be on June 20th at 16:00 UTC in the #core channel of the WooCommerce Community Slack. If you don’t already have access to the group, you can request an invite at the bottom of the WooCommerce developers page.

Here is the agenda:

If you have anything to propose for the agenda or related to the above, please leave a comment below.

See you there!