Version 1.8.7.2 of Paid Memberships Pro is out with a couple of bug fixes. Primarily, some debug code has been removed which was causing pmpro_activate() to run on every page load, which could slow your side down. This bug has been back ported into v1.8.7 and v1.8.7.1, but you will have to update to get the fix on your site.


Please update the Paid Memberships Pro from the plugins page of your WordPress dashboard. You can also get the latest version of PMPro here or version 1.8.7.2 specifically here.


The full list of updates is below.

  • BUG: Fixed bug where pmpro_activation() was firing on every page load. (Thanks, Tigertech and MegaZ on WordPress.org)
  • BUG: Fixed bugs with internationalized date formats in a few places.
See this post on deleting redundant cron jobs if you ran PMPro v1.8.7 or v1.8.7.1 for any length of time and follow the instructions to clean your cron jobs up.

Comments (6)

Author’s gravatar

Hi,

I have updated to Version 1.8.7.2 but I think this issue has brought my site down (I guess due to volume / backlog or cron jobs?).

Can you please explain how I can rectify this (without losing PMPro settings / data)?

Many thanks.

Reply
Author’s gravatar

I’m working on a more in depth article, but in the meantime you can use one of these methods to clean up the cron jobs.

0. Back up databases and files first.

1. If you can access the WP dashboard, you can try deactivating PMPro and then reactivating it. (Don’t “DELETE” it though.) If you can’t access the dashboard, you can FTP to change the /plugins/paid-memberships-pro/ folder name to something else which will trigger WP to deactivate it.

2. Use a SQL query to clear out all crons. (http://wordpress.stackexchange.com/questions/175878/delete-thousands-of-cron-jobs) If you do this, you should probably deactivate and reactivate all plugins to give them a chance to set their crons back up.

3. Use the WP Crontrol plugin (https://wordpress.org/plugins/wp-crontrol/screenshots/) to check in a see what cron events are remaining.

Reply
Author’s gravatar

Having just done this on our site here. #2 is the way to go. When I tried #1, it locked the site up and didn’t remove the crons. (Too many for WP/PHP to remove that way.)

Author’s gravatar

$cron = get_option(‘cron’);
foreach($cron as $ts => $jobs)
{
foreach($jobs as $name => $data)
{
if ($name == “pmpro_cron_expiration_warnings” || $name == “pmpro_cron_expire_memberships”)
{
unset($cron[$ts][$name]);
}
}

if (count($cron[$ts]) == 0)
{
unset($cron[$ts]);
}
}
update_option(‘cron’, $cron);

I ran the following with wp-cli eval-file to remove just the bad pmpro items.

Reply
Author’s gravatar

Or you can use the PMPro Fix Cron plugin I just linked to in a comment to the “Important: How to Delete Redundant Cron Jobs” post.

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *