Skip to content

Instantly share code, notes, and snippets.

@PluginRepublicSupport
Last active August 28, 2023 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PluginRepublicSupport/6c8cf94116473ae85fcf2a9ad6b7a2f1 to your computer and use it in GitHub Desktop.
Save PluginRepublicSupport/6c8cf94116473ae85fcf2a9ad6b7a2f1 to your computer and use it in GitHub Desktop.
Translate Members Only Field
<?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