Skip to content

Commit

Permalink
Handle initial optin
Browse files Browse the repository at this point in the history
  • Loading branch information
Camwyn committed Nov 7, 2023
1 parent 5982551 commit 10f4f15
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Telemetry/Opt_In/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,15 @@ public function set_status( bool $status, string $stellar_slug = '' ) {

$option = $this->get_option();

// Set the sent plugin's optin status.
$option['plugins'][ $stellar_slug ]['optin'] = $status;

// Force the others to all match.
foreach( $option['plugins'] as &$plugin_data ) {
$plugin_data['optin'] = $status;
}


return update_option( $this->get_option_name(), $option );
}

Expand Down

0 comments on commit 10f4f15

Please sign in to comment.