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

Additional email template variables for the Billable Invoice email #2947

Conversation

MaximilianoRicoTabo
Copy link
Contributor

  • Get membership_level_name and membership_level_id from $order object and add to data object before call sendEmail function in pmproemail class
  • Add level name to billable_invoice template
image image

All Submissions:

Changes proposed in this Pull Request:

Resolves #2891 .

How to test the changes in this Pull Request:

  1. Apply this patch
  2. Go to Memberships->Oders
  3. Look into the Orders WP_List_Table and click email link to send en billing invoice from that order.
  4. Check results.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you successfully run tests with your changes locally?

Changelog entry

Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.

 * Get membership_level_name and membership_level_id from $order object and add to data object before call sendEmail function in pmproemail class
 * Add level name to billable_invoice template
@@ -55,7 +55,7 @@
'billable_invoice' => array(
'subject' => __( 'Invoice for order #: !!order_code!!', 'paid-memberships-pro' ),
'description' => __( 'Billable Invoice', 'paid-membershps-pro' ),
'body' => __( '<p>Thank you for your membership to !!sitename!!. Below is your invoice for order #: !!order_code!!</p>
'body' => __( '<p>Thank you for your membership to !!membership_level_name!! at !!sitename!!. Below is your invoice for order #: !!order_code!!</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other email templates, such as all the checkout templates, do not include the level name that was purchased. Reverting this change to stay consistent with those other email template defaults.

Suggested change
'body' => __( '<p>Thank you for your membership to !!membership_level_name!! at !!sitename!!. Below is your invoice for order #: !!order_code!!</p>
'body' => __( '<p>Thank you for your membership to !!sitename!!. Below is your invoice for order #: !!order_code!!</p>

 * Remove level name from email template as suggested.
@ideadude ideadude merged commit d528772 into strangerstudios:dev Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Additional email template variables for the Billable Invoice email
3 participants