Develop WooCommerce

The official WooCommerce development blog

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.

Dev Chat Summary – June 6th — June 7, 2017

Dev Chat Summary – June 6th

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

WooCommerce 3.1 Beta

  • Beta 2 should be available soon.
  • Still on track for a release at the end of June.
  • Please test the new importer/exporter included in WooCommerce.

Rest API feature plugin

  • API development will now be done in a separate repo.
  • When new API versions are ready they will be merged into WooCommerce and released with the next WooCommerce version.
  • This will enable API development to not be tied to the WooCommerce release schedule.
  • The legacy v1, v2, and v3 APIs will be removed in WooCommerce 4.0.

Extensions version checking

  • Sites had a high amount of errors when people upgraded to WooCommerce 3.0 and were using extensions that were not ready for WooCommerce 3.0.
  • We need to show warnings or programmatically manage extensions that are not compatible with new versions of WooCommerce somehow.
  • An issue has been created on GitHub for this. Please leave feedback or ideas.
Dev Chat Summary: April 25th — April 27, 2017

Dev Chat Summary: April 25th

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

Product Admin UI

  • Mock-up of proposed redesign.
  • The UI changes are primarily to reduce confusion with new users.
  • Product data panel remains the same.
  • Primary concerns are about existing plugins that add fields still being compatible with the redesign, especially the price fields area.
  • Auto-generating SKUs will be tricky to get right.

CRUD Search Helpers

  • Standardized way for developers to get information out of the database without having to worry about the actual database structure.
  • Information will be retrieved using WC_Object_Query objects similar to WP_Query.
  • This is under development now. See this pull request for an initial implementation.
  • WC_Object_Query objects support querying by props and a subset of the parameters WP_Query supports.
  • 3.1 will have Order and Product queries.

Importer / Exporter

  • Please provide feedback on the proposed schema.
  • Fields that don’t match a known field get imported as meta data.
  • Handling of serialized data is a concern.
  • We need to work out a good solution for a long-running import. One option is a background process with periodic polling to get the status.
Say hello to WooCommerce 3.0 “Bionic Butterfly” — April 4, 2017

Say hello to WooCommerce 3.0 “Bionic Butterfly”

Today we’re excited to release WooCommerce 3.0 (previously 2.7), dubbed the “Bionic Butterfly”, into the wild! 3.0 has been in beta since December, development since August, and has had over 3000 commits from 115 contributors.

Read on to find out what’s new!


3.0 is a major update. As always, please ensure extensions and themes are compatible before upgrading, test on a staging site if you can, and make a backup for peace of mind.

Continue reading

End-to-end testing WooCommerce — March 30, 2017

End-to-end testing WooCommerce

It is important for developers to be able to easily and quickly test new versions of WooCommerce. The Core Testing Checklist has 30 items in it, and is a manual process. Running through the whole thing is tedious and time consuming, so automating the process would be a big improvement.

End-to-end (e2e) testing tests whether the whole flow of an application is working as expected, and will be an important part in ensuring changes don’t break anything. It automates the manual process of going through all of the different customer-facing and admin-facing pages, performing actions on those pages, and verifying those actions do what is expected.

We have developed an e2e testing suite that should dramatically reduce the time it takes to run through tests before big releases. It works by navigating around a site with ChromeDriver. ChromeDriver simulates a real user by moving the mouse around, clicking on things, and entering input into forms. The results of these actions get compared to the expected results, and the test suite can then determine whether the action was successful. Since this is programmatic, testing can be completed much faster than humanly possible.

The initial release of the testing suite covers some of our core testing checklist, but not yet all of it. Developers are welcome and encouraged to contribute new tests.


You can use the test suite included in the WooCommerce GitHub repository for testing the base WooCommerce plugin. Follow the Getting Started guide to set up your environment for e2e testing.

You can also use the tests for verifying that an extension didn’t break core WooCommerce functionality. To do this, activate the extension before running the tests. If the tests pass, it will verify that the activated extension did not break functionality covered by the tests.

Please note: this may not work well with some extensions that drastically change the WooCommerce flow or change certain html elements because the tests expect to be able to click on specific elements and have them act in a predetermined way.

Adding end-to-end tests to extensions.

The WooCommerce test suite is built on top of a library we’ve developed for simplifying WooCommerce e2e testing. The library contains a collection of JavaScript objects that can be used for performing common actions on WooCommerce screens, and the objects can be easily extended to add new, custom user actions. You can write test suites for your extensions and dramatically cut down on the amount of time you spend manually testing!

Here is a simple test example using the library:

// Create a new Shop page object.
const shopPage = new ShopPage( 
        url: manager.getPageUrl( '/shop' ) 

// Click the "Add to Cart" button for "Flying Ninja".
shopPage.addProductToCart( 'Flying Ninja' );

// Create a new Cart page object.
const cartPage = new CartPage( 
        url: manager.getPageUrl( '/cart' ) 

// Verify the cart has the items.
assert.eventually.ok( cartPage.hasItem( 'Flying Ninja' ) );

To help you get started with extension e2e testing, we’ve written a helpful tutorial that introduces the library, setting up your environment, writing tests for customer-facing screens, and writing tests for admin-facing screens. Read the tutorial to get started! If you run into any questions about objects or their methods, there is also API documentation.


If you encounter any bugs in the library or want to contribute, you can do that here.