Skip to content

Commit e688658

Browse files
committed
Revert "Merge pull request #3760 from craftcms/feature/pricing-catalog-event"
This reverts commit 7ae858e, reversing changes made to d13b99f.
1 parent 4ac3e58 commit e688658

File tree

2 files changed

+1
-55
lines changed

2 files changed

+1
-55
lines changed

src/events/CatalogPricingJobEvent.php

-34
This file was deleted.

src/services/CatalogPricing.php

+1-21
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use craft\commerce\db\Table;
1313
use craft\commerce\elements\conditions\purchasables\CatalogPricingCondition;
1414
use craft\commerce\elements\conditions\purchasables\CatalogPricingCustomerConditionRule;
15-
use craft\commerce\events\CatalogPricingJobEvent;
1615
use craft\commerce\models\CatalogPricing as CatalogPricingModel;
1716
use craft\commerce\models\CatalogPricingRule;
1817
use craft\commerce\Plugin;
@@ -41,11 +40,6 @@
4140
*/
4241
class CatalogPricing extends Component
4342
{
44-
/**
45-
* @since 5.3.0
46-
*/
47-
public const EVENT_BEFORE_CREATE_CATALOG_PRICING_JOB = 'beforeCreateCatalogPricingJob';
48-
4943
/**
5044
* @var array|null
5145
*/
@@ -506,21 +500,7 @@ public function createCatalogPricingJob(array $config = [], int $priority = 100)
506500
$catalogPricingRuleIds = $config['catalogPricingRuleIds'] ?? null;
507501
$purchasableIds = $config['purchasableIds'] ?? null;
508502
$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);
524504

525505
$config = array_merge([
526506
'class' => CatalogPricingJob::class,

0 commit comments

Comments
 (0)