• I am using Woocommerce Subscriptions plugin. When i go to checkout page, it gives me Warning Messages as :
    Warning: array_merge(): Argument #1 is not an array in /home/speedys1/public_html/wp-content/plugins/woocommerce-subscriptions/includes/class-wcs-cart-renewal.php on line 432
    Warning: array_key_exists() expects parameter 2 to be array, null given in /home/speedys1/public_html/wp-content/plugins/woocommerce-subscriptions/includes/class-wcs-cart-renewal.php on line 436

    Please suggest how i can fix?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I had the same problem. Apparently the warning comes from array_merge() and array_key_exists(), currently it’s not ensured that an array is passed to them.
    I changed them in checkout_get_value function in class-wcs-cart-renewal.php, making sure the arguments are arrays. It seems to be fixing it for now.

    $address_fields = array_merge( array(WC()->checkout()->checkout_fields['billing']), array(WC()->checkout()->checkout_fields['shipping']) );

    array_key_exists( $key, array($address_fields) )

    • This reply was modified 7 years, 10 months ago by shahriard. Reason: typo

    Are you able to guide me how to use your fix, Shahriad?

    Thank you!

    • This reply was modified 7 years, 9 months ago by webstyledk.

    I am having the same issue. Any solutions?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Getting Warning Messages on Checkout page with Woocommerce Subscription PLugin’ is closed to new replies.