2

In Woocommerce, I am trying to hide the checkout postcode field if a specific state field is selected.

I am following this code: Show or hide checkout postcode field based on chosen city in WooCommerce

This code is written by Sir @LoicTheAztec and I have change these values

jQuery(function($){
            var bc   = '#billing_city_field input',
                sc   = '#shipping_city_field input',

To

jQuery(function($){
            var bc   = '#billing_state_field input',
                sc   = '#shipping_state_field input',

But it's not working.

I want when the state is Newyork then postcode(with required field) display and for all other states it will hide.

Need help. Regards.

Hannah James
  • 540
  • 3
  • 14

0 Answers0