Action
rpress_setup_payment
On this page
Fires after an RPRESS_Payment object has been fully set up.
Runs at the end of RPRESS_Payment::setup_payment, once all standard properties are loaded. Extensions can attach their own properties to the object here.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$payment | RPRESS_Payment | The populated payment object. |
$payment_id | int | ID of the payment post. |
Example#
function my_setup_payment( $payment, $payment_id ) {
$payment->my_reference = get_post_meta( $payment_id, '_my_reference', true );
}
add_action( 'rpress_setup_payment', 'my_setup_payment', 10, 2 );
Notes#
Also runs after save(), which calls setup_payment again.
Source#
Fired from:
includes/payments/class-rpress-payment.php(line 474), inRPRESS_Payment::setup_payment()
See also#
Was this page helpful?
