1. Home
  2. Knowledge Base
  3. WooCommerce Product Add-Ons Ultimate
  4. Don’t remove parent products from cart
  1. Home
  2. Knowledge Base
  3. Cart
  4. Don’t remove parent products from cart
  1. Home
  2. Knowledge Base
  3. Advanced
  4. Don’t remove parent products from cart

Don’t remove parent products from cart

If you don’t want your parent products to be removed from the cart when child products are deleted, add this filter to your functions.php or snippets file:

<?php
/**
* Don't remove parent items when a child product is removed from the cart
*/
add_filter( 'pewc_do_not_remove_parents', '__return_true' );

Was this article helpful?

Need More Support?

If you can't find the answer that you're looking for, then please use the link below to raise a support ticket.
Contact Support

Related Articles