Forked from andrewlimaza/pmpro-change-default-country.php
Last active
April 8, 2021 18:36
-
-
Save travislima/c2ed2bafcddb71f1e680ae609b64b989 to your computer and use it in GitHub Desktop.
PMPRO change 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 | |
| /** | |
| * 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' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/