Title: Error when editing widgets
Last modified: October 21, 2021

---

# Error when editing widgets

 *  [kmmathis](https://wordpress.org/support/users/wereallthieves/)
 * (@wereallthieves)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/error-when-editing-widgets/)
 * 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)

 *  [CubicInfinity](https://wordpress.org/support/users/cubicinfinity/)
 * (@cubicinfinity)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/error-when-editing-widgets/#post-15009594)
 * 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://&#8230](https://&#8230);) 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](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.
   > [https://&#8230](https://&#8230);
   > 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/
 *  [CubicInfinity](https://wordpress.org/support/users/cubicinfinity/)
 * (@cubicinfinity)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/error-when-editing-widgets/#post-15019885)
 * About experiencing the errors: I confirmed that when interacting with a widget
   customization the error is produced.
    -  This reply was modified 4 years, 7 months ago by [CubicInfinity](https://wordpress.org/support/users/cubicinfinity/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Error when editing widgets’ is closed to new replies.

 * ![](https://ps.w.org/adroll-for-woocommerce-stores-dev/assets/icon-256x256.png?
   rev=2909795)
 * [AdRoll for WooCommerce Stores](https://wordpress.org/plugins/adroll-for-woocommerce-stores-dev/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/adroll-for-woocommerce-stores-dev/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/adroll-for-woocommerce-stores-dev/)
 * [Active Topics](https://wordpress.org/support/plugin/adroll-for-woocommerce-stores-dev/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/adroll-for-woocommerce-stores-dev/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/adroll-for-woocommerce-stores-dev/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [CubicInfinity](https://wordpress.org/support/users/cubicinfinity/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/error-when-editing-widgets/#post-15019885)
 * Status: not resolved