woocommerce - 更改“您必须登录才能结帐”的文本。
问题描述
嗨,有人请告诉我如何更改 woocommerce 默认短信“您必须登录才能结帐。” 在结帐页面带有我自己的短信“您必须登录或注册才能参加比赛”
提前致谢...
我在这里等待一个漂亮的答复/.......
解决方案
你可以试试下面的代码。
function custom_woocommerce_checkout_must_be_logged_in_message( $var ) {
return 'You have to login or register to join contests';
}
add_filter( 'woocommerce_checkout_must_be_logged_in_message', 'custom_woocommerce_checkout_must_be_logged_in_message', 10, 1 );
代码在您当前子主题的functions.php 中。
推荐阅读
- python - AttributeError: 'float' 对象在 if 条件中使用 & 时没有属性 'isin'
- python-3.x - 如何识别具有此类名称的展开折叠图标:
- django-rest-framework - 错误 TemplateResponseMixin 需要“template_name”的定义或“get_template_names()”的实现
- javascript - Video.js:video.js 7.8.2 中用于测验的大按钮
- typescript - Angular 8将元素引用传递给方法
- c++ - ncurses 在后台?
- emacs - Emacs - 如何在弹丸和treemacs中自动添加新项目?
- javascript - Javascript获取回调不在循环中工作
- node.js - 当modules: false被babel设置时,nodejs如何解析import es6 module语句?
- c# - HTTPClient 返回 400 Bad Request 但 Postman 在 C# 中返回 201