I currently have a bit of code in my child theme's functions.php file which is supposed to change "Billing Details" to say "Shipping Details" on my WooCommerce checkout page.
However, when I updated to WooCommerce 3.0, the code snippet stopped working. Below is the code I was using.
function wc_billing_field_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Billing Details' :
$translated_text = __( 'Shipping Details', 'woocommerce' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'wc_billing_field_strings', 20, 3 );
I would really like a code snippet that works with WooCommerce 3.0.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…