I am trying to change some titles on the WooCommerce checkout page.
One of the titles is "Billing details"
I've tried:
function wc_billing_field_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Billing details' :
$translated_text = __( 'Billing Info', 'woocommerce' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'wc_billing_field_strings', 20, 3 );
I just can't change the text of those, whatever I add to my functions.php or WooCommerce alterations file.
Can you please let me know, how I can change those title?
Note: I would like to make use of action hooks. I don't won't to copy the WooCommerce template file as other options suggests.
source https://stackoverflow.com/questions/67918992/how-to-change-billing-details-title-on-woocommerce-checkout-page-with-a-hook
No comments:
Post a Comment