How can I autofill checkout of Woocommerce with Google place API? - wordpress

I have activated an API Key from "Google Places API Web Service" following all the instrutions.
Now I'm trying to use this API to autocomplete billing form of Woocommerce like this demo:
https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform.
How can I adapt this code in my form?
Do I need to edit only ID or other?
Thanks very much for the answers!
PS: The API KEY works with Google's demo.
edit:
I have made a new field like the google demo fot the autocomplete and edited the Id. It's working for the simple field, but not for COUNTRY and STATE because they are select fields.
How can I set up COUNTRY AND STATE?
I can have the returning value "US"
In woocommerce I have Stati Uniti (US)

Related

How can i get same checkout fields in mobile application

I am finishing my mobile application and now in the checkout screen, i want to show the same fields as i configure in woocommmerce store, i.e: default country, required fields cities value etc.
Similarly i am looking a way to get the same shipping rules i set for online store, so on preview i can show the same value.
Is there any way i can achieve this?? i looked into the documentation as in below mentioned link, but it does not shows how can i retrieve the configuration data for checkout.
http://woocommerce.github.io/woocommerce-rest-api-docs/#order-properties
Appreciate community help.
I think is not possible, you would need to create a custom plugin that creates a new endpoint and using these hooks you get checkout fields and list them:
$address_fields = apply_filters('woocommerce_billing_fields', $address_fields);
$address_fields = apply_filters('woocommerce_shipping_fields', $address_fields);
You can find more info at: https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/

build REST API for WooCommerce for mobile apps

we are building the REST API for WooCommerce and we want to add a product to user's cart. For that we have used Cart API for WooCommerce but it doesn't seems to working for us as it doesn't giving any option to set user_id along with the data so we are facing issues with mobile app and website syncing. We want to make it generalize like if user is using mobile and adds product to cart, it should be remain in the cart if login from web too and it's seems not working for us
Any help will be appreciated for it
Thanks in advance
Woo-commerce cart items is temporary store in session so you can not get items using REST API, for that you have to make a custom table of cart then store details in your custom cart table using REST API.

A Google Form creates an Event in Google Calendar (without using responses)

This is more of a simple yes or no question with the hope that someone could point me in the right direction.
My company has Google Calendar and Google Forms. What we want to do is create a Registration Form using Google Forms, once the Registration Form is created then it will automatically create an event within our Google Calendar with the Registration Form Link.
We do not want to use the responses to create an event, we want to use the form to create the event. The responses are set up within the form to be emailed to the a specific person where they can tally and confirm all the registries.
Our company also has a wordpress site, so maybe there is a plugin for wordpress that creates the form and automatically creates an event on our Google Calendar.
Is this possible?
From the Google Form editor you could create a bounded script project and add to it an script that creates a Google Calendar event, so yes, it's possible.

specialties field was removed from the LinkedIn API?

I'm trying to get the "specialties" field from the LinkedIn API but it returns nothing. So, this field is still avalible?
note: I barely use LinkedIn and I'm using my account to develop this app, so, maybe that field is empty. If it's that case, please tell where I can find it.
Basic Profile Fields
The specialties field has been removed from the API as stated here, but the API docs haven't been updated.
In my case, I can see the previous content of that field added to the summary field as plain text: "my-cv-summary \nSpecialties: my-specialties".
btw, you can test the API here https://apigee.com/console/linkedin using this URL:
https://api.linkedin.com/v1/people/~:(summary,specialties)?format=json
...and allowing apigee to connect to your profile, obviously. You'll see that no specialties field is returned, but if you had informed that field before the change, you'll see it's content added to the summary.

How to select specific Google Calendar through Google API

How to select non-primary calendar using Google's Calendar API? I can see from documentation you can get full list of calendards, but nothing about how to select specific one.
For example I have calendar with title 'My Calendar_1'
I don't want to iterate over all calendars to check each name.
Seems to be it should some how use Query, but the documentation on its application is so poor.
Thanks in advance.

Resources