How to Remove Other Countries on the Registration Form

By default, we don’t have a feature to remove other countries on the country dropdown of the Wholesale Registration Page.

Fortunately, there is an easy workaround by using the custom snippet below and adding it to your theme/child theme’s functions.php

// Change the country list of the registration form
add_filter( 'woocommerce_form_field_args', 'my_wwlc_set_country');
function my_wwlc_set_country($args){
   
    // Set the country list
    if($args['id'] == 'wwlc_country'){
        $args['options'] = array(
            'AU' => 'Australia',
            'US' => 'United States'
        );
    }
   
    // Return the modified list
    return $args;
}

Please note that the code above needs to use the correct 2 digit country code. For example, ‘AU’ for Australia, and ‘US’ for United States. You can replace or add more countries by following that format. Kindly visit this link to get the list of 2-digit country codes.

in WooCommerce Wholesale Lead Capture

Solve The Big Three Problems With Wholesaling In WooCommerce

Add wholesale pricing to products   Streamline your ordering   Register & manage wholesale customer

Explore The Plugin Suite  

[data-image-id='gourmet_bg']
[data-image-id='gourmet_bg']
[data-image-id='gourmet_bg']
[data-image-id='gourmet_bg']
[data-image-id='gourmet_bg']
[data-image-id='gourmet_bg']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']