Is there a callback that can be used (where a mixin can be added) for when a checkout step is displayed?
For example, there is the navigate function for each step that is called when the checkout is loaded directly to that step.
So if you access directly the url checkout/#some-step and there is a step with the code some-step then the function navigate from that step js file is called.

Is there similar for when a step becomes active?
Note: need this for a custom step, so I can change the code in that step without restrictions.


Not sure if this is the way to go, but it seems to work for me.
I added a subscriber on the isVisible observable method:

 isVisible: ko.observable(false),
 initObservable: function () {
     this.isVisible.subscribe(function (value) {
         if (value) {
            //if value is true, it means the step just became visible.
            //I placed my logic here
     }, this);
     return this;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.