Untitled
function custom_text_change_script() { if ( is_cart() ) { ?> <script type="text/javascript"> // Replace the text inside <strong> tags in cart page jQuery(document).ready(function($) { $('.woocommerce-cart-form .product-name strong:contains("Inserisci la larghezza (m):")').each(function() { $(this).text($(this).text().replace('Inserisci la larghezza (m):', 'Largezza:')); }); }); </script> <?php } } add_action('wp_head', 'custom_text_change_script');