Encoding issue in dropdown. | WordPress.org

[ad_1]

I do not know in which version this problem started, but I got a call from a customer telling me that it was not possible to order product variations in my webshop that had non ascii chars in the version name. It turned out when the select dropdown is reconstructed with the DOMDocument class it messes up the variation name encoding.

The fix for this issue if someone else has it is to edit includes/Frontend/Woo_Config.php and on line 248 change from

$dom->loadHTML($old_html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);

To

$dom->loadHTML(mb_convert_encoding($old_html, ‘HTML-ENTITIES’, ‘UTF-8’), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);

It would be nice if you would fix this issue in the next version you release.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer