Skip to content

Instantly share code, notes, and snippets.

@AertHulsebos
Created May 27, 2021 08:51
Show Gist options
  • Select an option

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

Select an option

Save AertHulsebos/f6a823e65409b9c5117b513eb1291d80 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 not supported, return us as region, so banner will behave as for US
if (!$region) {
$region = 'us';
}
return $region;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment