Banner for Advanced Code Recipe Tutorial for Paid Memberships Pro

Here is a bit of code you can use to have all of your customers memberships expire on the same day. For example, you may want your memberships to roll over on January 1 no matter when someone signs up.

Create a normal level that expires after “1 Year”. Then copy this code into your active theme’s functions.php or into a custom pmpro-customization.php plugin. Edit line 13 to set the expiration dates for your levels. Elements in the array should use the format “level_id” => “YYYY-MM-DD”.

This content requires a premium membership plan.