我需要将参数传递给指定为回调的函数wp_list_comments
public function ggowl_comment_lister($ggowl_id,$icon_html){
$args = array (
\'post_type\' => \'product\',
\'post_id\' => $ggowl_id
);
$comments = get_comments( $args );
$args = array(
\'callback\' => array($this, \'ggowl_woocommerce_comments\'),
);
wp_list_comments( $args , $comments);
}
但是
public function ggowl_woocommerce_comments($ggowl_id){
这不适用于
$ggowl_id
未定义
https://codex.wordpress.org/Function_Reference/wp_list_comments