I'm new to this, sorry. So let's say I'm trying to fill in dynamic values in the Google survey code explained here https://support.google.com/merchants/answer/7106244?hl=en&ref_topic=7105160#example
This post mentions a few of the fields How to insert Google Merchant Review JS code in WooCommerce Order Complete page
But what about the others, like shipping date and country code? How can those be dynamically filled in?
Would shipping country be shipping_country, so then <?php echo $shipping_country; ?>
?
What about delivery date, how is that put in? I see there are ways to calculate shipping dates (such as this), but we have multiple shipping options (local pick up, free over $200 and flat rates based on location). Is there a simple way to just pull this info from what the user selects?
Tried to look here, and other docs, but didn't find anything related to shipping https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/
This is what it wants to fill in:
<!-- BEGIN GCR Opt-in Module Code -->
<script src="https://apis.google.com/js/platform.js?onload=renderOptIn" async defer></script>
<script>
window.renderOptIn = function() {
window.gapi.load('surveyoptin', function() {
window.gapi.surveyoptin.render({
// REQUIRED
"merchant_id": "MERCHANT_ID",
"order_id": "ORDER_ID",
"email": "CUSTOMER_EMAIL",
"delivery_country": "COUNTRY_CODE",
"estimated_delivery_date": "YYYY-MM-DD",
// OPTIONAL
"products":[{"gtin":"GTIN1"}, {"gtin":"GTIN2">}],
"opt_in_style": "OPT_IN_STYLE"
});
});
}
</script>