Skip to content

Commit

Permalink
Fix param
Browse files Browse the repository at this point in the history
  • Loading branch information
alecritson committed Oct 30, 2023
1 parent e49f9df commit 99bd248
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions packages/core/src/Models/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,11 @@ class Cart extends BaseModel

/**
* The shipping override to use for the cart.
*
* @var ShippingOption|null
*/
public ?ShippingOption $shippingOptionOverride = null;

/**
* Additional shipping estimate meta data.
*
* @var array
*/
public array $shippingEstimateMeta = [];

Expand Down Expand Up @@ -669,17 +665,13 @@ public function checkFingerprint($fingerprint)

/**
* Return the estimated shipping cost for a cart.
*
* @param array $params
* @param bool $setOverride
* @return ShippingOption
*/
public function getEstimatedShipping(array $params, bool $setOverride = false): ShippingOption
{
$this->shippingEstimateMeta = $params;
$option = ShippingManifest::getOptions($this)
->filter(
fn($option) => !$option->collection
fn ($option) => ! $option->collect
)->sortBy('price.value')->first();

if ($setOverride) {
Expand Down

0 comments on commit 99bd248

Please sign in to comment.