Skip to content

Commit f3b03d5

Browse files
authored
ENGCOM-4376: Checkout Page Cancel button is not working #21327 #21356
2 parents 6ea1eac + 5394674 commit f3b03d5

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

app/code/Magento/Checkout/view/frontend/web/js/view/billing-address.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,13 @@ function (
202202
}
203203
},
204204

205+
/**
206+
* Manage cancel button visibility
207+
*/
208+
canUseCancelBillingAddress: ko.computed(function () {
209+
return quote.billingAddress() || lastSelectedBillingAddress;
210+
}),
211+
205212
/**
206213
* Restore billing address
207214
*/

app/code/Magento/Checkout/view/frontend/web/template/billing-address.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<button class="action action-update" type="button" data-bind="click: updateAddress">
2323
<span data-bind="i18n: 'Update'"></span>
2424
</button>
25-
<button class="action action-cancel" type="button" data-bind="click: cancelAddressEdit">
25+
<button class="action action-cancel" type="button" data-bind="click: cancelAddressEdit, visible: canUseCancelBillingAddress()">
2626
<span data-bind="i18n: 'Cancel'"></span>
2727
</button>
2828
</div>

0 commit comments

Comments
 (0)