Support » Plugin: AdRoll for WooCommerce Stores » Error when editing widgets

  • kmmathis


    Getting the following error with this plugin activated when trying to edit widgets under Dashboard -> Appearance -> Widgets: Uncaught Error: Call to a member function get() on null in /var/www/html/wp-content/plugins/adroll-for-woocommerce-stores-dev/adroll-for-woocommerce.php:300

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m experiencing the same. 300 is this line within the declaration of get_products_added_to_cart() and it occurs in relation to widgets:
    $products_added_to_cart = array_merge($products_added_to_cart, WC()->session->get(self::PRODUCTS_ADDED_TO_CART_SESSION_KEY, array()));

    I’ve never experienced the errors while interacting with the site, but have gotten multiple instances of the error reported to my email. This is an example taken from the most recent error (Note, it is not always the same widget):

    Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

    In this case, WordPress caught an error with one of your plugins, AdRoll for WooCommerce Stores.

    First, visit your website (https://…) and check for any visible issues. Next, visit the page where the error was caught (https://…/wp-admin/widgets.php?legacy-widget-preview%5BidBase%5D=nav_menu&legacy-widget-preview%5Binstance%5D%5Bencoded%5D=YToxOntzOjg6Im5hdl9tZW51IjtpOjEwNDt9&legacy-widget-preview%5Binstance%5D%5Bhash%5D=542ee33e5ee5a8203ae2efbde9ac019d&legacy-widget-preview%5Binstance%5D%5Braw%5D%5Bnav_menu%5D=104&legacy-widget-preview%5Binstance%5D%5Btitle%5D=&legacy-widget-preview%5Binstance%5D%5Bis_widget_customizer_js_value%5D=true) and check for any visible issues.

    Please contact your host for assistance with investigating this issue further.

    If your site appears broken and you can’t access your dashboard normally, WordPress now has a special “recovery mode”. This lets you safely login to your dashboard and investigate further.


    To keep your site safe, this link will expire in 1 day. Don’t worry about that, though: a new link will be emailed to you if the error occurs again after it expires.

    When seeking help with this issue, you may be asked for some of the following information:
    WordPress version 5.8.1
    Current theme: … – Shoptimizer Child (version 1.2.1)
    Current plugin: AdRoll for WooCommerce Stores (version 2.2.13)
    PHP version 7.4.13

    Error Details
    An error of type E_ERROR was caused in line 300 of the file /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/adroll-for-woocommerce-stores-dev/adroll-for-woocommerce.php. Error message: Uncaught Error: Call to a member function get() on null in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/adroll-for-woocommerce-stores-dev/adroll-for-woocommerce.php:300
    Stack trace:
    #0 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/adroll-for-woocommerce-stores-dev/adroll-for-woocommerce.php(406): AdRoll_For_WooCommerce->get_products_added_to_cart()
    #1 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/adroll-for-woocommerce-stores-dev/pixel.php(8): AdRoll_For_WooCommerce->get_global_vars()
    #2 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/adroll-for-woocommerce-stores-dev/adroll-for-woocommerce.php(46): include_once(‘/opt/bitnami/ap…’)
    #3 /opt/bitnami/apps/wordpress/htdocs/wp-includes/class-wp-hook.php(303): AdRoll_For_WooCommerce->wp_footer_action_callback()
    #4 /opt/bitnami/apps/wordpress/htdocs/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #5 /opt/bitnami/apps/wordpress/htdocs/wp-includes/plugin.php(470): WP_Hook->do_action()
    #6 /opt/bitnami/apps/wordpress/htdocs/

    About experiencing the errors: I confirmed that when interacting with a widget customization the error is produced.

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