I'm afraid B2BKing doesn't have any feature for country restrictions. We will look at adding a dynamic rule for that in future updates, thanks for the feedback.
You could try to look for a country restriction plugin that can restrict by user role. I looked around a bit but I can't seem to find any though.
If there is none, you would probably need to get this done through a custom code snippet. In that sense, I can share some code, but please keep in mind we cannot do custom work directly as part of support. You can use the below code to differentiate between B2B and B2C users.
$user_id = get_current_user_id();
$is_b2b = get_user_meta($user_id,'b2bking_b2buser', true);
if ($is_b2b === 'yes'){
// allow X countries
} else {
// disallow X countries
}
I'll try to do it with shipping options. I will create a shipping option only for this country. And then in your plugin i'll assing this shipping option to B2B only. I hope it will work this way.
However, it would be very interesting to include this option on your plugin, because it is very common for a distributor to want exclusivity in their country. Hope you can include that on next update ;)
Hi
I can't find how configure the plugin to let the B2B customers, of a specific country, buy products, but not to B2C customers from that country.
If i disable the country from woocommerce settings (Sell to all countries, except for…), then the B2B customer can not buy either.
For example, I want to sell to United Kingdom only to B2B customers, not to B2C ones.
Can you help me to configure that?
Thanks
Hi Marc,
I'm afraid B2BKing doesn't have any feature for country restrictions. We will look at adding a dynamic rule for that in future updates, thanks for the feedback.
You could try to look for a country restriction plugin that can restrict by user role. I looked around a bit but I can't seem to find any though.
If there is none, you would probably need to get this done through a custom code snippet. In that sense, I can share some code, but please keep in mind we cannot do custom work directly as part of support. You can use the below code to differentiate between B2B and B2C users.
Kind regards,
Stefan
OK thanks for quick response.
I'll try to do it with shipping options. I will create a shipping option only for this country. And then in your plugin i'll assing this shipping option to B2B only. I hope it will work this way.
However, it would be very interesting to include this option on your plugin, because it is very common for a distributor to want exclusivity in their country. Hope you can include that on next update ;)
Thanks
We will look at adding that, thank you.
And yes, I think that will work with the shipping options. Good idea!