diff --git src/wp-includes/widgets.php src/wp-includes/widgets.php
index c3be679516..4637a017b1 100644
--- src/wp-includes/widgets.php
+++ src/wp-includes/widgets.php
@@ -1125,6 +1125,23 @@ function the_widget( $widget, $instance = array(), $args = array() ) {
 
 	$instance = wp_parse_args( $instance );
 
+	/**
+	 * Filter the settings for a particular widget instance.
+	 * 
+	 * Returning false will effectively short-circuit display of the widget.
+	 * 
+	 * @since 5.3.0
+	 * 
+	 * @param array     $instance   The current widget instance's settings.
+	 * @param WP_Widget $widget_obj The current widget instance.
+	 * @param array     $args       An array of default widget arguments.
+	 **/
+	$instance = apply_filters( 'widget_display_callback', $instance, $widget_obj, $args );
+	
+	if ( false === $instance ) {
+		return;
+	}
+
 	/**
 	 * Fires before rendering the requested widget.
 	 *
diff --git tests/phpunit/tests/widgets.php tests/phpunit/tests/widgets.php
index 4d404100f6..cc95ac572c 100644
--- tests/phpunit/tests/widgets.php
+++ tests/phpunit/tests/widgets.php
@@ -1160,4 +1160,22 @@ class Tests_Widgets extends WP_UnitTestCase {
 		);
 		$this->assertEquals( $expected_sidebars, $new_next_theme_sidebars );
 	}
+
+	/**
+	 * @ticket 34226
+	 */
+	public function test_the_widget_should_shortcircuit_with_widget_display_callback() {
+
+		add_filter( 'widget_display_callback', '__return_false' );
+
+		register_widget( 'WP_Widget_Text' );
+
+		ob_start();
+		the_widget( 'WP_Widget_Text' );
+		$widget_content = ob_get_clean();
+		unregister_widget( 'WP_Widget_Text' );
+
+		$this->assertSame( '', $widget_content );
+	}
+
 }
