Skip Navigation

[Resolved] Call to a member function get_price() on boolean

This support ticket is created 4 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 10 replies, has 3 voices.

Last updated by robD-8 4 years, 6 months ago.

Assisted by: Christian Cox.

Author
Posts
#1855357

Tell us what you are trying to do? Yesterday all of a sudden the site showed the above mentioned error, more details below. I had to set back an earlier backup to retrieve the site.

Is there any documentation that you are following? Site has been developed for over the past two months, no such error appeared before.

Is there a similar example that we can see? If you would like I can setup a staging environment with an actual database dump of the moment of error

What is the link to your site? To be discussed, live site is at hidden link

Full error:
Fatal error: Uncaught Error: Call to a member function get_price() on boolean in /home/user/domains/user.nl/public_html/wp-content/plugins/woocommerce-views/Class_WooCommerce_Views.php:3003 Stack trace: #0 /home/user/domains/user.nl/public_html/wp-content/plugins/woocommerce-views/Class_WooCommerce_Views.php(3059): Class_WooCommerce_Views->process_product_fields(Array) #1 /home/user/domains/user.nl/public_html/wp-content/plugins/woocommerce-views/Class_WooCommerce_Views.php(3150): Class_WooCommerce_Views->batch_process_products(Array) #2 /home/user/domains/user.nl/public_html/wp-includes/class-wp-hook.php(287): Class_WooCommerce_Views->maybe_process_products_fields('') #3 /home/user/domains/user.nl/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #4 /home/user/domains/user.nl/public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Array) #5 /home/user/domains/user.nl/public_html/wp-settings.php(546): do_action('init') #6 /home/user/ in /home/user/domains/user.nl/public_html/wp-content/plugins/woocommerce-views/Class_WooCommerce_Views.php on line 3003

#1855397

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Rob,

Thank you for getting in touch.

Unfortunately i'm not able to see any information on your site because the debug information wasn't provided.

Can you provide this information for me so that I can see your site setup ?

To do this please follow the instructions in the link below.
https://toolset.com/faq/provide-debug-information-faster-support/

While you are doing that you can also perform a test by disabling all the non-toolset plugin with the exception of woocommerce and let me know if the issue still remains.

Thanks,
Shane

#1858485

Debug information added

#1859171

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Rob,

Thank you for providing the debug information for the site.

I had a look and noticed that your views plugin needs updating. Can you download the latest version from the link below and let me know if it resolves the issue ?
https://toolset.com/account/downloads/#legacy-plugins

Thanks,
Shane

#1863275

Hi Shane, I downloaded and installed the latest version 3.3.2 which messed up the complete single product page [seems to be back to standard]. Where are the with Toolset made templates installed/ storesd so I can pull them back from a backup.
Regards, Rob

#1863751

Hello, Shane is unavailable this week so I'm looking in on his outstanding tickets. The first thing to check is the Product Template File setting in Toolset > WooCommerce Blocks. Be sure the option "WooCommerce Views plugin default single product template" is selected there, as this setting can change unexpectedly when activating/deactivating plugins and themes.

Once this option is selected, the Content Template applied to Single Product posts should begin to appear on the front-end of the site. If it does not, please verify that the correct Content Template is assigned to Single Product posts. Let me know if this is not working as expected and I can take a closer look.

#1863793

Hi Christian, the option is selected! Probably something else went wrong? If I understand correctly layouts made will not be overridden by upgrading the plugin? Just received an e-mail from Dario annoucing all Toolset plugins are updated, will give it a try.

#1863815

Okay, I may have misunderstood how your site is set up. You mentioned layouts, but I'm not clear whether you are referring to the design you created in a Toolset Content Template as a layout, or if you're referring to a design created in the Toolset Layouts plugin, applied to the Product post type. Toolset Layouts should not be overwritten when updating plugins, but it seems that the Toolset Layouts plugin and the Elementor/Elementor Pro plugins are active on your site together. Using both systems together can cause some problems, so we recommend you either disable Layouts or disable Elementor. Have you created a Toolset Layout and applied it to the Product post type, or are you trying to display a Toolset Content Template on the Product post type? If you are not trying to display a Toolset Layout, I would need to know more about how you are using the Toolset Layouts plugin, and how you are using the Elementor system for templating. Are you using Toolset Layouts to design parts of the site, or is the plugin active without having any Layouts created? If it's the latter, you should deactivate the Toolset Layouts plugin to display Content Templates for Products.
Are you also using Elementor Pro's templating system? If so, are Elementor Pro templates applied to the Product post type?

#1864413

Hi Christian, I'm a newbie regarding WordPress so I have to get used to the correct terminology. I used Toolset to set up additional product fields and filter content with a specific attribute or productcategory. Therewith I used Layout to create the various pages, Elementor is only used to create the header and footer, therefor I think I cannot disable it.

#1864613

Okay we recommend you deactivate the Toolset Layouts plugin if you plan to also use Elementor. Instead of building your designs with Toolset Layouts, we recommend using Toolset Blocks and Content Templates. Our documentation includes some other best practices here: https://toolset.com/course-lesson/using-toolset-with-elementor-page-builder/

If you deactivate Layouts, is the error resolved? If not, I'll need to take a closer look.

#1864693

My issue is resolved now. Thank you!