The Billing Phone number captured at membership checkout attempts to format the saved value according to the North American Numbering Plan (NANP). This article demonstrates how to use the pmpro_format_phone filter to change the phone number format for your membership site.
Banner for Advanced Code Recipe Tutorial for Paid Memberships Pro

About the Code Recipe

In a recent support ticket, one of our premium members asked for a solution on how to format the phone number of their membership site. Specifically, they wanted to change the phone number from (123) 456-7890 to 1234567890. So in other words, remove the default North American Numbering Plan(NANP) formatting entirely.

Being a very ‘developer-friendly’ plugin, Paid Memberships Pro has a myriad of Hooks (Actions & Filters) that can be used to craft a membership site to suit most site administrator needs. To learn more about WordPress Hooks please see this entry in the WP Plugin Developer Handbook.


The Code Recipe


Note: Customize this code recipe to suit formatting needs. For help with this reach out to our Support Engineers on our Member Support Area.

Adding the recipe to your website

Copy and paste this code recipe into a helper PMPro Customizations plugin.

Free Course: Membership Site Development—The Basics

Develop a deeper understanding of membership site development in this beginner-level course. Learn how to make your site work better, save yourself time and money, and improve your site's performance.

Featured Image for Membership Site Development Course: The Basics
Was this article helpful?
YesNo