Skip to content

Instantly share code, notes, and snippets.

@dparker1005
Last active June 14, 2019 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dparker1005/59f6a854e980d5595e1a4280f154cfad to your computer and use it in GitHub Desktop.
Save dparker1005/59f6a854e980d5595e1a4280f154cfad to your computer and use it in GitHub Desktop.
Send 'invoice' email notification when user is added using Add Member Admin Add on.
<?php
// Add this function to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
function pmproama_send_invoice( $user_id ) {
$order = new MemberOrder();
$order->getLastMemberOrder( $user_id );
$pmproemail = new PMProEmail();
$pmproemail->sendInvoiceEmail( get_userdata( $user_id ), $order );
}
add_action( 'pmpro_add_member_added', 'pmproama_send_invoice' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment