Filter
rpress_checkout_service_section_heading
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#
| Parameter | Type | Description |
|---|---|---|
$heading | string | Current service label. |
$current_service | string | Slug of the active service, such as delivery or pickup. |
$enabled_service | string | Value 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?
