Remove required when changing to optional
This commit is contained in:
parent
9b6ded2cef
commit
023217c03d
|
@ -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( ' <span class="optional">(' + wc_address_i18n_params.i18n_optional_text + ')</span>' );
|
||||
|
|
Loading…
Reference in New Issue