Sometimes you need to ask users to be specific about WooCommerce billing details. Especially when registering for say, a CPL or a medical or government billing form.
Here is a quick plugin to edit the “Billing Details” text on the check out page to direct BOB to fill out the form as ROBERT, or however it appears on their drivers license. I would also suggest a free plugin like Checkout Field Editor to add MIDDLE NAME and SUFFIX too.
<?php
/**
* Plugin Name: Billing as appears on drivers license
* Plugin URI: https://wallydavid.com
* Description: Changes the billing contact details heading and the billing address information tab label
* Author: wallydavid
* Author URI: https://wallydavid.com
* Text Domain: billonlic
* Domain Path: /languages
* Version: 0.1.0
*
* @package billonlic
*/
//Change the billing details heading and the billing information tab label
function wc_billing_field_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Billing address' :
$translated_text = __( 'Contact information as appears on drivers license', 'woocommerce' );
break;
case 'Billing details' :
$translated_text = __( 'Billing address as appears on drivers license', 'woocommerce' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'wc_billing_field_strings', 20, 3 );
?>