• For 2.3, aside from UI, we’ve been looking at some long standing issues. One of these issues related to the display of coupons when prices include tax (#4848). Although complex, this issue has been resolved in 2.3 without too much change, however, this also got us looking at this point raised by Samuel Aguilera:

    Apply discounts after taxes is not legal. Discounts must be always applied before taxes, is the law, not user preference.

    If you’re not aware, up to now the coupon system has always had an option at coupon level called “apply before tax” which, as stated, makes sure a coupon is calculated before tax at line-item level. Leaving the box unchecked would take the discount off after all taxes – so in reality we had 2 different types of coupons (before tax – cart, after tax – order) each with their own methods and display related functions.

    In 2.3 we’ve decided to simplify this down, have 1 set of coupons, and always apply them before-tax. See #6830.

    So What Has This Been Changed?

    • Apply Before Tax option removed from coupons
    • WC_Cart::get_coupons() which used to allow you to pass either ‘cart’ or ‘order’ has deprecated the type arg. If you pass in ‘order’ an empty array is returned.
    • WC_Cart::remove_coupons() same as above.
    • Deprecated some coupon methods in the cart and orders class:
      • WC_Cart::get_order_discount_total()
      • WC_Cart::apply_cart_discounts_after_tax()
      • WC_Cart::apply_product_discounts_after_tax()
      • WC_Cart::get_discounts_before_tax()
      • WC_Cart::get_discounts_after_tax()
      • WC_Abstract_Order::get_cart_discount()
      • WC_Abstract_Order::get_order_discount()
      • WC_Abstract_Order::get_cart_discount_to_display()
      • WC_Abstract_Order::get_order_discount_to_display()
    • $discount_total variable in cart class is deprecated (was after tax discount total) and will always be 0.
    • templates/cart/cart-totals.php has been edited to remove the after-tax discounts
    • templates/checkout/review-order.php has been edited to remove the after-tax discounts
    • Removed the edit ‘discount’ row from the edit orders panel in the backend – discounts are applied per line item (before tax!)

    WC_Cart::get_total_discount() should be used if you need to get the discount amount, instead of the deprecated methods. This method exists in 2.2.

    WC_Cart::get_discount_to_display() should be used to display the discount amount. This is a new method in 2.3

    What Theme Developers Need to Update

    Themes will need to update their template files, namely:

    1. templates/cart/cart-totals.php
    2. templates/checkout/review-order.php

    They will need to remove the second coupon/discounts loops (order level coupons). Failure to update won’t break anything however, it will just show a deprecated notice.

    What Plugin Developers Need to Update

    Remove the use of dedicated methods, and avoid accessing properties directly where possible. This update has deprecated methods and thus shouldn’t ‘break’ plugins, but it will render some functionality useless, such as code which checks for after-tax discounts.

    If you do notice something not backwards compatible (in that it causes error) will let us know asap.

     


  • The WooCommerce 2.2.8 release is now available via WordPress.org or automatic update in your administration panel. Thanks to all of our contributors who’ve been helping out.

    There were several fixes in this release, including a minor security fix for nonce check in form handler. Read more about the fixes in the changelog. A total of 25 commits made it into this release.

    (As always, the comments on this post are closed because this is not the right platform for support requests.)


  • The WooCommerce 2.2.7 release is now available via WordPress.org or automatic update in your administration panel. Thanks to all of our contributors who’ve been helping out.

    There were several fixes in this release, including a minor security fix for an XSS issue when using product notes. Read more about the fixes in the changelog. A total of 58 commits made it into this release.

    (As always, the comments on this post are closed because this is not the right platform for support requests.)


  • The WooCommerce 2.2.6 release is now available via WordPress.org or automatic update in your administration panel. This fixes a few small notices and a bug around editing order addresses in the backend.

    You can read more about the changes in the changelog. A total of 10 commits made it into this release.

    (As always, the comments on this post are closed because this is not the right platform for support requests.)


  • The WooCommerce 2.2.5 release is now available via WordPress.org or automatic update in your administration panel. Thanks to all of our contributors who’ve been helping out.

    There were several minor fixes in this release which you can read about inside the changelog. A total of 130 commits made it into this release.

    (As always, the comments on this post are closed because this is not the right platform for support requests.)


  • The WooCommerce 2.2.4 release is now available via WordPress.org or automatic update in your administration panel. Thanks to all of our contributors who’ve been helping out.

    There were several minor fixes in this release which you can read about inside the changelog. A total of 52 commits made it into this release.

    (As always, the comments on this post are closed because this is not the right platform for support requests.)


  • The WooCommerce 2.2.3 release is now available via WordPress.org or automatic update in your administration panel. Thanks to all of our contributors who’ve been helping out.

    There were several fixes in this release, including a minor security fix for an XSS issue in the reports section. Read more about the fixes in the changelog. A total of 78 commits made it into this release.

    (As always, the comments on this post are closed because this is not the right platform for support requests.)


  • The WooCommerce 2.2.2 release is now available via WordPress.org or automatic update in your administration panel. Thanks to all of our contributors who’ve been helping out.

    There are only three changes in this release which can be found in the changelog. A total of 6 commits made it into this fix release.

    (As always, the comments on this post are closed because this is not the right platform for support requests.)


  • The WooCommerce 2.2.1 release is now available via WordPress.org or automatic update in your administration panel. Thanks to all of our contributors who’ve been helping out.

    There are only three changes in this release which can be found in the changelog. A total of 6 commits made it into this fix release.

    (As always, the comments on this post are closed because this is not the right platform for support requests.)


  • Finally we’re proud to announce WC 2.2 (Prowling Pangolin) is live! 2.2 is our 9th major release and has been in development since 2.1 was released back in February.

    Some Stats on This Release

    To highlight the work that’s gone into 2.2, since 2.1 I would have loved to have shown more stats from Github, but instead saw this:

    This comparison is big! We’re only showing the most recent 250 commits

    I think that pretty much covers how much work has been done, but from the data I was able to scrape there have been:

    • 47 contributors
    • 1670 commits
    • 553229 additions
    • 972950 deletions

    That’s staggering, so huge props to everyone who has contributed via Github, and also not forgetting the translation teams on Transifex!

    Release Highlights for Developers

    Upgrading to 2.2

    Aside from testing before pushing to live (use a staging site) developers should be aware of the upgrade script which runs in 2.2. The script will:

    1. Update some deprecated options such as woocommerce_ship_to_billing.
    2. Convert the old order statuses (taxonomy) to the new ‘post status’ formats.
    3. Update variations to include new stock meta data.
    4. Add new capabilities to admin users for webhooks.

    Users will be prompted to run this in WP admin after upgrading.

    What Comes Next?

    WC 2.3 has already been scoped out and planned to be a UI focussed release. We’re hoping to speed up our release cycles as of 2.3, so keep an eye on Github and feel free to get involved.

    And for everyone attending our first WooCommerce conference, see you in November!