public void Execute(OnAddedArgs <ProductVariant> args) { if (!_ecommerceSettings.WarehouseStockEnabled) { return; } var productVariant = args.Item; if (productVariant.TrackingPolicy != TrackingPolicy.Track) { return; } _generateProductVariantWarehouseStock.Generate(productVariant); }