WPML Simplemap Compatibility Issue – enqueue script path
-
Hi guys,
On a WPML enabled website, it appears that the Simplemap enqueue script path breaks for multilingual.
wp_enqueue_script( ‘simplemap-master-js’, get_home_url() . ‘?simplemap-master-js=1&smpid=’ . $post->ID, array( ‘jquery’ ) );
get_home_url() for mulitilingual will look like https://website.com?lang=%5Blanguage-prefix%5D
so the enqueue script path looks like https://website.com?lang=%5Blanguage-prefix%5D
?simplemap-… which breaksHard-coding the enqueue script and replacing get_home_url() with ‘https://website.com’ works, but obviously is a poor/hacky solution.
Please advise.
- The topic ‘WPML Simplemap Compatibility Issue – enqueue script path’ is closed to new replies.