You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: show payment method descriptions only in redirect mode
- Updated PayPal, Bizum, MBWay, and Multibanco settings to
conditionally show description fields only when redirect mode
is enabled
- Added custom CSS classes to description fields for
conditional visibility
- Implemented generic JavaScript logic to toggle description
field visibility based on redirect mode checkbox state
- Modified CC gateway to display description only in redirect
mode (not in component/embedded mode)
- Removed description display from subscription change payment
page (always uses component mode)
Descriptions are now only visible to customers when using
redirect flow, providing clearer UX by avoiding unnecessary
text when payment components are embedded directly on checkout.
Copy file name to clipboardExpand all lines: includes/admin/monei-bizum-settings.php
+17-2Lines changed: 17 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,20 @@
33
33
'label' => __( 'Enable Bizum by MONEI', 'monei' ),
34
34
'default' => 'no',
35
35
),
36
+
'bizum_mode' => array(
37
+
'title' => __( 'Use Redirect Flow', 'monei' ),
38
+
'type' => 'checkbox',
39
+
'label' => __( 'This will redirect the customer to the Hosted Payment Page.', 'monei' ),
40
+
'default' => 'no',
41
+
'description' => sprintf( __( 'If disabled the Bizum button will be rendered directly on the checkout page. It is recommended to enable redirection in cases where Bizum payments do not function correctly.', 'monei' ) ),
42
+
),
43
+
'bizum_style' => array(
44
+
'title' => __( 'Bizum Style', 'monei' ),
45
+
'type' => 'textarea',
46
+
'description' => __( 'Configure in JSON format the style of the Bizum component. Documentation: ', 'monei' ) . '<a href="https://docs.monei.com/docs/monei-js/reference/#bizum-options" target="_blank">MONEI Bizum Style</a>',
47
+
'default' => '{"height": "42"}',
48
+
'css' => 'min-height: 80px;',
49
+
),
36
50
'title' => array(
37
51
'title' => __( 'Title', 'monei' ),
38
52
'type' => 'text',
@@ -43,8 +57,9 @@
43
57
'description' => array(
44
58
'title' => __( 'Description', 'monei' ),
45
59
'type' => 'textarea',
46
-
'description' => __( 'The payment method description a user sees during checkout.', 'monei' ),
47
-
'default' => __( 'Pay with Bizum, you will be redirected to Bizum. Powered by MONEI', 'monei' ),
60
+
'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' ),
61
+
'default' => __( 'Pay with Bizum. Powered by MONEI.', 'monei' ),
Copy file name to clipboardExpand all lines: includes/admin/monei-mbway-settings.php
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -43,8 +43,9 @@
43
43
'description' => array(
44
44
'title' => __( 'Description', 'monei' ),
45
45
'type' => 'textarea',
46
-
'description' => __( 'The payment method description a user sees during checkout.', 'monei' ),
47
-
'default' => __( 'Pay with MBWay, you will be redirected to MBWay. Powered by MONEI', 'monei' ),
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' ),
47
+
'default' => __( 'Pay with MBWay. Powered by MONEI.', 'monei' ),
Copy file name to clipboardExpand all lines: includes/admin/monei-multibanco-settings.php
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -43,8 +43,9 @@
43
43
'description' => array(
44
44
'title' => __( 'Description', 'monei' ),
45
45
'type' => 'textarea',
46
-
'description' => __( 'The payment method description a user sees during checkout.', 'monei' ),
47
-
'default' => __( 'Pay with Multibanco, you will be redirected to Multibanco. Powered by MONEI', 'monei' ),
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' ),
47
+
'default' => __( 'Pay with Multibanco. Powered by MONEI.', 'monei' ),
Copy file name to clipboardExpand all lines: includes/admin/monei-paypal-settings.php
+17-2Lines changed: 17 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,20 @@
33
33
'label' => __( 'Enable PayPal by MONEI', 'monei' ),
34
34
'default' => 'no',
35
35
),
36
+
'paypal_mode' => array(
37
+
'title' => __( 'Use Redirect Flow', 'monei' ),
38
+
'type' => 'checkbox',
39
+
'label' => __( 'This will redirect the customer to the Hosted Payment Page.', 'monei' ),
40
+
'default' => 'no',
41
+
'description' => sprintf( __( 'If disabled the PayPal button will be rendered directly on the checkout page. It is recommended to enable redirection in cases where PayPal payments do not function correctly.', 'monei' ) ),
42
+
),
43
+
'paypal_style' => array(
44
+
'title' => __( 'PayPal Style', 'monei' ),
45
+
'type' => 'textarea',
46
+
'description' => __( 'Configure in JSON format the style of the PayPal component. Documentation: ', 'monei' ) . '<a href="https://docs.monei.com/docs/monei-js/reference/#paypal-options" target="_blank">MONEI PayPal Style</a>',
47
+
'default' => '{"height": "42"}',
48
+
'css' => 'min-height: 80px;',
49
+
),
36
50
'title' => array(
37
51
'title' => __( 'Title', 'monei' ),
38
52
'type' => 'text',
@@ -43,8 +57,9 @@
43
57
'description' => array(
44
58
'title' => __( 'Description', 'monei' ),
45
59
'type' => 'textarea',
46
-
'description' => __( 'The payment method description a user sees during checkout.', 'monei' ),
47
-
'default' => __( 'Pay with PayPal, you will be redirected to PayPal. Powered by MONEI.', 'monei' ),
60
+
'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' ),
61
+
'default' => __( 'Pay with PayPal. Powered by MONEI.', 'monei' ),
0 commit comments