Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter bfc0

    (@bfc0)

    Thanx for replying

    Question : Each time the Points expiration time will occur, points will be lost, so rank could be downgrade too, right ?

    So will the downrank be automatic ?

    I have another issue: as an Admin i wanna manually add points to a customer, unfortunately the rank doesn’t change at all, staying stuck to null.

    Don’t understand why

    How could i debugg that ?

    best regards

    Thread Starter bfc0

    (@bfc0)

    Hi,

    The issue is not completely resolved …

    The rank title still doesn’t change when i remove points …

    There is another issue: after changing an user’s amount of points in PhpMyadmin with a SQL request, the total points doesn’t change in wordpress profile even after puting this script in fonctions.php :

    function update_user_points_on_login( $user_login ) {
    $user = get_user_by( ‘login’, $user_login );
    $user_id = $user->ID;
    $total_points = floatval($wpdb->get_var( “SELECT COALESCE(SUM(point), 0) FROM {$wpdb->prefix}epoi_point_reward_system WHERE user_id = {$user_id}” ));
    update_user_meta( $user_id, ‘point’, $total_points );

    }
    add_action( ‘wp_login’, ‘update_user_points_on_login’ );

    in your plugin, i could’t find a cache file or temporary back-up méthod to check where points are added or removed .

    I guess i need help from you 🙂

    best regards

Viewing 2 replies - 1 through 2 (of 2 total)