```php
<?php

require_once '../../core/api_bootstrap.php';

$data = Request::post();

try {

    Validator::required($data,['plan_id']);

    $db = new Database();
    $conn = $db->connect();

    $query = "

        UPDATE plans
        SET status = 0
        WHERE id = :plan_id

    ";

    $stmt = $conn->prepare($query);

    $stmt->execute([
        ':plan_id'=>$data['plan_id']
    ]);

    Response::success([],"Plan disabled");

}
catch(Exception $e){

    Logger::log("system.log",$e->getMessage());

    Response::error("Server error",500);

}