Merge pull request #250 from woocommerce/PCP-256-disable-funding-credit-cards-aff

Disable funding credit cards affecting hosted fields, unset for GB
This commit is contained in:
Emili Castells 2021-09-10 15:24:58 +02:00 committed by GitHub
commit 079e8e6acc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 13 deletions

View file

@ -1918,15 +1918,6 @@ return array(
unset( $fields['ppcp_disconnect_sandbox'] );
}
/**
* Disable card for UK.
*/
$region = wc_get_base_location();
$country = $region['country'];
if ( 'GB' === $country ) {
unset( $fields['disable_funding']['options']['card'] );
}
/**
* Depending on your store location, some credit cards can't be used.
* Here, we filter them out.