From aea42b111d268433c065f8fbe0c7d87055594d80 Mon Sep 17 00:00:00 2001 From: BeeMargarida Date: Thu, 15 Apr 2021 09:13:27 +0100 Subject: [PATCH] feat: delete product function --- src/shopify/product.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/shopify/product.py b/src/shopify/product.py index a738f27..0712be4 100644 --- a/src/shopify/product.py +++ b/src/shopify/product.py @@ -71,6 +71,10 @@ def get_product(self, id): contents = self.get(url) return contents["product"] + def delete_product(self, id): + url = self.base_url + "admin/products/%d.json" % id + self.delete(url) + def images_product(self, id, *args, **kwargs): url = self.base_url + "admin/products/%d/images.json" % id contents = self.get(url, **kwargs)