Woocommerce Subscriptions How to Remove Checkout Information

2.5k views Asked by At

I am building a membership website where one can become a member of paying a sign up fee for a limited time. So there is no monthly fee. I have set monthly fee as $0 / month in woocommerce subscriptions.

But the problem is that $0/ month for x months shows in checkout page which is just un-necessary information I just want to display signup fee and no monthly recurring amount. enter image description here

What would be best way to do this?

Ahmar

1

There are 1 answers

0
sgtpepperaut On BEST ANSWER

Here is what worked for me in functions.php:

function my_example_filter( $include, $product ) {

    $mynewarray = array(
                'tax_calculation'     => false,
                'subscription_price'  => true,
                'subscription_period' => true,
                'subscription_length' => false,
                'sign_up_fee'         => false,
                'trial_length'        => false
            );

    return $mynewarray;
}

This only leaves in the price and the period.

add_filter( 'woocommerce_subscriptions_product_price_string_inclusions', 'my_example_filter', 10, 2);