Fixing WooCommerce 3.0 notice in single product page

WooCommerce released new 3.0 version couple of weeks ago and they updated lots of things in that version. Last year, I’ve two premium WooCommerce plugin ( Attachment Tab For Woocommerce, WooCommerce Product FAQ Manager ) in CodeCanYon marketplace.

After upgrading WooCommerce version 3.0 buyers send me support message regarding that notice. So, I need to update the plugins and remove notice from single product page.

Notice: id was called incorrectly. Product properties should not be accessed directly. Backtrace: require('D:\xampp\htdocs\dev.woo.plug\wpfm\wp-blog-header.php')

I’ve solved that notice by just updating a single line of code in plugin. So, go to you code and replace $product->id text by $product->get_id()

And that’s it. Super easy ! Right ? Hope that quick tips will help you to fix WooCommerce 3.0 notice.

Thank You !

Leave a Comment

Back To Top