You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
! I'm trying to get all the fulfilled orders, for that I created this function:
public function getOrders($status = null, $financialStatus = null, $since = null, $limit = 250)
{
$shopify = $this->connectToShopify();
if ($shopify) {
$options['limit'] = $limit;
if ($status !== null) {
$options['status'] = $status;
}
if ($financialStatus !== null) {
$options['financial_status'] = $financialStatus;
}
if ($since !== null) {
$options['since_id'] = $since;
}
return $shopify->Order->get($options);
} else {
return [];
}
}
If I pass 'closed' to the status variable, it retrieves both canceled and fulfilled orders, but I need only the shipped orders. For that, I created this second function:
public function getFulfilledOrders($status, $since = null, $limit = 250)
{
$shopify = $this->connectToShopify();
if ($shopify) {
if ($status !== null) {
$options['fulfillment_status'] = 'fulfilled';
}
return $shopify->Order->get($options);
} else {
return [];
}
}
However, this function returns an empty array
Array ()
despite having more than 1000. What could be my mistake? Thank you!
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
! I'm trying to get all the fulfilled orders, for that I created this function:
If I pass 'closed' to the status variable, it retrieves both canceled and fulfilled orders, but I need only the shipped orders. For that, I created this second function:
However, this function returns an empty array
Array ()
despite having more than 1000. What could be my mistake? Thank you!
The text was updated successfully, but these errors were encountered: