Filter
rpress_privacy_payment_status_action_{$status}
On this page
Filters the privacy action taken for a payment with a given status.
The dynamic part of the name is the payment status (for example publish, refunded, revoked, failed, abandoned, pending or processing). It runs in _rpress_privacy_get_payment_action() after the action has been read from the payment_privacy_status_action_{status} setting or defaulted: anonymize for publish, refunded and revoked, delete for failed and abandoned, and none otherwise. The action decides whether a payment is deleted, anonymized or left alone during erasure requests, and a status of none blocks anonymizing the customer.
Available since RestroPress 2.9.2.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$action | string | One of 'none', 'delete' or 'anonymize'. |
$payment | RPRESS_Payment | The payment being evaluated. |
Return value#
string. One of 'none', 'delete' or 'anonymize'.
Example#
add_filter( 'rpress_privacy_payment_status_action_pending', 'my_pending_payment_privacy_action', 10, 2 );
function my_pending_payment_privacy_action( $action, $payment ) {
return 'anonymize';
}
Source#
Applied in:
includes/privacy-functions.php(line 437), in_rpress_privacy_get_payment_action()
See also#
Was this page helpful?
