Action
rpress_resume_payment_refused
On this page
Fires when checkout declines to resume the session's pending payment.
Runs in rpress_insert_payment() when the payment looks recoverable but core could not claim it, or the resume check (another claim, rpress_can_resume_payment or recoverability) failed. Checkout creates a new payment and leaves the old one untouched. The new payment does not exist yet when the action runs.
Available since RestroPress 3.5.1.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$payment_id | int | The payment left untouched. |
$payment_data | array | Data for the new payment. |
Example#
add_action( 'rpress_resume_payment_refused', 'my_resume_refused', 10, 2 );
function my_resume_refused( $payment_id, $payment_data ) {
rpress_insert_payment_note( $payment_id, __( 'A later checkout created a separate order instead of changing this one.', 'my-plugin' ) );
}
Notes#
If the new data reuses the old purchase key, core generates a new key after this action, so do not rely on $payment_data['purchase_key'].
Source#
Fired from:
includes/payments/functions.php(line 181), inrpress_insert_payment()
See also#
Was this page helpful?
