最佳答案
—更新1—
在后端,如果您转到 WooCommerce > 设置 > 结帐 > 货到付款(选项卡),您将看到:
You will be able to remove "Pay wish cash upon arriving to destination." instructions message, or to replace it with something more convenient.
您可以尝试使用WordPress gettext()
函数将以这种方式删除您的文本:
add_filter( 'gettext', 'removing_email_text', 10, 3 );
function customizing_checkout_text( $translated_text, $untranslated_text, $domain )
{
if ( 'Pay wish cash upon arriving to destination.' == $untranslated_text ) {
$translated_text = __( '', $domain );
}
return $translated_text;
}
此代码位于事件子主题的 function.php 文件中(事件主题或任何插件文件)。
您还可以用其他内容替换文本。
关于php - 从 WooCommerce 电子邮件中删除货到付款说明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41231686/