Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi there

    The problem is caused by the fact that you’re filtering product title to add that HTML span, but we escape any HTML special character in the title, as a security measure, before printing it out

    The optimal solution would be to stop filtering product title, and add that span via templates
    Anyway, if this is not an option, I suggest you to override default wishlist-view.php template in your theme folder, under /woocommerce subpath, and manually remove esc_html() function from product title output:

    <a href="<?php echo esc_url( get_permalink( apply_filters( 'woocommerce_in_cart_product', $item->get_product_id() ) ) ); ?>"><?php echo apply_filters( 'woocommerce_in_cartproduct_obj_title', $product->get_title(), $product ); ?></a>
    
    Thread Starter tcn2020

    (@tcn2020)

    Thank alot for your answer.

    I tried but as i’m don’t know php yet and how write him, i’m dont’t know what delete and when stop, i deleted this full line :

    <?php echo esc_html( apply_filters( 'woocommerce_in_cartproduct_obj_title', $product->get_title(), $product ) ); ?></a>

    And it just let met keep picture of products, did they have a way for also keep the title ?

    Plugin Author YITHEMES

    (@yithemes)

    Hi there

    Sorry, I should’ve been more detailed in my explaination

    Please, try to follow these steps:

    1. Copy wishlist-view.php file from wp-content/plugins/yith-woocommerce-wishlist/templates into wp-content/themes/<your theme or child>/woocommerce (make sure that your theme do not include already a copy of this template; if it does, just skip this step)
    2. Update the brand new wishlist-view.php template in your theme folder, by replacing the following line

    <a href="<?php echo esc_url( get_permalink( apply_filters( 'woocommerce_in_cart_product', $item->get_product_id() ) ) ); ?>"><?php echo esc_html( apply_filters( 'woocommerce_in_cartproduct_obj_title', $product->get_title(), $product ) ); ?></a>

    that you should find inside the file, with what follows

    <a href="<?php echo esc_url( get_permalink( apply_filters( 'woocommerce_in_cart_product', $item->get_product_id() ) ) ); ?>"><?php echo apply_filters( 'woocommerce_in_cartproduct_obj_title', $product->get_title(), $product ); ?></a>

    (as you can see the only difference is the removed escape function)

    Hope this makes more sense; let me know if solves the issue

    Thread Starter tcn2020

    (@tcn2020)

    Thank alot to had take time to explain me, i will know for future now.

    Absolutly it work perfectly 🙂 But i changed native plugin files instead put copy of them on my theme (i have do for normal and mobile view). Should i put a copy of them on theme file too? it will work and not conflict beetween them?

    Because i searched and i havent see similars php files relative to wishlist on my theme files. Maybe i have searched bad, but even sublime text donc help me to find this line on the aurum theme.

    Plugin Author YITHEMES

    (@yithemes)

    Hi there

    It is totally fine for your theme not to override any default template of YITH WooCommerce Wishlist

    I suggest you to proceed copying the modified template in theme folder, any way, in order to avoid to lose all your changes on next plugin update
    There shouldn’t be any conflict; simply plugin will use templates bundled with your theme instead of its own
    This behaviour is completely implemented inside plugin, and do not require anything on theme side

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘span name appear’ is closed to new replies.