Skip to content

Commit

Permalink
Add new setting for the express button
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaymo committed Oct 16, 2024
1 parent 962ea04 commit 84e1681
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 8 additions & 0 deletions inc/settings/mollie_applepay_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@
'value' => isset($applePayOption['mollie_apple_pay_button_enabled_product']) ? $applePayOption['mollie_apple_pay_button_enabled_product'] : 'no',

],
[
'id' => 'mollie_apple_pay_button_enabled_express_checkout',
'title' => __('Enable Apple Pay Express Button on Checkout page', 'mollie-payments-for-woocommerce'),
'desc' => __('Enable the Apple Pay direct buy button on the Express Buttons section of the Checkout page', 'mollie-payments-for-woocommerce'),
'type' => 'checkbox',
'default' => 'no',
'value' => isset($applePayOption['mollie_apple_pay_button_enabled_express_checkout']) ? $applePayOption['mollie_apple_pay_button_enabled_express_checkout'] : 'no',
],
[
'id' => $pluginName . '_' . 'sectionend',
'type' => 'sectionend',
Expand Down
8 changes: 6 additions & 2 deletions src/PaymentMethods/Applepay.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public function getFormFields($generalFormFields): array
$paymentMethodFormFieds = [
'mollie_apple_pay_button_enabled_cart' => [
'title' => __('Enable Apple Pay Button on Cart page', 'mollie-payments-for-woocommerce'),
/* translators: Placeholder 1: enabled or disabled */
'desc' => __(
'Enable the Apple Pay direct buy button on the Cart page',
'mollie-payments-for-woocommerce'
Expand All @@ -42,14 +41,19 @@ public function getFormFields($generalFormFields): array
],
'mollie_apple_pay_button_enabled_product' => [
'title' => __('Enable Apple Pay Button on Product page', 'mollie-payments-for-woocommerce'),
/* translators: Placeholder 1: enabled or disabled */
'desc' => __(
'Enable the Apple Pay direct buy button on the Product page',
'mollie-payments-for-woocommerce'
),
'type' => 'checkbox',
'default' => 'no',
],
'mollie_apple_pay_button_enabled_express_checkout' => [
'title' => __('Enable Apple Pay Express Button on Checkout page', 'mollie-payments-for-woocommerce'),
'desc' =>__('Enable the Apple Pay direct buy button on the Express Buttons section of the Checkout page', 'mollie-payments-for-woocommerce'),
'type' => 'checkbox',
'default' => 'no',
],
];
return array_merge($generalFormFields, $paymentMethodFormFieds);
}
Expand Down

0 comments on commit 84e1681

Please sign in to comment.