3ea44e45d4
Remove adjustForTimezoneDifference functionality
...
This is no longer used. It was used in just a couple of places
and was fixing a difference between PHP time zone and browser time.
We rely on WordPress to set PHP timezone to UTC and we use the site's
timezone on the client so the fix is no longer useful.
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
f814624e0e
Set GMT timezone to WPDB
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
506652bdc4
Fix scheduling post notifications
...
The user picks time in a select box, and we expect they pick a time
in the site's timezone so the saved cron expression is in the site's timezone.
When we calculate the next run date, we do it in the site's timezone and
to get UTC time, we convert it.
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
797a446470
Fix values in list of times in scheduling form
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
ef5ee6d59a
Fix times in task lists on Help > System Status
...
The time adjustments are not necessary because we rely on WP setting
timezone to UTC.
Manipulation in adjustTimezone difference was causing us to display GMT time.
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
dac4eb82a4
Show proper time in listing for scheduled newsletter
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
73ffe485e7
Use isInFutureGmt to check future on send page
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
49ae4e5517
Show proper times for action scheduler info on help page
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
c6916431b0
Use proper time in scheduling calendar on send page
...
We add offset before we display time and we remove when we pass it to callback.
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
e9acdbf9ad
Replace simple usages of date formating with offet aware methods
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
0bc5f3acc8
Add formatFromGmt etc to MailPoet.Date
...
This set of function expects input in GMT and add site's offset
They are meant to be used for data coming from server in GMT
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
9fa6890606
Pass GMT offset from WordPress settings to JS
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
5fdba0e170
Replace current_time usage in tests
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
33f4b2d729
Replace usage of WP's current_time without gmt parameter in libs
...
This commit replaces usages by Carbon::now or in case we need a timestamp it
keeps current_time but adds the gtm parameter as true.
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
9209a25199
Improve LastSubsribedAtListener to use fresh now
...
The cached now may cause the value to not be exact.
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
83fb7f55ea
Use UTC time in TimestampListener
...
$this->wp->currentTime('timestamp') adds 'gmt_offset' value.
This was needed with PDO connection because the connection
used @session.time_zone set to the same offset value.
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
9f56ee67b7
Skip null ids when deleting WP list subscribers with invalid emails
...
Theoretically, we may end up running the delete query with a condition like
WHERE wp_user_id IN (null, null);
This is a tiny optimization to skip null IDs to avoid running such a query.
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
c95cd1073b
Improve SubscriberLifetieEmailCountTest to use saved entity
...
The test was using an empty entity which was not presisted. This may
potentially cause issues as in some places, an entity with a proper type might be expected.
It was already causing that an SQL query ran with WHERE type = null condition which is always false.
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
ec0210cdab
Rename $value to $row in WPDB/Result for better readability
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
7f1c606040
Reintroduce legacy DB table name constants for backward compatibility
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
d53fde4250
Cleanup unused Doctrine drivers and other files
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
569204b594
Remove PDO
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
4531ae9e60
Use WPDB driver for Doctrine
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
200ea47926
Use mysqli to run test cleanups
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
accdb64894
Split mutli-query into multiple statements
...
WPDB doesn't support multi queries.
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
8c4b2cf3ef
Replace deprecated Statement::bindParam() and Statement::exec() with params
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
240f15e22a
Fix missing array key
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
fd72597e2c
Fix last insert ID type check
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
c25d7d6b53
Use single quotes for strings in SQL queries
...
This is more standard SQL and required by WPDB.
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
3b3ebb1cbd
Pass SQLSTATE and code to query exceptions so they are converted to DBAL exceptions properly
...
The conversion is done by MailPoetVendor\Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter
that is returned from MailPoetVendor\Doctrine\DBAL\Driver\AbstractMySQLDriver.
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
c42c37e8b1
Implement parameter conversion and named parameters
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
53cad38099
Implement Statement and Connection::prepare()
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
dc66a6a349
Implement Result and Connection::query()
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
2047f0b694
Implement Connection::exec() and other simple connection methods
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
c17d8feaa4
Implement basic WPDB Doctrine driver with connection, statement, and result stubs
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
ff6a98fae1
Replace deprecated array types with Doctrine's ArrayParameterType
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
c7dc7e5a24
Replace PDO types with Doctrine's ParameterType
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
8473511bff
Remove Paris, Idiorm, and Sudzy
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
805c752843
Remove all old models and their setup
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
0584c63180
Replace old model table name constants with Doctrine repositories
...
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
437a4c414e
Make sure the pQuery does not break html comments
...
We had the fix in the renderer, but we do use pQuery also in further processing of the rendered email
e.g. in code where we add GA tracking params to links.
In this commit, I moved the fix directly to the pQuery library so that it is safe to use
later in email code processing.
[MAILPOET-6190]
2024-08-19 13:14:12 +02:00
3214a86ee2
Add empty email check also for multisite registration
...
[MAILPOET-6188]
2024-08-16 09:35:45 +02:00
08ac80774c
Add test for the registration class
...
[MAILPOET-6188]
2024-08-16 09:35:45 +02:00
a046d4ab6f
Attempt to add a subscriber only when there is an email address
...
[MAILPOET-6188]
2024-08-16 09:35:45 +02:00
f022cc23fc
Allow pingBridge endpoint for all users with access to the plugin admin
...
We call the endpoint on the admin pages and the restricted access was causing
that editor users were getting false error notices.
[MAILPOET-6189]
2024-08-14 11:54:28 +03:00
9feb0433e6
Show "from" value in logs when not explicitely set
...
It was empty before, and it looked like there are no logs. But they were just filtered for the last 7 days.
[MAILPOET-5670]
2024-08-14 10:26:54 +02:00
8ea0482ed8
Replace MailPoet.I18n.t with __() and _x()
...
[MAILPOET-5670]
2024-08-14 10:26:54 +02:00
4ce8ef48ab
Add toggle button on MailPoet logs page
...
[MAILPOET-5670]
2024-08-14 10:26:54 +02:00
1722d383f9
Release 4.58.2
2024-08-13 15:23:15 +02:00
8ec7333a34
Track CAPTCHA setting to Mixpanel
...
[MAILPOET-6187]
2024-08-13 08:01:38 +02:00