Plugin Author
Franky
(@liedekef)
This should help:
https://plugins.trac.wordpress.org/changeset/2724404/
(only the DISTINCT-changed lines should already be enough, the rest is more cosmetic)
Thread Starter
Fred17
(@f14m07)
test next birthday 21 mai…
Plugin Author
Franky
(@liedekef)
Or you change the info for a person to tomorrow 🙂
Thread Starter
Fred17
(@f14m07)
Hi
It works but there are as many emails sent as there are active memberships. If the person is identified and active in 2 memberships he/she receives 2 emails
Plugin Author
Franky
(@liedekef)
That’s weird. In my tests this works fine, only 1 email is sent. Can this be the cause of another person with the same email? Is it the same person id that is being used for both memberships?
Thread Starter
Fred17
(@f14m07)
Yes. The same person/email. There is two birthday today for two people. Each of them are members of two different memberships. May be the sending is hook to the member and not the person ?
Thread Starter
Fred17
(@f14m07)
Tomorrow I will test for a person in only one membership
Plugin Author
Franky
(@liedekef)
Finally found the problem: I’m just calling that function twice 🙂
This fixes it (apply just the delete-line change in eme_cron.php):
https://plugins.trac.wordpress.org/changeset/2725363
Thread Starter
Fred17
(@f14m07)
Thanks, I did it. Final answer tomorrow.
Thread Starter
Fred17
(@f14m07)
Well it is correct for my local site. But not in my site in production, where still two mails this morning! Perhaps a delay in the correction being taken into account
-
This reply was modified 1 month, 1 week ago by
Fred17.
Plugin Author
Franky
(@liedekef)
Can you check in eme_cron.php that there’s now only 1 call to the function eme_people_birthday_emails ?
And that function is called in the WP scheduled action called “eme_cron_daily_actions”. Currently that’s the only action in there, so if you have something like WP Cron Manager installed, you can run that action again and again to check with a user. I’ll check later on too.
Thread Starter
Fred17
(@f14m07)
The mystery is over. I had changed the birthday of two people with the same first name for my tests, and I had received their email but to two different addresses. I thought the email was duplicate but it was not and was sent to 2 different addresses.
So everything is ok for me now. Thank you for your support, always fast and efficient.
Have a nice day
Frédéric
Plugin Author
Franky
(@liedekef)
Good to hear and glad it all got sorted out!