Skip to content
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

Abstract email templates into individual classes #3234

Merged
merged 64 commits into from
Jan 30, 2025
Merged
Changes from 1 commit
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
c895c45
Created abstract PMPro_Email_Template class
dparker1005 Oct 28, 2024
73b6626
Added PMPro_Email_Template_Cancel class
dparker1005 Oct 28, 2024
368dab3
Merge pull request #3181 from dparker1005/create-email-template-class
dparker1005 Nov 4, 2024
e7801ed
* Fix for sitename variable
MaximilianoRicoTabo Nov 5, 2024
686ad9a
Merge pull request #3187 from MaximilianoRicoTabo/bugfixing/sitename
dparker1005 Nov 6, 2024
64105a4
* Add Change Membership Classes ( admin and member )
MaximilianoRicoTabo Nov 6, 2024
414c2c9
* Add the body in the send function in the abstract email template class
MaximilianoRicoTabo Nov 7, 2024
1dd5827
* Add cancel admin class
MaximilianoRicoTabo Nov 7, 2024
f28ccea
* Remove added classes from email-templates array
MaximilianoRicoTabo Nov 8, 2024
b5eb2f9
*Rename admin change classes
MaximilianoRicoTabo Nov 8, 2024
83533eb
Tweaking admin changed templates
dparker1005 Nov 11, 2024
88b4ef2
Spacing to match original email template
dparker1005 Nov 11, 2024
fb6611e
Merge pull request #3188 from MaximilianoRicoTabo/add-admin-change-class
dparker1005 Nov 11, 2024
2bef7f2
Add payment failure classes
MaximilianoRicoTabo Nov 12, 2024
749b941
* Add canceled autorenewal template / classes for member and admin
MaximilianoRicoTabo Nov 14, 2024
6d95fbb
* Add checkout templates
MaximilianoRicoTabo Nov 15, 2024
f0a511c
* Add credit card expiring email class
MaximilianoRicoTabo Dec 2, 2024
c68d73b
[ENHANCEMENT] * Add Membership expiring email class
MaximilianoRicoTabo Dec 4, 2024
6e80dae
*add expired membership email class
MaximilianoRicoTabo Dec 3, 2024
480282e
* Add refund email classes
MaximilianoRicoTabo Dec 9, 2024
d4ed471
* Add Payment Email Classes
MaximilianoRicoTabo Dec 8, 2024
5a5f813
* Add billing info updated and billing info updated admin classes
MaximilianoRicoTabo Nov 11, 2024
9d8e83e
Merge pull request #3199 from MaximilianoRicoTabo/enhancement/add-cen…
dparker1005 Dec 13, 2024
a5906d7
* Rename billing info updated and billing info updated admin classes…
MaximilianoRicoTabo Dec 13, 2024
fccf2f8
* Remove header_name variable from children class as it's already pre…
MaximilianoRicoTabo Dec 13, 2024
7b7ec9a
[BUGFIXING] Send Invoice email from edit order page takes the wrong user
MaximilianoRicoTabo Dec 17, 2024
a4e187f
Merge branch 'enhancement/email-template-abstraction' into enhancemen…
dparker1005 Dec 17, 2024
a927512
Merge pull request #3197 from MaximilianoRicoTabo/enhancement/add-bil…
dparker1005 Dec 17, 2024
e7ec36b
Merge branch 'enhancement/email-template-abstraction' into enhancemen…
dparker1005 Dec 17, 2024
33804e4
* Remove unnecesary header_name from templates
MaximilianoRicoTabo Dec 17, 2024
e13b0c7
* Remove unnecesary header_name variable from child template
MaximilianoRicoTabo Dec 17, 2024
3194a47
* Remove unnecesary variable header_name from child template
MaximilianoRicoTabo Dec 17, 2024
b3ff95c
* Remove unnecessary header_name variable from child template
MaximilianoRicoTabo Dec 17, 2024
fa62cb3
* Remove unnecessary header_name variable from child template
MaximilianoRicoTabo Dec 17, 2024
0049752
Merge pull request #3193 from MaximilianoRicoTabo/enhancement/add-bil…
dparker1005 Dec 18, 2024
c8a76a4
Merge branch 'enhancement/email-template-abstraction' into enhancemen…
dparker1005 Dec 18, 2024
ac68088
Fixing file name
dparker1005 Dec 18, 2024
c99daa6
Adding missing global
dparker1005 Dec 18, 2024
b72ee4d
Merge pull request #3202 from MaximilianoRicoTabo/enhancement/add-che…
dparker1005 Dec 18, 2024
bcc3d90
Merge branch 'enhancement/email-template-abstraction' into enhancemen…
dparker1005 Dec 18, 2024
f664370
Merge pull request #3218 from MaximilianoRicoTabo/enhancement/add-cre…
dparker1005 Dec 18, 2024
b148ad7
Removing header name
dparker1005 Dec 18, 2024
9ce0d3c
Fixing missing variables
dparker1005 Dec 18, 2024
1ce3e8f
Merge branch 'enhancement/email-template-abstraction' into enhancemen…
dparker1005 Dec 18, 2024
3637eaf
Fixing broken variables
dparker1005 Dec 18, 2024
a47146e
Make sure that we can get an enddate
dparker1005 Dec 18, 2024
12f4c97
Merge branch 'enhancement/email-template-abstraction' into enhancemen…
dparker1005 Dec 18, 2024
8bdff4b
Merge pull request #3220 from MaximilianoRicoTabo/enhancement/members…
dparker1005 Dec 18, 2024
24dc95a
Merge branch 'enhancement/email-template-abstraction' into enhancemen…
dparker1005 Dec 18, 2024
d0c9a62
Merge pull request #3221 from MaximilianoRicoTabo/enhancement/members…
dparker1005 Dec 18, 2024
26f54af
Fixing sending payment reminder email
dparker1005 Dec 18, 2024
89c77c5
Fixing broken variables
dparker1005 Dec 18, 2024
0f56c2d
Merge branch 'enhancement/email-template-abstraction' into enhancemen…
dparker1005 Dec 18, 2024
85e17db
Merge pull request #3227 from MaximilianoRicoTabo/enhancement/payment…
dparker1005 Dec 18, 2024
9c74e72
Merge branch 'enhancement/email-template-abstraction' into enhancemen…
dparker1005 Dec 18, 2024
b6747f7
Merge pull request #3228 from MaximilianoRicoTabo/enhancement/add-ref…
dparker1005 Dec 18, 2024
daf9da1
Fixing payment action required email for Stripe
dparker1005 Dec 18, 2024
770ff46
Fixing incorrect variable usage and subject line that was not meant t…
kimcoleman Jan 18, 2025
1ddf06c
Merge pull request #3265 from kimcoleman/fix-admin-change-templates
dparker1005 Jan 20, 2025
a486e87
Switching to !!billing_address!! instead of individual fields
dparker1005 Jan 22, 2025
33268c1
Using global !!levels_link!!, encouraging _url instead of _link vars
dparker1005 Jan 28, 2025
fd4da01
Removing duplicate template variable
dparker1005 Jan 29, 2025
57ca669
Escaping
dparker1005 Jan 30, 2025
fc230b7
Merge branch 'v3.4' into enhancement/email-template-abstraction
dparker1005 Jan 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixing broken variables
dparker1005 committed Dec 18, 2024
commit 89c77c55d3d024caaf386d7e78dbedd4343d00e0
Original file line number Diff line number Diff line change
@@ -145,7 +145,7 @@ public function get_email_template_variables() {
$user = $this->user;
$order_url = $this->order_url;
return array(
"subject" => $this->subject,
"subject" => $this->get_default_subject(),
"name" => $user->display_name,
"user_login" => $user->user_login,
"display_name" => $user->display_name,
Original file line number Diff line number Diff line change
@@ -140,7 +140,7 @@ public function get_email_template_variables() {
$user = $this->user;
$order_url = $this->order_url;
return array(
"subject" => $this->subject,
"subject" => $this->get_default_subject(),
"name" => $user->display_name,
"user_login" => $user->user_login,
"display_name" => $user->display_name,
Original file line number Diff line number Diff line change
@@ -89,7 +89,8 @@ public static function get_default_body() {
* @return string The email address to send the email to.
*/
public function get_recipient_email() {
return $this->user->user_email;
$user = get_userdata( $this->subscription_obj->get_user_id() );
return $user->user_email;
}

/**
@@ -100,7 +101,8 @@ public function get_recipient_email() {
* @return string The name of the email recipient.
*/
public function get_recipient_name() {
return $this->user->display_name;
$user = get_userdata( $this->subscription_obj->get_user_id() );
return $user->display_name;
}