Skip to content
Docs
Get RestroPress

Filter

rpress_checkout_terms_agreement_html

Updated
On this page

Filters the HTML of the agree to terms section before it is output.

Runs in rpress_terms_agreement() with the section markup built from the agreement text, label and checkbox. The result is passed through wp_kses() with a fixed list of allowed tags, so tags and attributes outside that list are removed.

Parameters#

ParameterTypeDescription
$html_outputstringThe terms agreement markup.

Return value#

string. The markup to output.

Example#

function my_terms_agreement_html( $html_output ) {
	return str_replace( 'Show Terms', esc_html__( 'Read the terms', 'my-textdomain' ), $html_output );
}
add_filter( 'rpress_checkout_terms_agreement_html', 'my_terms_agreement_html', 10, 1 );

Notes#

Runs only when the agree-to-terms option is enabled.

Source#

Applied in:

  • includes/checkout/template.php (line 1055), in rpress_terms_agreement()
Was this page helpful?