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
When getting product SKUs, the bigcommerce API limits the response to 50 by default and uses pagination. In Resources/Product.php the function skus() needs to take pagination into account.
This is a quick solution I wrote, could probably be improved upon.
Perhaps if $product->skus is null you can use the new PHP null coalesce features?
$skus = $product->skus ?? [];
Also for the do while loop, the condition should be $skuCount == $limit. It should never be able to return a greater number than the $limit unless there is a serious problem with the API.
When getting product SKUs, the bigcommerce API limits the response to 50 by default and uses pagination. In Resources/Product.php the function skus() needs to take pagination into account.
This is a quick solution I wrote, could probably be improved upon.
for this to work you also need to add the following at the top of the file.
use Bigcommerce\Api\Filter;
The text was updated successfully, but these errors were encountered: