Skip to content

Commit 4386c2a

Browse files
committed
feat: improve settings descriptions and UI consistency
- Update API Key Mode description to match PrestaShop - Improve Account ID and API Key descriptions - Change Pre-Authorize from checkbox to select dropdown with Sale/Authorization options - Add line breaks to Payment Action and Log Level descriptions for better readability - Standardize 'Recommended' labels across settings - Remove desc_tip to show descriptions below fields instead of tooltips - Add hint for Credit Card redirect flow - Match PrestaShop setting descriptions for consistency
1 parent 7664d63 commit 4386c2a

File tree

2 files changed

+35
-38
lines changed

2 files changed

+35
-38
lines changed

includes/admin/monei-cc-settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
'type' => 'checkbox',
3737
'label' => __( 'This will redirect the customer to the Hosted Payment Page.', 'monei' ),
3838
'default' => 'no',
39-
'description' => sprintf( __( 'If disabled the credit card input will be rendered directly on the checkout page.', 'monei' ) ),
39+
'description' => __( 'If disabled the credit card input will be rendered directly on the checkout page. It is recommended to enable redirection in cases where card payments do not function correctly.', 'monei' ),
4040
),
4141
'title' => array(
4242
'title' => __( 'Title', 'monei' ),

src/Settings/MoneiSettings.php

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,20 @@ public function get_settings() {
3030
'id' => 'monei_settings_title',
3131
),
3232
array(
33-
'title' => __( 'API Key Mode', 'monei' ),
34-
'type' => 'select',
35-
'desc' => __( 'Choose between Test or Live API Key.', 'monei' ),
36-
'desc_tip' => true,
37-
'id' => 'monei_apikey_mode',
38-
'default' => 'test',
39-
'options' => array(
40-
'test' => __( 'Test API Key', 'monei' ),
41-
'live' => __( 'Live API Key', 'monei' ),
33+
'title' => __( 'API Key Mode', 'monei' ),
34+
'type' => 'select',
35+
'desc' => __( 'Set to Live to use the production environment.', 'monei' ),
36+
'id' => 'monei_apikey_mode',
37+
'default' => 'test',
38+
'options' => array(
39+
'test' => __( 'Test', 'monei' ),
40+
'live' => __( 'Live', 'monei' ),
4241
),
4342
),
4443
array(
4544
'title' => __( 'Test Account ID *', 'monei' ),
4645
'type' => 'text',
47-
'desc' => __( 'Enter your MONEI Test Account ID here.', 'monei' ),
48-
'desc_tip' => true,
46+
'desc' => __( 'Your MONEI Test Account ID. Available at your MONEI dashboard.', 'monei' ),
4947
'id' => 'monei_test_accountid',
5048
'default' => '',
5149
'class' => 'monei-api-key-field monei-test-api-key-field',
@@ -54,8 +52,7 @@ public function get_settings() {
5452
array(
5553
'title' => __( 'Live Account ID *', 'monei' ),
5654
'type' => 'text',
57-
'desc' => __( 'Enter your MONEI Live Account ID here.', 'monei' ),
58-
'desc_tip' => true,
55+
'desc' => __( 'Your MONEI Account ID. Available at your MONEI dashboard.', 'monei' ),
5956
'id' => 'monei_live_accountid',
6057
'default' => '',
6158
'class' => 'monei-api-key-field monei-live-api-key-field',
@@ -64,8 +61,7 @@ public function get_settings() {
6461
array(
6562
'title' => __( 'Test API Key *', 'monei' ),
6663
'type' => 'password',
67-
'desc' => __( 'Enter your MONEI Test API Key here.', 'monei' ),
68-
'desc_tip' => true,
64+
'desc' => __( 'Your MONEI Test API Key. Available at your MONEI dashboard.', 'monei' ),
6965
'id' => 'monei_test_apikey',
7066
'default' => '',
7167
'class' => 'monei-api-key-field monei-test-api-key-field',
@@ -74,40 +70,41 @@ public function get_settings() {
7470
array(
7571
'title' => __( 'Live API Key *', 'monei' ),
7672
'type' => 'password',
77-
'desc' => __( 'Enter your MONEI Live API Key here.', 'monei' ),
78-
'desc_tip' => true,
73+
'desc' => __( 'Your MONEI API Key. Available at your MONEI dashboard.', 'monei' ),
7974
'id' => 'monei_live_apikey',
8075
'default' => '',
8176
'class' => 'monei-api-key-field monei-live-api-key-field',
8277
'placeholder' => 'pk_live_7h3m4n1f3st0k3yf0r3x4mpl3purp0s3',
8378
),
8479
array(
85-
'title' => __( 'What to do after payment?', 'monei' ),
86-
'type' => 'select',
87-
'description' => __( 'Choose what to do after the customer pays the order. This setting applies to all MONEI payment methods.', 'monei' ),
88-
'default' => 'processing',
89-
'id' => 'monei_orderdo',
90-
'options' => array(
91-
'processing' => __( 'Mark as Processing (default & recommended)', 'monei' ),
80+
'title' => __( 'What to do after payment?', 'monei' ),
81+
'type' => 'select',
82+
'desc' => __( 'Choose what to do after the customer pays the order. This setting applies to all MONEI payment methods.', 'monei' ),
83+
'default' => 'processing',
84+
'id' => 'monei_orderdo',
85+
'options' => array(
86+
'processing' => __( 'Mark as Processing (Recommended)', 'monei' ),
9287
'completed' => __( 'Mark as Complete', 'monei' ),
9388
),
9489
),
9590
array(
96-
'title' => __( 'Pre-Authorize', 'monei' ),
97-
'type' => 'checkbox',
98-
'label' => __( 'Manually capture payments', 'monei' ),
99-
'description' => __( "Place a hold on the funds when the customer authorizes the payment, but don't capture the funds until later. Only works with payment methods that support authorization (Credit Card, PayPal).<br>You can capture the payment by changing order status to <strong>Completed</strong> or <strong>Processing</strong>.<br>You can cancel the payment by changing order to <strong>Cancelled</strong> or <strong>Refunded</strong>.", 'monei' ),
100-
'default' => 'no',
101-
'id' => 'monei_pre_authorize',
91+
'title' => __( 'Payment Action', 'monei' ),
92+
'type' => 'select',
93+
'desc' => __( 'Choose payment flow: Immediate charge or Pre-authorization.<br>Pre-authorization is supported for: Card, Apple Pay, Google Pay, PayPal.<br>Not supported for: MBWay, Multibanco.', 'monei' ),
94+
'default' => 'no',
95+
'id' => 'monei_pre_authorize',
96+
'options' => array(
97+
'no' => __( 'Sale (Immediate charge)', 'monei' ),
98+
'yes' => __( 'Authorization (Pre-authorization)', 'monei' ),
99+
),
102100
),
103101
array(
104-
'title' => __( 'Log Level', 'monei' ),
105-
'type' => 'select',
106-
'desc' => __( 'Set minimum log level. Only messages at or above this level will be logged. Logs are available in WooCommerce > Status > Logs > Select MONEI Logs. WARNING: INFO level may impact performance.', 'monei' ),
107-
'desc_tip' => false,
108-
'id' => 'monei_log_level',
109-
'default' => '3',
110-
'options' => array(
102+
'title' => __( 'Log Level', 'monei' ),
103+
'type' => 'select',
104+
'desc' => __( 'Set minimum log level. Only messages at or above this level will be logged.<br>Logs are available in WooCommerce > Status > Logs > Select MONEI Logs.<br>WARNING: INFO level may impact performance.', 'monei' ),
105+
'id' => 'monei_log_level',
106+
'default' => '3',
107+
'options' => array(
111108
'1' => __( 'INFO - All messages (Debug mode)', 'monei' ),
112109
'2' => __( 'WARNING - Warnings and errors only', 'monei' ),
113110
'3' => __( 'ERROR - Errors only (Recommended)', 'monei' ),

0 commit comments

Comments
 (0)