Say hello to WooCommerce 3.0 “Bionic Butterfly”

Today we’re excited to release WooCommerce 3.0 (previously 2.7), dubbed the “Bionic Butterfly”, into the wild! 3.0 has been in beta since December, development since August, and has had over 3000 commits from 115 contributors.

Read on to find out what’s new!

3.0 is a major update. As always, please ensure extensions and themes are compatible before upgrading, test on a staging site if you can, and make a backup for peace of mind.

CRUD (Create, Read, Update, Delete) objects and data-stores

The CRUD classes in 3.0 represent a fundamental change in how we work with data objects in core (thats products, orders, coupons, customers etc).

Traditionally in WordPress when working with, for example, posts and post data you’re pretty much able to update/get/create any meta data you want anyway you want, procedurally direct to the database. Our new CRUD approach on the other hand introduces another layer between the database and your code which adds structure, validation and control.

As a simple example, let’s imagine you have a product and this product has a price. With the old way, if you wanted to update the price of this product you’d:

  1. need to know where that price is stored (meta key)
  2. need to know in what format that data is stored (string? 2 decimal places?)
  3. need to know how to update that data (update_post_meta).

With CRUD, you instead have a list of product properties, one of which is price, and you can call ->set_regular_price() to set the data, followed by ->save() to make that data persist in the database. Where is gets stored is none of your concern and formatting is handled for you. Example:

[code]
$product = wc_get_product( 1 );
$product->set_regular_price( 10.99 );
$product->save();
[/code]

The benefits?

  • We define the structured data for each resource and you can look it up easily.
  • We control the flow of data, and any validation needed.
  • You don’t need to know the internals of the data you’re working with.
  • Internally, the data can be moved elsewhere e.g. custom tables, without affecting existing code.
  • It’s reusable (API, CLI, WP Admin) and has more unit test coverage.

We’re excited about this change, and it really paves the way for us to improve performance in the future.

You can read more about the new CRUD classes here.

A new product gallery

Back in August we posted about some improvements we wanted to make to our product image galleries and then took a poll to see what users wanted. The results showed that the majority of voters liked the zoom feature, and a significant number of people wanted to keep some form of lightbox.

Based on these findings, we devised a system that included both, with added mobile device support and includes the following benefits:

  • Visitors now have access to both magnification and zooming (lightbox)
  • Gallery behaviour is more intuitive – clicking a thumbnail updates the main image rather than opening a lightbox
  • Dramatic improvements on handheld, in particular; touch gestures – swipe to scroll through the gallery, pinch to zoom, swipe up to close, etc
  • Opening the lightbox on mobile now displays the image in it’s true size, larger than the in-page display

To avoid disrupting custom lightboxes in themes, non-default WordPress themes will need to enable the new functionality using add_theme_support(). It’s easy; you can read how to do this here.

New CLI (Command Line Interface) and Rest API v2

2.6.x had a CLI but it was custom and didn’t share any code with the rest of the codebase. This was wasteful and hard to maintain; we have a fully blown REST API after all. In 3.0.x we’ve made a new CLI which integrates directly with the REST API and supports all of the same functionality.

You can read more about the new CLI here.

We’ve also introduced a new version of the API with several benefits over v1. To summarise whats new:

  • Support for meta data on most endpoints.
  • New variations endpoint for creating and updating variations. In addition, we’ve prevented the (broken) ability to manipulate variations directly on the products endpoints.
  • Settings endpoint (update/view shop settings).
  • Shipping zones endpoints.
  • Payment and shipping methods endpoints, including settings.
  • Added support for oAuth1.0a authentication using headers.
  • Additional caching and removal of slow queries (last order query from the customers part of the API).

You can view the REST API documentation here.

A new logging system

The new logger, which can be used by extensions to log events, errors and warnings, addresses limitations in our old logger. It includes log handlers, it implements the methods described by the PSR-3 logger interface, and it’s much more extensible.

The new logger includes 2 handlers; file and database. The database handler can be enabled with;

[code]define( ‘WC_LOG_HANDLER’, ‘WC_Log_Handler_DB’ );[/code]

Read more about the improved logging system here

Performance improvements

There are several performance improvements in 3.0.x. To summarise the main ones:

  • For variable products specifically, we’ve tried to optimise variable product sync. Upper/lower price meta data is no longer stored (it was not used in core), just the main prices, if a child has weight, and if a child has dimensions.
  • In our template files, we’ve removed WP_Query from up-sells.php and related.php and replaced with PHP foreach loop (since we already have the product IDs). This means one less large query on product and cart pages.
  • We’ve removed the feature where old orders get access to new downloads on product edit. Looping (potentially) thousands of orders to do this update was too much of a performance burden for some stores and this also could lead to unexpected behaviour. After this update we do however update edited downloads, so editing a file will not prevent purchasers from downloading it.
  • We’ve removed the ‘order items’ column on the orders page. Whilst this can be useful, loading all items for all orders on the page is not performant. This may return in the future but it will need to be dynamic so it may just be left for a future UI redesign.
  • Rather than sending emails in one big request when placing an order on checkout, we’ve implemented a delayed CRON event to send the emails instead. This sends the emails after a small delay in a separate request and in turns speeds up the checkout by about 50% in testing.

Additionally, since joining to the post meta table can cause significant slowdown when you have a large product catalog, we’ve made some optimisations to utilise taxonomies more for frontend product filters.

  • Product visibility (which controls if products are visible in the catalog, search, or both) was previously post meta, and was used in all WooCommerce product queries. In 3.0 this is a new product_visibility taxonomy instead. In testing, with ~8k products we saw speed improvements of around 94%.
  • Featured products are also using the new product_visibility taxonomy instead of meta which improves queries on those.
  • And the same for out of stock products. If you’re hiding out of stock products from your catalog, you’ll see improvements.

Meta to taxonomy conversions are handled by our upgrade script.

Everything else

  • Sorting tax rates was previously a manual process. When you have pages of tax rates this becomes cumbersome. In 3.0.x we sort tax rates automatically, placing more specific rules above more general rules (the way they should be sorted).
  • On the frontend, we’ve made the storewide notice dismissible making it less of an issue when it overlaps content on mobile 🙂
  • On WordPress networks/multisite, when a user logs into a store with an account, but not an account on the current store, WooCommerce will add existing users to the store rather than throw an error as it did in 2.6.
  • Previously, structured data was output inline in our template files (marking up things such as products). In 3.0 we’ve switched to JSON-LD format which keeps our template files tidy and keeps data intact if customisations are made by theme developers.
  • When authorising payments with PayPal Standard, funds are now automatically captured when the order is changed to processing or completed. It was a manual process in 2.6.x.
  • We merged cart percent and product percent coupon types into one and removed product_cart discounts. The discounts these coupons provide are identical, however, the cart based validation would stop the coupon being applied if any non-eligble item was in the cart, rather than just discounting eligible items like product coupons do. This was not intuitive, caused store owner and confusion, and most important of all, just meant users would have to checkout twice to make use of these coupons (thats not fair nor ideal).
  • Variable product prices which contain sale items will no longer contain a strikethrough. Showing a striked out range followed by a non-striked out range, especially if the prices overlap, is too darn confusing and longwinded. Instead we show just a range now. Sale prices will still be shown when selecting a variation.
  • Grouped products are linked from the parent rather than the children. Children can be in more than one group.

There are many more smaller tweaks and improvements in 3.0 but this covers the main changes that you may notice.

Upgrading to 3.0

As always, before upgrading ensure that your extensions and theme are compatible with 3.0 and you’ve made backups. If unsure, check with the theme/extension developer.

Store ownersread this helpful guide on preparing for the update and if you see any deprecation notices after updating don’t be alarmed; read here to understand why.

After upgrading, the data upgrader prompt will run updates in the background. If your site is not accessible or password protected there may be a delay for the cron-based fallback to run.

If you’ve not yet made your extensions and themes compatible with 3.0.x (!) here are some notes we’ve been writing during our own testing:

How we tested 3.0

In total we had 4 beta versions for “2.7” from December; you can check out the Beta 1beta 2, and beta 3 posts if interested. We then had a “2.7” release candidate before deciding to move to Semantic Versioning and use 3.0.0 instead. In total our betas have had at least 1,148 downloads according to the stats we have from Github.

Internally we’ve been testing our own plugins and themes, releasing updates where needed, and we’ve had support from our 3rd party developers also. Huge kudos to our 3rd party devs!

On top of the manual testing we’ve all been performing, and the testing by the community, we’ve also been gradually expanding our unit test coverage which is now up to 50%. You can view current test coverage on Scruitinizer.

A huge thanks for our contributors!

A massive thanks to everyone in the community who have contributed, be that via issue reports, fixes, translation, testing, supporting other users or simply spreading the word!

mikejolley claudiosanches justinshreve sirreal aristath franticpsyx
mikejolley claudiosanches justinshreve sirreal aristath franticpsyx
jameskoster thenbrent ramiy opportus corsonr WPprodigy
jameskoster thenbrent ramiy opportus corsonr WPprodigy
claudiulodro shivapoudel JeroenSormani bor0 leewillis77 rynaldos
claudiulodro shivapoudel JeroenSormani bor0 leewillis77 rynaldos
jobthomas Chouby maximus80 gedex rellect jtsternberg
jobthomas Chouby maximus80 gedex rellect jtsternberg
Dartui danielhuesken ryanr14 belcherj prettyboymp pierrebuet
Dartui danielhuesken ryanr14 belcherj prettyboymp pierrebuet
vishalkakadiya helgatheviking terence1990 nishitlangaliya bekarice dwainm
vishalkakadiya helgatheviking terence1990 nishitlangaliya bekarice dwainm
todeveni mattyza coderkevin rasmusbe rodrigoprimo davefx
todeveni mattyza coderkevin rasmusbe rodrigoprimo davefx
tlovett1 proArtex akashsonic jaydeeprami maciekkus jamesckemp
tlovett1 proArtex akashsonic jaydeeprami maciekkus jamesckemp
kahanit sabbir1991 AnwerAR ragulka attiladonath nicomollet
kahanit sabbir1991 AnwerAR ragulka attiladonath nicomollet
kouratoras ttarpinyan MA7 andreagrillo A5hleyRich webmandesign
kouratoras ttarpinyan MA7 andreagrillo A5hleyRich webmandesign
crodas javorszky Ramoonus mik-laj tiagonoronha alarocca130
crodas javorszky Ramoonus mik-laj tiagonoronha alarocca130
Sidsector9 kalenjohnson leogermani datafeedr DavidAnderson684 davidlawson
Sidsector9 kalenjohnson leogermani datafeedr DavidAnderson684 davidlawson
unfulvio michaeltieso MichelPoulain dabernathy89 bobbingwide flemarie
unfulvio michaeltieso MichelPoulain dabernathy89 bobbingwide flemarie
hussong ChuckMac hannahswain nabsul justinstern renemeye
hussong ChuckMac hannahswain nabsul justinstern renemeye
DanielAGW zachd desko27 hereswhatidid roykho mattallan
DanielAGW zachd desko27 hereswhatidid roykho mattallan
bryceadams daigo75 mkdgs niravmehta lucasstark BFTrick
bryceadams daigo75 mkdgs niravmehta lucasstark BFTrick
faisal-alvi duracelltomi jluisfreitas macbookandrew iMazed matheusgimenez
faisal-alvi duracelltomi jluisfreitas macbookandrew iMazed matheusgimenez
flyonthenet jezmck fuzzguard widoz BIOSTALL slash1andy
flyonthenet jezmck fuzzguard widoz BIOSTALL slash1andy
ChaseWiseman iconicwp ksere divadmts pmaiorana thii
ChaseWiseman iconicwp ksere divadmts pmaiorana thii
shoheitanaka
shoheitanaka

Keep yourself in the loop!

This field is hidden when viewing the form
This field is hidden when viewing the form
This field is hidden when viewing the form


199 responses to “Say hello to WooCommerce 3.0 “Bionic Butterfly””

  1. Thanks for sharing, some great updates in there 🙂 Especially pleased with the JSON-LD update after I had to manually remove the on-page markup from another site before >.<

  2. Hey, Congrats for 3.0.
    but since i as update WC 3.0, my page is always refreshing !
    Check here :
    http://www.jiefsourd.eu/wp (is a fake Shop, i’m studying WebDesign)

    1. Not sure if it’s 3, but you do have the ‘geolocation with page cache’ setting enabled – thats why you have the v= string in the URL 🙂

      1. Is solved ! Thanx you 🙂

      2. Hi – I too have the page refreshing issue since upgrading to 3.0 (and yes, I use geolocation with caching support). Is there a fix, other than to disable this setting?

        Thanks!

        1. No but keep an eye on the Github issue.

      3. macnpcsoftware Avatar
        macnpcsoftware

        Hello,
        Please help! How do I disable geolocation? Upated to WC 3.0 and the page and site is constantly refreshing?
        Appreciate any advice.

        1. This is fixed in 3.0.1

  3. Is there no longer an automatic way to show the original price (with a strikethrough) and discounted price for a variable product?

    1. Only for regular/simple products. When you’re showing ranges of prices it can be extremely confusing depending on your min/max before sale, and min/max after sale. You will however still see the striked out prices when you’ve selected a specific variation so you can see what sale is going on.

    2. Cami, I have a “simple product” with sales prices and it isn’t doing a strikethrough either. Is this what you are seeing as well for your simple products?

  4. Hello, I’m having some issues with the latest update (RC.1 is works). Functions: is_product(), is_cart(), wc_get_attribute_taxonomies() are all coming back as undefined. Was there a change in how WooCommerce initializes with wordpress or are these functions depreciated?

    1. If these are undefined, WC is not active. Check your plugins section. The update/update may not be complete.

      1. powerus92 Avatar
        powerus92

        Hey mike, how do I replace the new version with the old one without messing up our store?

        1. Restore a backup (you backed up right?) or update the old version from github to wp-content/plugins using FTP. Ensure the directory name is “woocommerce”.

          1. powerus92 Avatar
            powerus92

            ok and it appears to have autoupdated which was very frustrating. Is that a setting that I didn’t see to turn off by any chance? Thanks for the quick response. We have customers waiting to checkout literally as we speak.

            Also just so im clear. I just drag and drop replace the woocommerce folder over the old one using zip file for version 2.7 right? (in FTP)

          2. Using the file for 2.6.14 which was the last stable release.

            WC/plugins cannot auto-update. It requires a click from an admin on the plugins screen.

          3. powerus92 Avatar
            powerus92

            it looks like only the source code is available for 2.6.14 – where other than github can i get the zip folder with files for 2.6.14?

            and thats odd because im the only admin and I am honestly 1,110% positive I didn’t click update, so maybe its something else? wordpress update?

          4. Github is the only place since the .org redesign. Nothing else can auto-update it I know of.

          5. powerus92 Avatar
            powerus92

            also, this won’t overwrite my settings will it?

          6. No. As long as you never ‘uninstall’ from admin, you’re safe.

          7. @Mike and @powerus92 , atm it’s still available here:
            https://de.wordpress.org/plugins/woocommerce/advanced/
            At the bottom you will find the older versions

      2. It’s definitely showing that Woocommerce is up-to-date and active – thoughts? I’m not sure what would stop Woo from initializing

        1. Maybe it failed to upload all files? Re-upload the plugin.

          1. Woo! That worked – I had to download the master from Gitgub and update by manual upload. Thanks so much!

            I’m also having an issue were the [featured products] shortcode returns nothing, but I think that may be my own custom code – thanks again!

  5. Congrat WooCommerce team on this major release.

  6. Hi, my domain is wezshop.com and I am facing this error which now my site blocked, can someone help me pls ? Thanks a dozen.

    Fatal error: Class ‘WC_Legacy_API’ not found in /home4/wezshop/public_html/wp-content/plugins/woocommerce/includes/class-wc-api.php on line 17

    1. I don’t think your plugin has finished or completed updating – you have missing files. Wait for it to finish updating, or upload the latest version manually via FTP.

  7. Congrats to the entire Woo team on shipping 3.0.
    Gotta say, the new gallery is brilliantly executed – well done one and all!

  8. Congrats to the entire Woo team on shipping 3.0.

  9. Congrats, on the update! Looks like a huge improvement. My clients are going to be happy.

  10. pop3r5 Avatar

    Congrats and thank you ! Small issue on my side, when I’m in Orders panel, I can no longer see what the customers has ordered without clicking on it and opening a new window everytime. Any way I could still see what they ordered on the Orders page directly?

    1. We took this out because it was a major performance bottleneck. If it did return in the future, it would have to be pulled in dynamically.

      1. pop3r5 Avatar

        Thank you for the quick answer, makes sense. Still having a problem though, I’m selling stuff with variations like Small, Medium, etc. If I click the order since the update, the product is now along the lines of : Variation ID: 36914 instead of let’s say Small and it is quite a pain to find out which variation id number is which variation.

        1. Are they fine in the cart? The ‘small’ should appear as part of the product name.

          1. pop3r5 Avatar

            Yes, fine in the cart, actually the new orders coming in are now fine when I click on em. I have about 25 orders processing that ”lost” the ‘small’ and just have variation Id, no biggie I’ll find what is what manually. At least I can see the variation with the new orders.

  11. Egbert Avatar

    Thanks for this shiny new version. Remarks: pagination does not show n-m but just first number on that page (mentioned before by me). New: the shortcode to show a number of products does not randomize anymore (orderby=”rand”).
    Best regards, Egbert Jan, NL

    1. Could not replicate those.

  12. digiproji Avatar
    digiproji

    Nice one and congrats! Any idea when the new discount/coupon API is coming our way (#13325)? Very excited about that too…

    1. Not yet 🙂 Possibly 4.0. We have a few minor releases to get out first.

      1. digiproji Avatar
        digiproji

        Hi Mike
        Until then, what would be the most elegant way to apply a “buy one get one free” type discount – by manipulating the cart object or the coupon object?

        1. Coupons I think would be cleanest.

  13. 3.0 breaks all my permalinks. Changed the theme, same thing.

    1. Settings > Permalinks > Save usually does the trick. Possibly translation related.

      1. I tried saving permalinks, renaming htaccess, etc. no luck. What do you mean translation related?

        1. If it was translated before it may have changed. No other reports of this yet. Try default permalink config? Post on support forum too – comments are not ideal.

      2. Thanks! Permalinks fixed it for me.

  14. Great work Mike, Claudio & the rest of the WC team + all the contributors to 3.0. WooCommerce 3.0 is as solid a release as I can remember – really great how the team stepped up to the testing challenge!

  15. Really odd one for you. Just updated our sandbox site to 3.0. All seems ok but our test product page, which has variations, is now coming up blank. our test simple product page is fine and if we create a new variable product, it’s fine too.

    Here’s the page: https://www.eleven.cc/sandbox/shop/test-product-page/

    vs this simple product:

    https://www.eleven.cc/sandbox/shop/atelier-derailleur/

    So something’s happened, at least with us, to the product page with variations… any idea? We’ve stripped out everything and the page still comes up blank, so it’s nothing on the page itself…

    1. …and here’s a V3 variable product (created after the update), which content wise is exactly the same as the pre-existing variable product liked above: https://www.eleven.cc/sandbox/shop/3-0-test/

      1. Since this is an error 500, you need to either look at the server error logs or enable WP_DEBUG to see the error thats occurring.

        1. Brilliant! Thank you. All sorted now – and a relief to know it was not Woo!

  16. jbailey969 Avatar
    jbailey969

    I just upgraded to woocommerce 3.0.0 on my wordpress site and it basically broke my store. Rewinded to 2.7 and everything is fine.

    The three bugs I found are.

    1. Product thumbnails are gone on product details page.

    2. My product is a digital download that can have a few links to download. Generally one is text instructions and the other two are the product and product adds on both in zip form. When the customer purchases all download links download the same item the text instructions.

    3. An order email is not sent.

  17. The first 3 links do not work –

    2.6.x to 3.0.0 Developer Migration Notes
    Template changes
    Deprecated functions and filters

  18. Hey Mike, would you mind clarifying the delayed CRON event for sending emails? How much of a delay, if noticeable at all, are we looking at?

    1. Next request if CRON is working correctly. it’s queued 10 seconds into the future.

  19. For “Variable” Product and at Stock Level I enable buy 1 unit only, found that the quantity combo still appear open to adjust over the product page on shop front-end. I suppose it should be invisible, or at least disable to adjust quantity. Pls help with thanks!

    1. The logic for hiding this is in the quantity.php template file. Your theme may have a custom version of this. Users will still only be able to purchase one so it won’t affect orders.

      1. Found that it still allow to me to checkout even I have added the quantity. The payment amount exactly the total quantity price. Previous version will block me from doing so…
        Pls help.

        1. Sounds like a plugin conflict to be honest. Validation in core appears to be working.

  20. This update totally broke my sites D:

    1. Post on the forums and we’ll try to help. You should definitely check everything on your site is compatible though as the post states above.

      1. I went back to the the previous stable version instead. This update’s features sound very promising, but I’ll probably wait for a couple weeks more.

  21. […] WooCommerce 3.0 is officially live. This version started out as WooCommerce 2.7 but along the way a critical bug in the way the system handled time-stamps was discovered an pushed back the release. […]

  22. Hi, I am facing this error which now my site blocked, can someone help me pls ? Thanks a dozen. Not sure what’s wrong here.
    Fatal error: Class ‘WC_Legacy_API’ not found in /home4/wezshop/public_html/wp-content/plugins/woocommerce/includes/class-wc-api.php on line 17

    1. Sounds like the update has not fully completed – that file definitely exists. Reupload WooCommerce plugin to wp-content/plugins using FTP.

  23. Hi, Thanks for the 3.0 upgrade! One thing I noticed is that it automatically adds product image to the product gallery. I used to have 3 thumbnails under the main image, now is four. Is there a way to prevent that from happening? Sometimes that product image has different dimensions and it looks awkward: example – https://designsbyrudy.com/product/dr-cb1-contemporary-concrete-bench/
    Thank you,
    Darek

    1. It’s required for the slider so you can get back to the main image. Enable thumbnail cropping?

  24. You have changed some of the post meta to taxonomies. So is faster to use taxonomies for true/false operations instead of post meta?

    1. Querying products is faster via WP_Query.

  25. Faisal Alvi Avatar
    Faisal Alvi

    Thanks to Mike for helping us by being an inspiration for us to contribute. Thanks to @multidots for making me realise that YES I CAN DO…! 🙂

  26. First of all, congratulations. I updated yesterday and the module of Woocommerce Booking appears a warning.

    Warning: Declaration of WC_Product_Booking::get_price() should be compatible with WC_Product::get_price($context = ‘view’)

    I have seen that in previous updates you have talked about this same problem. is it important to resolve? Or will it be resolved in future module updates?

    Regards,

  27. […] 3.0 was released (you can read the official development notes here). It’s been almost 24 hours, and I really hope you haven’t clicked that “Update […]

  28. Just one question. Is it possible to change the parameters of the Flexslider slider? If so, how? I’d like to show the left and right arrows.

      1. Thanks!

      2. Just one more question. Is it possible to convert the default thumbnail navigation to a dot one, just like the one here:

        http://flexslider.woothemes.com/

        If so, I suppose I have to edit the product-thumbnails.php template. Or hook the woocommerce_single_product_image_thumbnail_html filter. Am I wrong?

        1. I’ve not tried this – let us know how you get on 🙂

  29. Hello Mike.
    I have local e-commerce website with Shopkeeper + WooCommerce

    This morning I updated to 3.0 and the mobile version stopped working properly.
    The menu was not responding for my Samsung galaxy S5 + Note 4. On Huawei it was ok…
    However I reversed to previous version and It got better(menu got back to working, but on homepage the caret icon was gone)…

    I was able to locate the problem: YITH WooCommerce Wishlist – when I disable it everything seemed to work fine… I will update it again to 3.0 tonight, because now is primetime in Bulgaria and I dont want to loose customers testing..

    However, there is a compatibility issue with the Wishlist Plugin.

    Best Regards, Deo

    1. Is it their latest version, and have they been informed?

    2. I didn’t need to touch any template.

      function my_single_product_carousel_options( $array ) {
      $array[‘controlNav’] = true;
      return $array;
      }
      add_filter( ‘woocommerce_single_product_carousel_options’, ‘my_single_product_carousel_options’ );

      Regards

  30. […] Other major changes have to do with the CRUD (Create, Read, Update, Delete) objects and data-stores, a new CLI (Command Line Interface), the Rest API v2, improved Logging System and a slew of performance improvements. There are other odds and ends as well. If you are interested in learning more about any of that other stuff, see the post over on WooCommerce. […]

  31. Thanks for the update, excited to see where woocommerce goes from here, although I think I will hold off upgrading for a few weeks so plugin devs can catch up and any bugs can be resolved 🙂

    1. I have not informed them so far. I have their latest version + their last release is 2 days ago…
      Tonight(after 11hours – now is 4PM here) I will do some QA and can provide screenshots of the behavior(incompatibility).

  32. […] vooraf goed te checken of de update geen vervelende gevolgen heeft voor jouw webshop. Op de officiële WooCommerce website kun je tips lezen als je gaat […]

  33. well done folks! 🙂 Appreciate the changes made to WooCommerce

  34. I am having issues when I send a customer an invoice. The link returns the Pay for Order page, but shows “Invalid order” error. I checked the system status, all of my templates are up to date and it does not look like the checkout/form-pay.php file was changed. Can anyone verify this is an issue with v3.0?

    1. Can you log on Github so we can check? Need more details.

      1. So I made some progress with this… It looks like the user has to be logged in to pay for their order. Which makes sense because the shortcode is “if ( ! current_user_can( ‘pay_for_order’, $order_id ) ) { echo ” . __( ‘Invalid order. If you have an account please log in and try again.’, ‘woocommerce’ ) . ‘ ‘ . __( ‘My account’, ‘woocommerce’ ) . ‘‘ . ”; return; }”.

        I do find it interesting that it just started working with the v3.0 update. I found out that if I load my customer and their address information, then remove the customer (so it defaults back to guest), the link works without logging in (as it did pre v3.0).

        1. Do we know if there are any workarounds to the “Invalid order. If you have an account please log in and try again” so that customers don’t have to be logged in to our site to pay for their order?

          1. I don’t think that one is a bug. If the order is for a user, they need to be logged in otherwise it would leak a users address.

          2. Gotcha – makes sense. Thank you!

          3. Yes it does make sense.

            But,
            Since i’m not using any address for the customers anyway, is there a way to make it optional?
            I would still very much like my customers to be able to pay simple and fast without having to log in like in the 2.x versions.

          4. If you have no need for accounts you can use guest orders – no need to assign an order to a user.

          5. I use it all in a slightly different way.

            I have many cases where I create the orders for existing users. Like a point of sale setup.
            For payment, those customers receive an email with a link.

            I was able to customise it all according to my workflow, except for this change since 3.0. There are no hooks available, nor did I find a way to give users the capability to pay for orders without logging in.

            Is there a way to make a request to include a filter? In class-wc-shortcode-checkout.php @line 90 `! current_user_can( ‘pay_for_order’, $order_id )`

          6. I will answer my own question 😉

            Use the user_has_cap filter.
            https://codex.wordpress.org/Plugin_API/Filter_Reference/user_has_cap

          7. genuxuy Avatar

            @robbie7979 How to apply a solution?

          8. robbie7979 Avatar
            robbie7979

            Be careful when changing capabilities..

            But to get you started, add this to your functions.php

            “`/**
            * customer_cap_filter()
            *
            * Filter on the current_user_can() function.
            * This function is used to explicitly allow customers to pay for their own orders
            * without the need to login.
            *
            * @param array $allcaps All the capabilities of the user
            * @param array $cap [0] Required capability
            * @param array $args [0] Requested capability
            * [1] User ID
            * [2] Associated object ID
            */
            function customer_cap_filter( $allcaps, $cap, $args ) {

            // Bail out if we’re not asking about an order:
            if ( ‘pay_for_order’ != $args[0] )
            return $allcaps;

            // Load the order data:
            $order = wc_get_order( $args[2] );

            // Bail out if the user is the order author:
            if ( $args[1] == $order->get_user_id() )
            return $allcaps;

            // Bail out if the order isn’t pending:
            if ( ‘pending’ != $order->status )
            return $allcaps;

            // $allcaps[$cap[0]] = true;
            $allcaps[‘pay_for_order’] = true;

            return $allcaps;

            }
            add_filter( ‘user_has_cap’, ‘customer_cap_filter’, 10, 3 );“`

        2. I have the same problem. Prior to WC 3.x , from the Order Panel, Administrator can click on link “Customer Payment Page ->” and pay on the behalf of the customer. But after upgrading to WC 3.x, Admin will get “Invalid order. If you have an account please log in and try again. My account”.

          This is a bug. Because the admin has all the privileges.

          Please fix in the incoming release!!!

          THANKS

  35. Hi Mike,

    (Variable Products – Structed Data)

    For Variable products, before the update we could leave the Stock Quantity blank and control inventory specificly for each variation, and the structured data would show correctly in google search (in stock).

    But now, if you don’t enter a quantity in the main Inventory Stock Management box it shows as “Out of Stock” in google, even though there is stock and it’s set at the variable level.

    So for variable products it’s only pulling stock data from the main Inventory Tab, not the variable stock quantity.

    Did I explain that right?

    Basically, it’s important that google shows “In Stock” if it’s really in stock.

    Did you adjust something that now requires inventory to be entered in the “Inventory” Tab and for each Variable?

    1. No but there was a sync bug fixed in 3.0.1. Use github if you have other reports to make.

  36. printworx2015 Avatar
    printworx2015

    since the update, you have removed the purchased column from the woocommerce order page.
    How am i supposed to know what my customers have ordered???
    opening each order takes 5X longer.
    i have uninstalled and uploaded an older version to restore this function, this is not ideal though.
    please bring it back asap, and allow people to turn it on/off as they see fit.

    1. Since you have to go into the order to edit it anyway it shouldn’t make that much difference. Still, you can vote here if you want us to make a new solution (since the old one is not performant) https://href.li/?http://ideas.woocommerce.com/forums/133476-woocommerce/suggestions/18832222-dynamically-display-order-content-on-orders-page

      1. printworx2015 Avatar
        printworx2015

        I don’t have to open each order, I never have. I only need order info and address etc.
        I’m a printer so all the orders need to be seen on one page so I can set the print run up. Opening each one takes forever. I simply mark all as complete once I’ve posted them.
        I’ll await for an update, my singular vote won’t make much difference though if it’s only me with the issue. If it isn’t broken though… Don’t fix it. Leaving that there wouldn’t cause you any issues at all.
        I’ll have to look for a new shop plugin if it’s not resolved.
        >

        1. It was “broken”. That’s the point. The performance issues were major. Maybe get one of this bulk packing list extensions, then you don’t even need to click each row. Or click the link i gave and use the snippet someone provided.

  37. jerapub Avatar

    Having trouble with the WooCommerce – Gravity Forms Product Add-Ons n after updating. I get the white screen, error 500 message. FTP’d in and renamed that plugin’s folder for now to deactivate it so the site is at least up, but need to figure this out ASAP. Checking the error logs I see this message:

    [06-Apr-2017 20:21:03 UTC] PHP Fatal error: Can’t use method return value in write context in /home/selfpub/public_html/blog/wp-content/plugins/woocommerce-gravityforms-product-addons/admin/gravityforms-product-addons-admin.php on line 198

    1. Use the support area so the dev can get that patched up for you.

  38. jdevenuta Avatar
    jdevenuta

    Not sure if I’m correctly understanding the update around how different stores/sites on a multisite+WC install handles user sessions. Does this mean that a unified user identity is now available out of the box across stores on a multisite install?

    1. Which point are you reading into?

  39. My comment seems to have disappeared. Here goes again – Emails to customer not getting through after update to 3.0 and I hoped that the issue would resolve after the 3.0.1 update – but it has not.
    The sequence is that I updated Woo on my dev site (subdomain of the main site) and did a test transaction. The email to the store came through but the email to the customer did not. So I did a test transaction on the main store before updating and the email to the store and the email to the customer both came through (as they have always been doing in the past).

    After updating Woo on the main site I did another test transaction and the email to store came through but the email to the customer did not come through. I did the transactions as pay by ‘bank transfer’, so the transactions are marked as on hold (pending payment) and I checked the email settings after the update and the emails to the customers are marked to be sent for ‘on hold’ transactions.
    I am using the Canvas theme from Woothemes
    I tested again after updating to 3.0.1 and emails to the customer are still not being sent.

    1. Since some emails are working, this probably is not related to the background mailer we added. I’d suspect something is either trying to insert content into the mail and causing error, or it’s send but not received. Use a mail logging plugin, and check the server error logs.

      Use the support forums for further questions since comments are not really ideal 🙂

  40. dereck13 Avatar
    dereck13

    not having a lot of luck upgrading to 3.0
    The updater will not update it and it says there are template issues.
    http://imgur.com/a/RZAJl and
    http://imgur.com/a/xXQrx

    1. The update is complete; I don’t think that banner is accurate. The theme notice can be dismissed just be aware it may not be fully compatible.

      1. dereck13 Avatar
        dereck13

        another problem has also surfaced.
        I can book 3 persons on a tour and the appropriate cost comes up, i.e. $109 x3 $336
        however when I go to the basket the value is reduced to single tour cost $109
        is there something I have set wrong??

        This is very urgent please

        1. @dereck13 Please use the support desk to report issues with premium plugins so the developers can investigate if an update is not already released. I don’t have the full details in comments and they are not really ideal.

          1. dereck13 Avatar

            yes would normally do this but the response is far too slow and this is related to the upgrade so some urgency is needed pleazse…..!

  41. I should have said – I have changed the name of COD (cash on delivery) to ‘Pay by bank transfer’ – so what I am asking is – Are email to the customer working OK with the update when the payment method is COD?

    1. Yes, but you should use BACS for this since it is for bank transfer 🙂

  42. Danyo Borg Avatar
    Danyo Borg

    Hey,

    woocommerce_cart_item_price no longer works. It updates the price of the item in the cart, but the item line price doesnt get updated. Any ideas?

    Thanks!

    1. It’s working then. The line cost is filtered with woocommerce_cart_item_subtotal

      1. Danyo Borg Avatar
        Danyo Borg

        This seemed to work before i updated to 3.0.1 without using a filter on woocommerce_cart_item_subtotal.

  43. The naming scheme for variable products is wrong. Now any attribute that is part of a variation is included in the product name and any attribute outside of that is listed below the product name. This makes the product names too long and confusing in the cart pages and the attributes are getting removed on the checkout pages.

    1. Log an issue on github if we can improve the algorithm. There is a filter to disable it also. woocommerce_product_variation_title_include_attribute_names

  44. lhwagner Avatar
    lhwagner

    We had the lightbox option disabled in settings > products > display. That option is gone and I don’t see a way to turn off the zoo. How do I disable it? We just have generic “placeholder” graphics for our software products. Zooming is not appropriate.

    1. I made a little plugin to allow you to disable the new Zoom, Slider and Lightbox features selectively on a per product basis for WooCommerce 3.0+ if that helps https://wordpress.org/plugins/woo-product-image-gallery-options/ (This plugin of course assumes that your theme has already enabled support for the new features).

  45. Hi there, updated this morning, but now my checkout pages have black bar, and you can’t easily see the “View Cart” button without now hovering over it. What’s the fix for this? (go to cart/checkout on the following link)
    https://femalewrestlingchannel.com/product/legend-tamer-featuring-remy-rush-female-wrestling-photoset-27/

    1. I only see black notice styling which looks intentional in the theme.

      1. Hi Mike. Whatever the reason, it wasn’t like that before. Is there a simple way to change the colors? It’s going to confuse many people if I don’t get this fixed fast.

        1. Add CSS to your theme? I don’t know what it looked like before or what styling is there so I cannot really give you a solution right away.

          1. So you are saying it’s the theme doing it, and not Woocommerce? And, is there a support forum for Woocommerce?

  46. OK, struggling a little here.
    I’m using the ‘woocommerce_get_stock_quantity’ hook, which it now tells me to use ‘woocommerce_product_get_stock_quantity’ because it’s using different data structures.
    But I can’t find that hook anywhere in the code (when using Astrogrep), or listed on the online docs https://docs.woocommerce.com/wc-apidocs/hook-docs.html to find out what data/variables are being passed through the new hook.

    Am I doing something wrong?

    1. Ah ok, I understand now.

      In the `get_prop()` function within `abstract-wc-data.php`, there is `apply_filters( $this->get_hook_prefix() . $prop, $value, $this )`
      As the main `Data` class is extended, then in the extended class it has the `get_hook_prefix()` function` the returns the prefix to use for the apply_filters hook.

      Clever.

      1. albeit $context = ‘view’ would read much better if it was $context = ‘filter’

        😀

  47. amanda559 Avatar
    amanda559

    Hello! I updated to Woocommerce 3.0.1 and now my Shop page is blank. https://www.teatimedesignz.com/shop/ Help!

    1. Take a look at the theme files. Not see this one occur on other sites. You still have header/footer so it’s not an ‘error’ I can see. Please use the forums anyhow if you want to talk further – comments are not great for support.

      1. amanda559 Avatar
        amanda559

        Thank you Mike! I’ve submitted a ticket with Elegant Themes about their Divi theme and we will wait and see. I will follow-up here too, just in-case someone has the same issue as me. Best!

  48. mearedeytauch Avatar
    mearedeytauch

    Hello. I am very new to this update and just recently launched my website, excited that I am finally approved for a payment processor BUT (sadly) I cannot get my cart to check out correctly. Each time I do a test payment I get “internal error” I see the order on WP Dashboard, however I cannot pass the “internal error” when attempting to check out. I am not a web developer, designer or tech savy. My website guy is still trying to trouble shoot the source of the problem, but I am running out of patience. Please advice. Thank you very much

    1. Best to look at the server error logs – they should provide more detail on your issue.

  49. Hi guys,

    I have a problem since version 3.0.1 release, caused by “wc_format_content” function.

    The problem is that “wpautop” function add “…” construction even to content of the tag.

    And i cant add revslider or any other element that shows out the tag to content.

    You can review this problem at the category description or the Shop page.

    Please, note that this issue is also appeared with the Storefront default theme.

    Can you provide me some solution of this problem, please?

    1. We have a fix coming in 3.0.2

  50. dreamlabnl Avatar
    dreamlabnl

    Hi there, like the update but there are somethings weird. How do we order grouped products? We cannot use the Menu Order any more and “dragging” the linked products is no option?

    And what about the “Purchased” column in the Order admin? Is it gone? Or do you have to turn it on somewhere? It was a nice feature to see the number of items ordered.

    Hope you can help. It’s kinda weird now with the products not ordered (clothing sizes from s to xxl all messed up..)

    1. Grouped ordering has not changed afaik. As for column, see https://github.com/woocommerce/woocommerce/issues/14121

      1. dreamlabnl Avatar
        dreamlabnl

        Thanks for the quick reply Mike! We’ll see about the column 😉

        And for the Grouped Products sorting… i created a ticket. Hope someone can help.
        Thanks again! Good job (as always)!

  51. “We’ve removed the feature where old orders get access to new downloads on product edit. Looping (potentially) thousands of orders to do this update was too much of a performance burden for some stores and this also could lead to unexpected behaviour. After this update we do however update edited downloads, so editing a file will not prevent purchasers from downloading it.”

    I’ve updated to the new version and this update is a huge issue for me! I wasn’t aware of this and deleted some files from a listing last night and added the new ones I was replacing it with. And now I have thousands of accounts that don’t have access to their old files or the new ones I’ve replaced them with. And I don’t have time to manually add them to all of the accounts. Is there any way to work around this?

    1. Programmatically, you could run code similar to how we did it previously on all customer accounts, but realistically as sales increases and more customers need to be managed, you should definitely look into something that scales https://github.com/woocommerce/woocommerce/blob/2.6.14/includes/admin/class-wc-admin-post-types.php#L2215-L2227 If you need to downgrade see https://docs.woocommerce.com/document/woocommerce-self-service-guide/

      1. I’m not extremely literate when it comes to website coding. Do I add that entire highlighted section? And which file do I add it to.

        1. No don’t add this, I was just showing you the type of query possible, and the function to generate a permission. This would need to be customised to run over your products + customers. I don’t know how many orders you have that are affected, but if you edit the order you can regenerate permissions from the actions menu. This gives access to all downloads purchased.

          Another note, if you EDIT a downloadable file link rather than remove it and add another, access will be maintained.

          1. Yes I have several thousand orders that need this, so I was hoping to not manually edit each one.

          2. I am in the same position — how is editing the link different? My products are pdf and will sometimes need to be auto updated for ALL my customers. I am also planning on adding new files to their existing purchases. This was a plus with woo commerce and could be done with ease. I could tell my customer they had lifetime access and updates — this is also going to be an issue for theme developers — I would think. I am really hoping Woo commerce will create a work around for this. I am truly losing an integral part of my business.

        2. You can use this plugin to solve it: https://gist.github.com/claudiosanches/968f0d056d855d482e636e92002eb108
          Just install, active and then remove the new download and add again.
          This plugin will redo all the downloadable permissions again, but will perform a heavy query, the same query removed in WooCommerce 3.0.

          1. it doesn’t appear to be working for me 🙁

          2. I’ve added some additional description explaining how the system works here: https://docs.woocommerce.com/document/digital-downloadable-product-handling/#section-8

            And to restore, I’ve added a simple plugin here (works now) here: https://github.com/woocommerce/grant-download-permissions-for-past-woocommerce-orders

          3. Thanks for the plug in. I’m sorry to say that it’s still not working for me.

          4. Important to note you need to remove, save, and add the file back to the product to have it sync the old orders.

          5. Post a ticket then; maybe we’re not understanding what you want to happen. This works for me and gives my past orders a new download permission, just like 2.6.

          6. I tried it again and it’s working! I’m not sure why it’s different now, but it’s working! Thank you!

  52. I’m so unhappy with this update 🙁 I’m running on the old one right now as long as I can. I HATE that when you update a file it doesn’t update in previously bought accounts— THIS IS TERRIBLE FOR DIGITAL PRODUCTS!!!!!
    If it’s not revised I will be leaving woocommerce and building a custom site. SO DISAPPOINTED.

    1. See my reply here https://woocommerce.wordpress.com/2017/04/04/say-hello-to-woocommerce-3-0-bionic-butterfly/#comment-3038 As stated, updating all past overs forever is eventually going to fail – it won’t scale (this is one of the things disabled on woo.com because of that).

  53. Megan- Made for Mermaids Avatar
    Megan- Made for Mermaids

    “We’ve removed the feature where old orders get access to new downloads on product edit. Looping (potentially) thousands of orders to do this update was too much of a performance burden for some stores and this also could lead to unexpected behaviour. After this update we do however update edited downloads, so editing a file will not prevent purchasers from downloading it.”

    I’m not sure what editing a file means?? I update files often and loved the feature of previous purchasers having access…huge selling point for me and my buisness. I have way too many orders to individually update each account. I’m very worried about this feature being gone. I really can’t funtion without it 🙁

  54. “We’ve removed the ‘order items’ column on the orders page” – We REALLY REALLY need this feature, we have 1000’s of orders to process each day and we need to know, at a glance, what the order contains so that we can handle it appropriately. It’s not possible for us to open each order to see what it contains as there’s not enough time in a day!

    Can you let me know anyway to get this back. I’m comfortable making any changes to the code. Whatever needs to be done to get this back I will do!

    A speedy reply would also be awesome. Thank you in advance for the time 🙂
    – Hanuman.

      1. Awesome – thank you very much for the swift reply 🙂

  55. Ouch, had to do a rollback. The update to 3.0.2 led to wrong prices in the front-end. It is showing too high prices.
    More details: When i set ‘show prices in shop EXCLUDING taxes’ in the backend it shows the correct amount on the front-end but this price should be INCLUDING the tax. When i set ‘show prices in shop INCLUDING taxes’ in the backend it shows too high prices (DOUBLE taxes). It has maybe to do with the setting ‘Add products too shop including/excluding tax’ that is migrating wrong?

    1. I see it’s still awaiting moderation. Did anything go wrong?

      1. The issue you speak of was fixed in 3.0.3 FYI

        1. That’s great news. Thanks.

  56. Currently it takes 3-clicks to get to full screen, zoomed in. This is the preferred mode for many viewers (think YouTube, Netflix, Hulu, Flickr, Photos apps, etc.) You should consider making full-screen, zoomed-in a single-click options (put the two diagonal arrow icon next to the magnifying glass)

  57. HELP! my store hasn’t been working, when you go into a product page it wont let you select a size, I’ve tried upgrading everything but is still not working, any help is greatly appreciated!

    1. Post on the forums.

  58. eskamedia Avatar
    eskamedia

    Hi Mike, I have an issue where I can no longer fold open the product variations in the product admin screen. Never had this issue before and it stopped woring after the update from 2.6 to 3.0
    Please see this screencast: https://share.viewedit.com/qpT8j4vwMfAbAqx2yGbvXt

    1. Looks like a conflict with another plugin.

  59. I can’t get custom fields to update. We use two different types of custom fields, through the ACF plugin and also some of my own. In my save_post action hook, I make updates to all these fields and they were all not saving. After I issued an $order->save(), now all the ACF fields are saving, but not my custom field. I am using update_post_meta. Anyone else having this issue?

    1. If depends if you’re mixing old style update_post_meta and the CRUD in the same events. Can’t say without seeing code.

      1. I am not using any CRUD functions in this save_post action hook. I have lots of update_post_meta in this hook, but only those WC fields, and now ACF fields since adding ->save(), work. This field updates fine:

        update_post_meta($post_id, ‘_billing_city’, $bcity);

        But this one to a custom field does not, only a few rows apart in the code and both before the ->save() that then allowed ACF fields to save:

        update_post_meta($post_id, ‘donation_splits’, $splits);

        Very weird like that, I did have a problem with wc_add_order_item_meta to set item meta data in the same hook. While that didn’t work, I fixed by calling wc_delete_order_item first and then wc_add_order_item with the new values.

        1. Sorry, meant to say I had a problem with wc_update_order_item_meta in the last paragraph.

          1. There is a caching issue with meta so it may be fixed in 3.0.5, if not post on github after that update is live.

        2. I got it working by doing the same thing as when trying to update the item meta, deleting the meta first works:

          delete_post_meta($post_id, ‘donation_splits’);
          update_post_meta($post_id, ‘donation_splits’, $splits);

          Looking forward to 3.0.5….

  60. […] screen, you are probably experiencing a conflict. You can learn more on conflict solving in our WooCommerce 3.0 release […]

  61. Ahmet Sali Avatar
    Ahmet Sali

    I was having lightbox issue with the v3 update, this post helped me solve the lightbox issue;

    http://wpmagg.com/fixing-woocommerce-3-lightbox-issue/

  62. Hi, please help me.
    I recive this error on my website since woo 3.0
    Notice: WC_Product::get_parent este învechită din versiunea 3.0! Folosește WC_Product::get_parent_id în loc. in /home/razwzad/public_html/v2/wp-includes/functions.php on line 3830

    Notice: WC_Product::get_post_data este învechită din versiunea 3.0! Folosește get_post în loc. in /home/razwzad/public_html/v2/wp-includes/functions.php on line 3830

    Notice: WC_Product::get_parent este învechită din versiunea 3.0! Folosește WC_Product::get_parent_id în loc. in /home/razwzad/public_html/v2/wp-includes/functions.php on line 3830

    Notice: WC_Product::get_post_data este învechită din versiunea 3.0! Folosește get_post în loc. in /home/razwzad/public_html/v2/wp-includes/functions.php on line 3830

    this is mai website
    https://www.rawz.ro/v2/candy-bar/

    how can I correct this error ? Iti is possible to get to next update of woocommerce?

  63. qualitairwebmaster Avatar
    qualitairwebmaster

    Prices for variation products are missing. And also the stocks count 🙁

  64. Hello! I love you guys and woocommerce is awesome, the bionic butterfly is dope. Things are looking good with this release, I dig the product gallery. I did find a potential issue with the way variations load on the front-end. Previously, woocommerce used a filter ‘woocommerce_ajax_variation_threshold’ to hide the out of stock variations if desired. Now it seems in this update, this functionality is broken 🙁 I’ve found the solution to the problem but had to make a tiny change to a core file in the plugin includes folder.

  65. […] based on classes on AMP pages. Icons now work on AMP pages. WooCommerce 3.0.0 Added support for WooCommerce 3.0.0. Added support for WooCommerce 3.0.1. Added support for WooCommerce 3.0.2. Added support for […]

Leave a Reply

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