1. Home
  2. Developers
  3. wpinv_recurring_record_payment


Fires after an recurring payment has been recorded.

do_action( 'wpinv_recurring_record_payment', int $invoice_id, int $parent_invoice_id, array $subscription_args );



(int) The Invoice ID.


(int) The Parent Invoice ID.


(array) The array of subscription data.


Handle event of recurring payment recorded for the invoice.

function _wpi_wpinv_recurring_record_payment( $invoice_id, $parent_invoice_id, $subscription_args ) {
    // Invoice object
    $invoice = wpinv_get_invoice( $invoice_id );
    // Parent Invoice object
    $invoice = wpinv_get_invoice( $parent_invoice_id );

    // Invoice items
    $cart_items = $invoice->get_cart_details();

    // Do your stuff here
add_action( 'wpinv_recurring_record_payment', '_wpi_wpinv_recurring_record_payment', 10, 3 );
Was this helpful to you? Yes No