标签: woocommerce hook-woocommerce
我想移动导航菜单上我帐户信息中心上显示的欢迎消息。我将printF函数从dashboard.php剪切到navigation.php。问题是它返回"你好"没有用户的名字。 我必须先调用一些方法吗?
答案 0 :(得分:2)
你定义了$ current_user吗?
像这样:
$current_user = wp_get_current_user();