diff --git a/packages/block-library/src/search/index.php b/packages/block-library/src/search/index.php index 5f3c4bc571cff2..c6a0befe279bd2 100644 --- a/packages/block-library/src/search/index.php +++ b/packages/block-library/src/search/index.php @@ -37,13 +37,12 @@ function render_block_core_search( $attributes, $content, $block ) { // Check if the block is using the enhanced pagination. $enhanced_pagination = isset( $block->context['enhancedPagination'] ) && $block->context['enhancedPagination']; - // Check if the block is using the instant search experiment. + // Check if the block is using the instant search experiment, which requires the enhanced pagination. $gutenberg_experiments = get_option( 'gutenberg-experiments' ); $instant_search_enabled = $enhanced_pagination && $gutenberg_experiments && array_key_exists( 'gutenberg-search-query-block', $gutenberg_experiments ); $show_button = true; - // If the block is using the instant search experiment and the enhanced pagination, hide the button. if ( $instant_search_enabled ) { $show_button = false; // If the button position is no-button, ALSO hide the button.