I'm trying to add a fee to my woocommerce cart based on the subtotal after discounts have been applied:

```
    add_action( 'woocommerce_cart_calculate_fees','woocommerce_custom_surcharge' );
function woocommerce_custom_surcharge() {
  global $woocommerce;

    if ( is_admin() && ! defined( 'DOING_AJAX' ) )
        return;

    $percentage = 0.01;
    $surcharge =  $woocommerce->cart->subtotal - $woocommerce->cart->get_cart_discount_total(); 
    $woocommerce->cart->add_fee( 'Surcharge', $surcharge, true, '' );

}

```

I don't believe calls like `$woocommerce->cart->get_cart_discount_total()` can be used in an action hook, which is why I keep getting **`0.00`** for the fee. 

I also read around some WC values are deprecated and will always show zero, but it doesn't explain why those amounts appear in filters and not actions. 

What else can I use in an action to get the same number and add a percent fee to?