This action is used to do action directly before user's plan is changed OR new plan is added in plan list.
Hook Name: arm_before_change_user_plans
Hook Type: Action
Source: core/classes/class.arm_subscription_plans.php
Usage:
add_action( 'arm_before_change_user_plans', 'your_function', 10, 4);
function your_function($user_id=0, $old_plan_id_array = 0, $new_plan_id = 0, $new_plan_object) {
//Do Your Action
//$user_id User ID.
//$old_plan_id_array Array of user's old plan IDs.
//$new_plan_id Plan New plan ID.
//$new_plan_object New Plan Object.
}
Parameters:
$user_id
User ID
$old_plan_id_array
Array of user’s old plan IDs
$new_plan_id
New Plan ID
$new_plan_object
New Plan Object