Remove required when changing to optional

This commit is contained in:
Mike Jolley 2019-03-06 15:18:27 +00:00
parent 9b6ded2cef
commit 023217c03d
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ jQuery( function( $ ) {
}
} else {
field.find( 'label .required' ).remove();
field.removeClass( 'validate-required' );
field.removeClass( 'validate-required woocommerce-invalid woocommerce-invalid-required-field' );
if ( field.find( 'label .optional' ).length === 0 ) {
field.find( 'label' ).append( '&nbsp;<span class="optional">(' + wc_address_i18n_params.i18n_optional_text + ')</span>' );