Skip to content

Commit

Permalink
Merge pull request #250 from cadic/fix/237-track-event
Browse files Browse the repository at this point in the history
Fix track_event signature inside CLI command
  • Loading branch information
jeffpaul authored Apr 27, 2022
2 parents 9814890 + b3ae3b7 commit 86ede8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/classes/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function( $post_type ) use ( $post_types ) {
foreach ( $posts as $post ) {
if ( $count < $limit ) {
if ( ! $dry_run ) {
$response = track_event( 'publish', 'publish', $post );
$response = track_event( $post->ID, $post, true, null );
if ( is_wp_error( $response ) ) {
$error_count++;
} else {
Expand Down

0 comments on commit 86ede8b

Please sign in to comment.