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 🙂
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.
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
The full changelog can be found in the readme, but highlights include:
- Revised admin
- Refactored all code
- New MP6 UI
- Icon fonts replace image icons – WooCommerce has its own icon font, similar to WP 3.8’s Dashicons set.
- Settings page streamlining/new tabs
- Plugin structure refactoring – easier to navigate structure with class files within
/includes/and admin class files in
- New reports and functions for getting report data
- Tax Rounding improvements – Particularly for tax inclusive prices.
- Price formatting additions – Display prices incl or excl tax on the frontend, and append a string of your choice.
- WC_DELIMITER constant lets you change the ‘pipe’ for separating values – requested by some non-english users.
- Coupon usage limits per user (using email + ID)
Also, in more detail:
New notices API
The new notices API makes it easier to add notices, success messages and errors which are output on the frontend.
wc_add_notice( $message, 'notice_type' );
3 types (notice, error and success) are supported and each has its own template file.
These new notices replace the old $woocommerce->add_message() and $woocommerce->add_error() methods.
The brand new REST API lets you get orders, customers, reports, and products in JSON and XML format.
You can read more about the REST API in previous posts here on develop.woothemes, and docs will be available during the beta.
Endpoints instead of pages
WC 2.0 had many, many pages which were installed automatically, but we felt this was overkill, especially the nested pages for things such as payment and order confirmation.
These nested pages have been instead turned into endpoints – the pages we have now are:
All others (pay, order received, edit address etc) are endpoints.
“Add Payment Method” Feature
If gateways declare support for it, customers will be able to add payment methods/cards to their account under the My Account pages for later use during checkout.
WooCommerce 2.1 ships with a custom icon font which we use for all the icons in the WooCommerce UI. This aids performance and provides pixel perfect clarity on any screen.
If you’re building a WooCommerce extension you may want to use these icons if you’re adding a tab to the product data, or adding a new top level menu item.
See http://docs.woothemes.com/document/utilising-the-woocommerce-icon-font-in-your-extensions/ for instructions on this.
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.
To make core more lean, the following integrations have been dumped from core and made into plugins (available from .org):
Testing your extensions!
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:
19 replies on “WooCommerce 2.1 Beta 1 is ready”
Thanks to the whole Woo team, really great news, and we feel your hard work, just from the features & changelog! Amazing stuff, guys!! 🙂
I will make my few little plugins compatible thanks for the heads up! 🙂
One question, though: wasn’t the prefix also “wc_” in the 1.x era? Any reason for the prefix change again?
Thanks, Dave 🙂
We’ve made a couple detours (mostly not part of any strategy) in getting to the “wc_” prefix, never really got a real standard in place, until now.
Glad to see you like it Dave, thanks! 🙂
If we want to make a pull request do we do so against master?
What about minor issues (like white space or whatever) should those also still go to master?
Master is our bleeding edge; so yes, fixes and cleanup in master please 🙂
Nice work everyone!
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. 🙂
Definitely tried to simplify certain aspects in this release. Another example is the admin edit order page – take a look 🙂
Nice! Love the idea of hiding the item meta/line totals until an admin signals their intent to actually want to change those.
That said, I’m going to have to redo all of Subscriptions Edit Order code, and the Add/Edit Subscription docs, and the Add/Edit Subscription video. All for a good cause though! 😉
Great News, Woocommerce.
My smile icons with comments always coming with right aligned. Can you solve it permanently within the plugin. My comments often included smile inside the comments. 🙂
This is looking really awesome! WordPress 3.8 and Woocommerce 2.1 could be deadly.
Can you elaborate more on the reporting functionality? Will I be able to export that now? I have been waiting for that functionality. 🙂
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 🙂
In this URL
Can you tell me how I can get the order id (180)?
$order_id = $wp->query_vars[‘order-received’];
why make it simple when you can make it complicated?!
How is 2.1 comng along? Its kinda quiet…
Just did up date, none of my account endpoints are working?
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’m in the same boat… Unsure how to add conversion tracking to “thank you” page when updated to “end points”
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.