// Add shortcode to display the logged-in user’s points
add_shortcode(‘user_points’, function() {
if (!is_user_logged_in()) {
return ‘You need to log in to view your points.’;
}
adding this to woocommerce-points-and-rewards.php should do the trick i think. no promises people. DO NOT IMPLEMENT YOURSELF LET THE DEVS TEST IT FIRST AND UPDATE IF THEY WISH (FINGERS CROSSED THEY DO)
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.
// Add shortcode to display the logged-in user’s points
add_shortcode(‘user_points’, function() {
if (!is_user_logged_in()) {
return ‘You need to log in to view your points.’;
}
$user_id = get_current_user_id();
$points = get_user_meta($user_id, ‘wc_points_balance’, true);
if (!$points) {
$points = 0;
}
return ‘You have ‘ . $points . ‘ points.’;
});
adding this to woocommerce-points-and-rewards.php should do the trick i think. no promises people. DO NOT IMPLEMENT YOURSELF LET THE DEVS TEST IT FIRST AND UPDATE IF THEY WISH (FINGERS CROSSED THEY DO)
yes this would defo be a good feature
Yes! I would love to be able to integrate points balance text anywhere. A widget would be great as well.