Skip to content

Commit

Permalink
Remove $populate_capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
wpscholar committed Oct 28, 2024
1 parent 4195971 commit c5d483d
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions includes/Brands.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,9 @@ public static function get_default_brand() {
* contact information, and enabled features.
*/
public static function get_brands(): array {

// Only populate capabilities when in the WordPress admin
$populate_capabilities = is_admin();

// Forcibly prevent capabilities from being fetched in front-end requests
// if(! is_admin()) {
// $populate_capabilities = false;
// }

// Checks if customer has access to AI Sitegen.
$has_ai_sitegen = $populate_capabilities ? Config::has_ai_sitegen() : false;
$can_migrate_site = $populate_capabilities ? Config::can_migrate_site() : false;
$has_ai_sitegen = Config::has_ai_sitegen();
$can_migrate_site = Config::can_migrate_site();

return array(
'bluehost' => array(
Expand Down

0 comments on commit c5d483d

Please sign in to comment.