Magento – How to make the Place Order button disabled until after the address update button is pushed

checkoutmagento-2.1shipping-address

I am in Magento 2.13. If a customer checks out and uses a different billing and shipping address, the place order button is live, even if they have not pushed the update address button.
This causes the shipping address to over write the billing address when it is submitted causing errors in the CC processing and also for the shipping address to show up in the invoice.
How can I make it so that the Place Order button is disabled until AFTER they have hit the update button for the address?Place Order Button is live before Update Address button has been pushed

Best Answer

First I would have a look at IWD one page checkout ( google it ) its a great exetension and I use it on several M2 stores, it automatically calculates shipping and does not have an update button.

Failing that try this with good old javascripty

<script>
document.getElementById(' Your ORDER BUTTON ID ').style.display = 'none';

document.getElementById(' UPDATE BUTTON ID ').onclick=function(){

document.getElementById(' YOUR ORDER BUTTON ID ').style.display=''; 
};
</sript>

There are other ways of doing this but to be fare if you just use javascript you are not changing any magento process logic , just make sure you overwright the files in the correct way , seriously though look at the IWD extension it solves your problem out of the box I think