Action
rpress_before_payment_status_change
On this page
Fires just before a payment's status is changed.
Runs in RPRESS_Payment::update_status after rpress_should_update_payment_status allowed the change and before the post is updated.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$payment_id | int | ID of the payment. |
$status | string | The new status. |
$old_status | string|false | The previous status. |
Example#
function my_before_status_change( $payment_id, $status, $old_status ) {
update_post_meta( $payment_id, '_my_previous_status', $old_status );
}
add_action( 'rpress_before_payment_status_change', 'my_before_status_change', 10, 3 );
Source#
Fired from:
includes/payments/class-rpress-payment.php(line 1462), inRPRESS_Payment::update_status()
See also#
Was this page helpful?
