Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide API password fields #361

Merged
merged 2 commits into from Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
52 changes: 32 additions & 20 deletions classes/admin/class-kp-form-fields.php
Expand Up @@ -173,11 +173,14 @@ private static function kp_form_country_title( $country_name, $flag_path ) {
*/
private static function kp_form_production_username() {
return array(
'title' => __( 'Production Klarna API username', 'klarna-payments-for-woocommerce' ),
'type' => 'text',
'description' => __( 'Use the API username you downloaded in the Klarna Merchant Portal. Don’t use your email address.', 'klarna-payments-for-woocommerce' ),
'default' => '',
'desc_tip' => false,
'title' => __( 'Production Klarna API username', 'klarna-payments-for-woocommerce' ),
'type' => 'text',
'description' => __( 'Use the API username you downloaded in the Klarna Merchant Portal. Don’t use your email address.', 'klarna-payments-for-woocommerce' ),
'default' => '',
'desc_tip' => false,
'custom_attributes' => array(
'autocomplete' => 'off',
),
);
}

Expand All @@ -188,11 +191,14 @@ private static function kp_form_production_username() {
*/
private static function kp_form_production_password() {
return array(
'title' => __( 'Production Klarna API password', 'klarna-payments-for-woocommerce' ),
'type' => 'text',
'description' => __( 'Use the API password you downloaded in the Klarna Merchant Portal. Don’t use your email address.', 'klarna-payments-for-woocommerce' ),
'default' => '',
'desc_tip' => false,
'title' => __( 'Production Klarna API password', 'klarna-payments-for-woocommerce' ),
'type' => 'password',
'description' => __( 'Use the API password you downloaded in the Klarna Merchant Portal. Don’t use your email address.', 'klarna-payments-for-woocommerce' ),
'default' => '',
'desc_tip' => false,
'custom_attributes' => array(
'autocomplete' => 'off',
),
);
}

Expand All @@ -203,11 +209,14 @@ private static function kp_form_production_password() {
*/
private static function kp_form_test_username() {
return array(
'title' => __( 'Test Klarna API username', 'klarna-payments-for-woocommerce' ),
'type' => 'text',
'description' => __( 'Use the API username you downloaded in the Klarna Merchant Portal. Don’t use your email address.', 'klarna-payments-for-woocommerce' ),
'default' => '',
'desc_tip' => false,
'title' => __( 'Test Klarna API username', 'klarna-payments-for-woocommerce' ),
'type' => 'text',
'description' => __( 'Use the API username you downloaded in the Klarna Merchant Portal. Don’t use your email address.', 'klarna-payments-for-woocommerce' ),
'default' => '',
'desc_tip' => false,
'custom_attributes' => array(
'autocomplete' => 'off',
),
);
}

Expand All @@ -218,11 +227,14 @@ private static function kp_form_test_username() {
*/
private static function kp_form_test_password() {
return array(
'title' => __( 'Test Klarna API password', 'klarna-payments-for-woocommerce' ),
'type' => 'text',
'description' => __( 'Use the API password you downloaded in the Klarna Merchant Portal. Don’t use your email address.', 'klarna-payments-for-woocommerce' ),
'default' => '',
'desc_tip' => false,
'title' => __( 'Test Klarna API password', 'klarna-payments-for-woocommerce' ),
'type' => 'password',
'description' => __( 'Use the API password you downloaded in the Klarna Merchant Portal. Don’t use your email address.', 'klarna-payments-for-woocommerce' ),
'default' => '',
'desc_tip' => false,
'custom_attributes' => array(
'autocomplete' => 'off',
),
);
}

Expand Down