The counterparts to the add
methods are the methods for removing commerce items, shipping groups, and payment groups from an Order
. They are:
CommerceItemManager.removeItemFromOrder()
ShippingGroupManager.removeShippingGroupFromOrder()
PaymentGroupManager.removePaymentGroupFromOrder()
These methods take an Order
and their respective object ID as parameters. The object ID is found in the id
property of the CommerceItem
, ShippingGroup
, or PaymentGroup
.
To remove subitems from configurable commerce items, use one of these methods:
CommerceItemManager.removeSubItemFromConfigurableItem()
CommerceItemManager.removeAllSubItemsFromConfigurableItem()