Home / Archive / MemberPress: Remove all but one country from the drop-down
Duplicate Snippet

Embed Snippet on Your Site

MemberPress: Remove all but one country from the drop-down

Removes all the countries for the drop-down list on the account and registration pages and leaves only the one specified.

Code Preview
php
<?php
function mepr_remove_countries( $countries, $prioritize_my_country ) {
  return array ( 'DE' => _x( 'Germany', 'ui', 'memberpress' ) );
}
add_filter( 'mepr_countries', 'mepr_remove_countries', 10, 2 );

Comments

Add a Comment