Custom note showing as HTML after latest plugin update
-
We have been using the following code in our functions.php file to show a custom message on the Billing Details page for a few months now without a problem:
/* ______________________________________________ WooCommerce billing address note BEGIN ______________________________________________ */ function wc_billing_field_strings( $translated_text, $text, $domain ) { switch ( $translated_text ) { case 'Billing details' : $translated_text = __( 'Billing details <br><span style="font-size:80%; line-height:20px; color: #F97F85;">Name and address <em>must</em> be consistent with cardholder name and billing address.</span>', 'woocommerce' ); break; } return $translated_text; } add_filter( 'gettext', 'wc_billing_field_strings', 20, 3 ); /* ______________________________________________ WooCommerce billing address note END ______________________________________________ */
However, updating to the latest version of WooCommerce causes the HTML to show rather than the formatted text seen here: https://www.levellerspress.com/checkout/ (be advised you will need to add something to your cart to see the Billing Details message in red).
We have restored the previous version of WooCommerce and the message now appears again as intended.
I tried changing the double quotes to single quotes in the code above but that made no difference. I assume the custom coding we have been using is no longer an option with the latest plugin update?
Any guidance so we can update to the latest version of WooCommerce and keep our custom note is greatly appreciated. Thanks in advance!
The page I need help with: [log in to see the link]
- The topic ‘Custom note showing as HTML after latest plugin update’ is closed to new replies.