Update tokenization-form.js
When the checkout form is loaded for guests the save card option is shown, this fix hides it until the Create Account checkbox is checked.
This commit is contained in:
parent
1ea3ffb5a8
commit
2cdb4361e4
|
@ -37,6 +37,13 @@
|
||||||
|
|
||||||
// Trigger change event
|
// Trigger change event
|
||||||
$( ':input.woocommerce-SavedPaymentMethods-tokenInput:checked', $target ).trigger( 'change' );
|
$( ':input.woocommerce-SavedPaymentMethods-tokenInput:checked', $target ).trigger( 'change' );
|
||||||
|
|
||||||
|
// Hide "save card" if "Create Account" is not checked.
|
||||||
|
// Check that the field is shown in the form - some plugins and force create account hide it
|
||||||
|
if( !$('input#createaccount').is(':checked') && $( 'input#createaccount' ).length > 0) {
|
||||||
|
$( '.woocommerce-SavedPaymentMethods-saveNew', $formWrap ).hide();
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.hideForm = function() {
|
this.hideForm = function() {
|
||||||
|
|
Loading…
Reference in New Issue