I solved the first problem reading a post in this forum, but I couldn’t solve the second problem.
Any help?
Thank you
Hi Jorge,
we don’t officially support polylang, so there may be some errores when using both plugins together
Anyway, I suggest you to add this code at the end of functions.php of your theme
function filter_wishlist_items( $data ){
global $polylang;
$items = $data['wishlist_items'];
$translated_ids = array();
if( class_exists( 'Polylang' ) ) {
if ( ! empty( $items ) ) {
foreach ( $items as $id => & $item ) {
$item['prod_id'] = $polylang->model->get_post( $item['prod_id'], $polylang->curlang->term_id );
if( ! $item['prod_id'] || in_array( $item['prod_id'], $translated_ids ) ){
unset( $items[ $id ] );
}
$translated_ids[] = $item['prod_id'];
}
}
}
$data['wishlist_items'] = $items;
return $data;
}
add_filter( 'yith_wcwl_wishlist_params', 'filter_wishlist_items' );
This should filter products in wishlist, translating them, and leaving only one occurrence for each translated product
Let me know if this solves the problem
Have a nice day 🙂
Thank you very much!
I’ll try and let you know.
Hi,
I’ve tried with the code you gave me and my page has disappeared…
I don’t know what has happened but now nothing is working and it’s a big problem.
I’ve upload the original functions.php and the problem persists, the page doesn’t work, nothing.
Any idea?
I have a back up that I did some days ago, I’ll loose changes if it finally it works… because I was so stupid no to do a later backup..
At the moment I’m quite desperate.
Hi,
I’ve managed to have my webpage back with the backup!! I had made a very big mistake by copying the code in the functions.php of the father theme and then replacing the functions.php of the child with this.
Now I’ve just tried again copying the code only in the father theme functions.php, and your code works perfectly!
Thank you very much. When I saw that the page had disappeared it was like “Noooooooooooooooo”, a very bad experience hehehe, because I didn’t know why…
But fortunately everything is fixed.
Thank you again.
Glad to hear good news 🙂
If you have appreciated our plugin and our support, please don’t forget to give us a 5-star vote, and consider buying our premium version: here you can find more information about it, and here you can try a live demo of the plugin. 😉
Have a nice day!
If the wishlist url isn’t working, be sure to save your Permalinks settings again and it should fix the issue.
Hey Jorge,
Please let us know how you solved the first problem.
Thanks
Hi chris68,
If you’re talking about the 404 error on wihslist page, all you have to do is Navigate to Wp Dashboard -> Settings -> Permalinks, and save your options as they are
Let me know if this solves the problem
Have a nice day
i try to use this plugin on my site with permalinks enabled in the form /%postname%.html plus the plugin add any extension to page and when you try to access wishlist page gives a 404 error even if you try to recreate the permalinks that did not work but if you disable the plugin add any extension to pages and set the permalinks style in the defaut one the permalinks work fine, there is a way to fix this?
Hello Nick, hello YITH theme, hello community,
Nick have you been able to fix the issue?
I am experiencing the same issue as described. I went to dashboard > permalink, saved it as it was but nothing happened… It’s exactly the same thing than before regenerated permalinks: from homepage, I am redirected on mysite.com/wishlist/view/65KLMoI545 who doesn’t exist so the url is rewrited with the one of an article who begin with “view” ! And from a page of the site, I am redirected to the 404 page…
Thanks by advance for helping!
Rom174
-
This reply was modified 9 years, 8 months ago by
rom174. Reason: add some words
Hi rom174,
I am experiencing the same issue too, saving the permalink doesn’t work as well.
Please let me know if you already solved it.
Thanks
Hi khaishaunng,
It is just a tricky fix that I found in this topic : /bug-wishlistview-page-does-not-exist/ but it solves it for now.
Go to the plugin’s folder and in /includes/class.yith-wcwl.php at line 1110 :
public function get_wishlist_url( $action = 'view' ) {
remove view :
public function get_wishlist_url( $action = '' ) {
Let me know if it works.