小编jFi*_*ish的帖子

在Woocommerce结帐页面上将"结算明细"文字更改为"送货详情"

我目前在我的孩子主题的functions.php文件中有一些代码,它应该在我的Woocommerce结帐页面上更改"账单明细"以说明"发货明细".

但是,当我更新到Woocommerce 3.0时,代码片段停止工作.以下是我使用的代码.

function wc_billing_field_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Billing Details' :
$translated_text = __( 'Shipping Details', 'woocommerce' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'wc_billing_field_strings', 20, 3 );
Run Code Online (Sandbox Code Playgroud)

我真的很喜欢与Woocommerce 3.0一起使用的代码片段.

非常感谢!

php wordpress checkout woocommerce

0
推荐指数
2
解决办法
1万
查看次数

标签 统计

checkout ×1

php ×1

woocommerce ×1

wordpress ×1