mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 12:25:15 +08:00
Merge pull request #1691 from woocommerce/PCP-1943-validate-email-address-api-credentials-field
validate email address API credentials field (1943)
This commit is contained in:
commit
b3df2374fd
3 changed files with 4 additions and 3 deletions
|
@ -238,7 +238,7 @@ return function ( ContainerInterface $container, array $fields ): array {
|
|||
'merchant_email_production' => array(
|
||||
'title' => __( 'Live Email address', 'woocommerce-paypal-payments' ),
|
||||
'classes' => array( State::STATE_ONBOARDED === $state->production_state() ? 'onboarded' : '', 'ppcp-always-shown-element' ),
|
||||
'type' => 'text',
|
||||
'type' => 'email',
|
||||
'required' => true,
|
||||
'desc_tip' => true,
|
||||
'description' => __( 'The email address of your PayPal account.', 'woocommerce-paypal-payments' ),
|
||||
|
@ -304,7 +304,7 @@ return function ( ContainerInterface $container, array $fields ): array {
|
|||
'merchant_email_sandbox' => array(
|
||||
'title' => __( 'Sandbox Email address', 'woocommerce-paypal-payments' ),
|
||||
'classes' => array( State::STATE_ONBOARDED === $state->sandbox_state() ? 'onboarded' : '', 'ppcp-always-shown-element' ),
|
||||
'type' => 'text',
|
||||
'type' => 'email',
|
||||
'required' => true,
|
||||
'desc_tip' => true,
|
||||
'description' => __( 'The email address of your PayPal account.', 'woocommerce-paypal-payments' ),
|
||||
|
|
|
@ -568,6 +568,7 @@ class SettingsListener {
|
|||
break;
|
||||
case 'text':
|
||||
case 'number':
|
||||
case 'email':
|
||||
$settings[ $key ] = isset( $raw_data[ $key ] ) ? wp_kses_post( $raw_data[ $key ] ) : '';
|
||||
break;
|
||||
case 'ppcp-password':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue