Automattic / sensei

Sensei LMS - Online Courses, Quizzes, & Learning
https://senseilms.com
GNU General Public License v2.0
545 stars 198 forks source link

WooCommerce Ver Check #1461

Closed kraftbj closed 7 years ago

kraftbj commented 8 years ago

If WooCommerce is active, we should check for the version and make sure we're running a compatible version.

e.g. class-sensei-wc.php L1009 calls $product->get_id(), which became a method of WC_Product in 2.5. If someone is running WC 2.2, we should fail in a better way than a fatal.

aheckler commented 7 years ago

@pgk We're starting to see this error in Sensei support, but even when the latest stable version of WooCommerce is installed. It's happening on my test site when I have WooCommerce 2.7 beta installed. Any chance you can take a peek at this really quick?

Recent examples:

520326-zd-woothemes 518699-zd-woothemes 518428-zd-woothemes

lschuyler commented 7 years ago

Possibly 520326-zd-woothemes too

aheckler commented 7 years ago

522650-zd-woothemes

aheckler commented 7 years ago

524060-zd-woothemes

cc @pgk this seems to be getting more common

watermarkt commented 7 years ago

I'm using Sensei LMS with Woocommerce. However, I am receiving this error on my staging site; Fatal error: Call to a member function get_id() on boolean in /home/content/p3pnexwpnas16_data03/14/3812314/html/wp-content/plugins/woothemes-sensei/includes/class-sensei-wc.php on line 1888

I was directed here from Sensei support. Is this the correct thread for resolving this error? If so, is there any time frame for resolving? Thank you

watermarkt commented 7 years ago

fyi.. If anyone else is experiencing the fatal error above; the error disappeared on my staging site when I deselected "Enable WooCommerce Courses - Use WooCommerce to sell Courses by linking a Product to a Course" in Sensei WooCommerce settings. Fortunately, I now use Memberships to link products and courses instead of groups. So, this seems to have resolved the error for now.

pgk commented 7 years ago

Related to #1707 and #1706

aheckler commented 7 years ago

524765-zd-woothemes

aheckler commented 7 years ago

526599-zd-woothemes

pgk commented 7 years ago

Closing as related to #1707 and #1706