是否有一个正确的,更新证明的方法来编辑默认系统警报和WooCommerce WordPress插件使用的赘言?(这个问题可能适用于所有WordPress插件,但WooCommerce是我现在特别关心的问题。
举个简单的例子,假设我想将“您的密码已成功重置”更改为“您的密码已设置”。当前的措辞是特定于WooCommerce的,存在于以下两个文件中:
1./wp-content/plugins/woocommerce/i18n/languages/woocommerce.pot
- /wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-my-account.php
如果我把我的编辑硬编码到第二个文件中,它可以工作,但在更新插件时会有被覆盖的风险。有没有一种正确的方法可以防止更新?
1条答案
按热度按时间mtb9vblg1#
对于通知,您可以使用
woocommerce_add_notice
过滤器。字符串