如何从Woocommerce购物车中删除Shipping? [英] How to remove Shipping from Woocommerce cart?

查看:153
本文介绍了如何从Woocommerce购物车中删除Shipping?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题。我需要从购物车中删除运费和运费计算。它可能用钩子删除吗?我是新手。

I have one question. I need remove shipping and shipping calculate from cart. Its possible delete with hooks? I am newbie in this.

模板是: http: //flatsome.uxthemes.com/cart/

如果有任何建议,我会很高兴。
谢谢。

I'll be glad for any advice. Thanks.

购物车很抱歉

推荐答案

在您的 functions.php

function disable_shipping_calc_on_cart( $show_shipping ) {
    if( is_cart() ) {
        return false;
    }
    return $show_shipping;
}
add_filter( 'woocommerce_cart_ready_to_calc_shipping', 'disable_shipping_calc_on_cart', 99 );

这篇关于如何从Woocommerce购物车中删除Shipping?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆