duanjianl183188
2016-04-14 10:02
浏览 65
已采纳

无法更改woocommerce中的“Postcode / ZIP”字段标签

I have a site in hebrew based on woocommerce. The translation is work great, however, the field "Postcode / ZIP" is refuse to be trasnlate:

enter image description here

I've tried to change it using this code:

add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
function custom_override_checkout_fields( $fields ) {

    $fields['billing']['billing_postcode']['label'] = 'test';

    return $fields;
}

But something weird happen: when I reload the page I can see the change take effect, but after a second it change back to "Postcode / ZIP". Another weird thing: the above script work for the other fields, something is wrong with that specific field.

Anyone know what's going on?

Thanks!

图片转代码服务由CSDN问答提供 功能建议

我有一个基于woocommerce的希伯来语网站。 翻译工作很棒,但是,“Postcode / ZIP”字段拒绝进行转换:

我尝试使用以下代码更改它:

  add_filter('woocommerce_checkout_fields','custom_override_checkout_fields'); 
 nfunction custom_override_checkout_fields($ fields){\  n 
 $ fields ['billing'] ['billing_postcode'] ['label'] ='test'; 
 
返回$ fields; 
} 
   
 
  

但有些奇怪的事情发生了:当我重新加载页面时,我可以看到更改生效,但是一秒后它又变回“Postcode / ZIP”。 另一个奇怪的事情:上面的脚本适用于其他字段,某些东西 该特定字段是错误的。

任何人都知道发生了什么?

谢谢!

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题