简体   繁体   English

Woocommerce订阅如何删除结帐信息

[英]Woocommerce Subscriptions How to Remove Checkout Information

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. 我已将woocommerce订阅的月费设置为$ 0 /月。

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. 但是问题是,x个月的每月$ 0 /月在结帐页面上显示,这只是不必要的信息,我只想显示注册费,没有每月的经常性金额。 在此处输入图片说明

What would be best way to do this? 最好的方法是什么?

Ahmar 阿玛

Here is what worked for me in functions.php: 这是在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);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM