Skip to content

Commit

Permalink
Add Capability Check
Browse files Browse the repository at this point in the history
  • Loading branch information
officiallygod committed Jan 15, 2024
1 parent 048b3c4 commit 88274c9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
10 changes: 5 additions & 5 deletions includes/Brands.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static function get_brands() {
'enabled_flows' => array(
'ecommerce' => true,
'wp-setup' => true,
'sitegen' => true,
'sitegen' => Config::has_ai_sitegen(),
),
'wonder_blocks' => true,
'prioritization' => false,
Expand Down Expand Up @@ -166,7 +166,7 @@ public static function get_brands() {
'enabled_flows' => array(
'ecommerce' => true,
'wp-setup' => false,
'sitegen' => false,
'sitegen' => Config::has_ai_sitegen(),
),
'wonder_blocks' => true,
'prioritization' => false,
Expand Down Expand Up @@ -227,7 +227,7 @@ public static function get_brands() {
'enabled_flows' => array(
'ecommerce' => false,
'wp-setup' => false,
'sitegen' => false,
'sitegen' => Config::has_ai_sitegen(),
),
'wonder_blocks' => true,
'prioritization' => false,
Expand Down Expand Up @@ -288,7 +288,7 @@ public static function get_brands() {
'enabled_flows' => array(
'ecommerce' => true,
'wp-setup' => true,
'sitegen' => false,
'sitegen' => Config::has_ai_sitegen(),
),
'wonder_blocks' => true,
'prioritization' => false,
Expand Down Expand Up @@ -356,7 +356,7 @@ public static function get_brands() {
'enabled_flows' => array(
'ecommerce' => true,
'wp-setup' => true,
'sitegen' => false,
'sitegen' => Config::has_ai_sitegen(),
),
'wonder_blocks' => true,
'prioritization' => false,
Expand Down
9 changes: 9 additions & 0 deletions includes/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,13 @@ public static function get_site_capability( $capability ) {
public static function is_jarvis() {
return self::get_site_capability( 'isJarvis' );
}

/**
* Gets the current customer capability if he has access to AI Sitegen.
*
* @return boolean
*/
public static function has_ai_sitegen() {
return self::get_site_capability( 'hasAISiteGen' );
}
}

0 comments on commit 88274c9

Please sign in to comment.