1. Home
  2. Developers
  3. wpinv_complete_payment

wpinv_complete_payment

Fires after an invoice has been marked as paid.

do_action( 'wpinv_complete_payment', int $invoice_id );

Parameters

$invoice_id

(int) The Invoice ID.

Examples

Simple example to handle paid invoice event.

function _wpi_wpinv_complete_payment( $invoice_id ) {
    // Invoice object
    $invoice = wpinv_get_invoice( $invoice_id );

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

    // Do your stuff here
}
add_action( 'wpinv_complete_payment', '_wpi_wpinv_complete_payment', 10, 1 );
Was this helpful to you? Yes 1 No