Develop WC

The official WooCommerce development blog

WooCommerce 2.6.6 Fix Release Notes — October 20, 2016

WooCommerce 2.6.6 Fix Release Notes

We’ve made a small update and released WooCommerce 2.6.6 today to fix a potential conflict with extensions. You can download it on or as an automatic update in your administration panel.

Only ~2 made it into this release to fix:

  1. A conflict with Local Pickup Plus due to 2.7.x code making it into the 2.6.x branch. This went unnoticed due to core not using the function with the error.
  2. The sort order of shipping methods was not being respected on the cart.

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.

WooCommerce 2.6.5 Fix Release Notes — October 19, 2016

WooCommerce 2.6.5 Fix Release Notes

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

~82 commits made it into this release fixing several minor issues. The main changes are as follows.

  1. The ship to specific countries setting actually did nothing since 2.6.0. This has now been hooked up and made functional.
  2. We fixed the webhook delivery for manual orders by fixing the way dates are handled.
  3. Fixed some oddities around variation saving and the attributes being empty on the frontend when using ‘all’ attributes.
  4. Made the processing email send when the order goes from on-hold to processing. This can sometimes happen with PayPal orders which are delayed.
  5. Improved and fixed some validation functions on the my account screen.

The full changelog for 2.6.5 is below.

* Fix - Shipping classes URL in admin.
* Fix - Notice in reports when using custom date ranges.
* Fix - When checking needs_shipping, ignore anything after : in the method ID.
* Fix - Allow has_shipping_method to work with instances.
* Fix - Potential notice in wc_add_to_cart_message().
* Fix - Prevent notice in wpdb_table_fix if termmeta table is not used.
* Fix - Payment method box fixes e.g. maintain previously selected payment method after update.
* Fix - Prevent multiple password validation methods at once on my account page.
* Fix - Ship to specific counties option had no effect.
* Fix - Broken Webhook delivery due to use of post_date_gmt which does not exist for drafts.
* Fix - Use method title in admin shipping dropdown.
* Fix - Fixed downloadable variable product URL.
* Fix - Handle object when generate_cart_id is used to prevent notices.
* Fix - Set header link color in emails.
* Fix - Rest of the world ID 0 zone handling when using CRUD classes.
* Fix - Cast prices as decimal when querying prices in price filter widget.
* Fix - API - Fix coupon description field.
* Fix - API - ID needs to be capitalized to allow correct sorting.
* Fix - API - Fixed undefined order ID.
* Fix - API - Allow API to save refund reason.
* Fix - API - Resolved encoding issues with attribute and variation slugs.
* Fix - API - get_attributes should return term name, not slug.
* Fix - API - Product "filter" and "sku" paramaters.
* Fix - Handle info notices in cart, not just error messages.
* Fix - Don't remove hyphens in attribute labels.
* Fix - Start sales on variations after they are saved, if applicable.
* Fix - Made the text showing max variations you can link match the actual filtered value.
* Fix - Add missing tables to wpmu_drop_tables function.
* Fix - When syncing variation stock, ensure post is a variation.
* Fix - Resolved some sales by date sum issues.
* Fix - Fix cart update in IE when enter key is pressed.
* Fix - Variation is_on_backorder when parent manages stock.
* Fix - Fix variation script malfunctioning when show_option_none arg is set to false.
* Fix - Fire tokenisation event on load for pay page.
* Fix - Populate attribute dropdown when empty.
* Fix - Fix email check on my account page.
* Fix - Send processing email on on-hold to processing transition.
* Fix - Incompatibility with SQLite databases.
* Fix - KGS and ISK currency symbols.
* Tweak - Password reset now uses WP functions.
* Tweak - Format US 9-digit postcodes.

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.

New product gallery merged in to core for 2.7 —

New product gallery merged in to core for 2.7

Followers of this blog will know that we’ve been talking about the possibility of revamping our product gallery display on single product pages. This post is simply to document that this has now been confirmed and indeed merged in to core. The feature will be included in WooCommerce 2.7.

Here’s a (very) quick video demonstrating the new gallery:

The improvements, in a nutshell

To re-iterate the points from previous posts;

  • Visitors now have access to both magnification and zooming (lightbox)
  • Gallery behaviour is more intuitive – clicking a thumbnail updates the main image rather than opening a lightbox
  • Dramatic improvements on handheld, in particular; touch gestures – swipe to scroll through the gallery, pinch to zoom, swipe up to close, etc
  • Opening the lightbox on mobile now displays the image in it’s true size, larger than the in-page display 🎉

Theme and plugin authors, please heed the following message

If you develop a WooCommerce theme or plugin that interacts with our gallery in any way we highly recommend that you checkout the WooCommerce master branch and test your product against it as soon as you possibly can. Themes will very likely need a few CSS updates to support the new gallery. Things to look out for include;

  • We’ve adjusted how thumbnail columns are laid out. No more first and last classes, just a single .woocommerce-product-gallery--columns-x class applied to the gallery wrapper.
  • When working on integrations with default themes we noticed some button style conflicts with the buttons in Photoswipe (lightbox).
  • You’ll need to style the Photoswipe trigger (.woocommerce-product-gallery__trigger)

Beyond this, we hope the update will be fairly unobtrusive. But we must stress that this is a potentially breaking change so it’s always best to test these things sooner rather than later.

Your thoughts welcome

2.7 is still a ways off, so if you spot any bugs, or don’t like something we’ve done with the gallery then now is the time to make your voice heard. As always, github is the place to do so.

The New WooCommerce Product Image Gallery — September 7, 2016

The New WooCommerce Product Image Gallery

A couple of weeks ago we posted about an experiment we were working on to improve the product galleries in WooCommerce, particularly the mobile experience.

We laid out options to have a lightbox, a magnification/zoom, or both and included a poll to get your feedback. After 442 votes, the results of that poll look like this;

  • Lightbox – 18.55%
  • Zoom/Magnification – 51.81%
  • Both – 29.64%

What do these results show us?

  1. The majority of folks (81.45% – ‘both’ voters + ‘zoom’ voters) like the zoom/magnification feature
  2. A significant number of people (48.19% – ‘lightbox’ voters + ‘both’ voters) feel that we need to continue including a lightbox

Based on these results and internal discussions we’ve decided to include both a lightbox and a zoom/magnifier. To do this we’ll use the popular Photoswipe script for lightbox functionality alongside our own Flexslider which handles the carousel/swiping on mobile. Zoom is our script of choice for zooming.

How does it look

A little something like this;


And on mobile;


The (extra) nice thing about the mobile experience (which isn’t possible to capture in a desktop browser), is that you can tap/pinch to zoom once the lightbox is open which makes it feel very ‘native’. You also get to see the full size image, regardless of what size your thumbails display at.

Can I play with it?

You sure can. Just check out the add/product-galleries branch on github. There are a few styling tweaks to work through, and variation images don’t work yet. But you’ll get a very good idea of how things work.

Once again, a note to theme authors

Shamelessly copy/pasted from the previous post;

This change involves template changes to templates/single-product/product-image.phpand templates/single-product/product-thumbnails.php as well as the addition of some new scripts and a little css. If you dequeue WooCommerce styles in your theme and roll your own, you’ll need to add some css to support the new gallery.

Let us know what you think!🙂

A new product gallery coming to 2.7. Maybe. — August 18, 2016

A new product gallery coming to 2.7. Maybe.

The product image galleries in WooCommerce basically haven’t changed since version 1. The layout is fine, but the lightbox functionality is looking more than a little tired.

Most importantly the experience on smaller handheld devices is terrible. We’d like to replace the lightbox functionality entirely with a carousel/zoom combination which will provide a lightweight, intuitive experience for both desktop and handheld devices.


Just so we’re on the same page as to exactly how terrible our current implementation is for small screens check this out;

That’s right, the image that appears in the lightbox is actually smaller than the image displayed in the page itself.

Of course we could just disable the lightbox for small screens, but without a carousel it wouldn’t be possible to see the additional images at a size any larger than the small thumbnails. We need another solution.

How do we propose to address this?

I think we can agree that the lightbox is pointless on small screens. What works very nicely is a carousel with touch support to easily swipe between images. Something like this:


I don’t expect many WooCommerce users to be opposed to this change. What I’d really like you to consider is how our galleries behave on desktop.


We’ve agreed that a carousel is better for mobile. I happen to like the carousel for navigating the gallery on desktop as well. We’re already loading the script for mobile so it makes sense to use it on desktop too.

The question then becomes; How do we provide the ability to see the image in greater detail? There are a couple of potential answers to that question each with it’s own pros/cons.


The pros of using a lightbox are that it is familiar. It’s what we have currently.

But that’s about it.

The cons are several

  • Lightbox scripts are fairly hefty and include a lot of functionality that we don’t really need
  • Generally require additional assets (css) on top of the js
  • Given we’ve agreed that a carousel is the way to go for gallery navigation, it’s somewhat counter intuitive to have that method of navigation in addition to lightbox gallery navigation


Zooming in on the main product image as you hover over it is an alternative option. Here’s how that would look;


The pros

  • It provides a very intuitive overall experience. You click the thumbnail you want to look at then simply hover over the main image for more detail.
  • It’s lightweight. Including CSS, PrettyPhoto (our current lightbox script) weighs in at 30kb. The zoom script is 6kb. That’s an 80% decrease!
  • It’s consistent – the desktop / mobile experience mirror one another.

The cons

  • This solution is dependent on the theme to display the product image at a reasonable size. If the image is tiny, zooming might feel a little awkward.
  • It’s different. Not sure this is necessarily a con but it’s a very important to consider for store owners. Changes like this do have the potential for disruption.


I really wouldn’t want to do this, but it is of course an option to have zooming and a lightbox.

Over to you

What do you think? We’re very keen to hear feedback on this idea, in particular on the desktop behaviour.

If you’d like to actually test this functionality please check out the add-product-galleries branch on github. It goes without saying that you should only do this in a development environment.

Please vote in the poll!

A note to theme authors

This change involves template changes to templates/single-product/product-image.php and templates/single-product/product-thumbnails.php as well as the addition of two new scripts and a little css. If you dequeue WooCommerce styles in your theme and roll your own, you’d need to add some css to support the new gallery.