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:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Don't remove parent items when a child product is removed from the cart | |
*/ | |
add_filter( 'pewc_do_not_remove_parents', '__return_true' ); |