MemberPress: Remove a User Role After Subscription to a Specific Membership Expires
add_action(‘mepr-event-subscription-expired’, function($event) { $txn = $event->get_data(); // Get the transaction data from the event $user = $txn->user(); // Get the user associated with the transaction // Check if the expired subscription is for the specific membership if ($txn->product_id == ‘123’)…Continue reading