qTranslate-XT (eXTended) - reviving qTranslate-X multilingual plugin for WordPress. A new community-driven plugin soon. Built-in modules for WooCommerce, ACF, slugs and others.
GNU General Public License v2.0
553
stars
104
forks
source link
Apply filter to remove querystring arguments from url in widget #216
I use qTranslate-X succesfully in combination with Woocommerce and qTranslate Slug. I have a feature request. When a product is added to the cart with WooCommerce, it adds ?add-to-cart=1234 to the url. Unfortunately this is also added to the urls in language selector widget. I propose a filter to allow me to modify the generated urls, something like this:
in qtranslate_widget.php function qtranxf_generateLanguageSelectCode, append the following before the switch statement:
Additionaly, I noticed that qtranxf_convertURL returns an esc_url escaped url. This is done by qTranslate Slug function qts_get_url that is called by qtranxf_convertURL. This is unwanted I guess? Should I contact the Slug guys about this?
Issue by soft79 Thursday Aug 13, 2015 at 07:57 GMT Originally opened as https://github.com/qTranslate-Team/qtranslate-x/issues/216
Hi!
I use qTranslate-X succesfully in combination with Woocommerce and qTranslate Slug. I have a feature request. When a product is added to the cart with WooCommerce, it adds ?add-to-cart=1234 to the url. Unfortunately this is also added to the urls in language selector widget. I propose a filter to allow me to modify the generated urls, something like this:
in qtranslate_widget.php function qtranxf_generateLanguageSelectCode, append the following before the switch statement:
Then use the $translated_urls array in the output part, for example in the 'both' part:
Additionaly, I noticed that qtranxf_convertURL returns an esc_url escaped url. This is done by qTranslate Slug function qts_get_url that is called by qtranxf_convertURL. This is unwanted I guess? Should I contact the Slug guys about this?