Skip to content

Commit

Permalink
Merge pull request #1723 from PrestaShopCorp/EMKTG-3254_rollback
Browse files Browse the repository at this point in the history
EMKTG-3254/fix/rollback useless changes
  • Loading branch information
Quetzacoalt91 committed Apr 5, 2024
2 parents 33b5c29 + ce8d034 commit 660ff42
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions _dev/apps/ui/src/store/modules/product-feed/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const createProductFeedApiPayload = (settings:any) => ({
...(
(settings.shippingSetup === ShippingSetupOption.ESTIMATE) ? {
rate: settings.rate,
estimateCarriers: settings.estimateCarriers.map(filterEstimateCarriers),
estimateCarriers: settings.estimateCarriers,
} : {}
),
...(
Expand Down Expand Up @@ -477,21 +477,3 @@ export default {
return result.issues || [];
},
};

const filterEstimateCarriers = (data) => {
switch (data.offer) {
case OfferType.FLAT_SHIPPING_RATE:
data.freeShippingOverAmount = undefined;
break;
case OfferType.FREE_SHIPPING:
data.freeShippingOverAmount = undefined;
data.flatShippingRate = undefined;
break;
case OfferType.FREE_SHIPPING_OVER_AMOUNT:
data.flatShippingRate = undefined;
break;
default:
}

return data;
};

0 comments on commit 660ff42

Please sign in to comment.