• Resolved sakal037

    (@sakal037)


    2019-10-07T14:45:55+00:00 CRITICAL Uncaught Error: Call to a member function get_id() on null in wp-content/plugins/duracelltomi-google-tag-manager/integration/woocommerce.php:135
    Stack trace:
    #0 /wp-includes/class-wp-hook.php(286): gtm4wp_woocommerce_datalayer_filter_items(Array)
    #1 /wp-includes/plugin.php(208): WP_Hook->apply_filters(Array, Array)
    #2 /wp-content/plugins/duracelltomi-google-tag-manager/public/frontend.php(818): apply_filters(‘gtm4wp_compile_…’, Array)
    #3 /wp-includes/class-wp-hook.php(284): gtm4wp_wp_header_begin()
    #4 /wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
    #5 /wp-includes/plugin.php(465): WP_Hook->do_action(Array)
    #6 /wp-includes/general-template.php(2745): do_action(‘wp_head’)
    #7 /wp-content/themes/divi-mysodapop-d in /wp-content/plugins/duracelltomi-google-tag-manager/integration/woocommerce.php in Zeile 135

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    Thanks for reporting this error message.
    Please help me with some additional parameters
    – WordPress version?
    – WooCommerce version?
    – PHP version?

    What other WooCommerce related plugins are in use on the site?

    Thread Starter sakal037

    (@sakal037)

    WooCommerce version: 3.7.0
    WordPress 5.2.3
    php: 7.2.22

    Google Tag Manager for WordPress by Thomas Geiger – 1.10.1
    SOFT79 Cart Links for WooCommerce by Soft79 – 1.1.4
    Toolset Types by OnTheGoSystems – 2.3.5
    WooCommerce Admin by WooCommerce – 0.19.0
    WooCommerce Extended Coupon Features FREE by Soft79 – 3.1.0
    WooCommerce PayPal Checkout Gateway by WooCommerce – 1.6.17
    WooCommerce Stripe Gateway by WooCommerce – 4.2.5
    German Market by MarketPress – 3.9.1
    Booster for WooCommerce by Algoritmika Ltd – 4.5.1
    WooCommerce Order Status & Actions Manager by Actuality Extensions – 2.3.7
    WooCommerce by Automattic – 3.7.0
    YITH WooCommerce Product Slider Carousel Premium by YITH
    Classic Editor by WordPress Contributors – 1.5
    PixelYourSite by PixelYourSite – 7.1.2

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Thanks!

    The mentioned code in your initial message is the following:

    new WC_Customer( $woo->customer->get_id() )

    This is querying the customer ID for visitor but this should now throw an exception.
    I am testing some more settings on my dev site and let you know once I’ve found any specific reason.

    In the meanwhile, turning of the option “Customer data in data layer” will help.

    Thank you, that solve issue.

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    I’ve added a fix that will resolve the issue on your site as well if you turn back this feature in the upcoming v1.11:

    https://github.com/duracelltomi/gtm4wp/commit/a889e1f3fbe10990a50e5d2be27554e1fd2afe1f

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘CRITICAL Uncaught Error: Call to a member function get_id()’ is closed to new replies.