Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Iván Sosa

    (@ivansosa)

    Hi again,

    about your questions:

    1. That’s not possible with the current version of the plugin.

    2. Add the following code at the end of the file functions.php of your active theme folder:

    if( defined( 'YITH_WCAF' ) && ! function_exists( 'yith_wcaf_change_default_token' ) ){
     function yith_wcaf_change_default_token( $default_token, $user_id ){
            $user = get_user_by( 'id', $user_id );
     
     if( $user && ! is_wp_error( $user ) ){
                $username = $user->user_login;
     $default_token = $username;
            }
     
     return $default_token;
        }
     add_filter( 'yith_wcaf_affiliate_token', 'yith_wcaf_change_default_token', 10, 2 );
    }

    Please, note that I used username as token should be unique, and this is the only user field that has this trait.
    Besides, note that this tweak will only work for “new affiliates”, the ones that register as an affiliate after you apply this change to your site.
    For the already registered users you will have to change it manually in the database or editing the user token in the affiliate settings.

    I hope it helps you.

    Have a great day!

    Thread Starter lind22

    (@lind22)

    Hi,

    Thanks for the reply!
    I’m a little confused about the different commission for different users(1).

    On the plugin page (https://yithemes.com/themes/plugins/yith-woocommerce-affiliates/) it says this: ‘Specify a different commission rate for each product and/or user’.
    So it seems possible.

    Maybe I misunderstand the sentence?

    Thanks,
    Regards

    Plugin Support Iván Sosa

    (@ivansosa)

    Hi there,

    Sorry for the misunderstanding.
    With that version, it’s possible to set a different commission rate for each product or user, yes.

    Anyways, for this type of question, I kindly suggest to contact our Live Chat Team on our official page.

    Have a nice day!

    Thread Starter lind22

    (@lind22)

    Ok,

    thanks for help.
    Have a nice day

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Two questions about the plugin’ is closed to new replies.