Skip to content

Magento 2 Country Restriction on checkout page shipping address

I am working in Magento-2, In my requirement, I want to show particular country on checkout page shipping address country drop-down, this only applicable for the shipping address form section, in billing address it has to show all the country.

We have option in backend (Go to -> Store -> Configuration -> General -> Allow countries -> Select “United States”), if i select this, it’s applicable for shipping & billing address area.

I’ve also tried with layoutprocessing after plugin, but there is no luck, do you have any other way to achieve the requirment.

Also, I’ve added the custom Jquery script on onepage.html, but this is al

require(['jquery'], function($) {       
        $('select[name=country_id]')
            .find('option')
            .remove()
            .end()
            .append('<option value="whatever">text</option>')
    });

If you know any other good way please suggest, thanks in advance for your support.