Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Product get warnings in batch insert throws error on v2.2.2 #12

Open
mukdagr8 opened this issue Mar 12, 2019 · 0 comments
Open

Product get warnings in batch insert throws error on v2.2.2 #12

mukdagr8 opened this issue Mar 12, 2019 · 0 comments

Comments

@mukdagr8
Copy link

When using the batch insert function an error is thrown.

Call to undefined method Google_Service_ShoppingContent_Product::getWarnings()

I have checked and it seems the getWarnings() function has been removed from the product class.

foreach ($batchResponse->entries as $entry) { if (empty($entry->getErrors())) { $product = $entry->getProduct(); printf("Inserted product %s with %d warnings\n", $product->getOfferId(), count($product->getWarnings())); } else { print ("There were errors inserting a product:\n"); foreach ($entry->getErrors()->getErrors() as $error) { printf("\t%s\n", $error->getMessage()); } } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant