Skip to content

Instantly share code, notes, and snippets.

@pbrocks
Created December 2, 2017 21:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save pbrocks/81e68aa063943cf0cdfe9d403d2fb695 to your computer and use it in GitHub Desktop.
Save pbrocks/81e68aa063943cf0cdfe9d403d2fb695 to your computer and use it in GitHub Desktop.
Code to add to pmpro-customizations.php to adjust default country for PMPro VAT
/**
* Default to country code for Spain if none is set.
* Add to PMPro Customizations plugin.
*/
function init_set_default_vat_country_code() {
//default to Spain
if(!isset($_SESSION['eucountry'])) {
$eucountry = 'ES';
}
}
add_action('init', 'init_set_default_vat_country_code', 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment