Categories
WooCommerce Core

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!

By Mike Jolley

Mike Jolley is a tech hobbyist, astrophotographer, retro gamer, and software engineer who works at Automattic and contributes to open-source projects such as WordPress and WooCommerce.

24 replies on “WooCommerce 2.7 beta 2”

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()?

Like

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?

Like

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?

Like

> 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 🙂

Like

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

Like

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.

Like

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. 🙂

Like

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’ );

Like

Comments are closed.