更改标题“其他信息"在woocommerce中 [英] Change title "Additional Information" in woocommerce
本文介绍了更改标题“其他信息"在woocommerce中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从结帐页面更改标题.但是我可以更改标签和占位符.
I want to change the title from the checkout page. But I just can change the label and the placeholder.
// Hook in
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
// Our hooked in function - $fields is passed via the filter!
function custom_override_checkout_fields( $fields ) {
$fields['order']['order_comments']['placeholder'] = 'Please type your PO number here and we will add it to the invoice.';
$fields['order']['order_comments']['label'] = '';
return $fields;
}
推荐答案
按目前的情况,没有钩子可以更改节标题.但是,如果您迫不及待地进行修改,这就是hack.
As it stands there is not hook to change the section title. But here's the hack if you are desperate enough to make the modification.
- 找到您的模板文件夹
- 创建一个名为"checkout"的文件夹
- 在Woocommerce插件文件夹中的template/checkout/下找到文件form-shipping.php.
- 将步骤3中的文件复制到步骤2中创建的文件夹
- 现在,您拥有结帐表格的超能力
编辑此行:
<h3><?php _e( 'Additional Information', 'woocommerce' ); ?></h3>
这篇关于更改标题“其他信息"在woocommerce中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文