Skip to content
Docs
Get RestroPress

Filter

rpress_agree_to_terms_text

Updated
On this page

Filters the error message shown when the customer has not agreed to the terms of use.

Used when checkout validation finds that the terms checkbox was not ticked. The returned string is registered as the agree_to_terms checkout error and displayed with the other checkout errors.

Parameters#

ParameterTypeDescription
$messagestringDefault message, 'You must agree to the terms of use'.

Return value#

string. The error message.

Example#

function my_terms_error_text( $message ) {
	return __( 'Please accept our terms and conditions to place your order.', 'my-textdomain' );
}
add_filter( 'rpress_agree_to_terms_text', 'my_terms_error_text' );

Source#

Applied in:

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