removeProductsFromCollection( )


Removes products by ID from a collection.

The removeProductsFromCollection() function returns a Promise that resolves when the products with the given IDs are removed from a specified collection.

You can remove multiple products from a collection at one time by delimiting the list of products with commas.

If you do not specify any IDs, all products are removed from the collection.

Removing products from a collection does not delete the products from the store. See deleteProduct() to delete a product from the store.

Method Declaration
Copy
Method Parameters
collectionIdstringRequired

ID of the collection from which to remove products.


productIdsArray<string>Required

IDs of the products to remove from the collection.

Did this help?