Closed. This question is off-topic. It is not currently accepting answers.admin管理员组文章数量:1429524
Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 5 years ago.
Improve this questionI have a subscription product in which I have customized checkout page for this particular product. I want to remove "Recurring Totals" row from checkout and cart page.
Here is my code:
function cart_subtotal_func_unset( $total ) {
print_r($total);
unset($totals['cart_subtotal']);
return $totals;
}
add_filter('woocommerce_cart_item_subtotal', 'cart_subtotal_func_unset', 10, 2);
And here is my screenshot for checkout page.
Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 5 years ago.
Improve this questionI have a subscription product in which I have customized checkout page for this particular product. I want to remove "Recurring Totals" row from checkout and cart page.
Here is my code:
function cart_subtotal_func_unset( $total ) {
print_r($total);
unset($totals['cart_subtotal']);
return $totals;
}
add_filter('woocommerce_cart_item_subtotal', 'cart_subtotal_func_unset', 10, 2);
And here is my screenshot for checkout page.
Share Improve this question asked Apr 30, 2019 at 5:21 Arshad HussainArshad Hussain 2101 gold badge5 silver badges17 bronze badges1 Answer
Reset to default 4Try filtering the hook woocommerce_cart_calculate_fees.
Use this code. it might work for you.
add_filter( 'woocommerce_cart_calculate_fees', 'add_recurring_postage_fees', 10, 1 );
function add_recurring_postage_fees( $cart ) {
if ( ! empty( $cart->recurring_cart_key ) ) {
remove_action( 'woocommerce_cart_totals_after_order_total', array( 'WC_Subscriptions_Cart', 'display_recurring_totals' ), 10 );
remove_action( 'woocommerce_review_order_after_order_total', array( 'WC_Subscriptions_Cart', 'display_recurring_totals' ), 10 );
}
}
本文标签: woocommerce offtopicHow to remove recurring totals information for a particular subscription product
版权声明:本文标题:woocommerce offtopic - How to remove recurring totals information for a particular subscription product? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745539489a2662427.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论