Your cart is currently empty!
Association Not Working #2
—
by
This is a follow-up to : https://www.itthinx.com/topic/association-not-working/
Hey George,
Thank you for the suggestion, however I’m really not sure how I would go about achieving this.
What do you mean by initiating ajax only on failed logins?
That’s not an option provided by WLL.
Why does changing the ajax init prevent Affiliates Permanent from making the association? Would it be possible instead to force Affiliates to make the association regardless of how ajax was initiated?
Regards,
B
Posted in Affiliates Permanent
Comments
6 responses to “Association Not Working #2”
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
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
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
Hi Bastien,
Thanks for sharing the conversation, i will have a look on login with social networks and let you know.
Kind regards,
George
Hello George,
Here’s the reply I got from the RightHere developers :
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…
Here’s the reply they gave me :
Waiting for your feedback.
Kind regards,
B
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