Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save travislima/c2ed2bafcddb71f1e680ae609b64b989 to your computer and use it in GitHub Desktop.

Select an option

Save travislima/c2ed2bafcddb71f1e680ae609b64b989 to your computer and use it in GitHub Desktop.
PMPRO change default country
<?php
/**
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
* Change the default Country for Paid Memberships Pro - https://www.paidmembershipspro.com
* Find Country Codes here - https://github.com/strangerstudios/paid-memberships-pro/blob/dev/includes/countries.php
*/
function filter_pmpro_default_country( $default_country ) {
// Set country code to "GB" for United Kingdom.
$default_country = "GB";
return $default_country;
}
add_filter( 'pmpro_default_country', 'filter_pmpro_default_country' );
@laurenhagan0306

Copy link
Copy Markdown

This recipe is included in the blog post on "Change the default country of your Membership website." at Paid Memberships Pro here: https://www.paidmembershipspro.com/change-the-default-country-of-your-membership-website/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment