Last active
June 14, 2019 16:05
-
-
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.
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 | |
// 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