更改WooCommerce购物车和结帐页面中的“发货”文本: [英] Changing the 'Shipping' text in WooCommerce cart and checkout pages:

查看:74
本文介绍了更改WooCommerce购物车和结帐页面中的“发货”文本:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将WooCommerce与Storefront主题一起使用,并且尝试将购物篮页面上的发货 改为总计。

I'm using WooCommerce with the Storefront theme and I'm trying to alter the word "Shipping" on the basket page with totals.

我在这里找到了一些建议:> https://kriesi.at/support/topic/change-shipping-text-to-delivery-on-checkoutcart/

I found some advice here: https://kriesi.at/support/topic/change-shipping-text-to-delivery-on-checkoutcart/

但是,他们提到这样做可能需要定制工作。

However, they mention it might require custom work to do this.

有人可以请教吗?

Paul

推荐答案

将此钩子添加到function.php中。

Add this hook in function.php

add_filter( 'woocommerce_shipping_package_name', 'custom_shipping_package_name' );
function custom_shipping_package_name( $name ) {
  return 'Your Text';
}

这篇关于更改WooCommerce购物车和结帐页面中的“发货”文本:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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