This filter allows you to change the pattern that’s used to filter out the location data from the Geocode API response.
By default, it filters out the ‘postal_code’, ‘postal_code_prefix,postal_code’ value, but you can change this to the following values.
You can see an example of the returned data from the Geocode API here.
If the postal_code field is not included in the response, then it will default to the format_address field. This will show the address in this format: Oudezijds Achterburgwal 1921, 1012 DX Amsterdam, Netherlands.
Since 1.1.0 ( search widget only for now ).
This filter is located in /inc/class-widget.php
The code needs to be placed in the functions.php file inside your active theme folder.