Skip to content

Commit

Permalink
👌 IMPROVE: code and comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmoodak committed Aug 21, 2023
1 parent 701ec7e commit ff735d2
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions integrations/parsely.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,12 @@ public function wp_parsely_credentials_callback( $original_credentials ) {
$config = $this->get_config();
$credentials = array();

// If config provided by VIP is empty then take original credentials else take config.
if ( empty( $config ) ) {
$credentials = $original_credentials;
} else {
$credentials = array(
'site_id' => $config['site_id'] ?? null,
'api_secret' => $config['api_secret'] ?? null,
);
}
// If config provided by VIP is empty then take original credentials else take
// credentials from config.
$credentials = empty( $config ) ? $original_credentials : array(
'site_id' => $config['site_id'] ?? null,
'api_secret' => $config['api_secret'] ?? null,
);

// Adds `is_managed` flag to indicate that platform is managing this integration
// and we have to hide the credential banner warning or more.
Expand Down

0 comments on commit ff735d2

Please sign in to comment.