WooCommerce Get Product Tag with Language Code WPML
Today’s discussion is regarding how you can get a WooCommerce Product Tag with Language Code while using the WPML module. The example below will get translated product tag id of the given language. However, keep in mind that this code will work with the already installed WPML module.
Below is an example:
$langCode = 'fr';
$productTagId = 20;
$m_term_id = icl_object_id($productTagId,'product_tag',false,$langCode);
$productTagId = 20;
$m_term_id = icl_object_id($productTagId,'product_tag',false,$langCode);