diff --git a/modules/ppcp-onboarding/assets/css/onboarding.css b/modules/ppcp-onboarding/assets/css/onboarding.css index b2d06a26b..afd9c0c14 100644 --- a/modules/ppcp-onboarding/assets/css/onboarding.css +++ b/modules/ppcp-onboarding/assets/css/onboarding.css @@ -8,6 +8,20 @@ #field-merchant_email{ display: none; } +#field-client_secret.show, +#field-client_id.show, +#field-merchant_id.show, +#field-merchant_email.show { + display: table-row; +} + +#field-toggle_manual_input span.hide, +#field-toggle_manual_input.show span.show{ + display: none; +} +#field-toggle_manual_input.show span.hide { + display: unset; +} #field-toggle_manual_input button { color: #0073aa; diff --git a/modules/ppcp-onboarding/assets/js/settings.js b/modules/ppcp-onboarding/assets/js/settings.js index 3bd7bd494..ad403baae 100644 --- a/modules/ppcp-onboarding/assets/js/settings.js +++ b/modules/ppcp-onboarding/assets/js/settings.js @@ -64,11 +64,11 @@ const groupToggleSelect = (selector, group) => { 'click', (event) => { event.preventDefault(); - document.querySelector('#field-toggle_manual_input').style.display = 'none'; - document.querySelector('#field-merchant_email').style.display = 'table-row'; - document.querySelector('#field-merchant_id').style.display = 'table-row'; - document.querySelector('#field-client_id').style.display = 'table-row'; - document.querySelector('#field-client_secret').style.display = 'table-row'; + document.querySelector('#field-toggle_manual_input').classList.toggle('show'); + document.querySelector('#field-merchant_id').classList.toggle('show'); + document.querySelector('#field-merchant_email').classList.toggle('show'); + document.querySelector('#field-client_id').classList.toggle('show'); + document.querySelector('#field-client_secret').classList.toggle('show'); } ) diff --git a/modules/ppcp-wc-gateway/services.php b/modules/ppcp-wc-gateway/services.php index c81267ca9..5c5b79b87 100644 --- a/modules/ppcp-wc-gateway/services.php +++ b/modules/ppcp-wc-gateway/services.php @@ -266,6 +266,17 @@ return array( 'requirements' => array(), 'gateway' => 'paypal', ), + + 'checkout_settings_heading' => array( + 'heading' => __( 'PayPal Checkout Plugin Settings', 'paypal-payments-for-woocommerce' ), + 'type' => 'ppcp-heading', + 'screens' => array( + State::STATE_PROGRESSIVE, + State::STATE_ONBOARDED, + ), + 'requirements' => array(), + 'gateway' => 'paypal', + ), 'title' => array( 'title' => __( 'Title', 'paypal-payments-for-woocommerce' ), 'type' => 'text', @@ -481,7 +492,7 @@ return array( 'gateway' => 'paypal', ), 'prefix' => array( - 'title' => __( 'Installation prefix', 'paypal-payments-for-woocommerce' ), + 'title' => __( 'Invoice prefix', 'paypal-payments-for-woocommerce' ), 'type' => 'text', 'desc_tip' => true, 'description' => __( 'If you use your PayPal account with more than one installation, please use a distinct prefix to seperate those installations. Please do not use numbers in your prefix.', 'paypal-payments-for-woocommerce' ),