我想在返回的客户栏下面的结帐页面上更改文本,即"If you have shopped with us before, please enter your details below. If you are a new customer, please proceed to the Billing & Shipping section." .
该文似乎出现在: plugins\woocommerce\i18n\languages\woocommerce.pot
和 plugins\woocommerce\templates\checkout\form-login.php
我知道我可以简单地调整这些文件中的文本......但是如果woocommerce得到更新,它将被覆盖 .
有没有办法用钩子更改此文本,虽然文本没有出现在我的主题中?
如果可能的话,我不想为此使用插件 .
1 回答
当Overriding Woocommerce templates via a child theme (or a theme)时,您不会在Woocommerce插件更新时丢失任何更改 .
因此,在您的情况下,如模板
checkout\form-login.php
的注释所述,您必须将此文件复制到您的子主题:见:WooCommerce action hooks and overriding templates