From 63300d941298b6f3e5da383258b8fb2fdc8a14e2 Mon Sep 17 00:00:00 2001
From: Philipp Stracker
Date: Mon, 27 May 2024 16:41:37 +0200
Subject: [PATCH] Change error message to standard WooCommerce copy
---
.../ppcp-wc-gateway/src/Processor/OrderProcessor.php | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/modules/ppcp-wc-gateway/src/Processor/OrderProcessor.php b/modules/ppcp-wc-gateway/src/Processor/OrderProcessor.php
index d2b145b0b..4d1363361 100644
--- a/modules/ppcp-wc-gateway/src/Processor/OrderProcessor.php
+++ b/modules/ppcp-wc-gateway/src/Processor/OrderProcessor.php
@@ -220,9 +220,14 @@ class OrderProcessor {
);
throw new PayPalOrderMissingException(
- __(
- 'Could not retrieve order. Maybe it was already completed or this browser is not supported. Please check your email or try again with a different browser.',
- 'woocommerce-paypal-payments'
+ sprintf(
+ // translators: %s: Order history URL on My Account section.
+ esc_attr__(
+ 'There was an error processing your order. Please check for any charges in your payment method and review your order history before placing the order again.',
+ // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch -- Intentionally "woocommerce" to reflect the original message.
+ 'woocommerce'
+ ),
+ esc_url( wc_get_account_endpoint_url( 'orders' ) )
)
);
}