Created
July 13, 2026 07:21
-
-
Save andrewlimaza/abe532b2f585be53c5c01e5f21b1d0ea to your computer and use it in GitHub Desktop.
PMPro PDF Invoices add PDF Invoice attachment to "Membership Expiring" emails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Include PDF in the membership expiring email. | |
| * This will get the member's last successful order and attach it. | |
| * Add this code to your site by following this guide - https://yoohooplugins.com/customize-wordpress/ | |
| */ | |
| add_filter( 'pmpropdf_pdf_included_email_templates', function( $templates ) { | |
| // Add membership_expiring to the list of templates that get PDF invoices | |
| $templates[] = 'membership_expiring'; | |
| return $templates; | |
| } ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment