Skip to content

Instantly share code, notes, and snippets.

@rayflores
Last active August 22, 2018 21:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rayflores/f5445dd312b4a2999b3f302660d1670e to your computer and use it in GitHub Desktop.
Save rayflores/f5445dd312b4a2999b3f302660d1670e to your computer and use it in GitHub Desktop.
need to log
;( function ( $, window, document, undefined ) {
$( '.composite_data' )
.on( 'wc-composite-initializing', function( event, composite ) {
var l = composite.api;
var step_objects = l.get_steps();
var review_step = l.get_step_by( 'id', 'review' );
var result = $.grep(l, function(e){ return e.id == id; });
//console.log(step_objects);
//var actions = composite.actions;
// $.each( step_objects, function( step_index, step ){ step.callback = function(){
// console.log('step changed');
// }});
composite.actions.add_action('active_step_changed', function(review_step){ console.log(this, review_step); } , 100, review_step);
} );
} ) ( jQuery, window, document );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment