Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Woocommerce移动导航欢迎信息_Woocommerce_Hook Woocommerce - Fatal编程技术网

Woocommerce移动导航欢迎信息

Woocommerce移动导航欢迎信息,woocommerce,hook-woocommerce,Woocommerce,Hook Woocommerce,我想移动出现在“导航”菜单“我的帐户”仪表板上的欢迎信息。我将printF函数从dashboard.php剪切到navigation.php。问题是它返回“Hello”而不带用户名。 我必须先调用某个方法吗?您是否定义了$current\u user 像这样: $current_user = wp_get_current_user(); 您是否定义了$current\u用户 像这样: $current_user = wp_get_current_user(); 你能包括你的代码吗?并解释预期

我想移动出现在“导航”菜单“我的帐户”仪表板上的欢迎信息。我将printF函数从dashboard.php剪切到navigation.php。问题是它返回“Hello”而不带用户名。
我必须先调用某个方法吗?

您是否定义了$current\u user

像这样:

$current_user = wp_get_current_user();

您是否定义了$current\u用户

像这样:

$current_user = wp_get_current_user();

你能包括你的代码吗?并解释预期结果和您当前得到的结果。我得到的是“Hello(not?Log out)”和“Hello{username}(not?Log out)”,您能提供您的代码吗?并解释预期结果和您当前得到的结果。我得到的是“Hello(不是?注销)”和“Hello{username}(不是?注销)”