• I recently bought a new theme and everything seems to work perfect except for when I try and open the product pages.

    I get the following error:
    Fatal error: Call to a member function get_customer_id() on a non-object in /home/p253j7jc/public_html/wp-content/plugins/woocommerce-catalog-visibility-options/lib/woocommerce-catalog-restrictions/classes/class-wc-catalog-restrictions-query.php on line 145

    Line 145:
    if ( $session_id = false ) {
    $session_id = WC_Catalog_Visibility_Compatibility::WC()->session->get_customer_id();
    }

    When I disable catalog visibility plugin the product page successfully loads.

    I really need the plugin and would like to use my new theme. How should I proceed?

    I would appreciate any help.

    https://www.ads-software.com/plugins/wp-e-commerce-catalog-visibility-and-email-inquiry/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Steve Truman

    (@a3rev)

    Hello milan.badlani

    You are posting here on the WP e-Commerce Catalog Visibility forum – which I assume means you are running a WP e-Commerce store?

    The error message you posted is showing that you are trying to install the WooCommerce Email Inquiry and Cart Options plugin

    If that is the case – you should instead install this plugin WP e-Commerce Catalog Visibility

    Both are child plugins and require the parent to be on the site so they can hook into it and activate.

    Please take a look at that – If in fact you have a WooCommerce store and you are still experiencing that issue when you are trying to install WooCommerce Email Inquiry and Cart Options – can you please mark this support topic as resolved and post your support request to the WooCommerce Email Inquiry and cart Options support forum and we will help you there. Thank you – Steve

    Thread Starter milan.badlani

    (@milanbadlani)

    Hi Steve,

    I run a shop using woo-commerce.

    I am not trying to install WooCommerce Email Inquiry and Cart Options plugin.

    I have WP e-Commerce Catalog Visibility installed and for some reason when I view single products page I get the mentioned error code.

    When i disable WP e-Commerce Catalog Visibility the single products page load properly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal Error when Viewing Product’ is closed to new replies.