How to change a WooCommerce Subscription Deposit and Monthly Payment? [closed]

I THINK I have achieved what I want in this far more simple fee hook, found here https://stackoverflow.com/questions/43415783/change-cart-total-price-in-woocommerce:

function prefix_add_discount_line( $cart )
{
    $discount = $cart->subtotal_ex_tax * 0.1;
    $cart->add_fee( __( '10% Discount', 'yourtext-domain' ) , -$discount );
}
add_action( 'woocommerce_cart_calculate_fees', 'prefix_add_discount_line' );

This is taking 10% off the “To pay now” including tax and totals, and then 10% off “Recurring Totals” including tax and totals.

Note: Notice I am using $cart->subtotal_ex_tax and not $cart->subtotal, because $cart->subtotal is returning the subtotal plus tax, even though the cart table shows “subtotal” as the price ex. tax.