New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(admin-email): improve management of contact info in emails #3070 #3378
Conversation
$offline_address = give_get_option( 'contact_offline_mailing_address' ); | ||
|
||
if ( false === $offline_address ) { | ||
return '<em>' . get_bloginfo( 'sitename' ) . '</em><br> <em>111 Not A Real St.</em><br> <em>Anytown, CA 12345 </em><br>'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Sidsector9 use sprintf
to format code
'id' => "contact_offline_mailing_address", | ||
'desc' => __( 'Set the Offline Mailing Address. Use the {offline_mailing_address} tag to use this in the email templates.', 'give' ), | ||
'type' => 'wysiwyg', | ||
'default' => ' <em>' . get_bloginfo( 'sitename' ) . '</em><br> <em>111 Not A Real St.</em><br> <em>Anytown, CA 12345 </em><br>', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Sidsector9 I think we can use give_email_offline_mailing_address
fn here instead of repeating data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Sidsector9 check review
__( 'Please click the link to access your donation history on <a target="_blank" href="%1$s">%1$s</a>. If you did not request this email, please contact <a href="mailto:%2$s">%2$s</a>.', 'give' ), | ||
get_bloginfo( 'url' ), | ||
get_bloginfo( 'admin_email' ) | ||
__( 'Please click the link to access your donation history on {site_url}. If you did not request this email, please contact {admin_email}.', 'give' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Sidsector9 do we need sprintf
here?
@slewisma I wanted to give you a heads up that the three new email tags are coming in Give 2.2.0 based on your request: {admin_email} You'll define the value of these fields in settings and the email tags will be used to pre-populate the templates. If you need to customize a specific form's email notification, you can of course remove the tag and enter your own content into the form's email content. |
Call SummaryParticipants: @DevinWalker @ravinderk and @Sidsector9
|
Closes #3070
Description
This PR adds a feature to add admin email address and offline mailing address in a common place. This makes it easier to export Give Settings from one URL and import it to a different URL without the need to manually change the admin email address, site URL, site name and the offline mailing address. More details can be found in the video below.
The following email tags are added in this feature:
{admin_email}
{offline_mailing_address}
{site_url}
How Has This Been Tested?
By sending and previewing emails.
Video:
https://www.useloom.com/share/d9756dd20a874037bd9a15c8fa17c78c
Checklist: