Develop WC

The official WooCommerce development blog

Introducing WooCommerce Connect – Alpha Edition — May 4, 2016

Introducing WooCommerce Connect – Alpha Edition

For the past few months, we’ve been quietly working on something we think will be a big part of the future of WooCommerce: WooCommerce Connect.

Connect is a new architecture for integrating services with WooCommerce. We’re taking advantage of a SaaS-style Automattic-hosted server to do the heavy lifting and have created a new Calypso-style interface. On the users’s end, they’ll just see a streamlined experience:

  • No additional extensions to install
  • No API keys to remember
  • No subscription keys to copy and paste

We’ve built the foundation and added our first service. This first iteration supports real-time USPS shipping rates for stores based in the United States. Now, we’d like to welcome you to the testing phase.

Join us in building the future of WooCommerce

Release Highlights

This first Alpha release of WooCommerce Connect works with the WooCommerce 2.6 Beta and with Jetpack to bring hassle free USPS shipping to WooCommerce Shipping Zones.

Since this is an alpha version, there’s a lot we plan to add, change and enhance. Please take care – this early pre-release code should not be used on production sites.

At this time, WooCommerce Connect is delivered as a feature plugin, and the grand plan is to roll out Connect into a future WooCommerce core release.

For developers, this is an great opportunity to:

  • see the future of WooCommerce development
  • see examples of incorporating React into WooCommerce administration
  • see how we’re using JSON schemas provided by the WooCommerce Connect servers to drive the layout and composition of the forms for shipping services – making adding features much less likely to require plugin updates
  • see examples of how to extend the WP REST API and Shipping Zones in WooCommerce 2.6

Alpha Testing

Alpha is out today. Subsequent alphas will be released if needed and we’ll post on this blog if this happens.

If all goes to plan, Beta will begin during June 2016.

If you’d like to help test, sign-up to be a tester – we’d love to hear from you!

WooCommerce 2.6 Beta 1 is here — April 22, 2016

WooCommerce 2.6 Beta 1 is here

WC 2.6 codename “Zipping Zebra” has been tagged and is ready for testing. This is our 2nd major release of 2016 and has around 900 commits in total. You can download beta 1 here.

Release Highlights

2.6.0 has a host of improvements and new features to dramatically improve shipping. Shipping Zones are now part of core. This means you’ll now be able to have instance based shipping methods, multiple flat rates, and much much more without the use of extensions. For developers, the shipping API docs are inside our wiki.

The My Account shortcode/pages have been restructured to be tab based. This keeps things organised and allows devs to add more tabs if needed.

How it looks in Storefront 2.0

You can read more about the tabbed my account page here.

The cart page operations now use AJAX (updating item quantities, removing cart items, applying coupons, and updating shipping options) which you can read about and see in action here.

We’ve worked on our layered nav system in 2.6 adding new functionality (now you can filter products by ratings) and improving performance for all layered nav queries.

2016-04-05 at 15.11.png
Filter by rating

Developers will have access to our new Payment Tokens API which standardized the way in which tokens are stored and displayed. This wiki article explains usage for devs.

We’ve also released a new version of the WooCommerce REST API, based on the WordPress REST API, which you can read about here.

Other features developers and users will be interested in:

  • We’ve moved custom term meta implementation to WP Term Meta which was introduced in 4.4.
  • Added new wc_get_orders() function to get order objects and ids instead of direct get_posts() calls.
  • We’ve added the ability for shipping methods to store meta data to the order in the same way line items can.
  • We’ve made wc_create_new_customer() pluggable.
  • We’ve added > 100 new currencies based on, and Bitcoin.

Template changes in 2.6.0

The following template files had their versions bumped in 2.6.0:

  • single-product/review.php – Added hooks to support the following new templates:
    • single-product/review-rating.php
    • single-product/review-meta.php
  • order/order-details.php – Fix to only get purchase note if product exists.
  • myaccount/my-account.php – New action hooks to support tabbed navigation and the following new template files:
    • myaccount/downloads.php
    • myaccount/view-order.php
    • myaccount/payment-methods.php
    • myaccount/orders.php
    • myaccount/navigation.php
  • myaccount/my-downloads.php – Deprecated.
  • myaccount/my-orders.php – Deprecated.
  • myaccount/form-add-payment-method.php – Added tabbed naviation.
  • myaccount/form-edit-address.php – Added tabbed naviation.
  • myaccount/form-edit-account.php – Added tabbed naviation.

Release Schedule and beta testing

Beta 1 is out today (April 22nd). Subsequent betas will be released as needed and we’ll post on this blog if this happens.

If all goes to plan, Release Candidate 1 will be tagged during May 2016.

If you’d like to help test, you should download the release from Github. We posted a nice little write-up on beta testing here which should get you started. Please read that and jump right in!

If you’re like to help translate 2.6, you’ll find it on the development branch on

Thanks to all of our testers and contributors.

New REST API based on the WP REST API in 2.6 —

New REST API based on the WP REST API in 2.6

During the development of WooCommerce 2.1 (Back in Feb 2014) we knew that one day WordPress would have it’s own REST API, but the demand was so great for such a thing in WooCommerce we had to roll our own.

We’ve learned a lot from this process and our API is now widely used, but given recent developments surrounding the actual WordPress REST API, and since it is now part of WordPress core (since version 4.4) we started work to replace ours with what is available in WordPress.

2.6 will contain this new API, and will require WordPress 4.4 or higher.

Continue reading

Cart AJAX — April 19, 2016


WooCommerce 2.6 will include a new feature for the Shopping Cart: AJAX calls. This includes functionality for:

  • Updating cart quantities
  • Applying and removing coupons
  • Updating shipping options

Check out this video to see 2.5 and 2.6 side-by-side:

What does this mean for users?

The page looks exactly the same as before, so users familiar with the cart will be just fine. The main difference is in performance and no more page reloads for updates. Now, when you do any of the update operations above, instead of reloading the entire page, the cart will first show a spinner over the updating areas, then update within those areas on the page.

What does it mean for developers and designers?

Actually, other than a better user experience, very little. This update was designed with backward compatibility as a primary concern. Existing themes should work just fine still and existing server-side actions/filters as well. In fact, no server code was changed with this update. The JavaScript naturally depends on certain HTML IDs and CSS classes for selectors, so be careful if you start to use those class names elsewhere in your themes.

Where are the technical details?

The vast majority of code for this was updated in the cart.js file. Feel free to take a look there. For the Coupon update code, the API was used, but for the larger updates, the original form submit handling on the server is employed to make sure that the behavior matches the existing cart functionality as much as possible.



Get every new post delivered to your Inbox.

Join 5,882 other followers