Skip to content
Docs
Get RestroPress

Filter

rpress_checkout_service_section_heading

Updated
On this page

Filters the heading text for the service section of the checkout service selector.

Applied in the delivery steps template after the current service label has been filtered by rpress_modify_service_label and stripped of tags. The result is stripped of tags again and printed with esc_html().

Parameters#

ParameterTypeDescription
$headingstringCurrent service label.
$current_servicestringSlug of the active service, such as delivery or pickup.
$enabled_servicestringValue of the enabled service setting, for example delivery_and_pickup, delivery or pickup.

Return value#

string. The heading text.

Example#

add_filter( 'rpress_checkout_service_section_heading', 'my_service_heading', 10, 3 );
function my_service_heading( $heading, $current_service, $enabled_service ) {
	if ( 'pickup' === $current_service ) {
		return __( 'How would you like to collect?', 'my-textdomain' );
	}
	return $heading;
}

Source#

Applied in:

  • templates/rpress-delivery-steps.php (line 35)

See also#

Was this page helpful?