问题描述
自定义结帐字段,它是一个选择字段,用于在结帐时向总价添加价格.
A custom checkout field which is a select field that is used to add a price to total price in checkout.
使用 WooCommerce订阅插件时,也会出现经常性总计.所以有什么办法,我也可以将自定义结帐字段价格添加到重复总额中吗?
When using WooCommerce Subscription plugin Recurring Total also appears. So is there any way, i can add custom checkout field price to recurring total too ?
请也检查此问题.一个类似的
Please check this question too. A similar one
推荐答案
嘿,您可能想看看这个来自Woocommerce的文档
Hey you may want to check out this doc from Woocommerce
来源:
后来,他们说
这似乎与先前的陈述相矛盾,但是您可能想要尝试添加以下内容:
Which seems to contradict the previous statement but you may want to try adding this:
add_filter( 'woocommerce_subscriptions_is_recurring_fee', '__return_true' );
没有代码片段,我不确定您使用的是什么钩子,但是该资源包含一些您可以尝试使用的示例!
Without a code snippet, I'm unsure what hooks you're using, but the resource contains a few examples that you may be able to try!
这篇关于从checkout向woocommerce订阅重复总额加定制费的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!