mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
🐛 Fix the “disable card funding” condition
This commit is contained in:
parent
b5c08e842e
commit
ee5237adf5
1 changed files with 3 additions and 3 deletions
|
@ -132,14 +132,14 @@ class DisabledFundingSources {
|
|||
* @return array
|
||||
*/
|
||||
private function apply_context_rules( array $disable_funding ) : array {
|
||||
if ( ! is_checkout() || ! $this->dcc_configuration->is_bcdc_enabled() ) {
|
||||
// Non-checkout pages, or BCDC disabled: Don't load card payments.
|
||||
if ( ! is_checkout() || $this->dcc_configuration->is_acdc_enabled() ) {
|
||||
// Non-checkout pages, or ACDC enabled: Don't load card button.
|
||||
$disable_funding[] = 'card';
|
||||
|
||||
return $disable_funding;
|
||||
}
|
||||
|
||||
// A checkout page and BCDC is enabled: Load card payments.
|
||||
// A checkout page without ACDC: Load card button.
|
||||
return array_filter(
|
||||
$disable_funding,
|
||||
static fn( string $funding_source ) => $funding_source !== 'card'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue