{"id":7511,"date":"2023-04-21T00:56:24","date_gmt":"2023-04-20T22:56:24","guid":{"rendered":"https:\/\/fluidcheckout.com\/?post_type=docs&#038;p=7511"},"modified":"2023-04-24T17:32:26","modified_gmt":"2023-04-24T15:32:26","password":"","slug":"checking-data-returned-google-apis","status":"publish","type":"docs","link":"https:\/\/fluidcheckout.com\/docs\/checking-data-returned-google-apis\/","title":{"rendered":"Checking data returned from Google Address Autocomplete address search"},"content":{"rendered":"\n<p>In this article, you will learn how to check what was returned from the Google Maps API when searching for addresses using our add-on <a href=\"https:\/\/fluidcheckout.com\/fc-google-address-autocomplete\/\">Google Address Autocomplete for WooCommerce<\/a>.<\/p>\n\n\n\n<p>We assume that you have already followed our guide <a href=\"https:\/\/fluidcheckout.com\/docs\/getting-started-google-address-autocomplete\/\">Getting started with Google Address Autocomplete<\/a> and that you can see and select addresses from the suggested addresses. If not, check the <a href=\"#troubleshooting\">troubleshooting<\/a> section at the end of this article.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"enable-debug-mode\">Enabling debug mode in Google Address Autocomplete settings <\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to the plugin settings at WP Admin &gt; WooCommerce &gt; Settings &gt; Integration &gt; Google Address Autocomplete.<br>Locate the &#8220;Debug options&#8221; and check the option &#8220;Enable debug mode&#8221;.<\/li>\n\n\n\n<li>Click on &#8220;Save changes&#8221;.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"182\" src=\"https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/fcgaa-enable-debug-mode-1024x182.png\" alt=\"\" class=\"wp-image-7514\" srcset=\"https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/fcgaa-enable-debug-mode-1024x182.png 1024w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/fcgaa-enable-debug-mode-300x53.png 300w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/fcgaa-enable-debug-mode-768x137.png 768w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/fcgaa-enable-debug-mode-360x64.png 360w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/fcgaa-enable-debug-mode-1536x274.png 1536w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/fcgaa-enable-debug-mode-2048x365.png 2048w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/fcgaa-enable-debug-mode-600x107.png 600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"checking-data-returned\">Checking data returned in the browser console log <\/h2>\n\n\n\n<p>When debug mode is enabled, the Google Address Autocomplete plugin will &#8220;save&#8221; the data returned from the Google Maps APIs when searching and selecting a suggested address into the browser developer tools.<\/p>\n\n\n\n<p>You can use this data to determine if Google has all the data related to your selected address, in case some fields are not filled up after selecting a suggested address, or to determine what are the data components to be used for any custom fields you might have added to your address forms on the checkout page.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open your website in a web browser.<\/li>\n\n\n\n<li>Add any item to your cart.<\/li>\n\n\n\n<li>Navigate to the checkout page.<\/li>\n\n\n\n<li>Enter any data in the Contact step.<\/li>\n\n\n\n<li>Proceed either to the Shipping or Billing steps where you have an address section.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"532\" src=\"https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/inspect-element-context-menu-1024x532.png\" alt=\"\" class=\"wp-image-7515\" srcset=\"https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/inspect-element-context-menu-1024x532.png 1024w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/inspect-element-context-menu-300x156.png 300w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/inspect-element-context-menu-768x399.png 768w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/inspect-element-context-menu-360x187.png 360w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/inspect-element-context-menu-600x312.png 600w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/inspect-element-context-menu.png 1248w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"6\">\n<li>Open the browser&#8217;s developer tools by pressing F12 or right-clicking on the page and selecting the option &#8220;Inspect&#8221; or &#8220;Inspect Element&#8221; on the context menu.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"415\" src=\"https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/console-tab-developer-tools-1024x415.png\" alt=\"\" class=\"wp-image-7608\" srcset=\"https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/console-tab-developer-tools-1024x415.png 1024w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/console-tab-developer-tools-300x122.png 300w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/console-tab-developer-tools-768x311.png 768w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/console-tab-developer-tools-360x146.png 360w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/console-tab-developer-tools-1536x622.png 1536w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/console-tab-developer-tools-600x243.png 600w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/console-tab-developer-tools.png 1728w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"7\">\n<li>In the developer tools, select the &#8220;Console&#8221; tab.<\/li>\n\n\n\n<li>Back to your checkout page, start typing an address into the Street address field, and select one of the suggested addresses.<\/li>\n\n\n\n<li>Again on the developer tools, check the messages in the console log. You should see an expansible message that says <code>Object<\/code> or <code>{ address_components: Array(9) ... }<\/code>. If you can&#8217;t easily find those messages, you can use the filter field and search for <code>address_components<\/code>.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"662\" src=\"https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/console-log-google-data-details-1024x662.png\" alt=\"\" class=\"wp-image-7609\" srcset=\"https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/console-log-google-data-details-1024x662.png 1024w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/console-log-google-data-details-300x194.png 300w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/console-log-google-data-details-768x497.png 768w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/console-log-google-data-details-360x233.png 360w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/console-log-google-data-details-1536x993.png 1536w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/console-log-google-data-details-600x388.png 600w, https:\/\/fluidcheckout.com\/wp-content\/uploads\/2023\/04\/console-log-google-data-details.png 1726w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"10\">\n<li>Expand the respective <code>[Object]<\/code> or <code>{ address_components: ... }<\/code> message on the browser console, then expand the <code>address_components<\/code> property, where all the relevant address data is.<\/li>\n\n\n\n<li>Expand specific fields to see their details. Use the property <code>types<\/code> within each specific field to determine what that field is about. See below a mapping of the most common data used and which fields each represents.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"data-types-mapping\">Data types and mapping to the checkout fields <\/h3>\n\n\n\n<p>Address fields returned by the Google Maps APIs do not always match the checkout fields. Because of that, we need to map the checkout fields to the data fields returned by the Google Maps APIs.<\/p>\n\n\n\n<p>Below is the most common mapping for the checkout fields in relation to which data field types of the returned data are used from Google Maps APIs:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Checkout field<\/th><th>Google Maps API (data field types)<\/th><\/tr><\/thead><tbody><tr><td>address_1<\/td><td><code>route<\/code> + <code>street_number<\/code><\/td><\/tr><tr><td>city<\/td><td><code>locality<\/code><\/td><\/tr><tr><td>state<\/td><td><code>administrative_area_level_1<\/code><\/td><\/tr><tr><td>country<\/td><td><code>country<\/code><\/td><\/tr><tr><td>postcode<\/td><td><code>postal_code<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Please note that this is not an extensive or complete list of fields and the mapping of the related data fields from the Google Maps APIs, and it can vary depending on the country and locale.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"troubleshooting\">Troubleshooting <\/h2>\n\n\n\n<p>In case you have any problems when searching for addresses please make sure you followed all the steps in our <a href=\"https:\/\/fluidcheckout.com\/docs\/getting-started-google-address-autocomplete\/\">Getting started with Google Address Autocomplete<\/a> guide.<\/p>\n\n\n\n<p>If you still having problems using the plugin, also check our article <a href=\"https:\/\/fluidcheckout.com\/docs\/fcgaa-not-working\/\">Why Google Addresses Autocomplete is not working<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, you will learn how to check what was returned from the Google Maps API when searching for addresses using our add-on Google Address Autocomplete for WooCommerce. We assume that you have already followed our guide Getting started with Google Address Autocomplete and that you can see and select addresses from the suggested [&hellip;]<\/p>\n","protected":false},"author":293,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":""},"doc_category":[87],"doc_tag":[],"knowledge_base":[77],"class_list":{"0":"post-7511","1":"docs","2":"type-docs","3":"status-publish","5":"doc_category-development","6":"knowledge_base-fc-google-address-autocomplete"},"year_month":"2026-04","word_count":573,"total_views":"2691","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"Alan Marley","author_nicename":"amarleyspgmail-com","author_url":"https:\/\/fluidcheckout.com\/articles\/author\/amarleyspgmail-com\/"},"doc_category_info":[{"term_name":"Development","term_url":"https:\/\/fluidcheckout.com\/docs\/fluid-checkout\/development\/"}],"doc_tag_info":[],"acf":[],"knowledge_base_info":[{"term_name":"Google Address Autocomplete","term_url":"https:\/\/fluidcheckout.com\/docs\/fc-google-address-autocomplete\/","term_slug":"fc-google-address-autocomplete"}],"knowledge_base_slug":["fc-google-address-autocomplete"],"_links":{"self":[{"href":"https:\/\/fluidcheckout.com\/wp-json\/wp\/v2\/docs\/7511","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fluidcheckout.com\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/fluidcheckout.com\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/fluidcheckout.com\/wp-json\/wp\/v2\/users\/293"}],"replies":[{"embeddable":true,"href":"https:\/\/fluidcheckout.com\/wp-json\/wp\/v2\/comments?post=7511"}],"version-history":[{"count":0,"href":"https:\/\/fluidcheckout.com\/wp-json\/wp\/v2\/docs\/7511\/revisions"}],"wp:attachment":[{"href":"https:\/\/fluidcheckout.com\/wp-json\/wp\/v2\/media?parent=7511"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/fluidcheckout.com\/wp-json\/wp\/v2\/doc_category?post=7511"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/fluidcheckout.com\/wp-json\/wp\/v2\/doc_tag?post=7511"},{"taxonomy":"knowledge_base","embeddable":true,"href":"https:\/\/fluidcheckout.com\/wp-json\/wp\/v2\/knowledge_base?post=7511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}