• Resolved geylang666

    (@geylang666)


    Hi team,
    We need to use the number of referred users as a parameter, so we cannot use the shortcode. How do we retrieve the same by code?
    Thanks.

Viewing 1 replies (of 1 total)
  • Plugin Author shalior

    (@shalior)

    Hello,

    
    $ref_code = new WP_Refer_Code( $user_id );
    $count = empty( $ref_code->get_invited_users_id() ) ? '0' : count( $ref_code->get_invited_users_id() );
    

    as name suggests $count holds the counting for $user_id

Viewing 1 replies (of 1 total)
  • The topic ‘How to retrieve a user’s number of referred users by code?’ is closed to new replies.