Compare commits
3 Commits
c1ced0cc73
...
5.0.1
Author | SHA1 | Date | |
---|---|---|---|
fe6fa9480a | |||
6cb51a3841 | |||
122f73c3c2 |
@ -1,5 +1,9 @@
|
|||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
= 5.0.1 - 2024-08-23 =
|
||||||
|
|
||||||
|
- Fixed: incorrect date in the scheduling calendar on the send page.
|
||||||
|
|
||||||
= 5.0.0 - 2024-08-19 =
|
= 5.0.0 - 2024-08-19 =
|
||||||
|
|
||||||
- Changed: replaced PDO database connection in favor of WordPress's native wpdb;
|
- Changed: replaced PDO database connection in favor of WordPress's native wpdb;
|
||||||
|
@ -69,9 +69,7 @@ export const MailPoetDate: {
|
|||||||
}
|
}
|
||||||
return momentDate.format(this.convertFormat(this.options.format));
|
return momentDate.format(this.convertFormat(this.options.format));
|
||||||
},
|
},
|
||||||
toDate: function toDate(date: MomentInput, opts?: DateOptions): Date {
|
toDate: function toDate(date: MomentInput): Date {
|
||||||
const options = opts || {};
|
|
||||||
this.init(options);
|
|
||||||
return Moment.utc(date).toDate();
|
return Moment.utc(date).toDate();
|
||||||
},
|
},
|
||||||
short: function short(date: MomentInput): string {
|
short: function short(date: MomentInput): string {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { Component, SyntheticEvent } from 'react';
|
import { Component, SyntheticEvent } from 'react';
|
||||||
|
import Moment from 'moment';
|
||||||
import { __, _x } from '@wordpress/i18n';
|
import { __, _x } from '@wordpress/i18n';
|
||||||
import { registerLocale } from 'react-datepicker';
|
import { registerLocale } from 'react-datepicker';
|
||||||
import locale from 'date-fns/locale/en-US';
|
import locale from 'date-fns/locale/en-US';
|
||||||
import { Datepicker } from 'common/datepicker/datepicker';
|
import { Datepicker } from 'common/datepicker/datepicker';
|
||||||
import { MailPoet } from 'mailpoet';
|
import { MailPoet } from 'mailpoet';
|
||||||
import { DateOptions } from 'date';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is a copy of the buildLocalizeFn function from date-fns (date-fns/locale/_lib/buildLocalizeFn)
|
* This function is a copy of the buildLocalizeFn function from date-fns (date-fns/locale/_lib/buildLocalizeFn)
|
||||||
@ -134,10 +134,10 @@ class DateText extends Component<DateTextProps> {
|
|||||||
onChange = (value: Date, event) => {
|
onChange = (value: Date, event) => {
|
||||||
const changeEvent: DateTextEvent = event;
|
const changeEvent: DateTextEvent = event;
|
||||||
// Swap display format to storage format
|
// Swap display format to storage format
|
||||||
const storageDate = this.getStorageDate(value);
|
const formattedDate = this.getAsStringInFormat(value);
|
||||||
|
|
||||||
changeEvent.target.name = this.getFieldName();
|
changeEvent.target.name = this.getFieldName();
|
||||||
changeEvent.target.value = storageDate;
|
changeEvent.target.value = formattedDate;
|
||||||
this.props.onChange(changeEvent);
|
this.props.onChange(changeEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -155,19 +155,10 @@ class DateText extends Component<DateTextProps> {
|
|||||||
.replace(/\]/g, '');
|
.replace(/\]/g, '');
|
||||||
};
|
};
|
||||||
|
|
||||||
getDate = (date: string) => {
|
getDate = (date: string) => Moment(date).toDate();
|
||||||
const formatting = {
|
|
||||||
parseFormat: this.props.storageFormat,
|
|
||||||
} as DateOptions;
|
|
||||||
return MailPoet.Date.toDate(date, formatting);
|
|
||||||
};
|
|
||||||
|
|
||||||
getStorageDate = (date: Date) => {
|
getAsStringInFormat = (date: Date) =>
|
||||||
const formatting = {
|
Moment(date).format(MailPoet.Date.convertFormat(this.props.storageFormat));
|
||||||
format: this.props.storageFormat,
|
|
||||||
};
|
|
||||||
return MailPoet.Date.format(date, formatting);
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Plugin Name: MailPoet
|
* Plugin Name: MailPoet
|
||||||
* Version: 5.0.0
|
* Version: 5.0.1
|
||||||
* Plugin URI: https://www.mailpoet.com
|
* Plugin URI: https://www.mailpoet.com
|
||||||
* Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
|
* Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
|
||||||
* Author: MailPoet
|
* Author: MailPoet
|
||||||
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$mailpoetPlugin = [
|
$mailpoetPlugin = [
|
||||||
'version' => '5.0.0',
|
'version' => '5.0.1',
|
||||||
'filename' => __FILE__,
|
'filename' => __FILE__,
|
||||||
'path' => dirname(__FILE__),
|
'path' => dirname(__FILE__),
|
||||||
'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
|
'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
|
||||||
|
@ -3,7 +3,7 @@ Contributors: mailpoet, woocommerce, automattic
|
|||||||
Tags: email marketing, post notification, woocommerce emails, email automation, newsletter
|
Tags: email marketing, post notification, woocommerce emails, email automation, newsletter
|
||||||
Requires at least: 6.5
|
Requires at least: 6.5
|
||||||
Tested up to: 6.6
|
Tested up to: 6.6
|
||||||
Stable tag: 5.0.0
|
Stable tag: 5.0.1
|
||||||
Requires PHP: 7.4
|
Requires PHP: 7.4
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
@ -229,9 +229,7 @@ Check our [Knowledge Base](https://kb.mailpoet.com) or contact us through our [s
|
|||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
= 5.0.0 - 2024-08-19 =
|
= 5.0.1 - 2024-08-23 =
|
||||||
* Changed: replaced PDO database connection in favor of WordPress's native wpdb;
|
* Fixed: incorrect date in the scheduling calendar on the send page.
|
||||||
* Fixed: dual buttons in MS Outlook;
|
|
||||||
* Fixed: false error notice about MSS connection for editor users.
|
|
||||||
|
|
||||||
[See the changelog for all versions.](https://github.com/mailpoet/mailpoet/blob/trunk/mailpoet/CHANGELOG.md)
|
[See the changelog for all versions.](https://github.com/mailpoet/mailpoet/blob/trunk/mailpoet/CHANGELOG.md)
|
||||||
|
Reference in New Issue
Block a user