How to uncheck the "my billing address is the same as shipping" checkbox for a payment method programmatically?

checkout
payment

(Dazuaz) #1

Hello, I am using magento 2.1 and I need to disable billing same as shipping as default, since the vast majority of my customers don’t have this, and it present a lot of confution to have it as default for them. Thanks a lot.


(Dmitry Fedyuk) #2

I have implemented this feature in all the my payment extensions, and they are published on GitHub, you can learn the implementation there.


(Dazuaz) #3

Thank so much for the reply, I have checked the module, and I see the feature to disable billing address, what I was wondering was to default to uncheck the “My billing and shipping address are the same” option during payment on checkout. I checked the Stripe module, maybe I have missed the feature.


(Konstantin G ) #4

ХYou need to overwrite two javascript files vendor/magento/module-checkout/view/frontend/web/js/model/checkout-data-resolver.js and vendor/magento/module-checkout/view/frontend/web/js/model/shipping-save-processor/default.js

tested on M2.1.4


(Nabil Berkache) #6

Hi Konstantin, Can I know what you modified in the code to get this to work ? thanks


(Ferenc (Vaso123)) #8

Why did you remove the post? Can I access somewhere?