:::: MENU ::::

WooCommerce get comments by user id

WooCommerce get comments by user id

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

Let’s start with our example.

 $commentArg = array(
    'user_id' => 25,
         
    );
$comments = get_comments( $commentArg );
    if($comments){
      foreach($comments as $commentData){
        print_r($commentData);   
            }
                }
Author: Qaisar Satti
Last Modified: July 14, 2021


Comments are closed.