• Resolved Doru Tirlea

    (@stkwarrior)


    Hello

    I found this topic opened more then 2 years ago but with no resolve. And I do not find in admin a way to change that still. That message will ever be able to edit? As I need to change the word wishlist to favorites and that seem to be the only text not changeable.

    Let me know, thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Doru Tirlea

    (@stkwarrior)

    Hello again,

    Can you please add this in a future release? It’s just a few quick additions to have that issue sorted. Will be great.

    Replace in “/wpml-config.xml”
    <key name="yith_wcwl_already_in_wishlist_text" />
    with

    <key name="yith_wcwl_already_in_wishlist_text" />
    <key name="yith_wcwl_no_product_added_in_wishlist_text" />

    Replace in “/includes/yith-wcwl-admin-init.php”

    'already_in_wishlist_text' => array(
        'name'    => __( '"Product already in wishlist" text', 'yith-woocommerce-wishlist' ),
        'id'      => 'yith_wcwl_already_in_wishlist_text',
        'default' => __( 'The product is already in the wishlist!', 'yith-woocommerce-wishlist' ),
        'type'    => 'text',
        'css'     => 'min-width:300px;',
    ),

    with

    'already_in_wishlist_text' => array(
        'name'    => __( '"Product already in wishlist" text', 'yith-woocommerce-wishlist' ),
        'id'      => 'yith_wcwl_already_in_wishlist_text',
        'default' => __( 'The product is already in the wishlist!', 'yith-woocommerce-wishlist' ),
        'type'    => 'text',
        'css'     => 'min-width:300px;',
    ),
    'no_product_added_in_wishlist_text' => array(
        'name'    => __( '"No product added in wishlist" text', 'yith-woocommerce-wishlist' ),
        'id'      => 'yith_wcwl_no_product_added_in_wishlist_text',
        'default' => __( 'No products were added to the wishlist', 'yith-woocommerce-wishlist' ),
        'type'    => 'text',
        'css'     => 'min-width:300px;',
    ),

    Replace in “/includes/class.yith-wcwl.php”
    $message = apply_filters( 'yith_wcwl_no_product_to_remove_message', __( 'No products were added to the wishlist', 'yith-woocommerce-wishlist' ) );
    with
    $message = apply_filters( 'yith_wcwl_no_product_to_remove_message', get_option( 'yith_wcwl_no_product_added_in_wishlist_text' ) );

    Replace in “/templates/wishlist-view.php”
    <?php echo apply_filters( 'yith_wcwl_no_product_to_remove_message', __( 'No products were added to the wishlist', 'yith-woocommerce-wishlist' ) ) ?>
    with
    <?php echo apply_filters( 'yith_wcwl_no_product_to_remove_message', get_option( 'yith_wcwl_no_product_added_in_wishlist_text' ) ) ?>

    or if you do not like this method, add it differently, but please add it on a next release ?? (as I said, was requested even more then 2 years ago with no solution)

    • This reply was modified 6 years, 1 month ago by Doru Tirlea.
    Plugin Author YITHEMES

    (@yithemes)

    Hello there,
    hope you are doing well! ??

    Thanks for contacting us, we will check the changes you propose and study the possibility of adding them in the next plugin updates.

    At the moment, you can change this text adding the next snippet in the functions.php of your active theme and replacing the actual message with the new one you want.

    if ( ! function_exists('yith_wcwl_no_product_to_remove_message_custom' ) ) {
        function yith_wcwl_no_product_to_remove_message_custom( $message ){
            $message = __( 'No products were added to the wishlist', 'yith-woocommerce-wishlist' );
            return $message;
        }
    }
    add_filter( 'yith_wcwl_no_product_to_remove_message', 'yith_wcwl_no_product_to_remove_message_custom', 10, 1 );

    Could you check it and let us know any news, please?

    Have a nice day!

    Thread Starter Doru Tirlea

    (@stkwarrior)

    Hello

    I implemented what I wrote previously and in that way is controlled from admin (so the owner can change his texts when ever he wants), so for me works at the moment. It would be great just if you include it in your next update not to lose my changes (Specially that is a good thing to have there and is based on your coding standard, so should not be a problem to add) ??

    Plugin Author YITHEMES

    (@yithemes)

    Hello there,

    Sure, I think that we can add the changes so don’t worry ??

    If you have any issue let us know and we will be happy to help you.

    Have a very nice day!

    Thread Starter Doru Tirlea

    (@stkwarrior)

    Thanks,

    Same to you

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How change text “No products were added to the wishlist” ?’ is closed to new replies.