Action
rpress_payment_save
On this page
Fires from RPRESS_Payment::save for pending data keys that have no built-in handler.
RPRESS_Payment::save loops over the properties changed since the object was loaded and handles the standard ones itself. Any other key reaches this action so extensions can persist their own data. The key tells the callback which property was changed.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$payment | RPRESS_Payment | The payment being saved. |
$key | string | The pending property name that has no built-in handler. |
Example#
function my_save_payment_data( $payment, $key ) {
if ( 'my_reference' === $key ) {
$payment->update_meta( '_my_reference', $payment->my_reference );
}
}
add_action( 'rpress_payment_save', 'my_save_payment_data', 10, 2 );
Source#
Fired from:
includes/payments/class-rpress-payment.php(line 853), inRPRESS_Payment::save()
See also#
Was this page helpful?
