Membership expiry and automatic emails not ocurring

We have a free Membership set-up ("Subscription - Trial") with the following settings:

Access Structure: Finite access / Grant access for 14 days
After this membership ends Change to: Trial Expired

After the membership expires, users are not successfully moved to the "Trial Expired" membership. Indeed, their membership of "Subscription - Trial" remains active. Additionally they do not receive the automated emails for memberships which are ending soon/ended.

This issue is urgent as it affects a large pool of users. Any assistance greatly appreciated.

We have granted support access.

  • Kasia Swiderska

    Hello Dave,

    I can confirm that this is not working on your site only manual checking the expiration changes status of the subscription, but didn't change it yo next subscription.
    I couldn't replicate this issue on my testing site, so can you enable debug mode in your WordPress and then run the cron in Membership Settings (please, see the screen)? To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

    define('WP_DEBUG', true);

    In order to enable the error logging to a file on the server you need to add yet one more similar line:

    define( 'WP_DEBUG_LOG', true );

    In this case the errors will be saved to a debug.log log file inside the /wp-content/directory.

    Depending on whether you want your errors to be only logged or also displayed on the screen you should also have this line there, immediately after the line mentioned above:

    define( 'WP_DEBUG_DISPLAY', false );

    The wp-config.php is located in your WordPress root directory. It’s the same file where the database configuration settings are. You will have to access it by FTP or SFTP in order to edit it.

    Kind regards,
    Kasia

  • Dave

    Are you saying that after the Subscription - Trial ends members still have that membership and are not reverted to Trial Expired?

    Yes. Looking at their membership status the expiry date is correct (in the past) but their status isn't updated.

    Did you assign Trial Expired after the users registered for Subscription - Trial or it has been like this from the start?

    This was set as "After this membership ends Change to: Trial Expired" right from the start when the membership was created.

    Do your other email notifications work?

    Only the ones on membership sign-up etc, no scheduled ones such as expiry, pre-expiry, post-expiry etc. The sign-up emails are fine.

    I couldn't replicate this issue on my testing site, so can you enable debug mode in your WordPress and then run the cron in Membership Settings (please, see the screen)? To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

    We've done this now. Do you need a copy of the log?

  • Predrag Dubajic

    Hi @Dave,

    I tried searching for similar issues as yours but couldn't find any specific solution for this.
    I had another look at your site and notice that you have close to 50 plugins active, including another membership plugin, minimizers, caching plugin, optimizer and so on...

    Could you try running a basic troubleshooting by disabling your plugins, starting with ones mentioned above, and see if the M2 is working properly after that?

    Best regards,
    Predrag

  • Dave

    Hi,

    The site is well-established and will need debugging as-is - we can't disable plugins etc thereby reducing the functionality of a busy live site. We'll perform tests on a dev copy of the site but this will take time.

    As far as we can tell from the debug logs that Kasia was suggesting we create, wp-cron.php is hitting the max execution time for PHP and never finishing, even when the M2 cron job is the only one due for immediate execution. Is there a way of seeing/debugging what is happening during the M2 cron to establish where it is stalling (or why it's taking so long) and resolve this?

    Thanks.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.