Creating custom cancel and expire flows - YourMembers/yourmembers GitHub Wiki

On Your Members when a user cancels or payment is declined by default this makes the user inactive. When the user next attempts to login the user is prompted to complete the payment for the package they were on. This might not always be the best solution; quite often you may wish them to select a different package, or have some limited access to your site. You can achieve this via a custom-written cancel flow.

Your Members also has a feature that allows an expiring user to be dropped on to a different package. This feature can be used to allow expiring users to drop down to a special package which only has access to their profile and to your upgrade flows, in effect allowing you to have a much greater control over how they regain access to your site.

Set up the expired package

Within WordPress admin go to Your Members -> Membership packages and add a new package. Give the package a name, ("expired" is a good choice) and assign it a duration. This can be any period you like but 3 or 6 months is common. Next select a new package account type (again "expired" is a good choice).

Set the price to free and hide the package by clicking "hide from standard subscription" option. Then save the package.

Mail Manager and Segments

It's important to remember that if you use this method, the user will still be "active" on your system. As such, when sending to segments if you do not wish to email expired users, remove the segment corresponding to your expired package type from your mailing list.

One useful option in packages is the ability to direct a user to a specific page on first login (YM12) or each login. This can be useful to direct the expired user to a please upgrade page.

Drop Down other packages

For each package you wish to drop down to expiry, click edit, select advanced if it's not already open and then select your new package from "On expire drop user to:" and hit save. When the user expires they will be dropped down the package you selected.

Select content for expired users to see

Once setup, expired users will still be "active users" so if you wish for an expired user to see content such as a profile page just tick expired package option from the right hand side for a given post or page.
You can use ym_user_is shortcode and specify the package account type expired, to put a warning on every page the user has access to, to remind them they have expired with option to upgrade.
⚠️ **GitHub.com Fallback** ⚠️