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 ); |