Skip to content
Docs
Get RestroPress

Filter

rpress_agree_to_privacy_policy_text

Updated
On this page

Filters the error message shown when the customer has not agreed to the privacy policy.

Used when checkout validation finds that the privacy policy checkbox was not ticked. The returned string is registered as the agree_to_privacy_policy checkout error.

Parameters#

ParameterTypeDescription
$messagestringDefault message, 'You must agree to the privacy policy'.

Return value#

string. The error message.

Example#

function my_privacy_error_text( $message ) {
	return __( 'Please accept the privacy policy to continue.', 'my-textdomain' );
}
add_filter( 'rpress_agree_to_privacy_policy_text', 'my_privacy_error_text' );

Source#

Applied in:

  • includes/process-purchase.php (line 507), in rpress_purchase_form_validate_agree_to_privacy_policy()
Was this page helpful?