Skip to content

Commit bc76a53

Browse files
authored
Merge pull request #155 from woocommerce/fix/153/faker-errors
Terms: Update description generator for new Faker behavior
2 parents 4482b37 + 4e92930 commit bc76a53

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

includes/Generator/Term.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ public static function generate( $save = true, string $taxonomy = 'product_cat',
5757
$term_name = strtolower( $term_name );
5858
}
5959

60+
$description_size = wp_rand( 20, 260 );
61+
6062
$term_args = array(
61-
'description' => self::$faker->realTextBetween( 20, wp_rand( 20, 300 ), 4 ),
63+
'description' => self::$faker->realTextBetween( $description_size, $description_size + 40, 4 ),
6264
);
6365
if ( 0 !== $parent ) {
6466
$term_args['parent'] = $parent;

0 commit comments

Comments
 (0)