Multiple calling javascript from shortcode in one page
A script should be enqueued and localized only one time per page; so, what you describe is the correct behaviour. I think you are confusing localizing a script with printing inline JavaScript. Also, enqueuing and localizing should be done in wp_enqueue_scripts action. You need to think in a different approach. For example (just a example), … Read more