Translate birth date manually

This commit is contained in:
dinamiko 2022-04-26 12:36:41 +02:00
parent acf7fa6d00
commit ea3c13b59c

View file

@ -205,13 +205,16 @@ class PayUponInvoice {
function( string $description, string $id ): string { function( string $description, string $id ): string {
if ( PayUponInvoiceGateway::ID === $id ) { if ( PayUponInvoiceGateway::ID === $id ) {
ob_start(); ob_start();
$site_country_code = explode( '-', get_bloginfo( 'language' ) )[0] ?? '';
echo '<div style="padding: 20px 0;">'; echo '<div style="padding: 20px 0;">';
woocommerce_form_field( woocommerce_form_field(
'billing_birth_date', 'billing_birth_date',
array( array(
'type' => 'date', 'type' => 'date',
'label' => __( 'Birth date', 'woocommerce-paypal-payments' ), 'label' => $site_country_code === 'de' ? 'Geburtsdatum' : 'Birth date',
'class' => array( 'form-row-wide' ), 'class' => array( 'form-row-wide' ),
'required' => true, 'required' => true,
'clear' => true, 'clear' => true,
@ -219,7 +222,6 @@ class PayUponInvoice {
); );
echo '</div><div>'; echo '</div><div>';
$site_country_code = explode( '-', get_bloginfo( 'language' ) )[0] ?? '';
// phpcs:ignore WordPress.WP.I18n.TextDomainMismatch // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch
$button_text = apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'woocommerce' ) ); $button_text = apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'woocommerce' ) );