I tried this $shoppify->ProductVariant->search(“sku:{$sku}”) but it always gives output as Uncaught PHPShopify\Exception\ApiException: {“errors”:“Not Found”} even though sku present in inventory.
Note: used composer to install latest phpclassic/php-shopify
Link to github: https://github.com/phpclassic/php-shopify
example:
$sku="example-shirt-s";
var_dump($shopify->ProductVariant->search("sku:{$sku}"));
But I just tried with to get list of products with below APIs then it got list of products :
$products = $shopify->Product->get();
var_dump($products);