Enqueue Script in custom plugin before other

I’ve got a conflict with another plugin which is blocking the JS in my custom plugin with the hook:

add_action(‘wp_enqueue_scripts’, ‘<FOREIGN-PLUGIN>’);

Is there a way to enqueue my JS before all other plugins?

I tried already to set priority like

add_action(‘wp_enqueue_scripts’, ‘<FOREIGN-PLUGIN>’, 1);
add_action(‘wp_enqueue_scripts’, ‘<MY-PLUGIN>’, 2);

but it doesn’t work.
Any ideas?

Read more here:: Enqueue Script in custom plugin before other

Leave a Reply

Your email address will not be published. Required fields are marked *