Last active
August 28, 2023 14:16
-
-
Save PluginRepublicSupport/6c8cf94116473ae85fcf2a9ad6b7a2f1 to your computer and use it in GitHub Desktop.
Translate Members Only Field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'wcmo_registration_fields', function( $fields ) { | |
foreach ( $fields as $key => $field ) { | |
switch ( $key ) { | |
case "first_name": | |
$fields[$key]["label"] = "Voornaam"; | |
break; | |
case "last_name": | |
$fields[$key]["label"] = "Achternaam"; | |
break; | |
case "billing_company": | |
$fields[$key]["label"] = "Bedrijfsnaam"; | |
break; | |
case "billing_address_1": | |
$fields[$key]["label"] = "Adres"; | |
break; | |
case "billing_city": | |
$fields[$key]["label"] = "Plaats"; | |
break; | |
// case "billing_country": | |
// $fields[$key]["label"] = "Maa"; | |
// break; | |
case "billing_postcode": | |
$fields[$key]["label"] = "Postcode"; | |
break; | |
case "billing_phone": | |
$fields[$key]["label"] = "Telefoonnummer"; | |
break; | |
case "vat_number": | |
$fields[$key]["label"] = "B.T.W nummer"; | |
break; | |
} | |
} | |
return $fields; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment