• Resolved Christina

    (@geekmenina)


    Hello, I haven’t been able to use the WooCommerce integration for the last few updates. I’ve been hoping it would be resolved but it hasn’t been. I disabled all plugins but WooCommerce and used a twentytwentythree theme – when I click on a product category on the frontend, there is a fatal PHP error generated from the GTM Kit plugin and the page looks trashed.

    Can you please fix this so I can continue to use the integration? Thank you for your time.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    I’m not able to reproduce the error.

    I need the error message to investigate this further

    Thread Starter Christina

    (@geekmenina)

    Sure, here’s the error with WooCommerce integration turned back on. Thank you for taking the time to look at this:

    Warning: Trying to access array offset on value of type null REDACTED/wp-content/plugins/gtm-kit/src/Integration/WooCommerce.php?on line?866

    Fatal error: Uncaught TypeError: TLA_Media\GTM_Kit\Integration\WooCommerce::get_item_data_tag(): Argument #3 ($index) must be of type int, null given, called in REDACTED/wp-content/plugins/gtm-kit/src/Integration/WooCommerce.php on line 863 and defined in REDACTED/wp-content/plugins/gtm-kit/src/Integration/WooCommerce.php:815

    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    I don’t know why this is happening but i have a quic fix for you.
    Line 866 in /src/Integration/WooCommerce.php must be changed to ($woocommerce_loop['loop']) ?? 0

    Which version of WooCommerce are you using?

    Thread Starter Christina

    (@geekmenina)

    I’m using WooCommerce 8.3.1, and WordPres 6.4.2

    Thanks for the tip! Would this get added to an upcoming update?

    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    yes it will be in the next release

    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    The fix is included in the latest release 1.17.2

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP Fatal Error on Product Category Pages with WooCommerce Integration Turned On’ is closed to new replies.