diff --git a/assets/js/frontend/tokenization-form.js b/assets/js/frontend/tokenization-form.js index 6fbd4d82f23..d06439118df 100644 --- a/assets/js/frontend/tokenization-form.js +++ b/assets/js/frontend/tokenization-form.js @@ -37,6 +37,13 @@ // Trigger change event $( ':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() {