PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.5
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.5
1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 All 49 releases
← All changes | app/Modules/Shipping/Http/Controllers/ShippingZoneController.php +6 -0 1.5.5 → 1.6.5 View file →
@@ -48,9 +48,15 @@
48 48 }
49 49
50 50 public function update(ShippingZoneRequest $request, $id)
51 51 {
52 + // When the client omits shipping_class_id, ShippingZoneRequest::
53 + // beforeValidation resolves the zone's stored class into the request
54 + // (its return is merged in), so validation checks the effective class
55 + // and this write preserves it — getSafe would otherwise emit the
56 + // mapped key as null and wipe the stored link.
52 57 $data = $request->getSafe($request->sanitize());
58 +
53 59 $shippingZone = ShippingZone::query()->findOrFail($id);
54 60 if (Arr::get($data, 'region') !== $shippingZone->region) {
55 61 ShippingMethod::where('zone_id', $id)->update(['states' => []]);
56 62 }