Ensure that the placeholder changes even after clearing all Attribute values

This commit is contained in:
Jason Kytros 2023-09-01 14:13:38 +03:00
parent 80e998481f
commit 81a70a9b92
1 changed files with 4 additions and 0 deletions

View File

@ -466,6 +466,10 @@ jQuery( function ( $ ) {
if ( 'undefined' === $(el).attr( 'data-taxonomy' ) || false === $(el).attr( 'data-taxonomy' ) || '' === $(el).attr( 'data-taxonomy' ) ) {
add_placeholder_to_attribute_values_field( $(el) );
$( '.woocommerce_attribute input.woocommerce_attribute_used_for_variations' ).on( 'change', function() {
add_placeholder_to_attribute_values_field( $(el) );
} );
}
} );
$( 'select.wc-attribute-search' ).data(