Support » Plugin: WooCommerce » Error Message When adding to cart after 4.0 update

  • Resolved simco

    (@simco)


    After updating to 4.0 and testing for issues we noticed immediately after adding an item to the cart, the following errors:

    Warning: array_keys() expects parameter 1 to be array, null given in /home/xxwondersprayxx/public_html/wp-content/plugins/woocommerce/includes/wc-cart-functions.php on line 470

    Warning: array_keys() expects parameter 1 to be array, null given in /home/xxxyyyzzz/public_html/wp-content/plugins/woocommerce/includes/wc-cart-functions.php on line 441

    Warning: current() expects parameter 1 to be array, null given in /home/xxxyyyzzz/public_html/wp-content/plugins/woocommerce/includes/wc-cart-functions.php on line 442

    Warning: count(): Parameter must be an array or an object that implements Countable in /home/xxxyyyzzz/public_html/wp-content/plugins/woocommerce/includes/wc-cart-functions.php on line 421

    Please advise.

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

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

    (@peterfabian1000)

    Hi @simco ,

    Thanks for sharing the error information. I could not reproduce the problem right away, therefore would require further information to understand why is it happening.

    1. Were you able to reproduce this problem with only WooCommerce plugin active and using the default/Storefront theme?

    2. Can you please share your system status report so that we can better understand your installation?

    Thread Starter simco

    (@simco)

    We had to move the site to the live domain, It’s now found at https://thewonderspray.com

    If you add something to the cart you’ll see the error messages displayed. It’s only when viewing the cart itself.

    We’ve tried disconnecting ALL plugins but it’s directly related to the WC cart functions apparently.

    Here’s the system report:

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://thewonderspray.com
    Site address (URL): https://thewonderspray.com
    WC Version: 4.0.0
    REST API Version: ✔ 1.0.7
    WC Blocks Version: ✔ 2.5.14
    Action Scheduler Version: ✔ 3.1.2
    WC Admin Version: ✔ 1.0.0
    Log Directory Writable: ✔
    WP Version: 5.3.2
    WP Multisite: –
    WP Memory Limit: 512 MB
    WP Debug Mode: –
    WP Cron: ✔
    Language: en_US
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 7.3.15
    PHP Post Max Size: 32 MB
    PHP Time Limit: 90
    PHP Max Input Vars: 1000
    cURL Version: 7.68.0
    OpenSSL/1.1.1d
    
    SUHOSIN Installed: –
    MySQL Version: 5.5.5-10.0.38-MariaDB
    Max Upload Size: 32 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔
    
    ### Database ###
    
    WC Database Version: 4.0.0
    WC Database Prefix: wpit_
    Total Database Size: 12.57MB
    Database Data Size: 11.09MB
    Database Index Size: 1.48MB
    wpit_woocommerce_sessions: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
    wpit_woocommerce_api_keys: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_woocommerce_order_items: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_woocommerce_order_itemmeta: Data: 0.01MB + Index: 0.01MB + Engine MyISAM
    wpit_woocommerce_tax_rates: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wpit_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wpit_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_woocommerce_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_actionscheduler_actions: Data: 0.72MB + Index: 0.19MB + Engine MyISAM
    wpit_actionscheduler_claims: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_actionscheduler_groups: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wpit_actionscheduler_logs: Data: 0.35MB + Index: 0.27MB + Engine MyISAM
    wpit_ac_abandoned_cart_history_lite: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_ac_email_templates_lite: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
    wpit_ac_guest_abandoned_cart_history_lite: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_ac_sent_history_lite: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_aiowps_events: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_aiowps_failed_logins: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_aiowps_global_meta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_aiowps_login_activity: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_aiowps_login_lockdown: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_aiowps_permanent_block: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_c2c_config: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wpit_commentmeta: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wpit_comments: Data: 0.11MB + Index: 0.08MB + Engine MyISAM
    wpit_et_social_stats: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_gf_draft_submissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_gf_entry: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_gf_entry_meta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_gf_entry_notes: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_gf_form: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_gf_form_meta: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
    wpit_gf_form_revisions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_gf_form_view: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_mailchimp_carts: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_mailchimp_jobs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_options: Data: 1.22MB + Index: 0.07MB + Engine MyISAM
    wpit_postmeta: Data: 0.83MB + Index: 0.24MB + Engine MyISAM
    wpit_posts: Data: 7.40MB + Index: 0.13MB + Engine MyISAM
    wpit_rank_math_404_logs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_rank_math_internal_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_rank_math_internal_meta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_rank_math_redirections: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_rank_math_redirections_cache: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_rank_math_sc_analytics: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_smush_dir_images: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_termmeta: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wpit_terms: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wpit_term_relationships: Data: 0.03MB + Index: 0.07MB + Engine MyISAM
    wpit_term_taxonomy: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wpit_usermeta: Data: 0.34MB + Index: 0.25MB + Engine MyISAM
    wpit_users: Data: 0.03MB + Index: 0.03MB + Engine MyISAM
    wpit_wc_admin_notes: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_wc_admin_note_actions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_wc_category_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_wc_customer_lookup: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wpit_wc_download_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_wc_order_coupon_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_wc_order_product_lookup: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wpit_wc_order_stats: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wpit_wc_order_tax_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_wc_product_meta_lookup: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wpit_wc_tax_rate_classes: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wpit_wc_webhooks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_wpfb_post_templates: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wpit_wpfb_reviews: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    
    ### Post Type Counts ###
    
    attachment: 85
    custom_css: 1
    customize_changeset: 16
    et_pb_layout: 286
    nav_menu_item: 23
    page: 19
    post: 3
    product: 17
    product_variation: 4
    revision: 276
    shop_coupon: 10
    shop_order: 10
    
    ### Security ###
    
    Secure connection (HTTPS): ✔
    Hide errors from visitors: ✔
    
    ### Active Plugins (24) ###
    
    Gravity Forms: by rocketgenius – 2.4.17
    Divi Ultimate Plugin: by Divi Ultimate – 8.0.1
    All In One WP Security: by Tips and Tricks HQ
    Peter Petreski
    Ruhul
    Ivy – 4.4.3
    
    Classic Editor: by WordPress Contributors – 1.5
    PayPal Express Checkout Payment Gateway for WooCommerce ( Basic ): by WebToffee – 1.4.3 – Not tested with the active version of WooCommerce
    Facebook for WooCommerce: by Facebook – 1.10.1 – Not tested with the active version of WooCommerce
    Hummingbird: by WPMU DEV – 2.4.1
    Mailchimp for WooCommerce: by Mailchimp – 2.3.4 – Not tested with the active version of WooCommerce
    Monarch Plugin: by Elegant Themes – 1.4.12
    Rank Math SEO: by Rank Math – 1.0.40
    Supreme Modules Lite - Divi Theme, Extra Theme and Divi Builder: by Supreme Modules – 1.9.6
    Divi Supreme Pro: by Divi Supreme – 2.5.5
    UpdraftPlus - Backup/Restore: by UpdraftPlus.Com
    DavidAnderson – 1.16.22
    
    ELEX Stamps.com WooCommerce Extension (USPS): by ELEX – 2.2.2 – Not tested with the active version of WooCommerce
    WooCommerce Admin: by WooCommerce – 1.0.0 – Not tested with the active version of WooCommerce
    WooCommerce Extended Coupon Features FREE: by Soft79 – 3.1.2 – Not tested with the active version of WooCommerce
    WooCommerce Customer/Order/Coupon CSV Import Suite: by SkyVerge – 3.8.3 – Not tested with the active version of WooCommerce
    WooCommerce Authorize.Net Gateway: by SkyVerge – 3.2.1 – Not tested with the active version of WooCommerce
    WooCommerce Services: by Automattic – 1.22.4 – Not tested with the active version of WooCommerce
    WooCommerce - ShipStation Integration: by WooCommerce – 4.1.34 – Not tested with the active version of WooCommerce
    WooCommerce: by Automattic – 4.0.0
    WordPress Importer: by wordpressdotorg – 0.7
    Smush: by WPMU DEV – 3.6.1
    WordPress Google Translate: by Kartik Parmar – 1.0
    
    ### Inactive Plugins (9) ###
    
    Abandoned Cart Lite for WooCommerce: by Tyche Softwares – 5.7.1 – Not tested with the active version of WooCommerce
    Akismet Anti-Spam: by Automattic – 4.1.3
    Cart2cart: Magento to Woocommerce Plugin: by MagneticOne – 2.0.0 – Not tested with the active version of WooCommerce
    Divi Coming Soon: by Divi Life — Tim Strifler – 1.0
    Google Website Translator: by Prisna – 1.4.2
    Hello Dolly: by Matt Mullenweg – 1.7.2
    Jetpack by WordPress.com: by Automattic – 8.3
    WP Google Review Slider: by LJ Apps – 6.6
    Yoast SEO: by Team Yoast – 13.2
    
    ### Dropin Plugins (1) ###
    
    advanced-cache.php: advanced-cache.php
    
    ### Settings ###
    
    API Enabled: –
    Force SSL: –
    Currency: USD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: –
    
    ### WC Pages ###
    
    Shop base: #49713 - /shop/
    Cart: #49714 - /cart/
    Checkout: #49715 - /checkout/
    My account: #49716 - /my-account/
    Terms and conditions: ❌ Page not set
    
    ### Theme ###
    
    Name: Divi Ultimate
    Version: 8.0.1
    Author URL: https://diviultimate.com
    Child Theme: ✔
    Parent Theme Name: Divi
    Parent Theme Version: 4.4.1
    Parent Theme Author URL: http://www.elegantthemes.com
    WooCommerce Support: ✔
    
    ### Templates ###
    
    Overrides: –
    
    ### Authorize.Net Credit Card ###
    
    Environment: Production
    Tokenization Enabled: –
    Debug Mode: Off
    Webhooks Enabled: ❌
    						Not generated
    
    ### Authorize.Net eCheck ###
    
    Environment: Production
    Tokenization Enabled: –
    Debug Mode: Off
    Webhooks Enabled: Inherited
    
    ### Action Scheduler ###
    
    Complete: 1,870
    Oldest: 2020-02-11 19:05:07 +0000
    Newest: 2020-03-13 18:30:05 +0000
    
    Pending: 2
    Oldest: 2020-03-13 18:43:04 +0000
    Newest: 2020-03-13 18:43:04 +0000
    
    
    Thread Starter simco

    (@simco)

    *bump* I really need this to be looked at ASAP.

    Plugin Support Yuki K. a11n

    (@yukikatayama)

    Automattic Happiness Engineer

    Hi @simco

    I took a look at your site and cart page, however, am not seeing the error message: https://d.pr/i/L8rx7N

    Were you able to resolve this?

    Thread Starter simco

    (@simco)

    Couldn’t wait any longer for help. Through a series of tests and elimination and some digging in the code, it appeared to be a shipping issue with the plugin we were using for Stamps.com/USPS postage calculations. I purchased a different plugin, installed it, configured shipping zones, and the errors stopped occurring.

    Plugin Support Yuki K. a11n

    (@yukikatayama)

    Automattic Happiness Engineer

    Ah, a plugin conflict. Good to hear you were able to resolve!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error Message When adding to cart after 4.0 update’ is closed to new replies.