-
-
Save davidmutero/d2f8b40cb2c6c314708e372d9e9104ac to your computer and use it in GitHub Desktop.
Disable any automatic phone number formatting in Paid Memberships Pro
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 | |
/** | |
* Disable any automatic phone number formatting in Paid Memberships Pro. | |
* | |
* This ensures phone numbers are displayed exactly as entered by the member. | |
* | |
* Add this code to your PMPro Customizations Plugin | |
* - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function pmpro_disable_phone_formatting( $phone ) { | |
// Return the phone number as entered without formatting. | |
return $phone; | |
} | |
add_filter( 'pmpro_format_phone', 'pmpro_disable_phone_formatting' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment