Run js on every button click?

Hi there,

It’s probably because the buttons are re-rendered at every step, because their content might change.

Can you share you JS here?

Depending on what you want to do, you can also use the JS action PC.fe.steps.display_step E.g.

wp.hooks.addAction( 'PC.fe.steps.display_step', 'your_context', function( steps_object ) {
    // Do your thing here
    console.log( 'changed step', steps_object.current_step );
} );


Thread Starter


That was quick. Thank you, this worked.


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer