Action
rpress_anonymize_payment
On this page
Fires while a payment is being anonymized so extensions can anonymize more data.
Runs in _rpress_anonymize_payment() when the action for the payment status is 'anonymize'. By this point the IP address, email, address lines and names have been cleared on the object and the post title has been updated, and the hook fires just before $payment->save() persists the changes. Changes made to the payment object in the callback are therefore saved with it.
Available since RestroPress 2.9.2.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$payment | RPRESS_Payment | The payment being anonymized. |
Example#
add_action( 'rpress_anonymize_payment', 'my_anonymize_payment_meta', 10, 1 );
function my_anonymize_payment_meta( $payment ) {
delete_post_meta( $payment->ID, '_my_delivery_phone' );
}
Source#
Fired from:
includes/privacy-functions.php(line 382), in_rpress_anonymize_payment()
See also#
Was this page helpful?
