Skip to content

Commit

Permalink
Fix api_subject option being set even when reroute_requests unchecked
Browse files Browse the repository at this point in the history
  • Loading branch information
dechov committed Dec 22, 2017
1 parent 2f1c00b commit a871835
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions assets/css/wc-setup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1036,10 +1036,10 @@ p.jetpack-terms {
}
}

.wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_api_subject {
.wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_email {
margin-top: 0.75em;

label.stripe_email, label.ppec_paypal_api_subject {
label.stripe_email, label.ppec_paypal_email {
position: absolute;
margin: -1px;
padding: 0;
Expand Down
4 changes: 2 additions & 2 deletions assets/js/admin/wc-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ jQuery( function( $ ) {
.find( 'input.payment-email-input' )
.prop( 'required', true );
$( this ).closest( '.wc-wizard-service-settings' )
.find( '.wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_api_subject' )
.find( '.wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_email' )
.show();
} else {
$( this ).closest( '.wc-wizard-service-settings' )
.find( 'input.payment-email-input' )
.prop( 'required', false );
$( this ).closest( '.wc-wizard-service-settings' )
.find( '.wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_api_subject' )
.find( '.wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_email' )
.hide();
}
} ).find( 'input#stripe_create_account, input#ppec_paypal_reroute_requests' ).change();
Expand Down
2 changes: 1 addition & 1 deletion includes/admin/class-wc-admin-setup-wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ protected function get_wizard_available_in_cart_payment_gateways() {
'placeholder' => '',
'required' => false,
),
'api_subject' => array(
'email' => array(
'label' => __( 'Direct payments to email address:', 'woocommerce' ),
'type' => 'email',
'value' => $user_email,
Expand Down

0 comments on commit a871835

Please sign in to comment.