-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:craftcms/stripe
- Loading branch information
Showing
12 changed files
with
129 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,8 @@ | |
|
||
namespace craft\stripe\elements\conditions\products; | ||
|
||
use craft\base\conditions\BaseMultiSelectConditionRule; | ||
use craft\base\ElementInterface; | ||
use craft\elements\conditions\ElementConditionRuleInterface; | ||
use craft\elements\db\ElementQueryInterface; | ||
use craft\helpers\StringHelper; | ||
use craft\stripe\elements\conditions\prices\PriceTypeConditionRule; | ||
use craft\stripe\elements\db\ProductQuery; | ||
use craft\stripe\elements\Price; | ||
|
@@ -40,7 +37,7 @@ public function modifyQuery(ElementQueryInterface $query): void | |
{ | ||
$priceQuery = Price::find(); | ||
$priceQuery->select(['stripe_prices.primaryOwnerId as id']); | ||
$priceQuery->priceType($this->paramValue()); | ||
$priceQuery->type($this->paramValue()); | ||
|
||
/** @var ProductQuery $query */ | ||
$query->andWhere(['elements.id' => $priceQuery]); | ||
|
@@ -54,7 +51,7 @@ public function matchElement(ElementInterface $element): bool | |
/** @var Product $element */ | ||
foreach ($element->getPrices() as $price) { | ||
Check failure on line 52 in src/elements/conditions/products/ProductPriceTypeConditionRule.php GitHub Actions / ci / Code Quality / PHPStan / PHPStan
|
||
/** @var Price $price */ | ||
if ($this->matchValue($price->priceType)) { | ||
if ($this->matchValue($price->type)) { | ||
// Skip out early if we have a match | ||
return true; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.