Merge pull request #418 from woocommerce/pcp-196-use-wc-translation

Use translation from WC for "Place order" / "Pay for order" buttons
This commit is contained in:
Emili Castells 2022-01-10 13:17:47 +01:00 committed by GitHub
commit 45a4463e75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -571,7 +571,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(
'<div id="%1$s" style="display:none;">