Forked from andrewlimaza/send-invoice-after-checkout.php
Created
October 11, 2018 10:18
-
-
Save travislima/8027b0f081506c7c3d68878296358750 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
This recipe is included in the blog post on "Send members an additional invoice via email after Membership Checkout" at Paid Memberships Pro here: https://www.paidmembershipspro.com/send-members-an-additional-invoice-via-email-after-membership-checkout/