Home › Forums › WoodMart support forum › Product variation name is not showing in wishlist › Reply To: Product variation name is not showing in wishlist
March 26, 2024 at 3:49 pm
#552417
Luke Nielsen
Keymaster
Hello,
1. For now, there is no possible custom code because, in the button setting the ID of the product is defined that will be added to the wishlist.
2. The below code, will clear the wishlist after log out from an account.
add_action('wp_logout', function() {
if ( ! function_exists( 'woodmart_set_cookie' ) ) {
return;
}
$cookie_products_name = 'woodmart_wishlist_products';
$cookie_count_name = 'woodmart_wishlist_count';
if ( is_multisite() ) {
$cookie_products_name .= '_' . get_current_blog_id();
$cookie_count_name .= '_' . get_current_blog_id();
}
woodmart_set_cookie( $cookie_products_name, '' );
woodmart_set_cookie( $cookie_count_name, '' );
});
Also, clear the browser cache/cookie and recheck the issue with the first time added product.
Kind Regards