Fatal error is_type(‘variable’) on $product when $product is null
-
Uncaught Error: Call to a member function is_type() on null in /.../wp-content/plugins/enhanced-e-commerce-for-woocommerce-store/public/class-enhanced-ecommerce-google-analytics-public.php:2589 Stack trace: #0 /.../wp-includes/class-wp-hook.php(310): Con_GTM_Tracking->add_gtm_data_layer() #1 /.../wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters() #2 /.../wp-includes/plugin.php(517): WP_Hook->do_action() #3 /.../wp-includes/general-template.php(3069): do_action() #4 /.../wp-content/themes/wijnenwereld/footer.php(114): wp_footer() #5 /.../wp-includes/template.php(785): require_once('...') #6 /.../wp-includes/template.php(720): load_template() #7 /.../wp-includes/general-template.php(92): locate_template() #8 /.../wp-content/plugins/woocommerce/templates/single-product.php(60): get_footer() #9 /.../wp-includes/template-loader.php(106): include('...') #10 /.../wp-blog-header.php(19): require_once('...') #11 /.../index.php(17): require('...') #12 {main} thrown in /.../wp-content/plugins/enhanced-e-commerce-for-woocommerce-store/public/class-enhanced-ecommerce-google-analytics-public.php on line 2589
Hello, The plugin on version 6.5.4 throws an error on getting the type of a product. The line is
if ( $product->is_type('variable') ) {
. A quick fix could beif ($product && $product->is_type('variable') ) {
We have disabled the plugin because it completely breaks our website. Can a fix be implemented for this?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Fatal error is_type(‘variable’) on $product when $product is null’ is closed to new replies.