Customise the erasure request form, or put it on your privacy page
[benecaster_erasure_request] is how a listener, follower or donor asks for their personal data to be erased without wp-admin. It files a standard WordPress erasure request: WordPress emails its own confirmation link, and the confirmed request waits under Tools → Erase Personal Data for an administrator. Signed-in members see the same form as the Erase my data section of [benecaster_account], for their account’s address. Put the shortcode on your privacy page, and change its wording through the filter.
[benecaster_erasure_request button_label="Delete my data"] changes the button. $state is form, sent or error.
sent fires for every well-formed address: unknown, already asked, or throttled. Never add anything that depends on whether the address is on file, such as a count or a “we found your account” line. Identical output is what stops the form telling a stranger who is on your list.
Code
<?php
add_filter( 'benecaster_erasure_request_output', function ( string $html, array $atts, string $state ): string {
if ( 'sent' === $state ) {
// Same message for every address, known or not. Keep it that way.
return $html . '<p class="my-erasure-note">' . esc_html__( 'We aim to complete requests within 30 days.', 'my-theme' ) . '</p>';
}
return $html;
}, 10, 3 );
Hooks Used
Need this built rather than just documented? See our services →