Skip to content

Instantly share code, notes, and snippets.

@xlplugins
Created September 17, 2024 11:03
Show Gist options
  • Save xlplugins/cb6a7245d9a768d0528f63c891dcbf0e to your computer and use it in GitHub Desktop.
Save xlplugins/cb6a7245d9a768d0528f63c891dcbf0e to your computer and use it in GitHub Desktop.
Add script on second step of checkout
<script>
jQuery(document).ready(function($) {
$(document.body).on('wfacp_step_switching', function(e, v) {
console.log(e, v); // This will log the event and the step object
if (v.current_step === 'two_step') {
// Your custom jQuery code for the second step goes here
console.log("User has reached the second step!");
// Example: Change the background color of the body
$('body').css('background-color', '#000000');
// Add more of your custom jQuery code as needed
}
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment