private function _handlePlanEvent(array $data)
    {
        $planService = Commerce::getInstance()->getPlans();

        if ($data['type'] == 'plan.deleted') {
            $plan = $planService->getPlanByReference($data['data']['object']['id']);

            if ($plan) {
                $planService->archivePlanById($plan->id);
                Craft::warning($plan->name . ' was archived because the corresponding plan was deleted on Stripe. (event "' . $data['id'] . '")', 'stripe');
            }
        }
    }