<?php
public function status() {
$t = new template;
$n = new network;
$ret = ["success"=>true];
$n->enableCOR();
foreach (["status","order_id"] as $k) $$k = (isset(JSONDATA_CLEAN[$k])) ? JSONDATA_CLEAN[$k]:"";
$sql = "UPDATE wp_posts SET post_status = :order_status WHERE ID = :order_id";
$res = $this->conn->query($sql,[
"order_status" => $status,
"order_id" => $order_id
]);
$t->setView("json",$ret)->output();
}
?>