diff --git a/includes/Modules/Analytics_4/Conversion_Reporting/Conversion_Reporting_Events_Sync.php b/includes/Modules/Analytics_4/Conversion_Reporting/Conversion_Reporting_Events_Sync.php index edcbecbef30..ce23fc4919b 100644 --- a/includes/Modules/Analytics_4/Conversion_Reporting/Conversion_Reporting_Events_Sync.php +++ b/includes/Modules/Analytics_4/Conversion_Reporting/Conversion_Reporting_Events_Sync.php @@ -61,11 +61,11 @@ public function __construct( } /** - * Checks for available events and save them in settings. + * Syncs detected events into settings. * * @since 1.135.0 */ - public function check_for_events() { + public function sync_detected_events() { $report = $this->get_report(); $detected_events = array(); diff --git a/includes/Modules/Analytics_4/Conversion_Reporting/Conversion_Reporting_Provider.php b/includes/Modules/Analytics_4/Conversion_Reporting/Conversion_Reporting_Provider.php index 6042302c708..8bfc3008f91 100644 --- a/includes/Modules/Analytics_4/Conversion_Reporting/Conversion_Reporting_Provider.php +++ b/includes/Modules/Analytics_4/Conversion_Reporting/Conversion_Reporting_Provider.php @@ -45,11 +45,11 @@ class Conversion_Reporting_Provider { private Conversion_Reporting_Cron $cron; /** - * Conversion_Reporting_Events_Check instance. + * Conversion_Reporting_Events_Sync instance. * - * @var Conversion_Reporting_Events_Check + * @var Conversion_Reporting_Events_Sync */ - private Conversion_Reporting_Events_Sync $events_check; + private Conversion_Reporting_Events_Sync $events_sync; /** * Constructor. @@ -68,8 +68,8 @@ public function __construct( $this->user_options = $user_options; $this->analytics = $analytics; - $this->events_check = new Conversion_Reporting_Events_Sync( $settings, $this->analytics ); - $this->cron = new Conversion_Reporting_Cron( fn() => $this->cron_callback() ); + $this->events_sync = new Conversion_Reporting_Events_Sync( $settings, $this->analytics ); + $this->cron = new Conversion_Reporting_Cron( fn() => $this->cron_callback() ); } /** @@ -101,7 +101,7 @@ protected function cron_callback() { $owner_id = $this->analytics->get_owner_id(); $restore_user = $this->user_options->switch_user( $owner_id ); - $this->events_check->check_for_events(); + $this->events_sync->sync_detected_events(); $restore_user(); } diff --git a/tests/phpunit/integration/Modules/Analytics_4/Conversion_Reporting/Conversion_Reporting_Events_SyncTest.php b/tests/phpunit/integration/Modules/Analytics_4/Conversion_Reporting/Conversion_Reporting_Events_SyncTest.php index 5306259bc3b..895a5683797 100644 --- a/tests/phpunit/integration/Modules/Analytics_4/Conversion_Reporting/Conversion_Reporting_Events_SyncTest.php +++ b/tests/phpunit/integration/Modules/Analytics_4/Conversion_Reporting/Conversion_Reporting_Events_SyncTest.php @@ -58,11 +58,11 @@ public function set_up() { /** * @dataProvider report_dimensions */ - public function test_check_for_events( $detected_events, $report_rows ) { + public function test_sync_detected_events( $detected_events, $report_rows ) { $this->setup_fake_handler_and_analytics( $report_rows ); $event_check = $this->get_instance(); - $event_check->check_for_events(); + $event_check->sync_detected_events(); $this->assertEquals( $detected_events, $this->settings->get()['detectedEvents'] ); }