Filter
rpress_checkout_terms_agreement_html
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#
| Parameter | Type | Description |
|---|---|---|
$html_output | string | The 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), inrpress_terms_agreement()
Was this page helpful?
