Paid Memberships Pro (PMPro) coding notes

< All Topics

Paid Memberships Pro (PMPro)
• Added many plugins direct from GitHub. These will need to be manually checked for updates.
o PMPro Approvals Add On
o PMPro Email Templates Add On
o PMPro Extra Expiration Warning Emails Add On
o PMPro Membership Manager Role Add On

•  Many snippets have been created to modify PMPro behavior.

•  To adjust the membership warning on frontend user dashboard code is here:

change line 52 to put number of days before expiration to warn them
if( strtotime($hold_calc_enddate) < strtotime(‘+30 days’) ) {
$expiring_soon = true;

•  To turn off/on emails for PMPro approvals (like for testing), go to PMPro/Memberships, Email Templates, select the template you want, and click checkbox to turn off/on the emails

** NOTE ADDED 7/31/2023 – Updated pmpro approvals plugin to 1.5, fixes the spinning problem outlined below.

** NOTE ADDED 7/19/2023 – If  pmpro email templates (found in Settings/Email Templates of pmpro admin screens spins and doesn’t let you see the approval templates, it’s because they don’t have any help_text and wp-debug is blowing up.  Turn off debug to get through it, or edit  plugin directly paid-memberships-pro/includes/email.php  at line 200 about to put in dummy text like below:

// Get template help text from defaults.
if (isset($pmpro_email_templates_defaults[$template][‘help_text’])) {
$holdit = $pmpro_email_templates_defaults[$template][‘help_text’];
} else {
$holdit = ‘No Help Text Found’;
$template_data[‘help_text’] = $holdit;


Table of Contents