Skip to content

Internal server error when querying orders #718

@wildcant

Description

@wildcant

Describe the bug
Hi guys, thanks for all the work you have done here. I'm just starting to use this plugin for a new project and I'm getting Internal server error as response to simple orders query.

To Reproduce
Start a wordpress instance using docker with the command docker compose up -d. This is the docker-compose.yml:

version: '3'

services:
  # Database
  db:
    platform: linux/x86_64
    image: mysql:5.7
    volumes:
      - db_data:/var/lib/mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: password
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: wordpress
    networks:
      - wpsite

  # Wordpress
  wordpress:
    depends_on:
      - db
    image: wordpress:latest
    ports:
      - '8001:80'
    restart: always
    volumes: ['./src:/var/www/html']
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpress
    networks:
      - wpsite

networks:
  wpsite:
volumes:
  db_data:

After docker container starts visit http://localhost:8001/ and initialize wordpress. Install most recent version of plugins (see plugins versions section), initialize commerce, add products (I used the sample data from wp-content/plugins/woocommerce/sample-data/sample_products.csv) and a payment method (I used de default Cash on delivery), make an order, try to query to retrieve said order, see error. Is this a regression or maybe I'm missing a configuration step?

This is the internal server error with orders I'm not able to retrieve a single order neither

Screenshot 2023-03-20 at 4 27 56 PM

Screenshot 2023-03-20 at 4 24 40 PM

Expected behavior
queries should return the orders data similar to rest api
Screenshot 2023-03-20 at 4 12 08 PM

Plugin Versions
WordPress 6.1.1
Screenshot 2023-03-20 at 4 01 45 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions