WooCommerce 2.7 beta 2

Today we tagged WooCommerce 2.7 “Bionic Butterfly” beta 2. It contains a whole host of bug fixes and is ready for testing! if you’d like to find out whats new in 2.7, you can read more about 2.7 in our first beta post here.

Download WC 2.7 Beta 2


Changes since beta 1

We’ve been pretty busy since beta 1, mainly due to the feedback from testers. Kudos to everyone who has reported an issue or contributed so far!

Aside from many many fixes and smaller improvements, here are some of the larger changes you may need to be aware of:

What’s left to do?

Currently there are only 2 open issues we’ve yet to address and those are:

We’re hoping to have this done and beta 3 tagged by the 16th.

Developer notes/extensions

We’ve been taking notes as we’ve updated extensions. For know issues and gotchas, please see this article on the wiki.

As for examples on how to update extensions to support 2.7, we’ve been publishing a series of posts on how we’ve done it ourselves.

Release schedule

We’re aiming to have a release candidate ready on the 27th Febuary. The final release will be shortly after that.

If you have not yet tested extensions or your themes, now is the time 🙂 Thanks for your support!


Keep yourself in the loop!

Sign up for the WooCommerce developer newsletter:
This field is hidden when viewing the form
This field is hidden when viewing the form
This field is hidden when viewing the form


24 responses to “WooCommerce 2.7 beta 2”

  1. I like the new CRUD system. I’m just not entirely sure how custom properties should be handled. For example, given a product instance, how does one set a custom property and save it to the database, without calling update_post_meta()?

      1. I’m sorry, and I feel a bit “thick”, but I’m not sure I follow. The add_meta() in that class seems to add (of course) some meta to an array, and that’s it. The operation I would be looking for would be SET meta (i.e. add or replace) and persist it to the database. Something like the following:

        // Add or update custom property/meta
        $product->set_prop(‘my_custom_prop1’, 123);
        // Add or update custom property/meta
        $product->set_prop(‘my_custom_prop2’, ‘ABC’);
        // Persist the meta to the database
        $product->save();

        Is there something like that in the new CRUD classes?

        1. There are update and add meta data methods. The actual setting/updating is handled internally when the entire object is saved. https://github.com/woocommerce/woocommerce/blob/ae0e4e7ac395d276ea08e3464e7d922d7cddd532/includes/abstracts/abstract-wc-data.php#L281-L334

          1. Thanks the clarification. Now, the million dollars question. If I do the following:

            function some_cool_function() {
            $product = wc_get_product(123);
            $product->update_meta_data(‘my_custom_meta’, ‘abc’);
            }

            When is the object actually saved? Is there a method to call?

          2. It’s not saved until something (or you) call $product->save(). This triggers the write to the database.

  2. > The final release will be shortly after that.
    Does that mean like days? A week? Ideally we wanted to release extension compatibility during RC but we’ll be on our company retreat that week, just wanted to be sure our timing is good 🙂

    1. 7 days unless the world explodes.

  3. Hi,

    Is it intended/believed that in WC 2.7, all database access will go through the CRUD layer (i.e. no direct calls to wpdb outside of CRUD classes)? I’m quite interested in the possibilities that opens up, if it is so.

    David

    1. Whilst I’m sure there may be some ‘stragglers’, and we cannot account for all extensions, yes that is the plan. Data stores, and only data stores, interact with the database.

    2. The CRUD classes are a great idea, but there will still be cases in which SQL will be a better approach. I say that for personal experience. In over 20 years, I worked with countless frameworks that have extensive CRUD classes (far more flexible than WP_Query), yet sometimes a handcrafted SQL allows to achieve a result more quickly, without having to resort to convoluted nested loops, leading to a poor RBAR approach (see https://www.simple-talk.com/sql/t-sql-programming/rbar-row-by-agonizing-row/). 🙂

      The idea of CRUD classes, as well as Model classes, is to abstract the interaction with the underlying database, but there will always be some space for good, old queries. 🙂

  4. […] are reviewing and updating our popular Currency Switcher for WooCommerce, in preparation for the upcoming release of WooCommerce 2.7. Our next major version will be 4.0, and it will include several updates and enhancements, which […]

  5. What are the theme support declarations for the new Gallery? It seems that I will need to add them fro the zooming feature to start working like it did by default in beta 1.

    Thanks.

    1. I figured it out. For those who are having a hard time finding anything useful like I was, these are the 3 declarations.

      add_theme_support( ‘wc-product-gallery-zoom’ );
      add_theme_support( ‘wc-product-gallery-lightbox’ );
      add_theme_support( ‘wc-product-gallery-slider’ );

  6. […] 2.7 is currently in beta and I’d encourage any users to give it a try before it’s released, in a staging […]

  7. Any update on the ETA for release of 2.7?

  8. […] Today we tagged WooCommerce 2.7 “Bionic Butterfly” beta 3. If you’d like to find out whats new in 2.7, you can read more about 2.7 in our first beta post here and our second beta post here. […]

  9. Using 2.7, will you be able to add a product with attributes to an order using the API?

    1. Meta data to represent attributes.

      1. Ok, awesome. This update can’t come soon enough!

      2. I tried adding a line item with meta fields using the new 2.7 RC, but it didn’t work for me. What am I missing?

        https://wordpress.org/support/topic/add-line-item-with-meta-to-order-using-api/

  10. […] more information about what’s new in 2.7, check out the Beta 1, beta 2, beta 3 blog posts. We also have some compatibility example posts and posts about our new […]

  11. […] more information about what’s new in 3.0.0, check out the Beta 1, beta 2, beta 3 blog posts. We also have some compatibility example posts and posts about our new […]

Leave a Reply

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