• The Facebook for WordPress plugin causes a fatal error on mobile when I bulk add products to the cart. This only happens when the automatic redirect to the cart page is on.

    On mobile it gives the following error:
    Notice: Trying to access array offset on value of type null in /home/esthersco/domains/estherscookery.nl/public_html/wp-content/plugins/official-facebook-pixel/integration/FacebookWordpressWooCommerce.php on line 244

    Fatal error: Uncaught Error: Call to a member function get_id() on null in /home/esthersco/domains/estherscookery.nl/public_html/wp-content/plugins/official-facebook-pixel/integration/FacebookWordpressWooCommerce.php:346 Stack trace: #0 /home/esthersco/domains/estherscookery.nl/public_html/wp-content/plugins/official-facebook-pixel/integration/FacebookWordpressWooCommerce.php(244): FacebookPixelPlugin\Integration\FacebookWordpressWooCommerce::getProductId() #1 [internal function]: FacebookPixelPlugin\Integration\FacebookWordpressWooCommerce::createAddToCartEvent() #2 /home/esthersco/domains/estherscookery.nl/public_html/wp-content/plugins/official-facebook-pixel/core/ServerEventFactory.php(187): call_user_func_array() #3 /home/esthersco/domains/estherscookery.nl/public_html/wp-content/plugins/official-facebook-pixel/integration/FacebookWordpressWooCommerce.php(193): FacebookPixelPlugin\Core\ServerEventFactory::safeCreateEvent() #4 /home/esthersco/domains/estherscookery.nl/public_html/wp-includes/class-wp-hook.php(305): Fa in /home/esthersco/domains/estherscookery.nl/public_html/wp-content/plugins/official-facebook-pixel/integration/FacebookWordpressWooCommerce.php on line 346`

    This fatal error is resolved when I disable the Facebook for WordPress plugin. Is there a way to resolve this fatal error even when the plugin is enabled?

    Thanks in advance!

    The page I need help with: [log in to see the link]

The topic ‘Fatal error: Call to a member function’ is closed to new replies.