mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Pay upon Invoice: Add input validation via pattern and required attributes to the Experience Context setting fields (667)
This commit is contained in:
parent
0ce740ba62
commit
ef9a4d9cdf
1 changed files with 17 additions and 1 deletions
|
@ -202,7 +202,13 @@ class PayUponInvoiceGateway extends WC_Payment_Gateway {
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'default' => get_bloginfo( 'name' ) ?? '',
|
'default' => get_bloginfo( 'name' ) ?? '',
|
||||||
'desc_tip' => true,
|
'desc_tip' => true,
|
||||||
'description' => __( 'Merchant name displayed in Ratepay\'s payment instructions.', 'woocommerce-paypal-payments' ),
|
'description' => __( 'Merchant name displayed in Ratepay\'s payment instructions. Should not exceed 127 characters.', 'woocommerce-paypal-payments' ),
|
||||||
|
'maxlength' => 127,
|
||||||
|
'custom_attributes' => array(
|
||||||
|
'pattern' => '.{1,127}',
|
||||||
|
'autocomplete' => 'off',
|
||||||
|
'required' => ''
|
||||||
|
),
|
||||||
),
|
),
|
||||||
'logo_url' => array(
|
'logo_url' => array(
|
||||||
'title' => __( 'Logo URL', 'woocommerce-paypal-payments' ),
|
'title' => __( 'Logo URL', 'woocommerce-paypal-payments' ),
|
||||||
|
@ -210,6 +216,11 @@ class PayUponInvoiceGateway extends WC_Payment_Gateway {
|
||||||
'default' => '',
|
'default' => '',
|
||||||
'desc_tip' => true,
|
'desc_tip' => true,
|
||||||
'description' => __( 'Logo to be presented on Ratepay\'s payment instructions.', 'woocommerce-paypal-payments' ),
|
'description' => __( 'Logo to be presented on Ratepay\'s payment instructions.', 'woocommerce-paypal-payments' ),
|
||||||
|
'custom_attributes' => array(
|
||||||
|
'pattern' => '.+',
|
||||||
|
'autocomplete' => 'off',
|
||||||
|
'required' => ''
|
||||||
|
),
|
||||||
),
|
),
|
||||||
'customer_service_instructions' => array(
|
'customer_service_instructions' => array(
|
||||||
'title' => __( 'Customer service instructions', 'woocommerce-paypal-payments' ),
|
'title' => __( 'Customer service instructions', 'woocommerce-paypal-payments' ),
|
||||||
|
@ -217,6 +228,11 @@ class PayUponInvoiceGateway extends WC_Payment_Gateway {
|
||||||
'default' => '',
|
'default' => '',
|
||||||
'desc_tip' => true,
|
'desc_tip' => true,
|
||||||
'description' => __( 'Customer service instructions to be presented on Ratepay\'s payment instructions.', 'woocommerce-paypal-payments' ),
|
'description' => __( 'Customer service instructions to be presented on Ratepay\'s payment instructions.', 'woocommerce-paypal-payments' ),
|
||||||
|
'custom_attributes' => array(
|
||||||
|
'pattern' => '.+',
|
||||||
|
'autocomplete' => 'off',
|
||||||
|
'required' => ''
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue