From ea3c13b59c8d135afebb106bd9935d6ea93509af Mon Sep 17 00:00:00 2001 From: dinamiko Date: Tue, 26 Apr 2022 12:36:41 +0200 Subject: [PATCH] Translate birth date manually --- .../src/Gateway/PayUponInvoice/PayUponInvoice.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/ppcp-wc-gateway/src/Gateway/PayUponInvoice/PayUponInvoice.php b/modules/ppcp-wc-gateway/src/Gateway/PayUponInvoice/PayUponInvoice.php index 92d4ea974..9a5bb771a 100644 --- a/modules/ppcp-wc-gateway/src/Gateway/PayUponInvoice/PayUponInvoice.php +++ b/modules/ppcp-wc-gateway/src/Gateway/PayUponInvoice/PayUponInvoice.php @@ -205,13 +205,16 @@ class PayUponInvoice { function( string $description, string $id ): string { if ( PayUponInvoiceGateway::ID === $id ) { ob_start(); + + $site_country_code = explode( '-', get_bloginfo( 'language' ) )[0] ?? ''; + echo '
'; woocommerce_form_field( 'billing_birth_date', array( 'type' => 'date', - 'label' => __( 'Birth date', 'woocommerce-paypal-payments' ), + 'label' => $site_country_code === 'de' ? 'Geburtsdatum' : 'Birth date', 'class' => array( 'form-row-wide' ), 'required' => true, 'clear' => true, @@ -219,7 +222,6 @@ class PayUponInvoice { ); echo '
'; - $site_country_code = explode( '-', get_bloginfo( 'language' ) )[0] ?? ''; // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch $button_text = apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'woocommerce' ) );