WooCommerce 2.5 Beta 2

November has been a busy month for the WC core squad; prepping for WordPress 4.4 support, working on the 2.4.11 fix release (out Monday) and getting 2.5 beta 2 prepped and ready. We’re happy to report 2.5 beta 2 is now upon us!

You can download it here.

If you missed our post about 2.5 Beta 1, you can catch up with what has been happening here.

The time for testing is now

Feature freeze is in effect. Only fixes should be added from this point.

As mentioned in our beta 1 post, we still aim to drop the Release Candidate between Jan 4th–8th 2016 so if you’re a developer you need to test your plugins and themes as soon as possible. Please take responsibility for your own code.

End-users are also welcome to test their customizations or give feedback on the release. Beta 2 is not considered ‘stable’ so don’t run it on a live site unless you know what you’re doing, but by all means take it for a test run.

We have a beta testing plugin to make obtaining the beta release and staying updated simple. We suggest grabbing that if you would like to be involved.

Please raise any issues found on Github with a [2.5] issue title prefix so we see them right away.

Ch-Ch-Changes since beta 1

Since beta 1 we’ve made numerous improvements. You can compare beta 1 to master here.

Most of the changes have been fixes and changes for 4.4 compatibility, but there were a extra things we wanted to include before a feature freeze (which is now in effect).

Transient Overhaul

We’ve already done a lot of work to reduce options table usage by adding a new session handler in 2.5. Transients however were still problematic, particularly the ones with dynamic naming or that expire after a post save.

To improve this we did a review of the transients we were setting, and worked out the best way forward for each to balance performance with storage.

  • Store rating and reviews in postmeta rather than transients – this data is product specific, and only needs clearing when product specific events, such as a new comment, occur.
  • Simplified how wc_var_prices is stored so that only one transient is used per product at all times.
  • Store cached shipping rates in the customer session, rather than a separate global transient.
  • Made the related posts transient more robust to avoid multiple transients at once.
  • Made get_coupon_id_from_code use WP Caching instead of transients.
  • Store the product ids associated with terms in term meta instead of a separate transient.
  • Removed transients from get_total_stock as there was not much gain.
  • Use WP Cache and invalidation for taxes instead of transients.

Overall this should make a dramatic improvement to those facing issues with large numbers of transients and no way to clear them, whilst still allowing performance gains on sites using object caching.

Checkout Tweaks

To streamline and simplify our cart and checkout process we’ve made a few minor tweaks since beta 1.

On our cart page we used to show a (dynamic) notice stating that everything was estimated.

Since this often needed to change based on the specific setup, it was quite difficult to make the text generic enough for all situations, and does interrupt the flow somewhat. So we’ve removed that and made any information show up in context instead.

On the checkout page itself, another subtle change made for consistency, the terms checkbox is now aligned left and shows the required asterisk.

Finally, after reviewing the template code for emails it was aparent that having the order table duplicated inside each email template was a waste. This has now been unified into a single template file.

Malformed JSON checkout response recovery

A nice addition; if a rogue plugin does decide to break the checkout process, this commit should recover where possible by attempting to pre-parse the JSON.

wp.template usage for variations

2.5.0 introduces wp.template usage to control the appearance of a single variation (which is entirely populated by JavaScript).

Since beta 1, this has been tweaked to load into the footer when the variations JS script is present, and because of this should be backwards compatible with 2.4.0 templates and other plugins. We tested this with the help of Manos who develops composite and bundled product extensions.

And everything else…

You can see the full changelog here, and view a full comparison of changes between 2.4 and 2.5 here.

Thanks for testing in advance!

3 responses to “WooCommerce 2.5 Beta 2”

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

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

  3. […] We made a number of performance improvements in 2.5, mainly working on optimising our usage of transients which we covered in our beta 2 post. […]

Leave a Reply

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