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!
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 customisations 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).
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.
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 interupt 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 consistantcy, 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 additon; 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
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…
Thanks for testing in advance!