View Categories

Mix Places Autocomplete Address Types

By default you can only choose one address type for the Places Autocomplete feature to return.

In Places Autocomplete (Legacy) it is only possible to mix two of these address types. The geocode and establishment types. Mixing any other type will result in an error from Google.

Use the block of code below to override the default single address type in favor for the geocode and establishment types.

PHP
function lpac_cc_places_autocomplete_mix_types(){
	return array('geocode', 'establishment');
}
add_filter('lpac_pro_places_autocomplete_types', 'lpac_cc_places_autocomplete_mix_types');

In Places Autocomplete (New) you can use the same code above, but you have the flexibility to mix five (5) address types. The address types that can be mixed must be selected from either Table A or Table B on the Google official documentation.

Boost Your Sales w/ Kikote Pro!

Get 25% off with code: