In 862c395d3263f30057aef73a14704345e181dde3, SendingErrorHandler was
refactored to replace the `\MailPoet\Tasks\Sending` class with Doctrine
code. Inside `processSoftError()`, a call to
`$sendingTask->saveSubscriberError()` was replaced with a call to
`$this->scheduledTaskSubscribersRepository->saveError()`. The problem is
that the former updates the processed and unprocessed counts in the
QueueEntity while the later doesn't.
This commit fixes this issue by calling
`$this->sendingQueuesRepository->updateCounts()` inside
`processSoftError()`.
[MAILPOET-5682]
We don't need to use the value from `processedAt` here since we can rightfully use the current datetime value
Also, I found out `processedAt` is usually null here for standard newsletters which cause new Carbon to use the server datetime settings
MAILPOET-5795
Fix a problem in the codebase where we create, schedule and update newsletters in the user time zone, but we set the ProcessedAt with another timezone
Also, `Carbon::createFromTimestamp($this->wp->currentTime('mysql'))` is not a valid date.
It would return date: '1970-01-01 00:35:29.000000'
MAILPOET-5795
As far as I could test, calling validate() directly is not necessary.
The call to $sendingTask->save() right above calls validate() internaly
and then any errors will be returned by $sendingTask->getErrors().
I added a integration test that seems to confirm this interpretation.
[MAILPOET-4693]
When we apply this commit every purchase will be tracked. When the shop manager updates an order
the status will be updated. For the statistics it will only return values for purchases with
the 'completed' status
[MAILPOET-5485]
In the previous commit, we removed the global count for our output. This commit removes
the logic as the only places where it was used was in recalculating the cache and since
the last commit, we do not use this value anymore
[MAILPOET-4487]
This will cause the cron job that recalculates engagement score to pick
up these users the next time it runs. This ensures scores don't get
stale.
MAILPOET-5410