public function refresh_nonces() { if (!$this->is_preview()) { wp_send_json_error('not_preview'); } wp_send_json_success($this->get_nonces()); }