This code will add an “Exclude my profile from the member directory” field at membership checkout when using the Member Directory and Profile Pages Add On for Paid Memberships Pro.
About the Recipe
The Member Directory and Profile Page Add On includes functionality to allow members to remove their profile from display. This field is added by default as a field on the user’s WordPress Profile. The recipe below adds that field at membership checkout (note that this recipe requires the Register Helper Add On).