Skip to content

Commit

Permalink
fix(oauth): start php session if no session available
Browse files Browse the repository at this point in the history
  • Loading branch information
adekbadek committed Oct 9, 2024
1 parent b53dbb6 commit 20b6a56
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions includes/oauth/class-oauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ public static function get_unique_id() {
if ( ! $id ) {
$id = session_id(); // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_id
}
if ( ! $id ) {
session_start(); // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_start
$id = session_id(); // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_id
}
return $id;
}

Expand Down

0 comments on commit 20b6a56

Please sign in to comment.