Skip to content

Instantly share code, notes, and snippets.

View LiamBailey's full-sized avatar
💭
Build With Heart - Codeable.io

Liam Bailey LiamBailey

💭
Build With Heart - Codeable.io
View GitHub Profile
protected function get_location_select_html( $object_id, $chosen_location = null, $product = null ) {
$object_type = $this->get_object_type();
$enhanced_search = $this->use_enhanced_search();
$field_name = wc_local_pickup_plus_shipping_method()->is_per_item_selection_enabled() ? '_pickup_location_id' : '_shipping_method_pickup_location_id';
if ( $using_single_location = $this->get_product_pickup_location( $product ) ) {
$chosen_location = $using_single_location;
$using_single_location = true;
} elseif ( ! $chosen_location ) {