Skip to content

Instantly share code, notes, and snippets.

@eighty20results
Created September 9, 2016 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eighty20results/c6f5466d7d246c6ce9cd3537666baf0d to your computer and use it in GitHub Desktop.
Save eighty20results/c6f5466d7d246c6ce9cd3537666baf0d to your computer and use it in GitHub Desktop.
Configure International addresses & set a non-US default country
<?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 <thomas@eighty20results.com>
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