Jake Vanderwerf
2026-01-11 474109a5df0a06f5343ab184838fe2d80e3872a8
inc/rest/RegisterRoutes.php
@@ -106,7 +106,6 @@
   public function handlePOST(WP_REST_Request $request):WP_REST_Response
   {
      $data = $request->get_params();
      error_log('Handling update with this data: '.print_r($data, true));
      $user = $data['user'];
      if (!$this->checkUser($user) || !$this->userCheck($user)) {
         return new WP_REST_Response([
@@ -114,7 +113,6 @@
            'message'   => 'Looks like you may not be who you say you are...'
         ]);
      }
      error_log('User passed');
      if ($this->route === 'shop' && !$this->checkTerm([
         'term_id'   => $data['shop'],
         'taxonomy'  => $this->route
@@ -124,7 +122,6 @@
            'message'   => 'This shop doesn\'t exist?'
         ]);
      }
      error_log('Processing...');
      $queue = JVB()->queue();
      unset($data['user']);
      $operationID = $data['id'];
@@ -156,7 +153,6 @@
   }
   protected function handleUpdateOperation(int $userID, array $data):WP_Error|array
   {
      error_log('Handling update Operation with route: '.print_r($this->route, true));
      if ($this->route === 'options') {
         if (!user_can($userID, 'manage_options')) {
            return [
@@ -182,7 +178,6 @@
         return array_key_exists($v, $this->config['fields']??[]);
      }, ARRAY_FILTER_USE_BOTH);
      error_log('Allowed Result: '.print_r($allowed, true));
      foreach ($allowed as $name => $value) {
         if (empty($value)) {