0

I have created a WordPress eCommerce website, with WooCommerce providing the shopping functionality.

Each Product Page, consists of a 'Platform' Variation. Upon the selection of the desired Platform, an additional piece of text appears beneath the Product Description. This is referred to as the Product Variation description.

Although this description appears on the page, I noticed that the Product Variation Description is outputted via the following entry:

<div class="woocommerce-variation-description">{{{ data.variation.variation_description }}}</div>

Whilst familiar with PHP, CSS and HTML, I do not recognise the data.variation.variation_description entry. Is this JavaScript or jQuery etc?

Is there anyway I could replace this with the actual content/markup, as to aid with SEO efforts?

Craig
  • 1,872
  • 5
  • 23
  • 56
  • That is likely an object, `data`, with an prop./object, `variation`, having a prop. `variation_description`. If you replace it and that object change, your output won't – Asons Jul 08 '18 at 23:00
  • @LGSon: Are you saying that should WooCommerce roll out an update, with a change to this entry, it could result in issues if I changed it? I was hoping I could simply replace it with something similar to a `the_content` PHP entry. Am I right in saying that search engines would not be able to read the outputted markup, despite it appearing on product pages, due to it not actually appearing in the Source Code? – Craig Jul 08 '18 at 23:07
  • I'm quite sure that the notation using curly brackets like this is [Mustache](https://github.com/janl/mustache.js) and here is the [manual page](http://mustache.github.io/mustache.5.html) where you can read that the triple mustache: `{{{name}}}` is used for unescaped HTML. – Louys Patrice Bessette Jul 08 '18 at 23:17

1 Answers1

1

Whether that is Javascript or any other library, e.g. jQuery, Mustache, etc., it doesn't matter.

If the content behind that entry, data.variation.variation_description, changes, your code won't notice it, if you replace the entry with something else, no matter who change the entry's content.

Regarding SEO efforts, this post have both great answers, and a lot of great links as well, that will show that as of today, most of the search engines do execute script, and will see such entry's content:

Asons
  • 84,923
  • 12
  • 110
  • 165