|
12 | 12 | use craft\commerce\db\Table;
|
13 | 13 | use craft\commerce\elements\conditions\purchasables\CatalogPricingCondition;
|
14 | 14 | use craft\commerce\elements\conditions\purchasables\CatalogPricingCustomerConditionRule;
|
15 |
| -use craft\commerce\events\CatalogPricingJobEvent; |
16 | 15 | use craft\commerce\models\CatalogPricing as CatalogPricingModel;
|
17 | 16 | use craft\commerce\models\CatalogPricingRule;
|
18 | 17 | use craft\commerce\Plugin;
|
|
41 | 40 | */
|
42 | 41 | class CatalogPricing extends Component
|
43 | 42 | {
|
44 |
| - /** |
45 |
| - * @since 5.3.0 |
46 |
| - */ |
47 |
| - public const EVENT_BEFORE_CREATE_CATALOG_PRICING_JOB = 'beforeCreateCatalogPricingJob'; |
48 |
| - |
49 | 43 | /**
|
50 | 44 | * @var array|null
|
51 | 45 | */
|
@@ -506,21 +500,7 @@ public function createCatalogPricingJob(array $config = [], int $priority = 100)
|
506 | 500 | $catalogPricingRuleIds = $config['catalogPricingRuleIds'] ?? null;
|
507 | 501 | $purchasableIds = $config['purchasableIds'] ?? null;
|
508 | 502 | $storeId = $config['storeId'] ?? null;
|
509 |
| - |
510 |
| - /** @var CatalogPricingJobEvent $event */ |
511 |
| - $event = Craft::createObject( |
512 |
| - CatalogPricingJobEvent::class, compact('catalogPricingRuleIds', 'purchasableIds', 'storeId'), |
513 |
| - ); |
514 |
| - |
515 |
| - if ($this->hasEventHandlers(self::EVENT_BEFORE_CREATE_CATALOG_PRICING_JOB)) { |
516 |
| - $this->trigger(self::EVENT_BEFORE_CREATE_CATALOG_PRICING_JOB, $event); |
517 |
| - } |
518 |
| - |
519 |
| - if (!$event->isValid) { |
520 |
| - return; |
521 |
| - } |
522 |
| - |
523 |
| - $this->markPricesAsUpdatePending($event->catalogPricingRuleIds, $event->purchasableIds, $event->storeId); |
| 503 | + $this->markPricesAsUpdatePending($catalogPricingRuleIds, $purchasableIds, $storeId); |
524 | 504 |
|
525 | 505 | $config = array_merge([
|
526 | 506 | 'class' => CatalogPricingJob::class,
|
|
0 commit comments