Hook for writing text string after footer scripts

I’m looking to insert a string of JavaScript variables AFTER the in_footer enqueued scripts. When I write the string via the wp_footer hook, they occur before the in_footer scripts. Is there another hook I can tie into that happens after those enqueued scripts have been written.

2 Answers
2

If you change the priority on the hook to wp_footer you should be able to shift when it’s called in reference to the enqueue functions.

Example:

add_action('wp_footer', 'my_footer_hook', PHP_INT_MAX);

Leave a Comment