MemberPress: Display Current User’s Memberships Renewal Dates
This code snippet adds the new [mp_membership_renewal_date] shortcode.
Adding this shortcode anywhere on the website displays a list of active MemberPress memberships and their renewal dates for the current (logged-in) user.
To update the error message displayed when a logged-out user tries to access this data, adjust the "You need to be logged in to view this information" error text on this line:
return 'You need to be logged in to view this information.';
To update the error message displayed when the logged-in user has no active memberships, adjust the "No active memberships found" error text on this line:
Comments