🔥 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:
Philipp Stracker 2025-03-12 13:42:24 +01:00
parent 6da8988e0a
commit e2fbeffcdd
No known key found for this signature in database

View file

@ -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',