mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +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
|
* @return array
|
||||||
*/
|
*/
|
||||||
private function apply_context_rules( array $disable_funding ) : array {
|
private function apply_context_rules( array $disable_funding ) : array {
|
||||||
if ( ! is_checkout() || ! $this->dcc_configuration->is_bcdc_enabled() ) {
|
if ( ! is_checkout() || $this->dcc_configuration->is_acdc_enabled() ) {
|
||||||
// Non-checkout pages, or BCDC disabled: Don't load card payments.
|
// Non-checkout pages, or ACDC enabled: Don't load card button.
|
||||||
$disable_funding[] = 'card';
|
$disable_funding[] = 'card';
|
||||||
|
|
||||||
return $disable_funding;
|
return $disable_funding;
|
||||||
}
|
}
|
||||||
|
|
||||||
// A checkout page and BCDC is enabled: Load card payments.
|
// A checkout page without ACDC: Load card button.
|
||||||
return array_filter(
|
return array_filter(
|
||||||
$disable_funding,
|
$disable_funding,
|
||||||
static fn( string $funding_source ) => $funding_source !== 'card'
|
static fn( string $funding_source ) => $funding_source !== 'card'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue