Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix site capability transient filter issue #94

Merged
merged 3 commits into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading