Skip to content

Commit

Permalink
Adding !!refund_date!! to the refund user and admin emails.
Browse files Browse the repository at this point in the history
  • Loading branch information
kimcoleman committed Feb 14, 2025
1 parent 64b1443 commit ab43ab7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public static function get_default_body() {
<p>Account: !!display_name!! (!!user_email!!)</p>
<p>
Order #!!order_id!! on !!order_date!!<br />
Order #!!order_id!! refunded on !!refund_date!!<br />
Total Refunded: !!order_total!!
</p>
Expand All @@ -110,6 +110,7 @@ public static function get_email_template_variables_with_description() {
'!!order_id!!' => esc_html__( 'The order ID.', 'paid-memberships-pro' ),
'!!order_total!!' => esc_html__( 'The total amount of the order.', 'paid-memberships-pro' ),
'!!order_date!!' => esc_html__( 'The date of the order.', 'paid-memberships-pro' ),
'!!refund_date!!' => esc_html__( 'The refund date of the order.', 'paid-memberships-pro' ),
'!!billing_address!!' => esc_html__( 'The complete billing address of the order.', 'paid-memberships-pro' ),
'!!billing_name!!' => esc_html__( 'The billing name of the order.', 'paid-memberships-pro' ),
'!!billing_street!!' => esc_html__( 'The billing street of the order.', 'paid-memberships-pro' ),
Expand Down Expand Up @@ -175,6 +176,7 @@ public function get_email_template_variables() {
'order_id' => $order->code,
'order_total' => $order->total,
'order_date' => date_i18n( get_option( 'date_format' ), $order->timestamp ),
'refund_date' => date_i18n( get_option( 'date_format' ), current_time( 'timestamp' ) ),
'billing_name' => $order->billing->name,
'billing_street' => $order->billing->street,
'billing_street2' => $order->billing->street2,
Expand Down
6 changes: 4 additions & 2 deletions classes/email-templates/class-pmpro-email-template-refund.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ public static function get_default_body() {
<p>Account: !!display_name!! (!!user_email!!)</p>
<p>
Order #!!order_id!! on !!order_date!!<br />
Order #!!order_id!! refunded on !!refund_date!!<br />
Total Refunded: !!order_total!!
</p>
<p>Log in to your membership account here: !!login_url!!</p>
<p>To view an online version of this order, click here: !!order_url!!</p>
<p>View an online version of this order here: !!order_url!!</p>
<p>If you did not request this refund and would like more information please contact us at !!siteemail!!</p>', 'paid-memberships-pro' ) );
}
Expand All @@ -113,6 +113,7 @@ public static function get_email_template_variables_with_description() {
'!!order_id!!' => esc_html__( 'The order ID.', 'paid-memberships-pro' ),
'!!order_total!!' => esc_html__( 'The total amount of the order.', 'paid-memberships-pro' ),
'!!order_date!!' => esc_html__( 'The date of the order.', 'paid-memberships-pro' ),
'!!refund_date!!' => esc_html__( 'The refund date of the order.', 'paid-memberships-pro' ),
'!!billing_address!!' => esc_html__( 'The complete billing address of the order.', 'paid-memberships-pro' ),
'!!billing_name!!' => esc_html__( 'The billing name of the order.', 'paid-memberships-pro' ),
'!!billing_street!!' => esc_html__( 'The billing street of the order.', 'paid-memberships-pro' ),
Expand Down Expand Up @@ -175,6 +176,7 @@ public function get_email_template_variables() {
'order_id' => $order->code,
'order_total' => $order->total,
'order_date' => date_i18n( get_option( 'date_format' ), $order->timestamp ),
'refund_date' => date_i18n( get_option( 'date_format' ), current_time( 'timestamp' ) ),
'billing_name' => $order->billing->name,
'billing_street' => $order->billing->street,
'billing_street2' => $order->billing->street2,
Expand Down

0 comments on commit ab43ab7

Please sign in to comment.