Hi there,
it’s strange. Did you enable the debug mode and find any issue in the debug.log file?
How to enable the debug mode ?
I found PHP Deprecated: add_option_whitelist
-
This reply was modified 3 years, 8 months ago by Designrest.
How did you solve the problem?
Hi there,
are you using a cache plugin ? If yes, try to purge the cache and exclude the compare page from cache.
Let us know.
Hi, I am not using any cash plugin
Hello,
I have same problem any solution?
Thanx
My Problem was when I change the language using polylang the compare list become empty. I did this solution to fix this problem:
add_action('init','add_compare_products_after_change_language',9);
function add_compare_products_after_change_language(){
$list = [];
$the_list = isset( $_COOKIE['yith_woocompare_list'] ) ? json_decode( $_COOKIE['yith_woocompare_list'] ) : array();
foreach( $the_list as $product_id ) {
$translated_product_id = pll_get_post_translations($product_id);
if(isset($translated_product_id[pll_current_language()])){
$list[] = $translated_product_id[pll_current_language()];
}
}
if(!empty($list)){
$_COOKIE['yith_woocompare_list'] = json_encode( $list );
}
}
Hi!
I’m having the same issue.
@yousefqaood , where did you put that code? In what file?
Thanks