Commit Graph

10 Commits

Author SHA1 Message Date
19028eee3d Stop using utf8_encode() when calling php_uname()
This was added in a37ff8d. Per the commit message, php_uname() in a
Windows server can sometimes return the string using encondings other
than ISO-8859-1 and thus utf8_encode() was added. The problem is that
utf8_encode() only converts from ISO-8859-1 to UTF-8 so it does not work
for the purpose that it was added and it was deprecated in PHP 8.2.

Removing it seems safe. If we start having problems with character
encoding in the string that we are sending to Helpscout, we can consider
other alternatives to make sure the string is always send using UTF-8.

[MAILPOET-4865]
2023-04-28 10:26:03 +02:00
926620e8f8 Ignore strict types rule in all existing files that don't have it
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
d54129670d Reorganize information sent to HelpScout
We are now using the `session-data` method of the Beacon API to send
site information to HelpScout
(https://developer.helpscout.com/beacon-2/web/javascript-api/#beacon-session-data).
This method has a limit of 20 attribute-value pairs and since we had
more, it was necessary to combinte a few values under the same
attribute.

[MAILPOET-4525]
2022-08-18 15:43:12 +02:00
f19de77f70 Fix sending system info when creating a HelpScout ticket
We were calling the wrong Beacon API method to send system info
data to HelpScout when users create tickets inside WordPress. This
commit fixes this by calling the method `session-data` instead of
`identify`. It is likely that `identify` was the correct method in the
past, but the Beacon API changed
(https://developer.helpscout.com/beacon-2/web/javascript-api/).
Nowadays, the `identify` method is used to add data to the HelpScout
users and fields need to be created in advance in the HelpScout web
interface. `session-data` is used to add information to the ticket which
is what we are trying to achieve. Only `name` and `email` should still
be passed to `identify` to make it possible to match the correct
HelpScout user.

[MAILPOET-4525]
2022-08-18 15:43:12 +02:00
ef89cae94a Include in the Beacon info about if MP was installed via WC or not
[MAILPOET-4491]
2022-08-04 10:18:44 +02:00
f2edddfbff Handle inaccessible cron URL error when generating Beacon data
The unhandled exception in this place was causing that all MailPoet
admin pages were blank.
[MAILPOET-4406]
2022-06-09 09:31:56 +02:00
9f39843189 Sanitize incoming data according to WP sniffer
[MAILPOET-4219]
2022-04-04 17:12:33 +02:00
c701f444ec Add transactional sending method to system info
[MAILPOET-4148]
2022-03-21 10:51:25 +01:00
e95ceac77f Mask the API key when displayed in the info page
This commit adds a new flag to \MailPoet\Helpscout\Beacon::getData() to
mask half of the API key when this method is used to get information for
the System Info page. When it is used to pass information to HelpScout
nothing should change and the full key will be returned.

[MAILPOET-4009]
2022-01-19 16:16:55 +01:00
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00