如何从WooCommerce的购物车页面中的本地取件中删除文本(免费) [英] How to remove the text (Free) from Local Pickup in shopping cart page in WooCommerce

查看:102
本文介绍了如何从WooCommerce的购物车页面中的本地取件中删除文本(免费)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从WooCommerce的购物车页面中的本地取件(免费)中删除文本(免费)?我正在使用IDStore主题.

How to remove the text (Free) from Local Pickup (Free) in shopping cart page in WooCommerce? I'm using IDStore theme.

非常感谢, MT

推荐答案

将此代码添加到主题的functions.php文件中

Add this code in your theme's functions.php file

add_filter( 'woocommerce_cart_shipping_method_full_label', 'remove_local_pickup_free_label', 10, 2 );
function remove_local_pickup_free_label($full_label, $method){
    if( $method->id == 'local_pickup' )
    $full_label = str_replace("(Free)","",$full_label);
  return $full_label;
}

这篇关于如何从WooCommerce的购物车页面中的本地取件中删除文本(免费)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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