During a generic site update, the option block_visibility_settings was emptied (Nothing to do with the block-visibility plugin).
As we had no settings saved, we weren't able to see the block visibility settings within the block editor. I attempted to reset the settings from the plugin settings page, but was unable to do so.
The issue came from the class-block-visibility-reset-settings-controller.php on line 97.
if ( ! get_option( 'block_visibility_settings' ) ) {
return new WP_Error( '500', $error_message, array( 'status' => 500 ) );
}
if ( isset( $settings['reset'] ) ) {
if ( 'all' === $settings['reset'] ) {
// Delete the currently saved settings and pull the defaults.
delete_option( 'block_visibility_settings' );
$new_settings = get_option( 'block_visibility_settings' );
// ...
}
}
Would it be possible to have the option not required before deleting the option, and then regenerating it?
Sorry if I've worded this terribly.
During a generic site update, the option
block_visibility_settingswas emptied (Nothing to do with the block-visibility plugin).As we had no settings saved, we weren't able to see the block visibility settings within the block editor. I attempted to reset the settings from the plugin settings page, but was unable to do so.
The issue came from the
class-block-visibility-reset-settings-controller.phpon line 97.Would it be possible to have the option not required before deleting the option, and then regenerating it?
Sorry if I've worded this terribly.