1. Home
  2. Knowledge Base
  3. 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?