Skip to content

Instantly share code, notes, and snippets.

@AertHulsebos
Last active May 27, 2021 20:27
Show Gist options
  • Select an option

  • Save AertHulsebos/ac4a3cd321d0e9ff7de0b5e49546501d to your computer and use it in GitHub Desktop.

Select an option

Save AertHulsebos/ac4a3cd321d0e9ff7de0b5e49546501d to your computer and use it in GitHub Desktop.
<?php
add_filter("cmplz_region_for_country", "my_cmplz_override_region", 10, 2);
function my_cmplz_override_region($region, $country_code){
//if country code is 'CH'(Switzerland) , return us as region, so banner will behave as for EU
if ($country_code === 'CH'){
$region = 'eu';
}
return $region;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment