S2member-o.php is only loading css, no JS

Hello,

New pro user, developing a WP theme for a client.

I’m having trouble getting the Stripe Pro form to work. Where Stripe inputs should be loaded I’m seeing the commented out markup: <!-- A Stripe Element will be inserted here. -->.

I can see in the network tab that s2member-o.php is loading the CSS, but theres no JS resource being loaded in at all. No errors in the console.

I’m currently serving the site from a VM running Apache over HTTPS, using an SSL cert I generated myself on my local. Just mentioning this in case its relevant.

Any help would be greatly appreciated as I’m on a tight deadline, thanks!

DS

Update: Running the plugin on the default ‘twentytwentytwo’ theme works. However whenever I switch back to my custom theme, it just refuses. This is even if I comment out everything in functions.php and disable all other plugins.

Is there anything known on completely fresh themes which can prevent s2member from loading jQuery?

Disable all plugins, or if not self hosted check about performance optimizations. Sounds like some performance stuff

Thanks for the reply. I already tried disabling all plugins and nothing happened.

Do you mind explaining what you mean about the performance optimisations? It’s just not loading any JS associated with the form. The stripe content is missing, and the password strength indicator does nothing either. It’s not running a script too early before the DOM content is loaded, else I’d be seeing errors in the console.

Thanks,
DS

As an update, I’ve managed to solve this.

The JS which handles this form is loaded into the Wordpress footer. I had a custom footer.php file however I hadn’t added <?php wp_footer(); ?> to my footer, so the plugin didn’t know where to load the code.

I am amazed this isn’t in the documentation.