Created
September 9, 2016 17:41
-
-
Save eighty20results/c6f5466d7d246c6ce9cd3537666baf0d to your computer and use it in GitHub Desktop.
Configure International addresses & set a non-US default country
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
<?php | |
/* | |
Plugin Name: PMPro: Set Default Country for Billing Page | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Configure International addresses & set a non-US default country | |
Version: 1.0 | |
Requires: 4.0 | |
Author: Thomas Sjolshagen @ Paid Memberships Pro <[email protected]> | |
Author URI: http://www.eighty20results.com/thomas-sjolshagen/ | |
License: GPL2 | |
License URI: https://www.gnu.org/licenses/gpl-2.0.html | |
*/ | |
function e20r_set_default_country( $country ) { | |
// TODO: Replace with 2 letter country code of choice | |
return 'NZ'; | |
} | |
add_filter('pmpro_default_country', 'e20r_set_default_country'); | |
add_filter('pmpro_international_addresses', '__return_true' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment