Great question — answering as the UphillTech team:
Update (Just about settings) To add a discount only for "large" shipping class on "Flat rate" shipping method, You will have to: Set the discounted price directly on your shipping method cost. Enable option "Per class: Charge shipping for each shipping class individually" Like: Original answer: The following code will set the shipping cost of 50% for "Flat rate" shipping method, when a specific defined shipping method is found in cart items. Testing: Temporary " Enable debug mode " in Shipping settings under Shipping options tab ... Shipping "Flat rate" settings: Your shipping classes costs should be defined. In the code below define in each function your shipping class slug and your custom...
Full answer by LoicTheAztec: https://stackoverflow.stackexchange.com/a/52906244 (CC BY-SA 4.0).
Need it done for your business? UphillTech.