<?php
if (!defined('ABSPATH'))
  exit;

use AC_SYNC\Includes\Classes\Api\Action_Wear_Api_Route;
use AC_SYNC\Includes\Classes\Api\Action_Wear_API_Response as ApiResponse;

$route = new Action_Wear_Api_Route("/dismiss_whats_new");
$route->setMethods("POST");
$route->setCallback(function () {
  $response = new ApiResponse();
  update_option('_ACTIONWEAR_LAST_SEEN_VERSION', \AC_SYNC\Action_Wear_Core::$version);
  $response->success(['dismissed' => true]);
  return $response->getResponse();
});
$route->registerRoute();
