I am using the Weglot plugin to translate our Woocommerce site. Weglot allows you to exclude areas that you don’t want translated, to save from your quota of words.
By default, everything is translated on a page but you can exclude a section of a page by entering the CSS selector or HTML block you want to exclude.
We have successfully blocked everything containing the product name/product title EXCEPT one thing. There is a script running that contains the product name/product title and Weglot is translating the data in the script, even though it is not displayed. I have been working with Weglot support for about a week trying to figure out how to exclude it, but nothing has worked. 🙁
Based on what Weglot said about, about excluding page sections, can you figure out a way to make the script able to be excluded? What is that script for and, if it isn’t important, is there a way to remove it or the product name/product title that it is pulling?
Here is the script from the page. The translated words are: “Diamentowy wisiorek” (originally “Diamond Pendant“)
I even tried adding around where I thought the scripts were being pulled in footer.php.
So far, I have only noticed it on the product page. A programmer said the script is for WC_Structured_Data Class. Any thoughts about where the script is coming from or how to get it excluded? Weglot support had me add the following code snippet, but it didn’t work: