WooCommerce get comments by a user email

WooCommerce get comments by a user email

Today we talk about WooCommerce or WordPress get comments by a user email programmatically. In this tutorial, We focus on how to get user comments by using user email.

Let’s start with our example.

 $commentArg = array(
    'author_email' => $email,
         
    );
$comments = get_comments( $commentArg );
    if($comments){
      foreach($comments as $commentData){
        print_r($commentData);   
            }
                }

Search

Recent Blogs

Categories

Archives

Archives

Tags