Skip to content

Commit

Permalink
Buy plugin: Pass discounts as array
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasbestle committed Oct 26, 2024
1 parent eb85f6d commit 0c2cc9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion site/plugins/buy/src/Passthrough.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Passthrough
{
public function __construct(
public string|null $license = null,
public string $discounts = '',
public array $discounts = [],
public bool $gratitude = false,
public int $multiplier = 1,
public string|null $partner = null,
Expand Down
4 changes: 2 additions & 2 deletions site/plugins/buy/src/Price.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function customerDonation(): int
/**
* Returns a summary of all applied discounts
*/
public function discounts(): string
public function discounts(): array
{
$discounts = [];

Expand All @@ -90,7 +90,7 @@ public function discounts(): string
$discounts[] = 'Sale (' . $sale->discount() . '%)';
}

return implode(', ', $discounts);
return $discounts;
}

/**
Expand Down

0 comments on commit 0c2cc9c

Please sign in to comment.