Woocommerce & Polylang: common comments under product in different languages

I developed a WordPress multilingual site with shop, based on Woocommerce plugin. The task was to make all comments appear under all languages’ versions of a product. Tried a lot of possible solutions and finally came to bare mysql request. File woocommerce/single-product-reviews.php contains the line: wp_list_comments( array( ‘callback’ => ‘woocommerce_comments’, ‘avatar_size’ => 75 ) );… Continue reading Woocommerce & Polylang: common comments under product in different languages

Woocommerce & Polylang: shop page in proper language

I combined Woocommerce & Polylang to make multilingual shop. The problem appeared, while I tried to display Shop page in other language than main one. I solved the problem in the following way: Add the code to your theme function.php file. function get_woocommerce_shop_polylang() { return pll_get_post(get_option(‘woocommerce_shop_page_id’ ) ); } add_filter(‘woocommerce_get_shop_page_id’, “get_woocommerce_shop_polylang”); This function actually gets… Continue reading Woocommerce & Polylang: shop page in proper language

Polylang and custom fields: How to copy and how to not.

Polylang is a very powerful tool to enable your WordPress site to be multilingual. The only problem, I met during development is not simple and clear way of copying of custom fields to new language posts versions. Answer was found here [resolved] polylang not syncing custom fields If you want to make some custom field… Continue reading Polylang and custom fields: How to copy and how to not.