Getting the referrals to show up for affiliates

Posted in

Hello,
We have Affiliates Pro and the WC Affiliates Integration. We’re using coupons for our affiliates, but their referrals are not showing up in the Visits & Referrals or Affiliates & Referrals.
I can see the coupon being used in the order, but still doesn’t connect with the affiliate that is tied to that coupon.
thanks,
Janis @ Daily Harvest Express

3 Responses to Getting the referrals to show up for affiliates

  1. George April 28, 2018 at 3:10 pm #

    Hi Janis,

    Since this is not your case, then I suspect there is a conflict with your theme or another plugin.
    Please enable debugging, make a test purchase using an affiliate coupon and check the debug.log file for issues. Any issues logged will give you hints on what is going wrong. You can still provide me with temp admin access if you can’t work it out yourself.

    To enable debugging, edit your wp-config.php file and replace the following line:
    define(‘WP_DEBUG’, false );
    with these lines:

    define(‘WP_DEBUG’, true );
    define(‘WP_DEBUG_LOG’, true );
    define(‘WP_DEBUG_DISPLAY’, false );
    after that, any errors will be added to a file named debug.log under your wp-content folder.

    Kind regards,
    George

  2. Janis April 27, 2018 at 9:05 pm #

    Hello George,

    Thank you for that explanation about the lower case issue. Very helpful.

    Yes, the coupons are active with unlimited usage. I haven’t input the snippet (I’m not comfortable editing the php files, but I have someone who can). However, I did change all the coupon codes in Affiliates to lower case and yet I still do not see the referrals connecting with their affiliates in the Affiliates & Referrals.

    Any other suggestions will be very helpful!

    Thanks,
    Janis

  3. George April 27, 2018 at 3:55 pm #

    Hi Janis,

    Assuming that the correct coupon code is attributed to an affiliate, the coupon is active and hasn’t exceeded it’s usage limit, please make a comparison between the two codes.

    WooCommerce supports lowercase coupon codes. Whenever you add a new coupon it will be converted to lowercase upon saving.
    On the other hand Affiliates supports all cases for compatibility with other systems.
    This might result in a non-recorded referral because for Affiliates the coupon code sale10 is different than Sale10.
    If you have set a coupon code like sale10 on WooCommerce while on Affiliates you attributed a coupon code Sale10, these will be two different coupons for Affiliates system.
    If this is your case, you can either edit the Affiliates coupon attributes and convert them all to lowercase, or use the following snippet:

    add_filter( 'affiliates_coupons_equality_test', 'gt_affiliates_coupons_equality_test', 10, 3 );
    function gt_affiliates_coupons_equality_test( $test, $coupon1, $coupon2 ) {
    if ( strtolower( $coupon1 ) === strtolower( $coupon2 ) ) {
    $equal = true;
    } else {
    $equal = false;
    }

    return $equal;
    }

    The snippet should be placed to functions.php file preferably of your child theme, so that you will keep the contents intact upon a theme update.

    If after using the snippet, you still have issues, enable debugging and also send me temp admin credentials to your live or staging site, to george@itthinx.com.

    Kind regards,
    George

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share