5 votes

How to represent member discount for Commerce products?

Options #1 and #3 are the two options you'll want to decide between, and you've hit the nail on the head in terms of the pros and cons of each. If a discount code being deleted / modified poses a ...
  • 566
3 votes
Accepted

Delete All Products (and their variants)

This should do it: \Craft::$app->getElements()->deleteElement($product); Then run garbage collection.
  • 6,757

Only top scored, non community-wiki answers of a minimum length are eligible