Get product language with wpml_get_language_information
-
Hi,
I,m running an online shop with packages and subscriptions in both french and english and I recently noticed that I am no longer able to retrieve the correct language of a product id using wpml_get_language_information(). Instead, it always give me the same current language for all products.Here’s the code i’m using:
$product = get_product( $package ); $language_information = wpml_get_language_information($product->id); $locale = $language_information['locale'];I’m using woocommerce multilingual 3.6.7
Any help would be appreciated. My package selection page is a little messed up now with duplicates.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Get product language with wpml_get_language_information’ is closed to new replies.