Combine discounted shipping cost with discounted cart items prices in WooCommerce
问题 I need some help to combine custom shipping cost with discounted cart item prices in WooCommerce. In the below code, the first function is responsible for adding a 50% discount depending on the selected delivery option and the 2nd one is responsible for calculating a 50% discount for each item in the basket, except for specific category (and its subcategories). I would like to make sure when a customer chooses "Pickup" delivery to display "-50%" of discount that is added only for goods not