Created
April 1, 2022 07:31
-
-
Save pramodjodhani/7253d0e5bea9b1ab72c7d843917a6024 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Get all translations from one of the translations. Doesn't necesaily have to be the master post. | |
Here 93 is a translated post (not duplicated) | |
Considering that 93 is a product. | |
*/ | |
$post_id = 93; | |
$trid = apply_filters( 'wpml_element_trid', NULL, $post_id, 'post_product' ); | |
$translations = apply_filters( 'wpml_get_element_translations', NULL, $trid, 'post_product' ); | |
print_r($translations); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment