We use WooCommerce Subscription and some subscription are payed upfront and some monthly. When buying a Subscription, WooCommerce displays additional information on the cart and checkout page. When buying monthly, this infos are welcome. But if a customer bills upfront, then this infos are not needed.
Goal: We now try to hide the additional infos added by WooCommerce Subscription IF the recuring payment from the next payment is 0.
Current code:
add_filter( 'woocommerce_subscriptions_is_recurring', 'hide_subscription_recuring_info', 10, 3 );
function hide_subscription_recuring_info( $is_recurring, $cart ) {
// Check if recuring amount is 0
}
I'm a beginner and don't know how to access this values and hide the infos.
Anyone a idea how this can work? :)
Thanks.
