Fix GooglePay general fixes / improvements

This commit is contained in:
Pedro Silva 2023-09-06 11:55:26 +01:00
parent d6a564f24f
commit 318217acb9
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
9 changed files with 85 additions and 41 deletions

View file

@ -29,7 +29,7 @@ return array(
$fields,
'allow_card_button_gateway',
array(
'googlepay_button_enabled' => array(
'googlepay_button_enabled' => array(
'title' => __( 'Google Pay Button', 'woocommerce-paypal-payments' ),
'type' => 'checkbox',
'label' => __( 'Enable Google Pay button', 'woocommerce-paypal-payments' ),
@ -44,14 +44,18 @@ return array(
'handler' => 'SubElementsHandler',
'options' => array(
'values' => array( '1' ),
'elements' => array( '#field-googlepay_button_color', '#field-googlepay_button_type' ),
'elements' => array(
'#field-googlepay_button_color',
'#field-googlepay_button_type',
'#field-googlepay_button_shipping_enabled',
),
),
),
)
),
),
),
'googlepay_button_color' => array(
'googlepay_button_color' => array(
'title' => str_repeat( ' ', 6 ) . __( 'Button Color', 'woocommerce-paypal-payments' ),
'type' => 'select',
'label' => '',
@ -63,7 +67,7 @@ return array(
'gateway' => 'paypal',
'requirements' => array(),
),
'googlepay_button_type' => array(
'googlepay_button_type' => array(
'title' => str_repeat( ' ', 6 ) . __( 'Button Type', 'woocommerce-paypal-payments' ),
'type' => 'select',
'class' => array(),
@ -74,6 +78,15 @@ return array(
'gateway' => 'paypal',
'requirements' => array(),
),
'googlepay_button_shipping_enabled' => array(
'title' => str_repeat( ' ', 6 ) . __( 'Shipping Callback', 'woocommerce-paypal-payments' ),
'type' => 'checkbox',
'label' => __( 'Enable Google Pay shipping callback', 'woocommerce-paypal-payments' ),
'default' => 'no',
'screens' => array( State::STATE_ONBOARDED ),
'gateway' => 'paypal',
'requirements' => array(),
),
)
);
},