Skip to content

Instantly share code, notes, and snippets.

@plugin-republic
Created January 27, 2026 07:11
Show Gist options
  • Select an option

  • Save plugin-republic/b251031b9d50a8bfa4a78a8cf97bfc52 to your computer and use it in GitHub Desktop.

Select an option

Save plugin-republic/b251031b9d50a8bfa4a78a8cf97bfc52 to your computer and use it in GitHub Desktop.
<?php
add_action( 'wp_footer', function(){
?>
<script>
jQuery( document ).ready( function(){
jQuery( document.body ).on( 'woosq_loaded', function( event, id ){
jQuery( 'body' ).trigger( 'pewc_check_conditions' ).trigger('pewc_trigger_calculations');
jQuery( 'body' ).trigger( 'pewc_reinitiate_js_validation' );
jQuery( 'body' ).trigger( 'pewc_attach_form_cart_input_change' );
jQuery( 'body' ).trigger( 'pewc_trigger_initial_check' );
jQuery( 'body' ).trigger( 'pewc_attach_condition_events' );
});
});
</script>
<?php
}, 11 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment