Skip to content

Commit 32cb917

Browse files
committed
fix: improve payment method description field behavior and consistency
- Add conditional description display for card payment method - Update card description default to include 'Powered by MONEI' branding - Remove MBWay and Multibanco from conditional display (redirect-only methods) - Update MBWay and Multibanco description help text to reflect always-visible behavior Changes: - Card, PayPal, Bizum: Description shown only in redirect mode - MBWay, Multibanco: Description always visible (redirect-only methods) - All methods now have consistent 'Powered by MONEI' branding in defaults
1 parent 30adf5d commit 32cb917

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

assets/js/monei-settings.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ jQuery( document ).ready( function ( $ ) {
2929
}
3030
}
3131

32-
// Payment methods that have description fields
33-
const paymentMethods = ['paypal', 'bizum', 'mbway', 'multibanco'];
32+
// Payment methods that have description fields (only for methods with both redirect and embedded modes)
33+
// MBWay and Multibanco are redirect-only, so their descriptions are always visible
34+
const paymentMethods = ['cc', 'paypal', 'bizum'];
3435

3536
// Initial call to set the correct fields on page load
3637
toggleApiKeyFields();

includes/admin/monei-cc-settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
'title' => __( 'Description', 'monei' ),
4545
'type' => 'textarea',
4646
'description' => __( 'This description is only displayed when using redirect mode. It will be shown to customers before they are redirected to the payment page.', 'monei' ),
47-
'default' => __( 'Pay with credit card.', 'monei' ),
47+
'default' => __( 'Pay with credit card. Powered by MONEI.', 'monei' ),
4848
'class' => 'monei-cc-description-field',
4949
),
5050
'card_input_style' => array(

includes/admin/monei-mbway-settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
'description' => array(
4444
'title' => __( 'Description', 'monei' ),
4545
'type' => 'textarea',
46-
'description' => __( 'This description is only displayed when using redirect mode. It will be shown to customers before they are redirected to the payment page.', 'monei' ),
46+
'description' => __( 'Payment method description shown to customers during checkout.', 'monei' ),
4747
'default' => __( 'Pay with MBWay. Powered by MONEI.', 'monei' ),
4848
'class' => 'monei-mbway-description-field',
4949
),

includes/admin/monei-multibanco-settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
'description' => array(
4444
'title' => __( 'Description', 'monei' ),
4545
'type' => 'textarea',
46-
'description' => __( 'This description is only displayed when using redirect mode. It will be shown to customers before they are redirected to the payment page.', 'monei' ),
46+
'description' => __( 'Payment method description shown to customers during checkout.', 'monei' ),
4747
'default' => __( 'Pay with Multibanco. Powered by MONEI.', 'monei' ),
4848
'class' => 'monei-multibanco-description-field',
4949
),

0 commit comments

Comments
 (0)