Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Last active February 8, 2023 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save andrewlimaza/616061149771fa2279e2262f0efb66d4 to your computer and use it in GitHub Desktop.
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
<?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