Compare commits

..

1 Commits

Author SHA1 Message Date
817bea9057 Release 5.7.0 2025-02-11 12:23:42 +02:00
12 changed files with 32 additions and 98 deletions

View File

@ -197,7 +197,7 @@ jobs:
- run:
name: Download additional WP Plugins for tests
command: |
./do download:woo-commerce-zip 9.6.1
./do download:woo-commerce-zip 9.6.0
./do download:woo-commerce-subscriptions-zip 7.1.0
./do download:woo-commerce-memberships-zip 1.26.5
./do download:automate-woo-zip 6.1.5

View File

@ -1,30 +0,0 @@
clone:
git:
image: woodpeckerci/plugin-git
settings:
depth: 1
steps:
build:
image: node:current-bookworm-slim
commands:
- apt update
- apt install php php-symfony bash -y
- npm install pnpm
- cd mailpoet
- bash build.sh
- mkdir ../output
- mv mailpoet.zip ../output
- cd ..
release:
image: woodpeckerci/plugin-gitea-release:latest
settings:
base_url: https://git.cavemanon.xyz
api_key:
from_secret: releasesmithapikey
files: "output/"
prerelease: false
title: "${CI_COMMIT_TAG}"
when:
- event: tag

View File

@ -3,7 +3,6 @@ import { Step } from '../../../../../editor/components/automation/types';
import { storeName } from '../../../../../editor/store';
const transactionalTriggers = [
'mailpoet:custom-trigger',
'woocommerce:order-status-changed',
'woocommerce:order-created',
'woocommerce:order-completed',

View File

@ -41,7 +41,10 @@ export const initializeSatismeterSurvey = (writeId = null) => {
} else {
writeKey = oldUsersPollId;
}
const traits = {
satismeter({
writeKey,
userId: window.mailpoet_current_wp_user.ID + window.mailpoet_site_url,
traits: {
name: window.mailpoet_current_wp_user.user_nicename,
email: window.mailpoet_current_wp_user.user_email,
mailpoetVersion: window.mailpoet_version,
@ -55,22 +58,7 @@ export const initializeSatismeterSurvey = (writeId = null) => {
lists: trackingData.lists,
sendingMethod: trackingData.sendingMethod,
woocommerceIsInstalled: trackingData.woocommerceIsInstalled,
woocommerceVersion: trackingData.woocommerceVersion,
WordPressVersion: trackingData.WordPressVersion,
blockTheme: trackingData.blockTheme,
themeVersion: trackingData.themeVersion,
theme: trackingData.theme,
};
if (trackingData.gutenbergVersion) {
traits.gutenbergVersion = trackingData.gutenbergVersion;
}
if (trackingData.wooCommerceVersion) {
traits.wooCommerceVersion = trackingData.wooCommerceVersion;
}
satismeter({
writeKey,
userId: window.mailpoet_current_wp_user.ID + window.mailpoet_site_url,
traits,
},
events: {
submit: (response) => {
if (response.rating >= 9 && response.completed) {

View File

@ -61,9 +61,6 @@
"MailPoet\\Test\\DataGenerator\\": "tests/DataGenerator"
}
},
"replace": {
"soundasleep/html2text": "*"
},
"scripts": {
"pre-install-cmd": [
"@php tools/install.php",

10
mailpoet/composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "51893b0f5ed38d130932b86b48e55b94",
"content-hash": "9957467448f215809ac9dc8fbcab2b00",
"packages": [
{
"name": "dragonmantank/cron-expression",
@ -73,11 +73,10 @@
"dist": {
"type": "path",
"url": "../packages/php/email-editor",
"reference": "53577c5aa3a97e82c58284d48c3aa339cb2a15d4"
"reference": "311798cfd57b26bb5df1fc7f97b5732e45603419"
},
"require": {
"php": ">=7.4",
"soundasleep/html2text": "^2.1"
"php": ">=7.4"
},
"type": "library",
"autoload": {
@ -102,9 +101,6 @@
],
"code-style-fix": [
"../../../mailpoet/tasks/code_sniffer/vendor/bin/phpcbf -p"
],
"phpstan": [
"php ./tasks/run-phpstan.php"
]
},
"description": "Email editor based on WordPress Gutenberg package.",

View File

@ -417,15 +417,11 @@ class Reporter {
}
public function getTrackingData() {
global $wp_version, $woocommerce; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$newsletters = $this->newslettersRepository->getAnalytics();
$segments = $this->segmentsRepository->getCountsPerType();
$mta = $this->settings->get('mta', []);
$installedAt = new Carbon($this->settings->get('installed_at'));
$theme = $this->wp->wpGetTheme();
$result = [
'WordPressVersion' => $wp_version, // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
'pluginGutenberg' => $this->wp->isPluginActive('gutenberg/gutenberg.php'),
return [
'installedAtIso' => $installedAt->format(Carbon::ISO8601),
'newslettersSent' => $newsletters['sent_newsletters_count'],
'welcomeEmails' => $newsletters['welcome_newsletters_count'],
@ -433,19 +429,9 @@ class Reporter {
'woocommerceEmails' => $newsletters['automatic_emails_count'],
'subscribers' => $this->subscribersFeature->getSubscribersCount(),
'lists' => isset($segments['default']) ? (int)$segments['default'] : 0,
'sendingMethod' => $mta['method'] ?? null,
'sendingMethod' => isset($mta['method']) ? $mta['method'] : null,
'woocommerceIsInstalled' => $this->woocommerceHelper->isWooCommerceActive(),
'blockTheme' => $this->wp->wpIsBlockTheme(),
'theme' => $theme->Name, // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
'themeVersion' => $theme->Version, // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
];
if (defined('GUTENBERG_VERSION')) {
$result['gutenbergVersion'] = GUTENBERG_VERSION;
}
if ($this->woocommerceHelper->isWooCommerceActive()) {
$result['wooCommerceVersion'] = $woocommerce->version;
}
return $result;
}
private function isFilterTypeActive(string $filterType, string $action): bool {

View File

@ -62,7 +62,6 @@ class SendEmailAction implements Action {
private const OPTIN_RETRIES = 'optin_retries';
private const TRANSACTIONAL_TRIGGERS = [
'mailpoet:custom-trigger',
'woocommerce:order-status-changed',
'woocommerce:order-created',
'woocommerce:order-completed',

View File

@ -39,13 +39,7 @@ class PostContentManager {
if ($this->wp->hasExcerpt($post)) {
return self::stripShortCodes($this->wp->getTheExcerpt($post));
}
return self::stripShortCodes(
$this->wp->applyFilters(
'get_the_excerpt',
$this->generateExcerpt($post->post_content), // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$post
)
);
return $this->generateExcerpt($post->post_content); // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
}
return self::stripShortCodes($post->post_content); // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
}

View File

@ -167,6 +167,8 @@ class Subscribers {
}
private function getFreeSubscribersLimit() {
return 999999999;
$installationTime = strtotime((string)$this->settings->get('installed_at'));
$oldUser = $installationTime < strtotime(self::NEW_LIMIT_DATE);
return $oldUser ? self::SUBSCRIBERS_OLD_LIMIT : self::SUBSCRIBERS_NEW_LIMIT;
}
}

View File

@ -5,6 +5,9 @@
"autoload": {
"classmap": [
"src/"
],
"files": [
"src/exceptions.php"
]
},
"autoload-dev": {

View File

@ -75,7 +75,7 @@ services:
- mailhog-data:/mailhog-data
wordpress:
image: wordpress:${WORDPRESS_IMAGE_VERSION:-6.7.2-php8.3}
image: wordpress:${WORDPRESS_IMAGE_VERSION:-6.7.1-php8.3}
container_name: wordpress_${CIRCLE_NODE_INDEX:-default}
depends_on:
smtp: