• The WooCommerce 2.5.3 fix release is now available. You can download it on WordPress.org or as an automatic update in your administration panel.

    The most notable change is to customer details on the thanks page. The thanks page has an obscure URL making it impossible to guess/find and see other user’s orders, however, if someone did discover the URL they’d see the customer address along with order details. To maintain privacy this is now hidden if the user viewing the page is a guest, or does not own the order.

    A total of ~34 commits made it into this release fixing several minor issues and making some small tweaks. The changelog for 2.5.3 is below.

    * Fix - Correct the 'unavailable template' call for variations so the message is displayed correctly, fixing a JS error.
    * Fix - Add 'media-models' dependency to write panel scripts.
    * Fix - Fix hide empty check in category walkers.
    * Fix - Current class fix on some servers when empty.
    * Fix - Multibyte safe trim string function.
    * Fix - Prevent a notice by stopping a loop in woocommerce_products_will_display from stomping on other variables.
    * Fix - If an attribute meta key is not set, technically its 'any', so should match. Prevents issues when meta data is missing after renaming attributes.
    * Fix - Make wc_get_product_variation_attributes ignore non variation attributes.
    * Fix - Notice when no order notes exist.
    * Fix - Removed extra tab from plain email shipping address.
    * Fix - Round shipping after tax calculation instead of before to prevent wrong taxes being calculated.
    * Fix - State input box was not reappearing when switching from a hidden input to a text input.
    * Fix - Don't duplicate rating and review counts.
    * Fix - CLI - Allow setting of a single category.
    * Fix - API - Replace term_taxonomy_id for term_id whilst creating/editing terms.
    * Fix - API - Fix parent_id and menu_order for variations.
    * Fix - Combine update post calls when update_status is ran.
    * Fix - Total number of comments in the admin panel.
    * Tweak - Show customer details for logged in users only on thanks page to prevent customer details being revealed if someone finds out the URL.
    * Tweak - Wrap status report in backticks to stop people breaking .org forums.
    * Tweak - Error handling for screen ids.
    * Tweak - Use $wpdb->replace instead of doing a select and then deciding to do an update or insert in session handler.
    * Tweak - Added check for private WooCommerce pages in status report.
    * Tweak - Transactional emails for failed -> on hold.
    * Dev - Include new triggers when removing and adding the password strength meter.
    * Dev - Allow pass objects and arrays as webhook callbacks.

    If you spot any further issues, please report them to us in detail on Github so the development team can review – comments on this post are closed.


  • The WooCommerce 2.5.2 fix release is now available. You can download it on WordPress.org or as an automatic update in your administration panel.

    A total of ~46 commits made it into this release fixing several minor issues.

    * Fix - Compatibility with w3 total cache inline minification.
    * Fix - Remove stock bw compat code which was preventing manage stock being disabled at variation level.
    * Fix - When calculating shipping total, force rounding.
    * Fix - Make save button clickable in tax rate table after using autocomplete field.
    * Fix - Fix passed image_size variable in email templates.
    * Fix - Don't show purchase note to admin in emails.
    * Fix - Fix 'hide empty' setting in category widget
.
    * Fix - Prevent notice in get_allowed_countries.
    * Fix - Prevent add-to-cart querystring in pagination links.
    * Tweak - Allow propagation in variation script.
    * Tweak - Product image alt text.
    * Tweak - Remove notice and add styling for add payment page.
    * Tweak - Set input margin and label display for compatibility with themes using bootstrap CSS.
    * Tweak - Add context to category term localization.
    * Tweak - Moved cart URL functions to core-functions file to make them available in admin area.
    * Tweak - Added password hint text and error messages when showing the password strength meter in forms.
    * Tweak - Added Saudi Riyal currency.
    * Tweak - Added Russian Ruble symbol.
    * Tweak - When COOKIEPATH is an empty string, set to '/' so cookies work across all pages.
    * Dev - Template - Pass $category into wc_product_cat_class() in content-product_cat.php

    If you spot any further issues, please report them to us in detail on Github so the development team can review – comments on this post are closed.


  • The WooCommerce 2.5.1 fix release is now available. You can download it on WordPress.org or as an automatic update in your administration panel.

    A total of ~36 commits made it into this release fixing several minor issues.

    = 2.5.1 - 25/01/2016 =
    * Fix - Remove usage of get_currentuserinfo() which is deprecated in WordPress 4.5.
    * Fix - Fix responsive product sizes when the columns class is missing.
    * Fix - Fix function exists check for woocommerce_template_loop_category_title.
    * Fix - check_version on all requests so that the installer runs after remote plugin updates.
    * Fix - Only show the "add payment method" button when needed, and check for required fields on the add payment method page.
    * Fix - Correctly block UI to prevent attribute issues in backend when adding multiple attributes in quick succession.
    * Fix - Show SKU in admin emails.
    * Fix - Don't show downloads in admin emails.
    * Fix - Fix query/missing variable in validate_user_usage_limit function.
    * Fix - Prevent endless loading on checkout when reload_checkout session variable was used.
    * Fix - Correctly display html entities in tax screen autocomplete.
    * Fix - Do sales reports based on refund line items rather than fully refunded orders to prevent double refunds being reported.
    * Fix - Qty button can be hidden for variable products sold individually.
    * Fix - Show the taxable country rather than base country in "estimated for" text during checkout.
    * Fix - Prevent select2 gaining focus on IOS7 scroll.
    * Fix - API - Fix indexes on decimal and thousand values.
    * Tweak - Clear cron jobs on uninstall
.
    * Tweak - Don't disable place order button on checkout if a weak password is used.
    * Tweak - Added password strength meter in lost password and edit accout pages.
    * Tweak - Pass $args to woocommerce_dropdown_variation_attribute_options_html hook.
    

    If you spot any further issues, please report them to us in detail on Github so the development team can review – comments on this post are closed.


  • Today we’re proud to release WooCommerce 2.5 “Dashing Dolphin” into the wild! 2.5 has been in development for ~5 months and has seen around 1600 commits from 42 contributors.

    This is another evolutionary release which focuses on improvements to existing functionality, as well as stability and performance. We do however have some new features to mention in 2.5 which developers in particular should enjoy using.

    Introducing WooCommerce CLI

    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 very useful for power users! Here is a quick example of the CLI in action, in this example updating then deleting a coupon.

    The documentation for our CLI can be found here.

    A new sessions table

    Being stateless, WordPress doesn’t have an in-built way of handling session data. You can use cookies or implement PHP Sessions, but both have limitations and some hosts aren’t equipped to deal with them by default.

    Early on we decided to adopt a solution based on wp-session-manager whereby you have a cookie to identify each user, and have their session data stored in the WP options table. This worked well, and has served us nicely until now, however it did lead to problems with scalability and data cleanup.

    For these 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.

    Performance improvements

    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.

    tl;dr we’ve audited all transients, removing those that are unnecessary and moving to alternative forms of data storage and caching where possible. Combined with the new sessions table, query speed should be improved due to reduced usage of the wp options table.

    Tax rate settings UI

    We’ve been experimenting with backbonejs to improve the user interface recently, which should feature more prominantly in core from 2.6. In 2.5 we’ve used it to improve the tax rate input screens, which now saves via ajax and has a new inline search.

    Improved checkout flow

    We touched on some checkout screen tweaks in our beta 2 post here and the beta 1 post here. Most notably we have:

    • Moved the terms and conditions box before the place order button
    • Tweaked default call to action button styles
    • Added error recovery when malformed JSON is returned by the ajax methods.
    • Removed the ‘estimated’ text from the cart totals area.
    • Made it so when only 1 gateway is enabled, the radio buttons will be hidden.
    • Added password strength indicators when creating an account.

    Everything else…

    There are over 25 tweaks listed in the changelog, including:

    • Moved emails in the email settings to a table to keep things organised.
    • wp.template usage for variations which now allows developers to change the layout of single variations.
    • Removed the welcome screen.
    • For coupons with category restrictions, respect the category hierarchy.
    • A new wc_array_cartesian function to generate variations in a logical order.

    And some REST API improvements for developers using it:

    • Added /products/shipping_classes endpoint.
    • Added support to POST, PUT, and DELETE categories and tags.
    • Added support to filter products by tag, category, shipping class, and attribute.
    • Added tax and tax_class endpoints.

    We hope you’re excited about these changes 🙂

    Template Changes

    With most new releases, updates to template files are needed in order to add or change functionality. When we make a major change, the template version is incremented. Themes which bundle these templates may need to update them to reflect core.

    We covered some reasoning behind the larger changes in our beta 1 announcement.

    There are 7 new template files (see the beta 1 post). The following template files have been version bumped in 2.5:

    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.

    Additionally all email templates have been updated to use a unified order details template (email-order-details.php).

    Testing

    Since November 9th 2015 we’ve had 3 beta versions and 2 release candidates giving ample warning to developers to test, including posts on Twitter, Facebook, and our dev blog.

    Our beta tester plugin is installed on around ~60 sites according to .org, but this number does not include manual installs from Github. According to Github API, RC1 was downloaded manually over 100 times so we 190 times, so it’s good to see people testing things out.

    Internally we’ve been testing the RC on some new stores we’re building (for WooConf), on WPJobManager.com, and on WooThemes.com. We have also tested all WooThemes extensions for compatibility, and had our 3rd party devs do the same.

    We also know at least one user accidentally updated and had no upgrade issues 😉

    however it happened, I never noticed until now. The store’s got about 10 WooCommerce extension plugins. So, it looks like WC 2.5 isn’t going to break as many things as previous major releases!

    Thanks to everyone who contributed, tested, and translated this release and we hope you all enjoy using it!


  • Another small update today – 2.4.13 release is now available.

    You can download it on WordPress.org or as an automatic update in your administration panel. A total of ~6 commits made it into this release fixing a redirect issue when running your site over SSL, and adding some extra escaping to the clear sessions query for added security.

    If you spot any further issues, please report them to us in detail on Github so the development team can review – comments on this post are closed.

    In other news, we have also tagged WooCommerce 2.5 RC2 for those people testing. This includes a few small fixes and mostly code comments. We’re still due to launch 2.5 next week. Exciting times!


  • The release candidate for WooCommerce 2.5 is now available.

    RC means we think we’re done, but with thousands of users and hundreds of plugins and themes with WooCommerce support, it’s possible we’ve missed something. We hope to ship WooCommerce 2.5.0 on Monday, January 18, but we need your help to get there.

    If you haven’t tested WC 2.5 yet, now is the time!

    We’ve made ~100 changes since release beta 3 three weeks ago. Mostly small fixes, including:

    • Correcting Malaysian states.
    • Filtering non-images out of product image galleries.
    • Moved terms checkboxes logically before place order buttons.
    • Fixed sanitization of shipping tax class names.
    • Tweaked save logic for variable products.
    • Correctly hide attributes from quick edit.
    • Fixed some wc_var_price transient issues.

    Think you’ve found a bug? Please post in detail to Github.

    To test WooCommerce 2.5 RC1, you can use our WooCommerce Beta Tester plugin or you can download the release candidate here (zip).

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

    Developers, please test your plugins and themes against WooCommerce 2.5 before next week. If you find compatibility problems, we never want to break things, so please be sure to post to Github so we can figure those out before the final release.

    Translators, it is important than we translate 100% of the WooCommerce 2.5 strings so translations are downloaded automatically on update. Your help is most welcome! See more in Time to start translating WooCommerce 2.5.


  • Today we tagged WooCommerce 2.5 Beta 3. Now you can witness the power of this fully operational beta.

    Download it here.

    If you missed our posts about previous beta releases, you can read about 2.5 Beta 1 here and beta 2 here. Thank the maker!

    Changes since beta 2

    Here are our changes since beta 2:

    • Refactored our add-ons screen so it can be extended by add-ons.
    • Made some small changes to widgets API to be extended by add-ons.
    • Added a get_id() method for products.
    • Fixed some conflicts with PHP7.
    • Additional hooks for order line items.
    • Round discount totals to avoid issues with floats.
    • Various API and CLI tweaks/improvements.
    • Improved the usefulness of the wc_get_template_part filter.
    • Fixed some currency code.

    We also made a decision to remove the ‘dropdown’ view of shipping options in the cart. This was so we could have a hook after each shipping method to add additional options or text if an addon wanted to display something there. Dropdowns restrict this ability and would mean maintaining two completely different sets of code to cater for each.

    You can see the full list of commits since beta 2 here.

    Final call for testers

    What? You haven’t tested beta yet? I find your lack of faith disturbing.

    Everything is proceeding as we have foreseen, so the Release Candidate is still planned for Jan 4th–8th 2016 so long as we stay on target. Developers please test your code before then. Try not. Do. Or do not. There is no try.

    We also welcome user tests, but we recommend using a development site, since there may be undiscovered bugs.

    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. We would be honoured if you would join us!

    And of course, may the force be with you.


  • Just a small update today – 2.4.12 release is now available.

    You can download it on WordPress.org or as an automatic update in your administration panel. A total of ~10 commits made it into this release fixing a few 4.4 compatibility issues.

    If you spot any further issues, please report them to us in detail on Github so the development team can review – comments on this post are closed.


  • The WooCommerce 2.4.11 release is now available!

    You can download it on WordPress.org or as an automatic update in your administration panel. A total of ~49 commits made it into this release fixing a few small issues and improving compatibility with WordPress 4.4. See the changelog for the full details.

    One of the biggest changes we made in this version was to add basic support for 4.4’s new embeds feature. We enhanced embeds for products slightly by including rating, pricing, short description and product links as pictured below.

    There is also included support for the new default theme; Twenty Sixteen.

    If you spot any further issues, please report them to us in detail on Github so the development team can review – comments on this post are closed.


  • 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!