Add repository for purchases
[PREMIUM-142]
This commit is contained in:
@ -217,6 +217,7 @@ class ContainerConfigurator implements IContainerConfigurator {
|
||||
$container->autowire(\MailPoet\Statistics\Track\WooCommercePurchases::class);
|
||||
$container->autowire(\MailPoet\Statistics\Track\Unsubscribes::class)->setPublic(true);
|
||||
$container->autowire(\MailPoet\Statistics\StatisticsUnsubscribesRepository::class);
|
||||
$container->autowire(\MailPoet\Statistics\StatisticsWooCommercePurchasesRepository::class);
|
||||
$container->autowire(\MailPoet\Router\Router::class)
|
||||
->setArgument('$container', new Reference(ContainerWrapper::class));
|
||||
// Mailer
|
||||
|
@ -104,4 +104,11 @@ class StatisticsWooCommercePurchaseEntity {
|
||||
$this->safelyLoadToOneAssociation('click');
|
||||
return $this->click;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getOrderId() {
|
||||
return $this->orderId;
|
||||
}
|
||||
}
|
||||
|
19
lib/Statistics/StatisticsWooCommercePurchasesRepository.php
Normal file
19
lib/Statistics/StatisticsWooCommercePurchasesRepository.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace MailPoet\Statistics;
|
||||
|
||||
use MailPoet\Doctrine\Repository;
|
||||
use MailPoet\Entities\StatisticsWooCommercePurchaseEntity;
|
||||
|
||||
/**
|
||||
* @method StatisticsWooCommercePurchaseEntity[] findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null)
|
||||
* @method StatisticsWooCommercePurchaseEntity|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method StatisticsWooCommercePurchaseEntity|null findOneById(mixed $id)
|
||||
* @method void persist(StatisticsWooCommercePurchaseEntity $entity)
|
||||
* @method void remove(StatisticsWooCommercePurchaseEntity $entity)
|
||||
*/
|
||||
class StatisticsWooCommercePurchasesRepository extends Repository {
|
||||
protected function getEntityClassName() {
|
||||
return StatisticsWooCommercePurchaseEntity::class;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user