我想替换所有产品的“德:”这个词,但我不知道在哪里
问问题
92 次
1 回答
0
woocommerce_get_price_html_from_text
您可以通过过滤器更改“发件人”文本。
你会这样做,像这样:
add_filter( 'woocommerce_get_price_html_from_text', 'so_43054760_price_html_from_text' );
function so_43054760_price_html_from_text( $text ){
return __( 'whatever', 'your-plugin-textdomain' );
}
请记住,这是 WooCommerce 3.0 特定的代码。我不确定它是否与 WC 2.6.x 向后兼容。
于 2017-03-27T22:24:48.147 回答