From b93d0acfcc4f4f2d38e46e486a689021d376427b Mon Sep 17 00:00:00 2001 From: Alex P Date: Tue, 21 Dec 2021 17:51:28 +0200 Subject: [PATCH] Use translation from WC for "Place order" / "Pay for order" --- modules/ppcp-button/src/Assets/SmartButton.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ppcp-button/src/Assets/SmartButton.php b/modules/ppcp-button/src/Assets/SmartButton.php index 62ec1aa90..ccfa66d62 100644 --- a/modules/ppcp-button/src/Assets/SmartButton.php +++ b/modules/ppcp-button/src/Assets/SmartButton.php @@ -570,7 +570,8 @@ class SmartButton implements SmartButtonInterface { return; } - $label = 'checkout' === $this->context() ? __( 'Place order', 'woocommerce-paypal-payments' ) : __( 'Pay for order', 'woocommerce-paypal-payments' ); + // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch + $label = 'checkout' === $this->context() ? apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'woocommerce' ) ) : __( 'Pay for order', 'woocommerce' ); printf( '