Merge pull request #752 from woocommerce/pcp-831-fix-free-trial-card-button

Do not remove card funding source for free trials if card button enabled
This commit is contained in:
Alex Pantechovskis 2022-07-28 17:24:36 +03:00 committed by GitHub
commit 061ca9e7fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -984,7 +984,7 @@ class SmartButton implements SmartButtonInterface {
if ( $this->is_free_trial_cart() ) {
$all_sources = array_keys( $this->all_funding_sources );
if ( $is_dcc_enabled ) {
if ( $is_dcc_enabled || $is_separate_card_enabled ) {
$all_sources = array_diff( $all_sources, array( 'card' ) );
}
$disable_funding = $all_sources;