3 added 48 characters in body
source | link

Under Drupal Commerce 8.x-2.13 I find that the query

Drupal::entityQuery('commerce_order') 

with no conditions attached returns ONLY incomplete orders (when called in the context of an API endpoint) - and if I apply any parameters exclusive of incomplete orders such as

$query->condition('state', 'completed');

it returns nothing. How can entityQuery be made to retrieve data on completed orders?

Under Drupal Commerce 8.x-2.13 I find that the query

Drupal::entityQuery('commerce_order') 

with no conditions attached returns ONLY incomplete orders - and if I apply any parameters exclusive of incomplete orders such as

$query->condition('state', 'completed');

it returns nothing. How can entityQuery be made to retrieve data on completed orders?

Under Drupal Commerce 8.x-2.13 I find that the query

Drupal::entityQuery('commerce_order') 

with no conditions attached returns ONLY incomplete orders (when called in the context of an API endpoint) - and if I apply any parameters exclusive of incomplete orders such as

$query->condition('state', 'completed');

it returns nothing. How can entityQuery be made to retrieve data on completed orders?

2 Removing irrelevant details.
source | link

I have an API setup that should periodically sync completed Commerce orders to an external system. Under Drupal Commerce 8.x-2.13 I find that the query

Drupal::entityQuery('commerce_order') 

with no conditions attached returns ONLY incomplete orders - and if I apply any parameters exclusive of incomplete orders such as

$query->condition('state', 'completed');

it returns nothing. How can entityQuery be made to retrieve data on completed orders?

I have an API setup that should periodically sync completed Commerce orders to an external system. Under Drupal Commerce 8.x-2.13 I find that the query

Drupal::entityQuery('commerce_order') 

with no conditions attached returns ONLY incomplete orders - and if I apply any parameters exclusive of incomplete orders such as

$query->condition('state', 'completed');

it returns nothing. How can entityQuery be made to retrieve data on completed orders?

Under Drupal Commerce 8.x-2.13 I find that the query

Drupal::entityQuery('commerce_order') 

with no conditions attached returns ONLY incomplete orders - and if I apply any parameters exclusive of incomplete orders such as

$query->condition('state', 'completed');

it returns nothing. How can entityQuery be made to retrieve data on completed orders?

1
source | link

How can I make entityQuery('commerce_order') return completed orders?

I have an API setup that should periodically sync completed Commerce orders to an external system. Under Drupal Commerce 8.x-2.13 I find that the query

Drupal::entityQuery('commerce_order') 

with no conditions attached returns ONLY incomplete orders - and if I apply any parameters exclusive of incomplete orders such as

$query->condition('state', 'completed');

it returns nothing. How can entityQuery be made to retrieve data on completed orders?