slince / shopify-api-php

:rocket: Shopify API Client for PHP
MIT License
128 stars 47 forks source link

Delete product #31

Closed nezaboravi closed 5 years ago

nezaboravi commented 5 years ago

As per documentation, to delete product do this:

$client->getProductManager()->delete(12800);

However, php unit test throws this:

$this->shopifyClient->getProductManager()->delete(3573905391715); Error : Call to undefined method Slince\Shopify\Manager\Product\ProductManager::delete() I have been looking into ProductManager and Product classes and could not find delete() method.

maximzasorin commented 5 years ago

@nezaboravi

Hello, this is an error in the documentation, to remove product, you should use the remove method:

$client->getProductManager()->remove(3573905391715);

A list of all ProductManager methods can be found here:

https://github.com/slince/shopify-api-php/blob/master/src/Manager/Product/ProductManagerInterface.php

slince commented 5 years ago

This is a mistake. Thanks @maximzasorin for helping to fix this.