• Resolved hansford77

    (@hansford77)


    When this plugin is activated, Woocommerce breadcrumbs are replaced by the word “viewed_cookie_policy”. I have deactivated all other plugins and changed themes, it is definitely this plugin. I have tracked down the problem to the changing of the global $post variable somewhere in your plugin to one of the posts of type cookielawinfo. Can you look into this please?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter hansford77

    (@hansford77)

    I’ve now tracked it down to the function get_non_necessary_cookie_ids(), here:

    $cookies->the_post(); 
    global $post;

    I’ve fixed it for the moment like this, but there is probably a more elegant way. I’m only a php dabbler!

    global $post;
    $temp_post=$post;
    while($cookies->have_posts()):            
         $cookies->the_post(); 			
         $cookie_slugs[] = get_post_meta( $post->ID, "_cli_cookie_slugid", true);            
    endwhile;
    $post=$temp_post;

    Hi @hansford77,

    The issue has been fixed in the latest version of the plugin. Please check and let us know if there are any further issues.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin interfering with Woocommerce breadcrumbs’ is closed to new replies.