Feat: Adding Translations to Payment and Shipping Methods, removing unecessary shipping method fulfillment type
This commit is contained in:
@@ -6,6 +6,8 @@ use Lunar\DataTypes\ShippingOption;
|
||||
use Lunar\Facades\Pricing;
|
||||
use Lunar\Shipping\Models\ShippingMethod;
|
||||
use Lunar\Shipping\Models\ShippingRate;
|
||||
use Modules\Core\Shipping\Support\FulfillmentType;
|
||||
use Modules\Core\Shipping\Support\ShippingMethodName;
|
||||
|
||||
/**
|
||||
* Shared by any carrier driver that also supports Lunar's own price-break
|
||||
@@ -31,12 +33,13 @@ trait ResolvesFixedPricing
|
||||
}
|
||||
|
||||
return new ShippingOption(
|
||||
name: $shippingMethod->name ?: $this->name(),
|
||||
name: ShippingMethodName::resolve($shippingMethod) ?: $this->name(),
|
||||
description: $shippingMethod->description ?: $this->description(),
|
||||
identifier: $shippingRate->getIdentifier(),
|
||||
price: $pricing->matched->price,
|
||||
taxClass: $shippingRate->getTaxClass(),
|
||||
taxReference: $shippingRate->getTaxReference(),
|
||||
collect: FulfillmentType::isStorePickup($shippingMethod),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user