[Emails for recurring donations] Custom the default messages #6074
Labels
keep-fresh
"Keep Fresh" issues should not be marked as stale.
type: enhancement
An improvement to existing user-facing functionality
User Story
As a developper, I want to customize the default emails for a recurring donation, especially when a subscription is cancelled.
Details
In
give-recurring/includes/admin/emails
, filesclass-subscription-cancelled-email.php
,class-subscription-cancelled-admin-email.php
andclass-subscription-completed-email.php
.In the
Give_Subscription_Cancelled_Email
,Give_Subscription_Completed_Email
,Give_Subscription_Cancelled_Admin_Email
classes, the default email message does not have a hook.There is a hook to display the message:
return apply_filters( "give_{$this->config['id']}_get_email_message", $message, $this );
But this hook has no impact on the email displayed in the settings. It has an impact on the preview email which will therefore be different and the sent email. If this email is configured in the settings, it will be overwritten by this hook.
Suggested solution
Do the same as in GiveWP : add a get_default_message() function with a hook, and maybe remove that existing hook.
I solved the problem with two hooks:
The text was updated successfully, but these errors were encountered: