Compare commits

...

4 Commits

Author SHA1 Message Date
894a6f6066 Release 3.47.3 2020-06-03 14:29:05 +02:00
eb1daa683e Use correct format of post date in post query
[MAILPOET-2960]
2020-06-03 14:27:07 +02:00
045f4e3ab5 Use post notifications history parent to fetch latest sent post
[MAILPOET-2960]
2020-06-03 14:26:59 +02:00
375553346e Fix annotations in newsletter post
[MAILPOET-2960]
2020-06-03 14:26:49 +02:00
5 changed files with 12 additions and 8 deletions

View File

@ -19,13 +19,13 @@ class NewsletterPostEntity {
use SafeToOneAssociationLoadTrait;
/**
* @ORM\ManyToOne(targetEntity="MailPoet\Entities\NewsletterEntity", inversedBy="newsletterSegments")
* @ORM\ManyToOne(targetEntity="MailPoet\Entities\NewsletterEntity")
* @var NewsletterEntity|null
*/
private $newsletter;
/**
* @ORM\Column(type="int")
* @ORM\Column(type="integer")
* @var int
*/
private $postId;

View File

@ -2,6 +2,7 @@
namespace MailPoet\Newsletter;
use DateTimeInterface;
use MailPoet\Logging\LoggerFactory;
use MailPoet\Newsletter\Editor\Transformer;
use MailPoet\WP\Functions as WPFunctions;
@ -87,11 +88,11 @@ class AutomatedLatestContent {
// the query.
$parameters['suppress_filters'] = false;
if ($newerThanTimestamp) {
if ($newerThanTimestamp instanceof DateTimeInterface) {
$parameters['date_query'] = [
[
'column' => 'post_date',
'after' => $newerThanTimestamp,
'after' => $newerThanTimestamp->format('Y-m-d H:i:s'),
],
];
}

View File

@ -132,7 +132,7 @@ class Renderer {
if ($parent instanceof NewsletterEntity) {
$newsletterId = $parent->getId();
$lastPost = $this->newsletterPostsRepository->findOneBy(['newsletter' => $newsletter], ['createdAt' => 'desc']);
$lastPost = $this->newsletterPostsRepository->findOneBy(['newsletter' => $parent], ['createdAt' => 'desc']);
if ($lastPost instanceof NewsletterPostEntity) {
$newerThanTimestamp = $lastPost->getCreatedAt();
}

View File

@ -2,7 +2,7 @@
/*
* Plugin Name: MailPoet 3 (New)
* Version: 3.47.2
* Version: 3.47.3
* Plugin URI: http://www.mailpoet.com
* Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
* Author: MailPoet
@ -16,7 +16,7 @@
*/
$mailpoetPlugin = [
'version' => '3.47.2',
'version' => '3.47.3',
'filename' => __FILE__,
'path' => dirname(__FILE__),
'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',

View File

@ -3,7 +3,7 @@ Contributors: mailpoet, wysija
Tags: email, email marketing, post notification, woocommerce emails, email automation, newsletter, newsletter builder, newsletter subscribers
Requires at least: 4.7
Tested up to: 5.4
Stable tag: 3.47.2
Stable tag: 3.47.3
Requires PHP: 5.6
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
@ -184,6 +184,9 @@ Check our [Knowledge Base](https://kb.mailpoet.com) or contact us through our [s
== Changelog ==
= 3.47.3 - 2020-06-03 =
* Fixed: a bug which caused old posts to be sent.
= 3.47.2 - 2020-06-02 =
* Added: colors for form confirmation and error;
* Improved: lowercase all MailPoet related email addresses;