Merge pull request #515 from woocommerce/fix-onboaridng-fresh-install

Ensure `disable_funding` setting exist before getting it
This commit is contained in:
Emili Castells 2022-02-25 14:30:53 +01:00 committed by GitHub
commit b7a0b05e64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,7 +147,7 @@ class LoginSellerEndpoint implements EndpointInterface {
$accept_cards = (bool) ( $data['acceptCards'] ?? true );
$funding_sources = array();
if ( $this->settings->get( 'disable_funding' ) ) {
if ( $this->settings->has( 'disable_funding' ) ) {
$funding_sources = $this->settings->get( 'disable_funding' );
if ( ! is_array( $funding_sources ) ) {
$funding_sources = array();