• Resolved netgremlin

    (@netgremlin)


    Hi there,

    I’m getting the text <span> – <span> appearing in product titles on my woocommerce thank you pages. When I disable the Translatepress Plugin it fixes it but I then get the following error at the top of the page.

    Any idea how I can fix this?

    Cheers

    Notice: Undefined index: default in /home/564876.cloudwaysapps.com/gqgqfnknba/public_html/wp-includes/class-wp-list-util.php on line 170

    Notice: Undefined index: default in /home/564876.cloudwaysapps.com/gqgqfnknba/public_html/wp-includes/class-wp-list-util.php on line 170

    Notice: Undefined index: default in /home/564876.cloudwaysapps.com/gqgqfnknba/public_html/wp-includes/class-wp-list-util.php on line 170

    Notice: Undefined index: default in /home/564876.cloudwaysapps.com/gqgqfnknba/public_html/wp-includes/class-wp-list-util.php on line 170

Viewing 2 replies - 1 through 2 (of 2 total)

  • Hello,

    Thank you for reaching out with the details of the issue you’re facing.

    Firstly, can you please confirm if the product in question is a variation type within WooCommerce?

    If it is a variation type, the issue might be related to how WooCommerce constructs the title for variations. To address this, you can try using the following code snippet:

    add_filter( 'woocommerce_product_variation_title', 'filter_product_variation_title_callback', 10, 4 ); function filter_product_variation_title_callback( $variation_title, $product, $title_base, $title_suffix ) { $title_base = strip_tags($variation_title); return
    $title_base; }

    You can add this snippet to your theme’s functions.php file. This code aims to strip any HTML tags from the variation title, which might be causing the <span> – <span> to appear.

    Please give this a try and let us know if it resolves the issue. If not, we’ll continue to investigate and assist you further.

    Cheers,

    Thread Starter netgremlin

    (@netgremlin)

    Thanks Denis, that worked like a charm! Cheers

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘– in product titles’ is closed to new replies.