@idigi/reaction-plugin-shipments-flat-rate
Advanced tools
Comparing version 1.0.19 to 1.0.20
{ | ||
"name": "@idigi/reaction-plugin-shipments-flat-rate", | ||
"description": "Flat Rate Shipments plugin for the Reaction API", | ||
"version": "1.0.19", | ||
"version": "1.0.20", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "type": "module", |
@@ -24,3 +24,2 @@ import { attributeDenyCheck } from "./attributeDenyCheck.js"; | ||
const { FlatRateFulfillmentRestrictions } = context.collections; | ||
if (!hydratedOrder.shippingAddress) return []; | ||
///|\\\|///|\\\|///|\\\ | ||
@@ -81,3 +80,7 @@ /// args: Geo | ||
///|\\\|///|\\\|///|\\\ | ||
if (method.destinations && method.destinations.length) { | ||
if ( | ||
hydratedOrder.shippingAddress && | ||
method.destinations && | ||
method.destinations.length | ||
) { | ||
///|\\\|///|\\\|///|\\\ | ||
@@ -231,4 +234,26 @@ /// Geo | ||
///|\\\|///|\\\|///|\\\ | ||
/// Pickup || Digital | ||
///|\\\|///|\\\|///|\\\ | ||
if ( | ||
hydratedOrder.fulfillmentType !== "shipping" && | ||
!allValidShippingMethods.length | ||
) { | ||
allValidShippingMethods.push({ | ||
_id: "default", | ||
cost: 0, | ||
fulfillmentTypes: hydratedOrder.fulfillmentType, | ||
group: "free", | ||
isEnabled: true, | ||
label: "default", | ||
name: "default", | ||
rate: 0, | ||
shippingPrice: 0, | ||
handling: 0, | ||
destination: {}, | ||
}); | ||
} | ||
// Return all valid shipping rates | ||
return allValidShippingMethods; | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
180775
3261