Skip to content

Commit

Permalink
Merge pull request #94 from newfold-labs/fix/site-capability-transien…
Browse files Browse the repository at this point in the history
…t-issue

Fix site capability transient filter issue
  • Loading branch information
circlecube authored Aug 16, 2024
2 parents 49dc91e + 073045f commit 3a0515f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use NewfoldLabs\WP\Module\Data\SiteCapabilities;
use NewfoldLabs\WP\ModuleLoader\Container;
use WP_Forge\UpgradeHandler\UpgradeHandler;
use function NewfoldLabs\WP\ModuleLoader\container;

use function NewfoldLabs\WP\ModuleLoader\register as registerModule;

Expand Down Expand Up @@ -74,6 +75,22 @@ function ( $value ) {
}
);

// Temporary filter, as the migrate capability isn't working as expected.
add_filter(
'pre_set_transient_nfd_site_capabilities',
function ( $transient ) {
if ( empty( $transient ) && 'bluehost' === container()->plugin()->brand ) {
return array(
'canMigrateSite' => true,
'hasAISiteGen' => true,
);
}
return $transient;
},
10,
2
);

// Register activation/deactivation hooks
add_action(
'newfold_container_set',
Expand Down

0 comments on commit 3a0515f

Please sign in to comment.