:::: MENU ::::

WooCommerce get current user information

WooCommerce get current user information

Today we talk WooCommerce get current user information. In this tutorial, we will get the following information of the current user, user name, user email, user id, and user group. So let’s start with our example.

 $user = wp_get_current_user(); // get current user
 $id = $user->ID; // get user id
 $name = $user->user_name; // get user name
 $email = $user->email; //get user email
 $role = $user->roles[0]; // get user role
Author: Qaisar Satti
Category: WooCommerce
Last Modified: September 30, 2020


So, what do you think ?