This gives the ability to generate comments for a post, passing in any values available to wp_insert_comment with some default values and also giving the ability to attach comment meta.
Example
<?php
use \WP_Cypress\Seeder\Seeder;
class MySeeder extends Seeder {
public function run() {
$title = $this->faker->sentence();
$this->generate->posts( [
'post_title' => $title,
'import_id' => 10,
], 1 );
$this->generate->comments( [
'comment_post_ID' => 20,
], 10 );
}
}
This gives the ability to generate comments for a post, passing in any values available to
wp_insert_comment
with some default values and also giving the ability to attach comment meta.Example