Skip to content
Advertisement

Implement product review for google customer review program in WooCommerce

Im trying to apply product review for my website with google merchants optin review code.

I succeeded doing the part of the country, date, id, and email..

Now I’m not succeeding get the EAN or GTIN numbers from the code to apply to the product reviews…

can you please help ?

Here is the code.. is already working al the above described, it only miss the connection to the gtin inside the woocommerce for each product…

I basically d’ont know how to get the gtin .

An example url with two products:

JavaScript

Example page: https://gardentoy.com.br/finalizar-compra/order-received/2943/?key=wc_order_oOsii3Cuy6HWI

Advertisement

Answer

First you need to check in wp_postmeta table for the GTIN meta key that is used for a product (any product ID).

I have revisited your code as there was some mistakes since WooCommerce 3… Try the following:

JavaScript

It should work.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement