Skip to content
Docs
Get RestroPress

Action

rpress_delivery_location_field

Updated
On this page

Fires to print the location selector in the service type step.

Runs in the delivery option templates to print a location or branch selector. Core adds no callback, so multi-location add-ons hook here. In the delivery steps template the output is buffered and only shown when it contains a form control or visible text.

Example#

function my_delivery_location_field() {
	echo '<select name="my_branch"><option value="main">' . esc_html__( 'Main branch', 'my-textdomain' ) . '</option></select>';
}
add_action( 'rpress_delivery_location_field', 'my_delivery_location_field', 10, 0 );

Notes#

The delivery steps template discards output that has only hidden inputs and no visible text.

Source#

Fired from:

  • templates/grid/delivery-option.php (line 73)
  • templates/list/delivery-option.php (line 80)
  • templates/rpress-delivery-steps.php (line 83)
Was this page helpful?