Closed fresh5447 closed 5 years ago
Looking at the Checkout interface, it appears taxes should be a property, but it is not coming through in my data:
I am also confused by this issue, which makes it seem tax should be accessible through consignments, but that does not come through either:
I was able to resolve the issue. Going to post my solution in case it helps someone.
I was inspecting the wrong part of the checkout state.
service.getState()
does not return the full checkout resource, this is what I was mistakingly looking for.
The proper way to get the full checkout object is:
const state = service.loadCheckout();
const checkoutData = state.data.getCheckout();
Thanks happy coding!
I see there is a tax interface: and I have found a reference to tax in another issue, but I can't seem to find the tax property in any of the returned states that I look at.
Which part of the state is tax supposed to belong to? I was thinking maybe shipping consignments.
Could someone share an example of retrieving the tax value? Thanks!