• I just installed the plugin, so I haven’t fucked around with the code at all, other than translating it to Hungarian. I noticed when a user wants to remove an item from his/her wishlist, it doesn’t work – nothing happens at all (I am using a theme called Trizzy, if it would have an importance).

    Here’s the php code snippet if needed.
    <td class="product-remove"><a href="javascript:void(0)" onclick="<?php echo $remove_wishlist ?>" class="remove cart-remove" title="<?php _e( 'Termék eltávolítása', 'trizzy' ) ?>"></a></td>

    https://www.ads-software.com/plugins/yith-woocommerce-wishlist/

Viewing 3 replies - 1 through 3 (of 3 total)
  • I have the same problem and I got this error on console:

    Uncaught ReferenceError: remove_item_from_wishlist is not defined

    I have the same problem.
    Nothing happens when I try to remove item from whishlist.

    Plugin Author YITHEMES

    (@yithemes)

    Hi guys

    I think your problems are related to overwritten template within your themes; can you please try to use wishlist with default twenty theme?

    For example, new template doesn’t relay anymore on “onclick” attribute; old onclick attribute would call remove_item_from_wishlist() global function, but in new js code this function is defined within a jQuery closure, and then it isn’t accessible anymore for external call

    POSSIBILE WORKAROUND:

    You can try removing onclick attribute from remove link, and add class remove_from_wishlist to the anchor tag

    The code posted by justrandomdude would became something like this

    <td class="product-remove"><a href="#" class="remove cart-remove remove_from_wishlist" title="<?php _e( 'Termék eltávolítása', 'trizzy' ) ?>"></a></td>

    Let me know if this helps

    PS @justrandomdude: you shouldn’t change template just to translate them; for this purpose you should use .po archives included with plugin, and change WP language. Here you can find a guide to plugin localization

    Have a nice day ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can't remove items from wishlist’ is closed to new replies.