WooCommerce 2.5 Beta 1

WC 2.5 codename “Dashing Dolphin” has been tagged for testing. This release has seen a short development cycle of ~3 months and comprises of ~1000 commits from 21 contributors.

You can download beta 1 here.

Release Highlights

2.5 mostly contains enhancements to existing functionality, but we have added some new features which developers will appreciate such as WP CLI support!

The WooCommerce CLI (command line interface) lets you perform many actions on your store via the command line, such as creating customers and coupons. This should be useful for power users.

woocommerce-wp-cli-demo
WooCommerce CLI in action

The post here has more details on the CLI.

The WooCommerce REST API has been further enhanced with some new endpoints:

  • /products/shipping_classes to update product shipping classes.
  • POST, PUT, and DELETE for product categories and tags.
  • Added support to filter products by tag, category, shipping class, and attribute.
  • Added tax and tax_class endpoints for setting tax rates.

The REST API documentation will be updated with this new endpoints soon.

For performance and scalability reasons we’re introducing a new session handler which uses custom tables, rather than the WordPress options table. You can read more about this feature here.

Also related to performance, we’ve improved the way in which verified reviews are stored and retrieved, and we’ve improved backend searches.

Some admin screens have been tweaked; most notably the tax settings screen which is now ajax enhanced/faster and supports search.

2015-11-04 at 14.28.png
Ajax powered with inline search

The email settings screen has also been tweaked to remove the sub-navigation links in favour of a table.

2015-11-04 at 14.29
Emails are shown in a neat table in 2.5

The checkout and order flows have also had some adjustment:

  • When only 1 gateway is enabled, the radio buttons will be hidden.
  • We now only display the coupon form on the checkout if a coupon hasn’t yet been applied.
  • We have added a handy ‘pay’ link to the order screen which you can send to customers.
  • We have added the terms and conditions checkbox to the pay page, which was previously only shown on checkout.
  • Password strength indicators are now displayed on checkout when creating an account.
  • If payment fails, admin will receive an email.
  • When a WordPress user is deleted, their orders turn into guest orders.
  • When calculating order taxes, tax settings are respected and default to the base country.
  • Order notes are added to record manual email sends to customers.

Other notable tweaks include:

  • Variations are now generated in a logical order using a new wc_array_cartesian function.
  • Variations will fade in to avoid the initial ‘flicker’ during page load.
  • Reports now show both net and gross averages.
  • The welcome screen is no more.

You can see the full changelog in the readme file.

Template changes

For frontend templates we’ve changed some files to make templating more flexible:

  • Product archive anchors are now hooked into templates rather than hard coded.
  • We’ve added template files for the customer details list in emails (emails/email-customer-details.php)
  • Revised single variation cart template. Template files now exist for variations, and the cart button will display (disabled) when no selections are made.
  • New star ratings. The old one was 5 separate buttons. This new one consolidates the 5 options into one element making it leaner visually and more intuitive. Works in IE9+ with a graceful degradation for IE8.

The following template files have been version bumped in 2.5 and may require theme updates:

  1. single-product/review.php – Added new action hooks + verified reviewer code
  2. single-product/add-to-cart/variable.php – Correctly escape variation data.
  3. order/order-details.php – woocommerce_purchase_note_order_statuses filter.
  4. order/order-details-item.php – woocommerce_purchase_note_order_statuses filter.
  5. loop/add-to-cart.php – Uses supports_ajax_add_to_cart method.
  6. global/quantity-input.php – Changed min and max attributes.
  7. content-widget-product.php – File was missing version.
  8. content-product.php – Action hooks to handle anchor output.
  9. content-product_cat.php – Action hooks to handle anchor output.
  10. checkout/payment.php – Support for new terms.php template file.
  11. checkout/form-pay.php – Support for new terms.php template file.
  12. cart/mini-cart.php – URL escaping.
  13. cart/cart-shipping.php – Extra filters and some simplification of strings.

The following template files are new in 2.5.0:

  1. single-product/add-to-cart/variation.php
  2. single-product/add-to-cart/variation-add-to-cart-button.php
  3. emails/email-customer-details.php
  4. emails/plain/email-customer-details.php
  5. emails/admin-failed-order.php
  6. product-searchform.php
  7. checkout/terms.php

Release Schedule

Beta 1 is out today (Nov 9th) and the beta testing period will run through to the end of the year to avoid a release during the holiday season. Subsequent betas will be released as needed.

If all goes to plan, Release Candidate 1 will be tagged sometime between Jan 4th–8th 2016, with the final release dropping a week later.

How to beta test

We posted a nice little write-up on beta testing here which should get you started. Please read that and jump right in!

22 responses to “WooCommerce 2.5 Beta 1”

  1. Quite a few potentially breaking changes, here and there. I’m particularly curious about this statement: “When calculating order taxes, tax settings are respected and default to the base country.”

    This has always been the case, what changed exactly in 2.5?

    1. Don’t think there are; see the commits. For that one, from the backend it used to calculate no tax unless you filled in the customer billing country, and then it ignored your settings. Now it falls back to store address/uses settings.

      1. Actually, there is a pretty serious change in the Tax Rates page. One of my plugins uses JavaScript to automatically populate the tax rates. It works by simulating user’s input (Click on “new row”, enter country, enter rate, enter the description, repeat). This was done to avoid coupling with the specific implementation of the UI.

        Now the Tax Rates page seems to use Backbone.js, and the whole auto-population JavaScript is broken. In theory, it should work anyway, but it doesn’t, because Backbone overwrites the table using its own internal model/view system every time a new row is added.

        The difficulty is not just in rewriting the JS to populate the rates, but to keep full backward compatibility with 2.4 and earlier versions. I would rather avoid a long chain of “if(version)” statements, it quickly becomes unmaintainable.

      2. I might have found a 100% backward compatible workaround, without having to deal with the intricacies of Backbone.

        1. You could save them rather than insert them if you’re having trouble?

          1. I want to avoid using Ajax calls, they would be too slow (I usually avoid the “Ajax-ification” of pages, unless absolutely necessary). Besides, my logic is designed to be a pre-population, strictly on the frontend: I add the data, but I want the admin to review it before saving it, instead of saving it and re-saving it again.

            The big issue is that Backbone uses its own internal model, therefore anything added to the input fields is discarded upon saving. That is, adding one row, then populating the input fields via JavaScript doesn’t work (and that’s exactly what I must be able to do).

          2. Post an issue/request if needed so Claudio and Akeda can review.

          3. I might have found a workaround that works with all WooCommerce versions (with WC 2.5 is just four times slower, due to Backbone doing its sorting and re-sorting behind the scenes). If it doesn’t work, I will post the details of the issue on Github, perhaps there is an easier way to do it. 🙂

          4. Note: “four times slower” means four seconds instead of one. Since this tax pre-population is supposed to be a once in a while task, that should not be an issue.

          5. “Note: “four times slower” means four seconds instead of one. Since this tax pre-population is supposed to be a once in a while task, that should not be an issue.”

            Yes – I have the same issue, of course (Diego and I are the authors of the two most downloaded WC EU VAT plugins in the wordpress.org directory). In Firefox 42 (Linux), it’s slow enough to cause Firefox to pop up its dialog about a script apparently being unresponsive and ask the user if he wants to continue, which isn’t ideal.

  2. I didnt check it out yet, but would it be a lot of work to isolate the CLI part & make it work on earlier versions / existing instalations?

    1. It would be difficult because the CLI is based on the REST API.

  3. Hi! When will the switch from transifex to the wordpress language repository will take effect? It this planned for 2.5 too?

    1. This is already done.

  4. The wc_array_cartesian() name was particularly clever. Hopefully it’s never deprecated. 🙂

  5. Is there any chance of RC1 or final releasing before the proposed RC1 timeline or are we set on RC1 in January?

    1. Stick to the plan 🙂

      1. Ok, perfect! I saw only 4 items were left and needed to make sure that we can test and address any template changes in our theme after the holidays. 😉 Thanks Mike!

  6. […] you missed our posts about previous beta releases, you can read about 2.5 Beta 1 here and beta 2 here. Thank the […]

  7. […] more information about what’s new in 2.5, check out Beta 1, beta 2 and beta 3 blog […]

  8. […] first beta release was in November, but with the holiday sales season right in this release cycle, the beta and […]

  9. […] touched on some checkout screen tweaks in our beta 2 post here and the beta 1 post here. Most notably we […]

Leave a Reply

Your email address will not be published. Required fields are marked *