Polylang Importer

add_action(‘pmxi_saved_post’, function($post_id, $xml_node, $is_update) { // Check if Polylang & DeepL API are active if (!function_exists(‘pll_set_post_language’) || !class_exists(‘PLL_DeepL’)) return; // Get language code from custom field $lang_code = get_post_meta($post_id, ‘language_code’, true); if (!$lang_code) $lang_code = ‘en’; // Default fallback //…Continue reading