What I want to do is to force user to fill out the billing address on step two at checkout.
In my javascript file I've added a subscription:
quote.billingAddress.subscribe(function (billingAddress) {
billingAddress.isAddressDetailsVisible = function () {
return false;
}
});
The problem is that the in the file:
vendor/magento/module-checkout/view/frontend/web/js/view/billing-address.js
there is a subscription too:
quote.billingAddress.subscribe(function (newAddress) {
and in line 104
:
this.isAddressDetailsVisible(true);
And this subsciption is running after my subscription so the value always will be true
, and the form not shown.
Is there a method to force this to set false
? I want to show the form anyway.