diff --git a/changelog.txt b/changelog.txt index 3e9ddc31b..8313102d3 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,7 @@ *** Changelog *** = 8.7.0 - xxxx-xx-xx = +* Fix - Fix possible fatal errors when Stripe settings format is invalid during account connection. * Add - Log incoming webhook events and their request body. * Add - Show UPE payment methods in saved order on block checkout page. * Tweak - Delete the notice about the missing customization options on the updated checkout experience. diff --git a/includes/connect/class-wc-stripe-connect.php b/includes/connect/class-wc-stripe-connect.php index dbcf59a50..c7226ccdc 100644 --- a/includes/connect/class-wc-stripe-connect.php +++ b/includes/connect/class-wc-stripe-connect.php @@ -150,7 +150,8 @@ private function save_stripe_keys( $result, $type = 'connect', $mode = 'live' ) $is_test = 'live' !== $mode; $prefix = $is_test ? 'test_' : ''; $default_options = $this->get_default_stripe_config(); - $options = array_merge( $default_options, get_option( self::SETTINGS_OPTION, [] ) ); + $current_options = get_option( self::SETTINGS_OPTION, [] ); + $options = array_merge( $default_options, is_array( $current_options ) ? $current_options : [] ); $options['enabled'] = 'yes'; $options['testmode'] = $is_test ? 'yes' : 'no'; $options['upe_checkout_experience_enabled'] = $this->get_upe_checkout_experience_enabled(); diff --git a/readme.txt b/readme.txt index 6109b874f..a3fc6f22d 100644 --- a/readme.txt +++ b/readme.txt @@ -129,6 +129,7 @@ If you get stuck, you can ask for help in the Plugin Forum. == Changelog == = 8.7.0 - xxxx-xx-xx = +* Fix - Fix possible fatal errors when Stripe settings format is invalid during account connection. * Add - Log incoming webhook events and their request body. * Add - Show UPE payment methods in saved order on block checkout page. * Tweak - Delete the notice about the missing customization options on the updated checkout experience.