wpinv_recurring_add_subscription_payment
Fires after a new invoice created for recurring payment.
do_action( 'wpinv_recurring_add_subscription_payment', WPInv_Invoice $invoice, WPInv_Invoice $parent_invoice, array $subscription_args );
Parameters
- $invoice
-
(object) WPInv_Invoice object.
- $parent_invoice
-
(object) WPInv_Invoice object of parent invoice.
- $subscription_args
-
(array) The array of subscription data.
Examples
Handle event of new invoice created for recurring payment.
function _wpi_wpinv_recurring_add_subscription_payment( $invoice, $parent_invoice, $subscription_args ) { // Invoice items $cart_items = $invoice->get_cart_details(); // Do your stuff here } add_action( 'wpinv_recurring_add_subscription_payment', '_wpi_wpinv_recurring_add_subscription_payment', 10, 3 );