This is to be written in DonationInterface, probably in a helper class to be used by the Special:EmailPreferences page.
Guzzle is just so it's mockable - seems to already be installed in MW vendor directory.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T125272 Epic: Create Preference Center for donors to manage email subscription preferences | |||
Resolved | AndyRussG | T268497 Use Guzzle to make API request to CiviProxy to retrieve opt-in / opt-out fields. |
Event Timeline
@Ejegg I was considering looking at this tomorrow. Want to post any thoughts you've had about it? I'll have to explore CiviProxy documentation a bit.
This looks like what I need documentation wise: https://docs.civicrm.org/civiproxy/en/latest/outside/.
Hey... can anyone provide details on how the values of the two boolean fields that Civiproxy is returning (is_opt_out and is_opt_in) map to the selection of the mutually exclusive options shown to the user on the form (" I love hearing about Wikimedia, keep your regular schedule!" vs. "Unsubscribe me from all emails")?
I think we need to translate in both directions, that is Civi->Email-Pref-Ctr and Email-Pref-Ctr->Civi. I don't know if those two boolean fields are sufficient to determine the value to show on the form?
Also, I don't see a task for the queue consumer that will read the messages and change the settings in Civi? Am I missing something? (The need for that bit has indeed been mentioned; see for example, this comment: T125272#5423248.)
Change 677018 had a related patch set uploaded (by AndyRussG; author: AndyRussG):
[mediawiki/extensions/DonationInterface@master] Email Preference Center: Guzzle connetor to Civiproxy
@AndyRussG the is_opt_out field is the older one and defaulted to 0. is_opt_in is newer and defaults to NULL, indicating that the donor never saw an opt-in checkbox.
So if is_opt_out is 1 OR is_opt_in is 0, treat the donor as unsubscribed.
If is_opt_out is 0 AND is_opt_in is either 1 or NULL, treat the donor as subscribed ('regular schedule').
Change 677308 had a related patch set uploaded (by AndyRussG; author: AndyRussG):
[wikimedia/fundraising/dev@master] Add settings for email-pref-ctr connection to civiproxy
Change 677308 merged by Ejegg:
[wikimedia/fundraising/dev@master] Add settings for email-pref-ctr connection to civiproxy
Change 677018 merged by jenkins-bot:
[mediawiki/extensions/DonationInterface@master] Email Preference Center: Guzzle connetor to Civiproxy