tf-checkout-react 1.7.17 → 1.7.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tf-checkout-react.cjs.development.js +7 -3
- package/dist/tf-checkout-react.cjs.development.js.map +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
- package/dist/tf-checkout-react.esm.js +7 -3
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/billing-info-container/index.tsx +6 -2
|
@@ -7516,7 +7516,7 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref6) {
|
|
|
7516
7516
|
processPayment = _useStripePayment.processPayment;
|
|
7517
7517
|
var updateCheckoutWithAddOns = useCallback( /*#__PURE__*/function () {
|
|
7518
7518
|
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(addOns) {
|
|
7519
|
-
var mergedAddOns, _checkoutUpdateData, checkoutResponse, checkoutDataObj, errorMessage;
|
|
7519
|
+
var mergedAddOns, _checkoutUpdateData, checkoutResponse, checkoutDataObj, updatedAttributes, errorMessage;
|
|
7520
7520
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
7521
7521
|
while (1) switch (_context8.prev = _context8.next) {
|
|
7522
7522
|
case 0:
|
|
@@ -7556,6 +7556,10 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref6) {
|
|
|
7556
7556
|
checkoutDataObj = _get(checkoutResponse, 'data.attributes.cart_price_breakdown', {});
|
|
7557
7557
|
setCheckoutData(checkoutDataObj);
|
|
7558
7558
|
setSingleCheckoutAddOns(mergedAddOns);
|
|
7559
|
+
updatedAttributes = _get(checkoutResponse, 'data.attributes', {});
|
|
7560
|
+
if (updatedAttributes.additional_payment_information) {
|
|
7561
|
+
setCheckoutUpdateData(updatedAttributes);
|
|
7562
|
+
}
|
|
7559
7563
|
}
|
|
7560
7564
|
_context8.next = 18;
|
|
7561
7565
|
break;
|
|
@@ -7595,12 +7599,12 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref6) {
|
|
|
7595
7599
|
return _ref14.apply(this, arguments);
|
|
7596
7600
|
};
|
|
7597
7601
|
}(), [updateCheckoutWithAddOns]);
|
|
7598
|
-
var onAddOnSelect = useCallback(function (id, value,
|
|
7602
|
+
var onAddOnSelect = useCallback(function (id, value, _addon, fieldUpdates) {
|
|
7599
7603
|
if (fieldUpdates === void 0) {
|
|
7600
7604
|
fieldUpdates = {};
|
|
7601
7605
|
}
|
|
7602
7606
|
var quantity = parseInt(value) || 0;
|
|
7603
|
-
var addonId =
|
|
7607
|
+
var addonId = id;
|
|
7604
7608
|
// Get current add-ons and their custom fields
|
|
7605
7609
|
var currentAddOns = JSON.parse(localStorage.getItem('add_ons') || '{}');
|
|
7606
7610
|
var currentDataCapture = JSON.parse(localStorage.getItem('add_on_data_capture') || '{}');
|