diff --git a/lib/DI/ContainerConfigurator.php b/lib/DI/ContainerConfigurator.php index d24632541f..423bd3dfd3 100644 --- a/lib/DI/ContainerConfigurator.php +++ b/lib/DI/ContainerConfigurator.php @@ -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 diff --git a/lib/Entities/StatisticsWooCommercePurchaseEntity.php b/lib/Entities/StatisticsWooCommercePurchaseEntity.php index bef0ddcf2c..0f7df60706 100644 --- a/lib/Entities/StatisticsWooCommercePurchaseEntity.php +++ b/lib/Entities/StatisticsWooCommercePurchaseEntity.php @@ -104,4 +104,11 @@ class StatisticsWooCommercePurchaseEntity { $this->safelyLoadToOneAssociation('click'); return $this->click; } + + /** + * @return int + */ + public function getOrderId() { + return $this->orderId; + } } diff --git a/lib/Statistics/StatisticsWooCommercePurchasesRepository.php b/lib/Statistics/StatisticsWooCommercePurchasesRepository.php new file mode 100644 index 0000000000..81947a751b --- /dev/null +++ b/lib/Statistics/StatisticsWooCommercePurchasesRepository.php @@ -0,0 +1,19 @@ +