Skip to content

Commit

Permalink
add temporary hook to filter an empty capabilites transient
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube committed Aug 14, 2024
1 parent 3615189 commit b7aeb01
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,3 +203,21 @@ function () {

// Instantiate the Features singleton
Features::getInstance();

/**
* Temporary hook to filter the capabilities in case they are empty
* This is to fix an issue where the migration value is not found on new sites
* Temporary fix to keep things working while we determing the root cause
*/
add_filter(
'transient_nfd_site_capabilities',
function( $transient ) {
if( empty( $transient ) ) {
return array(
'canMigrateSites' => true,
);
}
},
10,
2
);

0 comments on commit b7aeb01

Please sign in to comment.