Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shipping method subscriber callbacks are called twice #5814

Closed
danslo opened this issue Jul 26, 2016 · 4 comments
Closed

Shipping method subscriber callbacks are called twice #5814

danslo opened this issue Jul 26, 2016 · 4 comments

Comments

@danslo
Copy link
Contributor

danslo commented Jul 26, 2016

In checkout, we can subscribe to shippingAddress observable. Something like:

quote.shippingMethod.subscribe(function(address) {
    // do something interesting with shipping method
});

However, this callback is executed twice when selecting a shipping method. This can cause issues with double AJAX calls for custom components.

Steps to reproduce

  1. Create a component that subscribes to shippingMethod observable as seen above.
  2. Go to the checkout and click on a shipping method.

Expected result

  1. Code is executed once.

Actual result

  1. Code is executed twice.
@veloraven
Copy link
Contributor

@danslo thank you for your report.
Please, provide the used version. If the problem is actual for a specific tag, please, specify it and be sure that the latest update was used.

@danslo
Copy link
Contributor Author

danslo commented Jul 29, 2016

@veloraven

This is on Magento 2.1.0.

@danslo
Copy link
Contributor Author

danslo commented Aug 2, 2016

@veloraven I have submitted a pull request which fixes this issue.

@viktym
Copy link
Contributor

viktym commented Sep 30, 2016

Hi @danslo
I’m closing this issue because it is a duplicate #5928
Thanks for contributing

@viktym viktym closed this as completed Sep 30, 2016
pdohogne-magento pushed a commit that referenced this issue Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants