6 Responses to Association Not Working #2

  1. Bastien February 3, 2016 at 4:51 pm #

    That’s fantastic George!

    Way to start the day 馃槈

    A thousand times thank you for your help with this. Things are about to get really interesting from here!

    Kind regards,
    B

  2. George February 3, 2016 at 10:15 am #

    Hi Bastien,

    The referring affiliate is working now. It seemed that is_admin() was conflicting with social login.
    It works normally now, so you can safely disable debugging.

    Cheers

    Cheers

  3. Bastien February 1, 2016 at 8:47 pm #

    Hey George,

    I saw you added some plugins to view the debug log. While debug was ON, debug_log was off so I activated that too and data started to come in. I also enabled ajax log, so there’s also the file “__wpe_admin_ajax.log” now to provide useful information related to ajax calls.

    I wasn’t able to findf the “affiliate id” string you set to be written in the log in “Affiliates Set New User Referrer”. However I did find in the admin ajax log a reference to “[wp_affiliates] => 2” so the data seems to be available at some point. Unfortunately the association is still failing when registering through social networks.

    I’ll wait for your feedback.

    Kind regards,
    Bastien

  4. George January 27, 2016 at 9:16 pm #

    Hi Bastien,

    Thanks for sharing the conversation, i will have a look on login with social networks and let you know.

    Kind regards,
    George

  5. Bastien January 26, 2016 at 7:52 pm #

    Hello George,

    Here’s the reply I got from the RightHere developers :

    Hi,

    Our fix moves the login ajax to admin-ajax.php wich is in the admin.

    The affiliate plugin has an option ‘affiliates_user_registration_on_admin’ in the code. If this option is turned on the affiliate will be associated.

    We could not find this option. however it is in the code in the file lib/core/class-affiliates-user-registration.php

    We will add a small plugin that forces this option ON.

    Will get back to you shortly.

    Regards,
    Alberto Lau.

    —-

    Hi,

    Unfortunately that didnt work. it seems that the affiliate system will not associate the affiliate if the procedure is ran in the admin.

    We will try to find an alternative.

    Regards,
    Alberto Lau.

    —-

    Hi,

    We uploaded a small file to wp-admin/spl.php and pointed the ajax to that file.

    The error messages are showing and the affiliate is being recorded as expected.

    Best regards,
    Alberto Lau.

    I then made some tests and noticed that while it fixed the assignment for manual registration, new users created through social login weren’t assigned…

    Hey Alberto,

    Thank you for the workaround. Manual registration now works indeed and the referring affiliate is now assigned to the new user!

    However if we use one of the social logins to create a new account, the user is still not assigned to the referring affiliate.

    Could it be possibly easily fixed with the code you added?

    Thank you infinitely for your help.

    Kind regards,
    B

    Here’s the reply they gave me :

    Hi,

    If the Affiliate plugin developers provide a procedure we can implement it.

    When login with social network, the action user_register is called, however it doesnt seems that the affiliate plugin is completing the process on this case.

    Regards,
    Alberto Lau.

    Waiting for your feedback.

    Kind regards,
    B

  6. George January 26, 2016 at 1:53 pm #

    Hi Bastien,

    Sorry i didn’t express it pretty clearly in my previous comment.

    You can disable ajax from WLL and since you need it only for false logins, you can enable it when wp_authenticate fails.
    i.e.
    add_action( 'wp_authenticate' , 'failed_authentication' );

    function failed_authentication ( $username ) {
    if ( ! username_exists( $username ) ) {
    //initialize ajax here
    }
    }

    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.

AffiliatesContactJobsTerms & ConditionsPrivacy PolicyDocumentationDownloadsUseful PluginsMy Account

Share