• Resolved martinneumannat

    (@martinneumannat)


    I have a multisite installation and I need to sync affiliates between multiple sites of the network. So if they are approved at one site, they are active on the other as well.

    I wonder whether there is a way to use the username for tracking, since the affiliate ID could be different on various sites.

    And I have a WooCommerce shop in various currencies. I wonder whether the plugin is able to make the currency conversion in order to apply the correct commission amount.

    Would appreciate your feedback.

Viewing 1 replies (of 1 total)
  • Plugin Author iova.mihai

    (@iovamihai)

    Hey @martinneumannat,

    Thank you for reaching out! Currently, SliceWP is not multisite compatible, so I’m afraid that we do not have a solution for this type of setups. You can run SliceWP independently on each site of a WordPress multisite, however, that will lead to separate affiliate programs for each site with separate datasets.

    As for tracking referral traffic via the username, this can be done with this code snippet:

    function slicewp_custom_track_visit_by_user_login( $affiliate, $query_arg ) {

    // Return if we have an affiliate
    if ( ! is_null( $affiliate ) ) {
    return $affiliate;
    }

    $user = get_user_by( 'login', sanitize_text_field( $query_arg ) );

    if ( ! $user ) {
    return $affiliate;
    }

    return slicewp_get_affiliate_by_user_id( $user->ID );

    }
    add_filter( 'slicewp_tracking_get_affiliate_by_query_arg', 'slicewp_custom_track_visit_by_user_login', 25, 2 );


    function slicewp_custom_affiliate_url_referral_query_arg_value_user_login( $query_arg_value, $affiliate_id, $format ) {

    $affiliate = slicewp_get_affiliate( $affiliate_id );

    if ( is_null( $affiliate ) ) {
    return $query_arg_value;
    }

    $user = get_userdata( absint( $affiliate->get( 'user_id' ) ) );

    if ( ! $user ) {
    return $query_arg_value;
    }

    return $user->user_login;

    }
    add_filter( 'slicewp_affiliate_url_referral_query_arg_value', 'slicewp_custom_affiliate_url_referral_query_arg_value_user_login', 25, 3 );

    Please access the link, copy the code and add it to your website. If you’re not sure how to add code snippets to your site, you can use the Code Snippets plugin (https://ww.wp.xz.cn/plugins/code-snippets/).

    As for multi-currencies, our Multi-currency add-on may be able to help you out. You can find our more here: https://slicewp.com/products/multi-currency/

    Also, if you have any particular questions about SliceWP Pro, please contact us here: https://slicewp.com/contact/

    Thank you and best wishes,

    Mihai

Viewing 1 replies (of 1 total)

The topic ‘Feature Inquiry’ is closed to new replies.