Our Capture Name and Address Add On allows you to collect billing fields for a free level or for paid levels when using with an offsite payment gateway like PayPal Express.
This code recipe demonstrates how hide those additional billing fields for a specific Membership Level ID.
About the Code Recipe
By default, the Capture Name and Address for Free Levels or for Offsite Gateway Add On adds billing fields for all Membership Level checkouts. In a recent support topic, we had a member who wanted to use this Add On to collect the billing address information for the site’s paid membership levels only, not the free level.
This code recipe will allow you to exclude billing details from certain membership levels. You will need to adjust the code recipe to use the specific Level ID that you want to exclude billing fields for at checkout.
The Code Recipe
Adding the Recipe to Your Website
You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. Read this companion article for step-by-step directions on either method.
Update line 10 to the specific array of level IDs you want to hide billing fields for.
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.