Woocommerce error after Laytheme update
-
After last update 4.2.0, when I go to a woocommerce product page the link doesn't work and display this:
Fatal error: Uncaught Error: Call to undefined method WC_Product_Simple::get_available_variations() in /usr/home/bravo.studio/web/testlaytheme/wp-content/themes/lay/woocommerce/single-product/product-image.php:36 Stack trace: #0 /usr/home/bravo.studio/web/testlaytheme/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include() #1 /usr/home/bravo.studio/web/testlaytheme/wp-content/plugins/woocommerce/includes/wc-template-functions.php(1529): wc_get_template('single-product/...') #2 /usr/home/bravo.studio/web/testlaytheme/wp-includes/class-wp-hook.php(307): woocommerce_show_product_images('') #3 /usr/home/bravo.studio/web/testlaytheme/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #4 /usr/home/bravo.studio/web/testlaytheme/wp-includes/plugin.php(474): WP_Hook->do_action(Array) #5 /usr/home/bravo.studio/web/testlaytheme/wp-content/themes/lay/woocommerce/content-single-product.php(57): do_action('woocommerce_bef...') #6 /usr/home/bravo.studio/web/testlaytheme/wp-includes/template.php in /usr/home/bravo.studio/web/testlaytheme/wp-content/themes/lay/woocommerce/single-product/product-image.php on line 36
Any idea?
Thanxs in advance -
Dear @dnlbrv
I haven't experienced any crash myself running:
- Woocommerce version 6.2.1
- Lay Theme version 4.2.0
- Wordpress Version 5.9.1
The error: "WC_Product_Simple::get_available_variations()" - likely relates to the recent update fixing Variable images
Please confirm the Following:
Wordpress, Lay Theme & Laytheme's Addons are all up to date ?
Any custom CSS or JS that may interfere is temporarily removed.
Any third-party plugins (except woocommerce) are de-activated to see if this resolves the issue.
If your WordPress Dashboard shows a warning "PHP Update required” Please update your PHP version in your webhost control panel.
If the above is confirmed and you still experience issue:
Please send your website address, /wp-admin/ username and password and a link to this topic to info@laytheme.com?
This will help Armin with inspection 🔍
Best wishes
Richard
-
please update lay theme and then it should be fixed
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it