The official WooCommerce development blog

Without further ado, we’re please to announce “Peppy Penguin” Beta 1 is available for testing.

╭────────────╮
┃ Woo! 2.1 ┃
(o< ╰─y──────────╯
//
V_/_

2.1 has pretty much been developed in parallel with our 2.0 fix releases for several months now, with major changes being added to 2.1 whilst fixes were rolled out in 2.0. Since 2.0 there have been over 1,318 commits which shows how busy we’ve been 🙂

The plan is to allow the beta(s) to run through Christmas, with a release candidate early Jan quickly followed by a stable release. So 2.1 will be released in January, so long as WordPress 3.8 is out.

That gives theme and plugin developers at least a month and a half for testing. You have been warned 🙂

Beta requirements

The most pressing requirement is that WC 2.1 requires WordPress 3.8. Why? MP6.

With the admin redesign in 3.8 we’ve worked on the look and feel of WooCommerce itself – this obviously works flawlessly in 3.8, but older versions will look rough around the edges. Please test with 3.8 when possible and only raise UI issues with this version.

Reporting Bugs

If you find a bug with the beta, please ensure you prepend the ticket title with [2.1-beta-1] when submitting the issue to GitHub, or at least mention what version you are using in the ticket description.

Also when reporting anything to us:

Describe the issue in detail, with a system status report

Don’t report issues with extensions, only core

Don’t report issues with themes

Report bugs, not feature requests

Release highlights

The full changelog can be found in the readme, but highlights include:

A new default credit card form which gateways can use

Since many gateway plugins use a similar interface for card payments during checkout, we’ve added a new ‘default’ card form which gateways can make use of:

This form uses the jQuery payment library developed by Stripe, has automatic formatting for credit card numbers and expiry dates, and automatically displays the type of card being used. It’s really slick and we’re excited to see it in use.

To use the form, the gateway need only declare support for ‘default_credit_card_form’ – it will then be output via the payment_fields method automatically (as long as you haven’t replaced this method with your own), or the gateway can just call it manually.

Removed integrations

To make core more lean, the following integrations have been dumped from core and made into plugins (available from .org):

Testing your extensions!

Now is a great time to start testing extensions for compatibility. With 2.1 and WP_DEBUG enabled you may see many deprecated notices for things such as enqueuing inline javascript and adding notices due to new functions in the API. You can tackle these either with version_compare or by only supporting 2.1+ after launch.

Key things to check for and fix:

Deprecated functions and classes

Throughout WC there may be deprecated methods in the classes, however the functions have been moved to the wc-deprecated-functions.php file. This file also maps old filters to new filters when applicable.

Check your usage of these and test with WP_DEBUG enabled.

Function name consistency

With the exception of template functions, all core function name prefixes have changed from woocommerce_ to wc_ – the old functions are still in the plugin (wc-deprecated-functions.php) and will not cause notices in 2.1 – deprecated notices will be added in 2.2, and the functions will be dropped in 2.3.

Getting page permalinks (e.g. in gateways)

If you get the permalinks of the pay and thanks pages directly you will have issues with 2.1; these pages are now endpoints.

Most commonly, if you have used woocommerce_pay_page_id in a gateway, you need to use the class methods instead:

$order->get_checkout_payment_url( true )

The above will return the correct link to the pay page endpoint for a particular order – this is also supported in later versions of 2.0 making backwards compatibility a non-issue.

Downloadable file URLs

As of 2.1, the structure for downloadable file urls have changed within downloadable products to support more data.

Downloads are stored with an md5-hash key, and an array value consisting of name and url.

Functions/methods for getting URLs/paths have changed – get_files() method for example which is part of the product classes.

Meta key ‘filepaths’ has been renamed to ‘downloadable_files’

The 2.1 upgrade script will update the formats for you from 2.0.x to 2.1.x

add_to_cart_handler filters are gone

In 2.0 we introduced some add_to_cart_handler filters for conditionally changing how add to cart events would take place for custom product types. In 2.1 this has been removed in favour of class methods which your custom product types can extend, the methods being:

It’s rare to see a new version actually simplify things, so I was pleasantly surprised to find both less front end pages and less admin tabs in 2.1. Both great changes for the many millions of new users still to discover the joys of WC. 🙂

I always get excited when I see there’s a new version of Woocommerce available! (sad, I know). Currently testing this on a site that isn’t live as I’m also in the middle of a re-design. How do you turn off the default Woocommerce styling now? There doesn’t seem to be an option to do this anymore…

Hi there …I’m looking forward to upgrading to this new version, but can you tell me please if you’ve included an option to get rid of the yellow numbers next to the product categories? I know this is a relatively small thing but it spoils the look of my website. I’ve tried to get rid of them myself & temporarily disabled my website in the process which was a tad stressful lol, my own fault for tampering really …Otherwise Woocommerce is fab 🙂

I have been unable to add Adwords Conversion Tracking to /checkout/order-received since the EndPoints were setup. It appears that these pages are Dynamically created. I attended to create a page with the same URL and it ignores the page I created and uses the Dynamic page. Anyone have a solution for this issue.

I installed update and my cart page responsiveness is falling off the page with the Streamline Pro Theme. I used a workaround found for the previous version and will use again if needed. But, wasn’t sure if there was a different solution to address this before doing so. Also, thought you might like to see it.