From e2877a25c511397c80ae325da3002e881b17e729 Mon Sep 17 00:00:00 2001 From: jochemgravendeel Date: Tue, 17 Sep 2024 10:15:52 +0200 Subject: [PATCH] fix: fix small parcel not showing in DO --- includes/frontend/class-wcmp-checkout.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/frontend/class-wcmp-checkout.php b/includes/frontend/class-wcmp-checkout.php index 40edc0642..561f4da08 100644 --- a/includes/frontend/class-wcmp-checkout.php +++ b/includes/frontend/class-wcmp-checkout.php @@ -581,7 +581,10 @@ private function getShippingMethodsAllowingDeliveryOptions(): array return $allowedMethods; } - $shippingMethodsForPackage = $shippingMethodsByPackageType[AbstractConsignment::PACKAGE_TYPE_PACKAGE_NAME]; + $shippingMethodsForPackage = array_merge( + $shippingMethodsByPackageType[AbstractConsignment::PACKAGE_TYPE_PACKAGE_NAME] ?? [], + $shippingMethodsByPackageType[AbstractConsignment::PACKAGE_TYPE_PACKAGE_SMALL_NAME] ?? [] + ); foreach ($shippingMethodsForPackage as $shippingMethod) { [$methodId] = self::splitShippingMethodString($shippingMethod);