I have been trying to add verification badge to Woocommerce My-Account users beside their display name but I no success. I searched the internet but their are no plugins or situations that fill the same case. Please i need to know the code or what plugin or css does it? I uploaded a picture for showing an example. Thank you in advance for helping.
Thats an example how i need the verification beside the displayed name. enter image description here
Thats the code found it:
$user_roles = $current_user->roles;
$user_role = array_shift($user_roles);
if ($user_role == 'pending') {
echo '<i class="fa fa-clock-o fa-lg" style="color:#ffa500" ></i>';
} elseif ($user_role == 'unverified') {
echo '<i class="fa fa-times-circle-o fa-lg" style="color:#ff0000" ></i>';
} elseif ($user_role == 'Verified') {
echo '<i class="fa fa-check-circle fa-lg" style="color:#1DADFF"></i>';
} else {
echo '<strong>' . $user_role . '</strong>';
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.