Based on "Custom Redirection based on Geolocation for specific products in WooCommerce" answer to my previous question, I should need the country condition to be an array of values instead.
Any help is appreciated.
Based on "Custom Redirection based on Geolocation for specific products in WooCommerce" answer to my previous question, I should need the country condition to be an array of values instead.
Any help is appreciated.
To handle multiple countries you must replace in the condition:
WC_Geolocation::geolocate_ip()['country'] === 'GE'
by:
in_array( WC_Geolocation::geolocate_ip()['country'], array( 'GE', 'UK', 'FR' ) )
where array( 'GE', 'UK', 'FR' )
is the array of country codes.