In order to automatically switch members over to a free membership when their account expires/cancels, you would use the push notification system to call a custom script which would update the member's account to be active on a free membership. MemberMouse utilizes WordPress' built-in cron function to check two times a day for any accounts that should be expired. WordPress' cron is triggered by traffic coming to the site so if you have minimal traffic coming to the site, the period of time in between when it's executed may be less frequent then two times per day. Any activity on the site will trigger the cron to run, so if you have minimal traffic and notice it hasn't run, simply visit any page on your site to initiate it.

Here is a sample script that you can use as a starting point: 


This script will change the members membership level to the one indicated in the script and set their status to Active. In order for the script to work you need to provide your API information and the appropriate membership level ID. Additional instructions can be found in the comments in the script. 

NOTE: This script is intended for people with development experience. The MemberMouse Customer Success Team cannot provide any support in relation to the interpretation or use of this script. 

After you modified the script as needed, you would then upload it to your server.

Next, you would create a push notification that's triggered on the Membership Status Changed event. If you want it to occur when the membership Expires, then you would choose 'Expired' in the When membership status is... dropdown menu. 

The setup would look something like this:


NOTE: If you want this to occur when the membership is Canceled, then choose 'Canceled' in the When membership status is... dropdown menu.

You should run some tests to ensure that everything is working correctly. In order to do this you'll need to use a test member account to recreate the scenario where their account becomes expired or canceled. If everything is setup correctly, this should result in the test account remaining active on a free membership level.