MemberPress: Disable Address Fields for a Specific Membership
Note: This code will not work if ReadyLaunch™ is enabled on the registration page.
The code will set the address fields as not required on the registration page of a specific membership and hide them.
The code needs to be adjusted by changing the dummy membership ID of 12 and 564 within the code with the ID of the user's membership(s). The code needs to be adjusted by changing the membership IDs on the following line:
if( is_single( array( 12, 564 ) ) ) {
In addition, the code can also be modified to exclude specific fields, leaving them visible and/or required. For example, to exclude the Country field from being hidden, the following code needs to be modified:
Comments