Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 7cd2d86

Browse files
author
Oleksii Korshenko
authored
MAGETWO-81665: Add a payload extender to the default shipping-save-processor (Backport to 2.2) #11249
2 parents 6f1488d + 4bcfdf4 commit 7cd2d86

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

app/code/Magento/Checkout/view/frontend/web/js/model/shipping-save-processor/default.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ define([
1212
'Magento_Checkout/js/model/payment/method-converter',
1313
'Magento_Checkout/js/model/error-processor',
1414
'Magento_Checkout/js/model/full-screen-loader',
15-
'Magento_Checkout/js/action/select-billing-address'
15+
'Magento_Checkout/js/action/select-billing-address',
16+
'Magento_Checkout/js/model/shipping-save-processor/payload-extender'
1617
], function (
1718
ko,
1819
quote,
@@ -22,7 +23,8 @@ define([
2223
methodConverter,
2324
errorProcessor,
2425
fullScreenLoader,
25-
selectBillingAddressAction
26+
selectBillingAddressAction,
27+
payloadExtender
2628
) {
2729
'use strict';
2830

@@ -46,6 +48,8 @@ define([
4648
}
4749
};
4850

51+
payloadExtender(payload);
52+
4953
fullScreenLoader.startLoader();
5054

5155
return storage.post(
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
define(function () {
6+
'use strict';
7+
8+
return function (payload) {
9+
payload.addressInformation['extension_attributes'] = {};
10+
11+
return payload;
12+
};
13+
});

0 commit comments

Comments
 (0)