mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Add filter to register standrard card button gateway programmatically
This commit is contained in:
parent
47e8fec98c
commit
b08c6f671a
2 changed files with 6 additions and 3 deletions
|
@ -1659,9 +1659,12 @@ return array(
|
|||
$settings = $container->get( 'wcgateway.settings' );
|
||||
assert( $settings instanceof ContainerInterface );
|
||||
|
||||
return $settings->has( 'allow_card_button_gateway' ) ?
|
||||
return apply_filters(
|
||||
'woocommerce_paypal_payments_enable_standard_card_button_gateway_settings',
|
||||
$settings->has( 'allow_card_button_gateway' ) ?
|
||||
(bool) $settings->get( 'allow_card_button_gateway' ) :
|
||||
$container->get( 'wcgateway.settings.allow_card_button_gateway.default' );
|
||||
$container->get( 'wcgateway.settings.allow_card_button_gateway.default' )
|
||||
);
|
||||
},
|
||||
'wcgateway.settings.has_enabled_separate_button_gateways' => static function ( ContainerInterface $container ): bool {
|
||||
return (bool) $container->get( 'wcgateway.settings.allow_card_button_gateway' );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue