Today, we will discuss how to get a WooCommerce Post Tag with Language Code using the WPML module, with an example. The example below will get translated pst 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';
$tagId = 20;
$tag = icl_object_id($tagId,'post_tag',false,$langCode);
$tagId = 20;
$tag = icl_object_id($tagId,'post_tag',false,$langCode);