• Resolved Silvia

    (@sipivi)


    Hi Marco!

    Thanks for your plugin! I’ve installed it on my website but I have a problem.

    In spite of I haven′t includes Madeira and Azores as a city on “Send” tab (WOOCOMMERCE – shipping areas) these areas appear on the dropdown list.

    How can I delete Azores and Madeira from the dropdown list on cart page?

    Hope you understand me! Thank you!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @sipivi,

    The “states” (in this case “distritos”) dropdown list will always include all the states/provinces/districts for a given country, no matter the shipping zones you’ve created. They’re not correlated.

    What will happen is that a message will appear to the customer saying there are no shipping methods for that area.

    If you really want to remove them you can do it by PHP code via WooCommerce hooks, but that’s something we cannot help in the scope of the support of a free plugin.

    Thread Starter Silvia

    (@sipivi)

    Thanks Marco very much!!

    What I′ve done to hide Ceuta and Melilla in Spain is:

    add_filter('woocommerce_states', 'eliminar_provincias');
    
    function eliminar_provincias( $provincias ) {
    
    unset($provincias['ES']['CE']);
    
    unset($provincias['ES']['ML']);
    
    return $provincias;
    
    }

    I think, it will be similar. The fact is that I can′t find the Maderia and Azores code. I’ll be very grateful If you tell me the code.

    Thanks in advance

    PT -> AC
    and
    PT -> MD

    You can put it inside the same function, after the second unset.

    Thread Starter Silvia

    (@sipivi)

    It works! Thank you very much!

    I’m going to write a review!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide Azores and Madeira from the dropdown list’ is closed to new replies.