Hi @smams,
The code you mentioned does not work with the User Registration country field because the default User Registration and WooCommerce country field hooks use different filters. However, you can use the following code snippet to add Kosovo to the country list.
add_filter( 'user_registration_countries_list', 'add_kosovo_country' );
function add_kosovo_country( $countries ) {
$countries['XK'] = 'Kosovo'; // XK is the ISO code for Kosovo
return $countries;
}
If you are unsure where to add this custom code snippet, please follow this guide: https://docs.wpuserregistration.com/docs/how-to-add-the-custom-code-snippet-on-your-site/
Best Regards!
Hi @smams,
Since we haven’t heard back from you, we’ll go ahead and mark this topic as resolved. We assume the issue has been addressed. If you still need help, feel free to reopen the topic at any time.
Thank you!
Thread Starter
smams
(@smams)
Hi @shresthauzwal,
Thank you for your reply. I’ve tried adding the code snippet however, it only added the new country to the “Extra fields” country dropdown and not the WooCommerce Billing/ Shipping address dropdowns.
Hi @smams,
We have provided a solution for the User Registration & Membership country field. If you are referring to WooCommerce integration fields, then it is a premium feature; this forum is not the appropriate place to discuss it, as it is intended only for users of the free plugin.
We kindly recommend reaching out to our support team through your customer dashboard. Please use this link to submit a support ticket.
We are marking this topic as resolved because, as mentioned earlier, this forum does not cover premium product support. Posting premium feature questions here may create confusion for other users.
Best regards,