[wp-trac] [WordPress Trac] #44314: `user_confirmed_action_email_content` filter run on two different strings
WordPress Trac
noreply at wordpress.org
Thu Jul 5 08:17:28 UTC 2018
#44314: `user_confirmed_action_email_content` filter run on two different strings
--------------------------+---------------------
Reporter: desrosj | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.9.7
Component: Privacy | Version: 4.9.6
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+---------------------
Comment (by lifeforceinst):
While 'user_confirmed_action_email_content' is called by both
_wp_privacy_send_erasure_fulfillment_notification() and
_wp_privacy_send_request_confirmation_notification() there are two items
passed being: $email_text, $email_data.
$email_data is an array, which contains a number of pieces of information
One option could be to add to the array of $email_data an option called
$request_type of "request_export" or "request_erasure".
In this way you would not need to create new hooks, depreciate the
existing hook, but just have an additional parameter which people can use
to determine which type of email is being generated.
While on this topic of $email_data it could also be useful to pass an
additional parameter $message_sender, and process that appropriately so
that there is any easy way to hook in to customise all aspects of the
email including: sender, title, recipient and content.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44314#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list