fbpx

PMPro – Set Expiration Date .4.3

Updated: March 27, 2020

The Most Complete Membership Solution for Your WordPress Site. Unlimited levels, recurring payments, registration & profile fields, protected member content, robust member management and more.

This code gist has been built into a full fledged plugin that is available now on GitHub. Using this plugin as is will add an additional field to the edit level and edit discount code pages allowing you to set a specific expiration date. So instead of “expire in 30 days” you can set the level to “expire on 2015-01-01”.

The symbols Y and Y2 can be swapped in to represent the current year and next year respectively. So to expire on January 1st next year, use: Y2-01-01

The symbols M and M2 can be swapped in to represent the current month and next month respectively. So to expire on the 1st of the next month, use: Y-M2-01

Viewing this code on GitHub may also give you insight into writing custom rules for expiration dates.

PMPro – Set Expiration Date
WordPress.com

Category:

Version: .4.3

License: GPL

Updated: March 27, 2020

Changelog:

* BUG FIX: Added back the code to make sure dates like 2019-02-31 are converted to 2019-02-28

5/5 - (1 vote)
JoinBooksCub.com

You might like these

Stop! Are you Blogging?

Today's Special Offer!