Action
rpress_popup_service_time
On this page
Fires inside the date and time popup to let extensions output service time fields.
Runs in the service popup template with the active service type. Its output is captured with an output buffer; if it contains visible text or form markup it is printed in the popup in place of the standard popup service content. If nothing is output, the standard tabs and time selectors are used.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$service_type | string | Active service type, such as delivery or pickup. |
Example#
add_action( 'rpress_popup_service_time', 'my_popup_service_time' );
function my_popup_service_time( $service_type ) {
if ( 'pickup' === $service_type ) {
echo '<p>' . esc_html__( 'Pickup is at the front counter.', 'my-textdomain' ) . '</p>';
}
}
Notes#
Output is buffered and tested for markup, so echo content rather than returning it. Any markup that matches a form element or a visible text node replaces the default popup content.
Source#
Fired from:
templates/rpress-datetime-popup.php(line 37)
See also#
Was this page helpful?
