Commit a0fde90a45d for woocommerce

commit a0fde90a45dfec2f8be59d2f53c501ef6b54453a
Author: Pavel Dohnal <pavel.dohnal@automattic.com>
Date:   Wed Nov 25 13:06:12 2026 +0100

    Let consumers control test sending in the email editor (#71357)

    * Let consumers hide or redirect the test email send

    The email editor always showed "Send a test email" and always posted
    to its own REST route, so consumers that send test emails another way
    had to remove the menu item from the DOM or intercept apiFetch.

    Two JS filters now control this: one removes the menu item and its
    modal, the other changes the path the request is posted to. Both are
    read when used, so a callback added after the package loads applies.

    * Drop MailPoet defaults from the test email error

    Every consumer of the email editor showed a MailPoet Sending Service
    sign-up note and, unless it set a filter, a mailpoet.com link when a
    test email failed. That content only fits MailPoet.

    The link now defaults to empty, the note is gone, and a new filter
    lets consumers add their own help items. The list is only shown when
    there is something in it. The filters are read on each render instead
    of once when the editor loads, so late callbacks take effect.

    * Show REST errors and pass email type to send filters

    A plugin that redirects the test email to its own endpoint usually
    fails with a standard WordPress REST error, which has a message but no
    error field, so the modal showed no reason. The modal now falls back
    to that message, and the README says what the endpoint should return.

    The enabled and path filters now get the email post type, and the path
    filter also gets the post ID, like the error message filters, so a
    plugin can change the test send for one email type only.

    * Shorten the email editor changelog entry for test email filters

    * Hide the test email item only on an explicit false

    A filter callback that forgot to return a value gave undefined, and
    that removed "Send a test email" from the menu. Only a false result
    hides it now; any other value keeps the default.

    * Skip test email help items React can't render

    The help items filter can return anything. A plain object in the list
    crashed the test email modal, so only text and React elements are
    listed now.

    * Document that help items are strings or elements

    The README said the help items filter takes any ReactNode, but the
    modal lists only strings and React elements, one per item, and skips
    anything else. Say that instead.

    * Show test email errors without JSON quotes

    The modal ran every error through JSON.stringify, so a plain text
    error showed as Error: "No mailer configured", quotes included. Text
    errors are shown as they are now; only other values are stringified.

diff --git a/packages/js/email-editor/README.md b/packages/js/email-editor/README.md
index c30b1bc0c6f..8cced9718f0 100644
--- a/packages/js/email-editor/README.md
+++ b/packages/js/email-editor/README.md
@@ -352,7 +352,10 @@ We may add, update and delete any of them.
 | `woocommerce_email_editor_send_action_callback`                    | `function` sendAction                                 | `function` sendAction                      | Action to perform when the Send button is clicked                                                                              |
 | `woocommerce_email_editor_send_button_disabled`                    | `boolean` isDisabled, `object` flags                  | `boolean` isDisabled                       | Override the send button disabled state. The flags object contains `hasEmptyContent`, `isEmailSent`, and `isDirty` booleans    |
 | `woocommerce_email_editor_content_validation_rules`                | `array` rules                                         | `EmailContentValidationRule[]` rules       | Email editor content validation rules. The validation is done on `send button` click and revalidated on `save draft`           |
-| `woocommerce_email_editor_check_sending_method_configuration_link` | `string` link                                         | `string` link                              | Edit or remove the sending configuration link message                                                                          |
+| `woocommerce_email_editor_check_sending_method_configuration_link` | `string` link (`''` default), `string` postType       | `string` link                              | Link in the test email error message. An empty link hides that line                                                            |
+| `woocommerce_email_editor_send_preview_enabled`                    | `boolean` (true-default), `string` postType           | `boolean`                                  | Return `false` to remove the “Send a test email” menu item and its modal                                                       |
+| `woocommerce_email_editor_send_preview_api_path`                   | `string` path, `string` postType, `number` postId     | `string` path                              | REST path for test emails, posted `email` and `postId`. On failure, respond with an `error` or a WP REST error `message`       |
+| `woocommerce_email_editor_send_preview_help_items`                 | `array` items (`[]` default), `string` postType       | `array` items                              | Extra items listed in the test email error message. Each item is a string or a React element; others are skipped               |
 | `woocommerce_email_editor_setting_sidebar_extension_component`     | `JSX.Element` RichTextWithButton                      | `JSX.Element` Sidebar extension component  | Add components to the Email settings sidebar                                                                                   |
 | `woocommerce_email_editor_preferred_template_title`                | `string` '', `Post` post                              | `string` custom (preferred) template title | Custom title for Email preset template selector                                                                                |
 | `woocommerce_email_editor_sidebar_email_type_info_icon`            | none                                                  | `JSX.Element` icon component               | Return an icon from @wordpress/icons e.g. () => <Icon icon={ postContent } />                                                  |
diff --git a/packages/js/email-editor/changelog/update-wooplug-8226-send-preview-filters b/packages/js/email-editor/changelog/update-wooplug-8226-send-preview-filters
new file mode 100644
index 00000000000..bd26cb838e1
--- /dev/null
+++ b/packages/js/email-editor/changelog/update-wooplug-8226-send-preview-filters
@@ -0,0 +1,4 @@
+Significance: minor
+Type: update
+
+Add filters to hide or redirect “Send a test email” and add help to its error; remove the MailPoet defaults from that error.
diff --git a/packages/js/email-editor/src/components/preview/send-preview-email.tsx b/packages/js/email-editor/src/components/preview/send-preview-email.tsx
index cfee021ceb0..0976ab29e03 100644
--- a/packages/js/email-editor/src/components/preview/send-preview-email.tsx
+++ b/packages/js/email-editor/src/components/preview/send-preview-email.tsx
@@ -10,11 +10,12 @@ import {
 	useRef,
 	createInterpolateElement,
 	memo,
-	useMemo,
+	isValidElement,
 } from '@wordpress/element';
 import { ENTER } from '@wordpress/keycodes';
 import { isEmail } from '@wordpress/url';
 import { applyFilters } from '@wordpress/hooks';
+import type { ReactNode } from 'react';

 /**
  * Internal dependencies
@@ -50,15 +51,6 @@ function RawSendPreviewEmail() {
 		void requestSendingNewsletterPreview( previewToEmail );
 	};

-	const sendingMethodConfigurationLink = useMemo(
-		() =>
-			applyFilters(
-				'woocommerce_email_editor_check_sending_method_configuration_link',
-				`https://www.mailpoet.com/blog/mailpoet-smtp-plugin/?utm_source=woocommerce_email_editor&utm_medium=plugin&utm_source_platform=${ postType }`
-			) as string,
-		[ postType ]
-	);
-
 	const closeCallback = () => {
 		recordEvent( 'send_preview_email_modal_closed' );
 		void togglePreviewModal( false );
@@ -76,6 +68,26 @@ function RawSendPreviewEmail() {
 		return null;
 	}

+	// Read on every render, so callbacks added after the editor loaded still apply.
+	const filteredLink = applyFilters(
+		'woocommerce_email_editor_check_sending_method_configuration_link',
+		'',
+		postType
+	);
+	const sendingMethodConfigurationLink =
+		typeof filteredLink === 'string' ? filteredLink : '';
+	const filteredHelpItems = applyFilters(
+		'woocommerce_email_editor_send_preview_help_items',
+		[],
+		postType
+	);
+	const helpItems = Array.isArray( filteredHelpItems )
+		? ( filteredHelpItems as unknown[] ).filter(
+				( item ): item is ReactNode =>
+					typeof item === 'string' || isValidElement( item )
+			)
+		: [];
+
 	return (
 		<Modal
 			className="woocommerce-send-preview-email"
@@ -101,58 +113,41 @@ function RawSendPreviewEmail() {
 							) }
 					</strong>

-					<ul>
-						<li>
-							{ sendingMethodConfigurationLink &&
-								createInterpolateElement(
-									__(
-										'Please check your <link>sending method configuration</link> with your hosting provider.',
-										__i18n_text_domain__
-									),
-									{
-										link: (
-											// eslint-disable-next-line jsx-a11y/anchor-has-content
-											<a
-												href={
-													sendingMethodConfigurationLink
-												}
-												target="_blank"
-												rel="noopener noreferrer"
-												onClick={ () =>
-													recordEvent(
-														'send_preview_email_modal_check_sending_method_configuration_link_clicked'
-													)
-												}
-											/>
+					{ ( sendingMethodConfigurationLink ||
+						helpItems.length > 0 ) && (
+						<ul>
+							{ sendingMethodConfigurationLink && (
+								<li>
+									{ createInterpolateElement(
+										__(
+											'Please check your <link>sending method configuration</link> with your hosting provider.',
+											__i18n_text_domain__
 										),
-									}
-								) }
-						</li>
-						<li>
-							{ createInterpolateElement(
-								__(
-									'Or, sign up for MailPoet Sending Service to easily send emails. <link>Sign up for free</link>',
-									__i18n_text_domain__
-								),
-								{
-									link: (
-										// eslint-disable-next-line jsx-a11y/anchor-has-content
-										<a
-											href={ `https://account.mailpoet.com/?s=1&g=1&utm_source=woocommerce_email_editor&utm_medium=plugin&utm_source_platform=${ postType }` }
-											key="sign-up-for-free"
-											target="_blank"
-											rel="noopener noreferrer"
-											onClick={ () =>
-												recordEvent(
-													'send_preview_email_modal_sign_up_for_mailpoet_sending_service_link_clicked'
-												)
-											}
-										/>
-									),
-								}
+										{
+											link: (
+												// eslint-disable-next-line jsx-a11y/anchor-has-content
+												<a
+													href={
+														sendingMethodConfigurationLink
+													}
+													target="_blank"
+													rel="noopener noreferrer"
+													onClick={ () =>
+														recordEvent(
+															'send_preview_email_modal_check_sending_method_configuration_link_clicked'
+														)
+													}
+												/>
+											),
+										}
+									) }
+								</li>
 							) }
-						</li>
-					</ul>
+							{ helpItems.map( ( item, index ) => (
+								<li key={ index }>{ item }</li>
+							) ) }
+						</ul>
+					) }
 				</div>
 			) : null }
 			<p>
diff --git a/packages/js/email-editor/src/components/preview/send-preview.tsx b/packages/js/email-editor/src/components/preview/send-preview.tsx
index bacbcf77056..8f5d4d3cb4e 100644
--- a/packages/js/email-editor/src/components/preview/send-preview.tsx
+++ b/packages/js/email-editor/src/components/preview/send-preview.tsx
@@ -1,10 +1,11 @@
 /**
  * External dependencies
  */
-import { useDispatch } from '@wordpress/data';
+import { useDispatch, useSelect } from '@wordpress/data';
 import { __ } from '@wordpress/i18n';
 import { external } from '@wordpress/icons';
 import { PluginPreviewMenuItem } from '@wordpress/editor';
+import { applyFilters } from '@wordpress/hooks';

 /**
  * Internal dependencies
@@ -15,6 +16,20 @@ import { recordEvent } from '../../events';

 export function SendPreview() {
 	const { togglePreviewModal } = useDispatch( storeName );
+	const postType = useSelect(
+		( select ) => select( storeName ).getEmailPostType(),
+		[]
+	);
+
+	if (
+		applyFilters(
+			'woocommerce_email_editor_send_preview_enabled',
+			true,
+			postType
+		) === false
+	) {
+		return null;
+	}

 	return (
 		<>
diff --git a/packages/js/email-editor/src/components/preview/test/send-preview-email.spec.tsx b/packages/js/email-editor/src/components/preview/test/send-preview-email.spec.tsx
index 55adfe95e19..456471b2bb6 100644
--- a/packages/js/email-editor/src/components/preview/test/send-preview-email.spec.tsx
+++ b/packages/js/email-editor/src/components/preview/test/send-preview-email.spec.tsx
@@ -10,6 +10,7 @@ import {
 } from '@wordpress/data';
 import { controls } from '@wordpress/data-controls';
 import { forwardRef } from '@wordpress/element';
+import { applyFilters } from '@wordpress/hooks';
 import userEvent from '@testing-library/user-event';

 /**
@@ -125,6 +126,7 @@ const renderWithPreviewState = (
 		reducer,
 		initialState: {
 			...initialState,
+			postType: 'woo_email',
 			preview: {
 				...initialState.preview,
 				isModalOpened: true,
@@ -147,6 +149,12 @@ const renderWithPreviewState = (
 };

 describe( 'SendPreviewEmail', () => {
+	beforeEach( () => {
+		( applyFilters as jest.Mock ).mockImplementation(
+			( _hook: string, value: unknown ) => value
+		);
+	} );
+
 	it( 'should render the modal with input and buttons', () => {
 		renderWithPreviewState();
 		expect( screen.getByTestId( 'modal' ) ).toBeInTheDocument();
@@ -223,6 +231,72 @@ describe( 'SendPreviewEmail', () => {
 		).toBeInTheDocument();
 	} );

+	it( 'shows only the error text, with no MailPoet content, when no filter adds help', () => {
+		renderWithPreviewState( {
+			sendingPreviewStatus: SendingPreviewStatus.ERROR,
+			errorMessage: 'Server failure',
+		} );
+
+		expect( screen.queryByRole( 'list' ) ).not.toBeInTheDocument();
+		expect( screen.queryByRole( 'link' ) ).not.toBeInTheDocument();
+		expect( screen.getByTestId( 'modal' ) ).not.toHaveTextContent(
+			/MailPoet/
+		);
+	} );
+
+	it( 'lists the configuration link and help items from filters added after the editor loaded', () => {
+		const { registry } = renderWithPreviewState( {
+			isModalOpened: false,
+			sendingPreviewStatus: SendingPreviewStatus.ERROR,
+			errorMessage: 'Server failure',
+		} );
+
+		( applyFilters as jest.Mock ).mockImplementation(
+			( hook: string, value: unknown, postType: string ) => {
+				if (
+					hook ===
+					'woocommerce_email_editor_check_sending_method_configuration_link'
+				) {
+					return 'https://example.com/smtp';
+				}
+				if (
+					hook === 'woocommerce_email_editor_send_preview_help_items'
+				) {
+					return [ <span key="a">Help for { postType }</span> ];
+				}
+				return value;
+			}
+		);
+		act( () => {
+			registry.dispatch( storeName ).togglePreviewModal( true );
+		} );
+
+		expect(
+			screen.getByRole( 'link', {
+				name: 'sending method configuration',
+			} )
+		).toHaveAttribute( 'href', 'https://example.com/smtp' );
+		expect( screen.getAllByRole( 'listitem' ) ).toHaveLength( 2 );
+		expect( screen.getByText( 'Help for woo_email' ) ).toBeVisible();
+	} );
+
+	it( 'skips help items that are not text or elements', () => {
+		( applyFilters as jest.Mock ).mockImplementation(
+			( hook: string, value: unknown ) =>
+				hook === 'woocommerce_email_editor_send_preview_help_items'
+					? [ { label: 'Not renderable' }, 'Check your mailer' ]
+					: value
+		);
+		renderWithPreviewState( {
+			sendingPreviewStatus: SendingPreviewStatus.ERROR,
+		} );
+
+		expect( screen.getAllByRole( 'listitem' ) ).toHaveLength( 1 );
+		expect( screen.getByRole( 'listitem' ) ).toHaveTextContent(
+			'Check your mailer'
+		);
+	} );
+
 	it( 'should show success message when status is SUCCESS', () => {
 		renderWithPreviewState( {
 			sendingPreviewStatus: SendingPreviewStatus.SUCCESS,
diff --git a/packages/js/email-editor/src/components/preview/test/send-preview.spec.tsx b/packages/js/email-editor/src/components/preview/test/send-preview.spec.tsx
new file mode 100644
index 00000000000..773bf482244
--- /dev/null
+++ b/packages/js/email-editor/src/components/preview/test/send-preview.spec.tsx
@@ -0,0 +1,92 @@
+/**
+ * External dependencies
+ */
+import { render, screen } from '@testing-library/react';
+import '@testing-library/jest-dom';
+import { applyFilters } from '@wordpress/hooks';
+
+/**
+ * Internal dependencies
+ */
+import { SendPreview } from '../send-preview';
+
+jest.mock( '@wordpress/data', () => ( {
+	useDispatch: () => ( { togglePreviewModal: jest.fn() } ),
+	useSelect: ( mapSelect: ( select: () => object ) => unknown ) =>
+		mapSelect( () => ( { getEmailPostType: () => 'woo_email' } ) ),
+} ) );
+
+jest.mock( '@wordpress/editor', () => ( {
+	PluginPreviewMenuItem: ( props: { children?: React.ReactNode } ) => (
+		<button>{ props.children }</button>
+	),
+} ) );
+
+jest.mock( '@wordpress/hooks', () => ( {
+	applyFilters: jest.fn(),
+} ) );
+
+jest.mock( '@wordpress/i18n', () => ( {
+	__: ( value: string ) => value,
+} ) );
+
+jest.mock( '@wordpress/icons', () => ( {
+	external: 'external',
+} ) );
+
+jest.mock( '../send-preview-email', () => ( {
+	SendPreviewEmail: () => <div data-testid="send-preview-modal" />,
+} ) );
+
+jest.mock( '../../../store/constants', () => ( {
+	storeName: 'email-editor/editor',
+} ) );
+
+jest.mock( '../../../events', () => ( {
+	recordEvent: jest.fn(),
+} ) );
+
+describe( 'SendPreview', () => {
+	it( 'adds the menu item and the modal by default', () => {
+		( applyFilters as jest.Mock ).mockImplementation(
+			( _hook: string, value: unknown ) => value
+		);
+		render( <SendPreview /> );
+
+		expect(
+			screen.getByRole( 'button', { name: 'Send a test email' } )
+		).toBeInTheDocument();
+		expect(
+			screen.getByTestId( 'send-preview-modal' )
+		).toBeInTheDocument();
+	} );
+
+	it( 'renders neither the menu item nor the modal when the enabled filter returns false for the email type', () => {
+		( applyFilters as jest.Mock ).mockImplementation(
+			( hook: string, value: unknown, postType: string ) =>
+				hook === 'woocommerce_email_editor_send_preview_enabled'
+					? postType !== 'woo_email'
+					: value
+		);
+		const { container } = render( <SendPreview /> );
+
+		expect( container ).toBeEmptyDOMElement();
+	} );
+
+	it.each( [ undefined, null, 0, '' ] )(
+		'keeps the menu item when the enabled filter returns %p instead of false',
+		( result ) => {
+			( applyFilters as jest.Mock ).mockImplementation(
+				( hook: string, value: unknown ) =>
+					hook === 'woocommerce_email_editor_send_preview_enabled'
+						? result
+						: value
+			);
+			render( <SendPreview /> );
+
+			expect(
+				screen.getByRole( 'button', { name: 'Send a test email' } )
+			).toBeInTheDocument();
+		}
+	);
+} );
diff --git a/packages/js/email-editor/src/store/actions.ts b/packages/js/email-editor/src/store/actions.ts
index 725c775d6ae..4a11df9e232 100644
--- a/packages/js/email-editor/src/store/actions.ts
+++ b/packages/js/email-editor/src/store/actions.ts
@@ -4,6 +4,7 @@
 import { select } from '@wordpress/data';
 import { store as coreDataStore } from '@wordpress/core-data';
 import { apiFetch } from '@wordpress/data-controls';
+import { applyFilters } from '@wordpress/hooks';

 /**
  * Internal dependencies
@@ -117,9 +118,21 @@ export function* requestSendingNewsletterPreview( email: string ) {
 	} as const;
 	try {
 		const postId = select( storeName ).getEmailPostId();
+		const postType = select( storeName ).getEmailPostType();
+
+		const defaultPath = '/woocommerce-email-editor/v1/send_preview_email';
+		const filteredPath = applyFilters(
+			'woocommerce_email_editor_send_preview_api_path',
+			defaultPath,
+			postType,
+			postId
+		);

 		yield apiFetch( {
-			path: '/woocommerce-email-editor/v1/send_preview_email',
+			path:
+				typeof filteredPath === 'string' && filteredPath
+					? filteredPath
+					: defaultPath,
 			method: 'POST',
 			data: {
 				email,
@@ -137,14 +150,21 @@ export function* requestSendingNewsletterPreview( email: string ) {
 		recordEvent( 'sent_preview_email', { postId, email } );
 	} catch ( errorResponse ) {
 		recordEvent( 'sent_preview_email_error', { email } );
+		// The package endpoint returns `error`; a standard WP REST error has `message`.
+		const { error, message } = ( errorResponse ?? {} ) as {
+			error?: unknown;
+			message?: unknown;
+		};
+		const detail = error ?? message;
 		yield {
 			type: 'CHANGE_PREVIEW_STATE',
 			state: {
 				sendingPreviewStatus: SendingPreviewStatus.ERROR,
 				isSendingPreviewEmail: false,
-				// eslint-disable-next-line @typescript-eslint/ban-ts-comment
-				// @ts-ignore
-				errorMessage: JSON.stringify( errorResponse?.error ),
+				errorMessage:
+					typeof detail === 'string'
+						? detail
+						: JSON.stringify( detail ),
 			},
 		};
 	}
diff --git a/packages/js/email-editor/src/store/test/actions.spec.ts b/packages/js/email-editor/src/store/test/actions.spec.ts
index 9e71e46e053..8a75c738365 100644
--- a/packages/js/email-editor/src/store/test/actions.spec.ts
+++ b/packages/js/email-editor/src/store/test/actions.spec.ts
@@ -3,6 +3,7 @@
  */
 import { select } from '@wordpress/data';
 import { apiFetch } from '@wordpress/data-controls';
+import { applyFilters } from '@wordpress/hooks';

 /**
  * Internal dependencies
@@ -23,6 +24,10 @@ jest.mock( '@wordpress/data-controls', () => ( {
 	apiFetch: jest.fn(),
 } ) );

+jest.mock( '@wordpress/hooks', () => ( {
+	applyFilters: jest.fn( ( _hook: string, value: unknown ) => value ),
+} ) );
+
 jest.mock( '../../events', () => ( {
 	recordEvent: jest.fn(),
 } ) );
@@ -49,6 +54,9 @@ describe( 'requestSendingNewsletterPreview', () => {
 			} )
 			.mockReturnValueOnce( {
 				getEmailPostId: () => 123,
+			} )
+			.mockReturnValueOnce( {
+				getEmailPostType: () => 'woo_email',
 			} );
 	} );

@@ -88,6 +96,33 @@ describe( 'requestSendingNewsletterPreview', () => {
 		} );
 	} );

+	it( 'posts the preview request to the path returned by the API path filter', () => {
+		( applyFilters as jest.Mock ).mockImplementationOnce(
+			(
+				hook: string,
+				value: unknown,
+				postType: string,
+				postId: number
+			) =>
+				hook === 'woocommerce_email_editor_send_preview_api_path'
+					? `/my-plugin/v1/test-email/${ postType }/${ postId }`
+					: value
+		);
+
+		const action = requestSendingNewsletterPreview( 'test@example.com' );
+		action.next();
+		action.next();
+
+		expect( apiFetchMock ).toHaveBeenCalledWith( {
+			path: '/my-plugin/v1/test-email/woo_email/123',
+			method: 'POST',
+			data: {
+				email: 'test@example.com',
+				postId: 123,
+			},
+		} );
+	} );
+
 	it( 'yields nothing when a preview send is already in flight', () => {
 		// Overwrite the queue beforeEach set up: this case needs the guard to see a
 		// send already running. Queue it the same way, so nothing outlives the case.
@@ -121,10 +156,28 @@ describe( 'requestSendingNewsletterPreview', () => {
 				state: {
 					sendingPreviewStatus: SendingPreviewStatus.ERROR,
 					isSendingPreviewEmail: false,
-					errorMessage: '"Request failed"',
+					errorMessage: 'Request failed',
 				},
 			},
 			done: false,
 		} );
 	} );
+
+	it( 'shows the message of a standard REST error from a custom endpoint', () => {
+		apiFetchMock.mockReturnValue( { type: 'API_FETCH' } );
+		const action = requestSendingNewsletterPreview( 'test@example.com' );
+
+		action.next();
+		action.next();
+
+		expect(
+			action.throw( {
+				code: 'my_plugin_error',
+				message: 'No mailer configured',
+				data: { status: 500 },
+			} ).value
+		).toMatchObject( {
+			state: { errorMessage: 'No mailer configured' },
+		} );
+	} );
 } );
diff --git a/packages/js/email-editor/src/telemetry-tracking.md b/packages/js/email-editor/src/telemetry-tracking.md
index 65eb04934aa..05abc7a6d2e 100644
--- a/packages/js/email-editor/src/telemetry-tracking.md
+++ b/packages/js/email-editor/src/telemetry-tracking.md
@@ -72,7 +72,6 @@ All events are prefixed `email_editor_events_`.
 | `send_preview_email_modal_send_test_email_button_clicked`                    | -                                                                                                | Tracked when the send test email button is clicked in the send preview email modal                                                                                          |
 | `send_preview_email_modal_send_to_field_key_code_enter`                      | -                                                                                                | Tracked when the enter key is pressed in the send to field of the send preview email modal                                                                                  |
 | `send_preview_email_modal_send_to_field_updated`                             | -                                                                                                | Tracked when the send to field is updated in the send preview email modal                                                                                                   |
-| `send_preview_email_modal_sign_up_for_mailpoet_sending_service_link_clicked` | -                                                                                                | Tracked when the sign up for MailPoet Sending Service link is clicked in the send preview email modal                                                                       |
 | `sent_preview_email`                                                         | `{ postId, email }`                                                                              | Tracked when a preview email is successfully sent                                                                                                                           |
 | `sent_preview_email_error`                                                   | `{ email }`                                                                                      | Tracked when there's an error sending a preview email                                                                                                                       |
 | `sidebar_tab_selected`                                                       | `{ tab: 'document' \| 'block' }`                                                                 | Tracked when user selects a tab in the sidebar                                                                                                                              |
diff --git a/plugins/woocommerce/changelog/update-wooplug-8226-send-preview-filters b/plugins/woocommerce/changelog/update-wooplug-8226-send-preview-filters
new file mode 100644
index 00000000000..0196894d443
--- /dev/null
+++ b/plugins/woocommerce/changelog/update-wooplug-8226-send-preview-filters
@@ -0,0 +1,4 @@
+Significance: patch
+Type: update
+
+Remove the MailPoet Sending Service sign-up note from the email editor’s test email error message.