mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
🔥 Remove incorrect filter
The filter solved a wrong problem: It only hides the BCDC button, while the solution would be to disable the entire BCDC gateway.
This commit is contained in:
parent
6da8988e0a
commit
e2fbeffcdd
1 changed files with 0 additions and 29 deletions
|
@ -552,35 +552,6 @@ class SettingsModule implements ServiceModule, ExecutableModule {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets the BCDC black button if merchant is eligible for ACDC.
|
||||
*/
|
||||
add_filter(
|
||||
'woocommerce_paypal_payments_disabled_funding_sources',
|
||||
/**
|
||||
* Unsets the BCDC black button if merchant is eligible for ACDC.
|
||||
*
|
||||
* @param int[]|string[]|mixed $disable_funding The disabled funding sources.
|
||||
* @return int[]|string[]|mixed The disabled funding sources.
|
||||
*
|
||||
* @psalm-suppress MissingClosureParamType
|
||||
*/
|
||||
static function ( $disable_funding ) use ( $container ) {
|
||||
if ( ! is_array( $disable_funding ) || in_array( 'card', $disable_funding, true ) ) {
|
||||
return $disable_funding;
|
||||
}
|
||||
|
||||
$dcc_product_status = $container->get( 'wcgateway.helper.dcc-product-status' );
|
||||
assert( $dcc_product_status instanceof DCCProductStatus );
|
||||
|
||||
if ( $dcc_product_status->is_active() ) {
|
||||
$disable_funding[] = 'card';
|
||||
}
|
||||
|
||||
return $disable_funding;
|
||||
}
|
||||
);
|
||||
|
||||
// Enable Fastlane after onboarding if the store is compatible.
|
||||
add_action(
|
||||
'woocommerce_paypal_payments_apply_default_configuration',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue