[Plugin: WooCommerce – excelling eCommerce] Bug in WooCommerce_Widget_Product_Categories
-
There is a bug in WooCommerce when using it with WPML and language indication way via ?lang=XX parameter.
The bug can be found here:
<script type='text/javascript'> /* <![CDATA[ */ var dropdown = document.getElementById("dropdown_product_cat"); function onCatChange() { if ( dropdown.options[dropdown.selectedIndex].value !=='' ) { location.href = "<?php echo home_url(); ?>/?product_cat="+dropdown.options[dropdown.selectedIndex].value; } } dropdown.onchange = onCatChange; /* ]]> */ </script>
echo home_url() produces for example https://site.com/?lang=es and then you add /?product_cat=XXXX resulting https://site.com/?lang=es/?product_cat=XXXX
Can be seen here:
https://fridja.com/product-category-f-1000-fr/?lang=frI consider it a bug because you may not rely on home_url() this way since it may be filtered by plugins (as in this case).
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘[Plugin: WooCommerce – excelling eCommerce] Bug in WooCommerce_Widget_Product_Categories’ is closed to new replies.