Automattic\WooCommerce\Internal\StockNotifications\Emails

EmailActionController::get_invalid_link_notice_text │ private │ WC 11.3.0

Returns the generic notice shown when an email link cannot be matched to a sign-up.

Method of the class: EmailActionController{}

No Hooks.

Returns

string.

Usage

// private - for code of main (parent) class only
$result = $this->get_invalid_link_notice_text( $action ): string;
$action(string) (required)
The email action: 'verify' or 'unsubscribe'.

Changelog

Since 11.3.0 Introduced.

EmailActionController::get_invalid_link_notice_text() code WC 11.3.0

private function get_invalid_link_notice_text( string $action ): string {
	return self::ACTION_VERIFY === $action
		? esc_html__( 'This verification link is no longer valid. Please use the link in the most recent verification email.', 'woocommerce' )
		: esc_html__( 'This unsubscribe link is no longer valid.', 'woocommerce' );
}