mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Hide checkout layout settings when using separate card button
This commit is contained in:
parent
c87ae7a050
commit
3e66958880
2 changed files with 17 additions and 2 deletions
|
@ -442,6 +442,8 @@ return array(
|
|||
$subscription_helper = $container->get( 'subscription.helper' );
|
||||
assert( $subscription_helper instanceof SubscriptionHelper );
|
||||
|
||||
$has_enabled_separate_button_gateways = $container->get( 'wcgateway.settings.has_enabled_separate_button_gateways' );
|
||||
|
||||
$fields = array(
|
||||
'checkout_settings_heading' => array(
|
||||
'heading' => __( 'Standard Payments Settings', 'woocommerce-paypal-payments' ),
|
||||
|
@ -739,7 +741,7 @@ return array(
|
|||
'button_layout' => array(
|
||||
'title' => __( 'Button Layout', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
'classes' => $has_enabled_separate_button_gateways ? array( 'hide' ) : array(),
|
||||
'input_class' => array( 'wc-enhanced-select' ),
|
||||
'default' => 'vertical',
|
||||
'desc_tip' => true,
|
||||
|
@ -1745,6 +1747,10 @@ return array(
|
|||
(bool) $settings->get( 'allow_card_button_gateway' ) :
|
||||
$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' );
|
||||
},
|
||||
|
||||
'order-tracking.is-tracking-available' => static function ( ContainerInterface $container ): bool {
|
||||
try {
|
||||
$bearer = $container->get( 'api.bearer' );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue