Replace ReactStringReplace with createInterpolateElement

MAILPOET-5162
This commit is contained in:
Oluwaseun Olorunsola
2023-10-31 09:24:22 +01:00
committed by Aschepikov
parent 4dba4f8b6a
commit b3665fd1bc
3 changed files with 30 additions and 28 deletions

View File

@@ -140,7 +140,7 @@ class Services extends APIEndpoint {
$error = __('Your key is not valid for the MailPoet Sending Service', 'mailpoet');
break;
case Bridge::KEY_ALREADY_USED:
$error = __('Your MailPoet Sending Service key is already [link]used on another site[/link]', 'mailpoet');
$error = __('Your MailPoet Sending Service key is already <a>used on another site</a>', 'mailpoet'); // we will use createInterpolateElement to replace <a> element
break;
default:
$code = !empty($result['code']) ? $result['code'] : Bridge::CHECK_ERROR_UNKNOWN;
@@ -209,7 +209,7 @@ class Services extends APIEndpoint {
$error = __('Your key is not valid for MailPoet Premium', 'mailpoet');
break;
case Bridge::KEY_ALREADY_USED:
$error = __('Your Premium key is already [link]used on another site[/link]', 'mailpoet');
$error = __('Your Premium key is already <a>used on another site</a>', 'mailpoet'); // we will use createInterpolateElement to replace <a> element
break;
default:
$code = !empty($result['code']) ? $result['code'] : Bridge::CHECK_ERROR_UNKNOWN;