我正在使用 Google 的 Content Shopping API,这段代码一切顺利。
但是当我尝试通过以下方法从 Merchant Center 中删除产品时,该产品已成功从列表中删除,但仍返回“未找到项目”错误。
这是代码:
public function deleteProduct($offerId) {
$productId = $this->buildProductId($offerId);
// The response for a successful delete is empty
$this->service->products->delete($this->merchantId, $productId);
}
这是它返回的错误。
Google_Service_Exception
{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "item not found"
}
],
"code": 404,
"message": "item not found"
}
}