Search for Resources and Solutions

user_plan_subscription_expired

user_plan_subscription_expired is a useful hook available since the version 0.0.8.3, which allows to execute a code by days after the user's subscription expiration. It could be very useful, because you could send promotions and notifications if the user's subscription has expired.

How the user_plan_subscription_expired hook work? If the user don't renews his subscription, in the first 30 days the user_plan_subscription_expired hook will be called. The user_plan_subscription_expired hook is incomplete. It should have at the end (_2) which means 2 days. (_5) means 5 days after the subscription expiration.

Example:

add_hook(

'user_plan_subscription_expired_2',

function ($args) {

// $args contains the user's ID and plan's ID

}

);

In this way by using the plugins, you can send custom notifications to your clients. The hook will be called once per day.

Was this article helpful?