Last active
February 8, 2023 08:50
-
-
Save andrewlimaza/616061149771fa2279e2262f0efb66d4 to your computer and use it in GitHub Desktop.
Send an invoice email after user signs up for a membership - Paid Memberships Pro
This file contains 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 | |
/** | |
* Send the Paid Memberships Pro invoice email on initial checkout for members. | |
* Add this code below into your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function pmpro_after_checkout_send_invoice_email( $user_id, $order ) { | |
$email = new PMProEmail(); | |
$email->sendInvoiceEmail( $user_id, $order ); | |
} | |
add_action( 'pmpro_after_checkout', 'pmpro_after_checkout_send_invoice_email', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment