Created
December 11, 2014 18:48
-
-
Save dancameron/c1524d3b1cfadcd43939 to your computer and use it in GitHub Desktop.
Sending an Invoice
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 | |
// Sending the invoice notification using an array of user ids | |
do_action( 'send_invoice', $invoice, $user_ids ); | |
// Users are associated to the client, which is associated to | |
// the invoice. To get the list of associated user ids the function | |
// SI_Notifications_Control::get_document_recipients( $invoice ) can | |
// be used. | |
$invoice = SI_Invoice::get_instance( $invoice_id ); // $invoice_id is the post id. | |
$user_ids = SI_Notifications_Control::get_document_recipients( $invoice ); | |
do_action( 'send_invoice', $invoice, $user_ids ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment