Hi,
All variables should contain links in the original language and we’ll convert them to the correct language once you change it.
However, if that’s displayed via javascript (I’m assuming they are), it won’t work. We don’t yet have support for that.
Is this the case?
Hi,
thanks for the quick response.
I’ve tried a plenitude of different themes to see if it’s because of a custom way my theme handles variable products, but the issue persisted throughout. Could ofcourse still be that all the ones I tried did it through java.
They all had the description per variable in variable product under:
> div summary entry-summary
> form variations_form cart (woocommerce github link)
> div single_variation_wrap (gets called in above mentioned github linked php)
> div woocommerce-variation single_variation
> div woocommerce-variation-description
> p (for the text)
> a ref (for the links, these links don’t get changed)
And for normal products under:
> div summary entry-summary
> form woocommerce-product-details__short-description
> p (for the text)
> a ref (for the links, these links get changed)
Not sure if above mentioned helps at all. Php/css/js is rather new to me.
Is woocommerce calling it the same way for every theme?
If not, is there a known theme I could swap to that would make this work?
I’ve tried using the trp_lanuage shortcode, and while it doesn’t write out the shortcode visually, it doesn’t hide the links of other languages, so sadly not something that could fix it.
Thanks for your time.
An yep, seems to be loaded in dir single-product/add-to-cart/variation.php with
<script type=”text/template” id=”tmpl-variation-template”>
<div class=”woocommerce-variation-description”>{{{ data.variation.variation_description }}}</div>
<div class=”woocommerce-variation-price”>{{{ data.variation.price_html }}}</div>
<div class=”woocommerce-variation-availability”>{{{ data.variation.availability_html }}}</div>
</script>
<script type=”text/template” id=”tmpl-unavailable-variation-template”>
<p><?php _e( ‘Sorry, this product is unavailable. Please choose a different combination.’, ‘woocommerce’ ); ?></p>
</script>
And found a semi-solution
For some reason, without “/”, it gets the correct language redirect though stays on the same page (ofcourse).
Solution I found around this was
href=”name-of-page” or href=”name-of-product”, which results in “www.domain.com/fr/products/current-product/name-of-product” for example.
And while that page/product doesn’t exist ofcourse, wordpress will redirect it to what it found to exist.
Not perfect, but does do what was wanted!