Created
December 2, 2017 21:38
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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