Commit a80d7610a3f for woocommerce

commit a80d7610a3f9fb1e80f94aa7a8d4726f9c968d15
Author: Rejaul Alom Khan (Arman Azij) <123895004+rejaulalomkhan@users.noreply.github.com>
Date:   Wed Nov 11 00:46:08 2026 +0600

    Refactor Product Filters blocks to use isPreviewMode flag (#69966)

    * Refactor Product Filters blocks to use isPreviewMode flag (Fixes #53125)

    * Add changefile(s) from automation for the following project(s): woocommerce

    * Add JSDoc to usePreviewMode and strengthen preview assertions in taxonomy-filter test

    * Use exact string match for sample item in taxonomy-filter test

    * simplify code

    * update block references documentation

    ---------

    Co-authored-by: woocommercebot <woocommercebot@users.noreply.github.com>
    Co-authored-by: Luigi Teschio <gigitux@gmail.com>

diff --git a/docs/block-development/reference/block-references.md b/docs/block-development/reference/block-references.md
index a9e15dd204f..5f1e2b4e702 100644
--- a/docs/block-development/reference/block-references.md
+++ b/docs/block-development/reference/block-references.md
@@ -1249,7 +1249,7 @@ Add a set of filters shoppers can use.
 - **Name:** woocommerce/product-filters
 - **Category:** woocommerce
 - **Supports:** align, color (background, button, heading, text, ~~enableContrastChecker~~), inserter, interactivity, layout (default, ~~allowEditing~~), position (sticky), spacing (blockGap), typography (fontSize)
-- **Attributes:** isPreview, overlayMode, overlayPosition
+- **Attributes:** overlayMode, overlayPosition

 ## Active Filters - woocommerce/product-filter-active

@@ -1268,7 +1268,7 @@ Let shoppers filter products by attribute.
 - **Category:** woocommerce
 - **Ancestor:** woocommerce/product-filters
 - **Supports:** color (text, ~~background~~), interactivity, spacing (blockGap, margin, padding), typography (fontSize, lineHeight)
-- **Attributes:** attributeId, displayStyle, hideEmpty, isPreview, queryType, selectType, showCounts, sortOrder
+- **Attributes:** attributeId, displayStyle, hideEmpty, queryType, selectType, showCounts, sortOrder

 ## List - woocommerce/product-filter-checkbox-list

@@ -1326,7 +1326,7 @@ Let shoppers filter products by rating.
 - **Category:** woocommerce
 - **Ancestor:** woocommerce/product-filters
 - **Supports:** color (text, ~~background~~), interactivity
-- **Attributes:** className, isPreview, minRating, showCounts
+- **Attributes:** className, minRating, showCounts

 ## Chips - woocommerce/product-filter-removable-chips

@@ -1346,7 +1346,7 @@ Let shoppers filter products by availability.
 - **Category:** woocommerce
 - **Ancestor:** woocommerce/product-filters
 - **Supports:** color (text, ~~background~~), interactivity, spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~
-- **Attributes:** displayStyle, hideEmpty, isPreview, showCounts
+- **Attributes:** displayStyle, hideEmpty, showCounts

 ## Taxonomy Filter - woocommerce/product-filter-taxonomy

@@ -1356,7 +1356,7 @@ Let shoppers filter products by category, brand, or tag.
 - **Category:** woocommerce
 - **Ancestor:** woocommerce/product-filters
 - **Supports:** color (text, ~~background~~), interactivity, spacing (blockGap, margin, padding), typography (fontSize, lineHeight)
-- **Attributes:** displayStyle, hideEmpty, isPreview, showCounts, sortOrder, taxonomy
+- **Attributes:** displayStyle, hideEmpty, showCounts, sortOrder, taxonomy

 ## Product Gallery - woocommerce/product-gallery

diff --git a/plugins/woocommerce/changelog/69966-fix-53125-is-preview-mode b/plugins/woocommerce/changelog/69966-fix-53125-is-preview-mode
new file mode 100644
index 00000000000..85e5b5231b4
--- /dev/null
+++ b/plugins/woocommerce/changelog/69966-fix-53125-is-preview-mode
@@ -0,0 +1,4 @@
+Significance: patch
+Type: update
+
+Refactor Product Filters blocks to use isPreviewMode flag.
diff --git a/plugins/woocommerce/changelog/update-53125-implement-preview-mode-flag-product-filters b/plugins/woocommerce/changelog/update-53125-implement-preview-mode-flag-product-filters
new file mode 100644
index 00000000000..85e5b5231b4
--- /dev/null
+++ b/plugins/woocommerce/changelog/update-53125-implement-preview-mode-flag-product-filters
@@ -0,0 +1,4 @@
+Significance: patch
+Type: update
+
+Refactor Product Filters blocks to use isPreviewMode flag.
diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/block.json b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/block.json
index 59c8bd1f30e..174812809cb 100644
--- a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/block.json
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/block.json
@@ -46,10 +46,6 @@
 		"forcePageReload"
 	],
 	"attributes": {
-		"isPreview": {
-			"type": "boolean",
-			"default": false
-		},
 		"overlayMode": {
 			"type": "string",
 			"enum": [ "off", "mobile", "always" ]
@@ -59,11 +55,7 @@
 			"enum": [ "left", "right" ]
 		}
 	},
-	"example": {
-		"attributes": {
-			"isPreview": true
-		}
-	},
+	"example": {},
 	"viewScriptModule": "woocommerce/product-filters",
 	"style": "file:../woocommerce/product-filters-style.css",
 	"editorStyle": "file:../woocommerce/product-filters-editor.css"
diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/edit.tsx b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/edit.tsx
index cbb68446454..06684b3fdf8 100644
--- a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/edit.tsx
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/edit.tsx
@@ -20,6 +20,7 @@ import { Icon, close } from '@wordpress/icons';
 import { useState } from '@wordpress/element';
 import { filterThreeLines } from '@woocommerce/icons';
 import { getSetting } from '@woocommerce/settings';
+import { usePreviewMode } from '@woocommerce/base-hooks';
 import clsx from 'clsx';

 /**
@@ -53,7 +54,7 @@ const TEMPLATE: InnerBlockTemplate[] = [

 export const Edit = ( props: BlockEditProps< BlockAttributes > ) => {
 	const { attributes, setAttributes } = props;
-	const { isPreview } = attributes;
+	const isPreviewMode = usePreviewMode();
 	const overlayMode = getOverlayMode( attributes );
 	const hasOverlay = overlayMode !== 'off';
 	const overlayPosition =
@@ -93,7 +94,7 @@ export const Edit = ( props: BlockEditProps< BlockAttributes > ) => {

 	let filtersContent: JSX.Element;

-	if ( isPreview ) {
+	if ( isPreviewMode ) {
 		filtersContent = (
 			<div className="wc-block-product-filters__overlay-content">
 				<InnerBlocks templateLock={ false } template={ TEMPLATE } />
diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/attribute-filter/block.json b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/attribute-filter/block.json
index 3dc9e97ea72..d91e9a00b48 100644
--- a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/attribute-filter/block.json
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/attribute-filter/block.json
@@ -82,10 +82,6 @@
 			"type": "string",
 			"default": "multiple"
 		},
-		"isPreview": {
-			"type": "boolean",
-			"default": false
-		},
 		"sortOrder": {
 			"type": "string",
 			"default": "count-desc"
@@ -95,10 +91,6 @@
 			"default": true
 		}
 	},
-	"example": {
-		"attributes": {
-			"isPreview": true
-		}
-	},
+	"example": {},
 	"style": "woocommerce/product-filter-attribute-view-style"
 }
diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/attribute-filter/edit.tsx b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/attribute-filter/edit.tsx
index b00214a0d5c..ed111ece516 100644
--- a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/attribute-filter/edit.tsx
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/attribute-filter/edit.tsx
@@ -19,6 +19,7 @@ import { withSpokenMessages } from '@wordpress/components';
 import { useEffect, useState } from '@wordpress/element';
 import { __ } from '@wordpress/i18n';
 import { getSetting } from '@woocommerce/settings';
+import { usePreviewMode } from '@woocommerce/base-hooks';
 import type { SelectableItemsContext } from '@woocommerce/types';

 /**
@@ -44,13 +45,14 @@ const Edit = ( props: EditProps ) => {
 	const {
 		attributeId,
 		queryType,
-		isPreview,
 		displayStyle,
 		showCounts,
 		sortOrder,
 		hideEmpty,
 	} = blockAttributes;

+	const isPreviewMode = usePreviewMode();
+
 	const attributeObject = getAttributeFromId( attributeId );

 	const [ attributeOptions, setAttributeOptions ] = useState<
@@ -217,7 +219,7 @@ const Edit = ( props: EditProps ) => {
 					value={ {
 						'woocommerce/selectableItems': {
 							items:
-								attributeOptions.length === 0 && isPreview
+								attributeOptions.length === 0 && isPreviewMode
 									? attributeOptionsPreview
 									: attributeOptions,
 							selectionMode: 'multiple' as const,
diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/attribute-filter/types.ts b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/attribute-filter/types.ts
index 23a67ff9cf4..8eb40eae8a5 100644
--- a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/attribute-filter/types.ts
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/attribute-filter/types.ts
@@ -16,7 +16,6 @@ export type BlockAttributes = {
 	queryType: 'or' | 'and';
 	displayStyle: string;
 	selectType: string;
-	isPreview: boolean;
 	sortOrder: keyof typeof sortOrders;
 	hideEmpty: boolean;
 };
diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/rating-filter/block.json b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/rating-filter/block.json
index 78eb10db2c8..9b9b7311b53 100644
--- a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/rating-filter/block.json
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/rating-filter/block.json
@@ -32,10 +32,6 @@
 		"minRating": {
 			"type": "string",
 			"default": "0"
-		},
-		"isPreview": {
-			"type": "boolean",
-			"default": false
 		}
 	},
 	"textdomain": "woocommerce",
diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/rating-filter/edit.tsx b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/rating-filter/edit.tsx
index 6ce977a663d..2686add9e1b 100644
--- a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/rating-filter/edit.tsx
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/rating-filter/edit.tsx
@@ -17,6 +17,7 @@ import { getSettingWithCoercion } from '@woocommerce/settings';
 import { isBoolean } from '@woocommerce/types';
 import { useState, useMemo, useEffect } from '@wordpress/element';
 import { withSpokenMessages } from '@wordpress/components';
+import { usePreviewMode } from '@woocommerce/base-hooks';
 import type { BlockEditProps } from '@wordpress/blocks';
 import type { SelectableItemsContext } from '@woocommerce/types';

@@ -37,7 +38,8 @@ import RatingStars from './components/rating-stars';
 const RatingFilterEdit = ( props: BlockEditProps< Attributes > ) => {
 	const { attributes, setAttributes, clientId } = props;

-	const { isPreview, showCounts, minRating } = attributes;
+	const { showCounts, minRating } = attributes;
+	const isPreviewMode = usePreviewMode();

 	const { children, ...innerBlocksProps } = useInnerBlocksProps(
 		useBlockProps(),
@@ -74,11 +76,13 @@ const RatingFilterEdit = ( props: BlockEditProps< Attributes > ) => {
 		} );

 	const [ displayedOptions, setDisplayedOptions ] = useState(
-		isPreview ? previewOptions : []
+		isPreviewMode ? previewOptions : []
 	);

 	const isLoading =
-		! isPreview && filteredCountsLoading && displayedOptions.length === 0;
+		! isPreviewMode &&
+		filteredCountsLoading &&
+		displayedOptions.length === 0;

 	const initialFilters = useMemo(
 		() => getActiveFilters( 'rating_filter' ),
@@ -95,7 +99,7 @@ const RatingFilterEdit = ( props: BlockEditProps< Attributes > ) => {
 	 * and filtered counts to get a list of options to display.
 	 */
 	useEffect( () => {
-		if ( filteredCountsLoading || isPreview ) {
+		if ( filteredCountsLoading || isPreviewMode ) {
 			return;
 		}

@@ -138,7 +142,7 @@ const RatingFilterEdit = ( props: BlockEditProps< Attributes > ) => {
 		setDisplayedOptions( productsRating );
 	}, [
 		showCounts,
-		isPreview,
+		isPreviewMode,
 		collectionFilters,
 		filteredCountsLoading,
 		productRatingsQuery,
diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/rating-filter/types.ts b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/rating-filter/types.ts
index a7229ef33e7..edfc59d5d74 100644
--- a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/rating-filter/types.ts
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/rating-filter/types.ts
@@ -1,6 +1,5 @@
 export interface Attributes {
 	className?: string;
 	showCounts: boolean;
-	isPreview?: boolean;
 	minRating?: string;
 }
diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/status-filter/block.json b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/status-filter/block.json
index da4c3a40bed..51f39c0b594 100644
--- a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/status-filter/block.json
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/status-filter/block.json
@@ -62,10 +62,6 @@
 			"type": "string",
 			"default": "woocommerce/product-filter-checkbox-list"
 		},
-		"isPreview": {
-			"type": "boolean",
-			"default": false
-		},
 		"hideEmpty": {
 			"type": "boolean",
 			"default": true
@@ -79,9 +75,5 @@
 		"filterParams",
 		"productFiltersKey"
 	],
-	"example": {
-		"attributes": {
-			"isPreview": true
-		}
-	}
+	"example": {}
 }
diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/status-filter/types.ts b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/status-filter/types.ts
index 1eafe00189a..26eaa37b02b 100644
--- a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/status-filter/types.ts
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/status-filter/types.ts
@@ -7,7 +7,6 @@ export type BlockAttributes = {
 	classname?: string;
 	showCounts: boolean;
 	displayStyle: string;
-	isPreview: boolean;
 	hideEmpty: boolean;
 };

diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/taxonomy-filter/block.json b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/taxonomy-filter/block.json
index 4f983aedeb4..4c0de5f8b52 100644
--- a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/taxonomy-filter/block.json
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/taxonomy-filter/block.json
@@ -74,10 +74,6 @@
 			"type": "string",
 			"default": "woocommerce/product-filter-checkbox-list"
 		},
-		"isPreview": {
-			"type": "boolean",
-			"default": false
-		},
 		"sortOrder": {
 			"type": "string",
 			"default": "count-desc"
@@ -87,9 +83,5 @@
 			"default": true
 		}
 	},
-	"example": {
-		"attributes": {
-			"isPreview": true
-		}
-	}
+	"example": {}
 }
diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/taxonomy-filter/edit.tsx b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/taxonomy-filter/edit.tsx
index 3e398d55caa..187117ed9f4 100644
--- a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/taxonomy-filter/edit.tsx
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/taxonomy-filter/edit.tsx
@@ -12,6 +12,7 @@ import { __, sprintf } from '@wordpress/i18n';
 import { useSelect } from '@wordpress/data';
 import { store as coreStore } from '@wordpress/core-data';
 import { useCollectionData } from '@woocommerce/base-context/hooks';
+import { usePreviewMode } from '@woocommerce/base-hooks';
 import { objectHasProp } from '@woocommerce/types';
 import type { SelectableItemsContext } from '@woocommerce/types';

@@ -103,27 +104,23 @@ function createHierarchicalList(
 const Edit = ( props: EditProps ) => {
 	const { attributes: blockAttributes } = props;

-	const {
-		taxonomy,
-		isPreview,
-		displayStyle,
-		showCounts,
-		sortOrder,
-		hideEmpty,
-	} = blockAttributes;
+	const { taxonomy, displayStyle, showCounts, sortOrder, hideEmpty } =
+		blockAttributes;
+
+	const isPreviewMode = usePreviewMode();

 	const [ termOptions, setTermOptions ] = useState< FilterOptionItem[] >(
-		isPreview
+		isPreviewMode
 			? sortFilterOptions( [ ...termOptionsPreview ], sortOrder )
 			: []
 	);
 	const [ isOptionsLoading, setIsOptionsLoading ] =
-		useState< boolean >( ! isPreview );
+		useState< boolean >( ! isPreviewMode );

 	// Fetch taxonomy terms using WordPress core data
 	const { taxonomyTerms, isTermsLoading } = useSelect(
 		( select ) => {
-			if ( isPreview || ! taxonomy ) {
+			if ( isPreviewMode || ! taxonomy ) {
 				return EMPTY_TAXONOMY_TERMS_RESULT;
 			}

@@ -147,19 +144,19 @@ const Edit = ( props: EditProps ) => {
 				] ),
 			};
 		},
-		[ taxonomy, hideEmpty, isPreview ]
+		[ taxonomy, hideEmpty, isPreviewMode ]
 	);

 	// Fetch taxonomy counts using the updated useCollectionData hook
 	const { data: filteredCounts, isLoading: isFilterCountsLoading } =
 		useCollectionData( {
-			queryTaxonomy: isPreview ? undefined : taxonomy,
+			queryTaxonomy: isPreviewMode ? undefined : taxonomy,
 			queryState: {},
 			isEditor: true,
 		} );

 	useEffect( () => {
-		if ( isPreview ) {
+		if ( isPreviewMode ) {
 			// In preview mode, use the preview data directly
 			const previewItems = termOptionsPreview.map( ( item ) => {
 				if ( showCounts ) {
@@ -234,7 +231,7 @@ const Edit = ( props: EditProps ) => {
 		sortOrder,
 		hideEmpty,
 		showCounts,
-		isPreview,
+		isPreviewMode,
 		isTermsLoading,
 		isFilterCountsLoading,
 	] );
@@ -264,7 +261,7 @@ const Edit = ( props: EditProps ) => {
 		}
 	);

-	const isLoading = isPreview
+	const isLoading = isPreviewMode
 		? false
 		: isTermsLoading || isFilterCountsLoading || isOptionsLoading;

@@ -284,7 +281,7 @@ const Edit = ( props: EditProps ) => {
 		);
 	}

-	if ( ! isLoading && ! isPreview && taxonomyTerms.length === 0 ) {
+	if ( ! isLoading && ! isPreviewMode && taxonomyTerms.length === 0 ) {
 		return (
 			<div { ...innerBlocksProps }>
 				<TaxonomyFilterInspectorControls { ...props } />
@@ -312,7 +309,7 @@ const Edit = ( props: EditProps ) => {
 					value={ {
 						'woocommerce/selectableItems': {
 							items:
-								termOptions.length === 0 && isPreview
+								termOptions.length === 0 && isPreviewMode
 									? termOptionsPreview
 									: termOptions,
 							selectionMode: 'multiple' as const,
diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/taxonomy-filter/test/block.ts b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/taxonomy-filter/test/block.ts
index 4a1df0c205a..f227951a77d 100644
--- a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/taxonomy-filter/test/block.ts
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/taxonomy-filter/test/block.ts
@@ -1,6 +1,7 @@
 /**
  * External dependencies
  */
+import { useCollectionData } from '@woocommerce/base-context/hooks';
 import { BlockAttributes } from '@wordpress/blocks';
 import '@testing-library/jest-dom';
 import { act, fireEvent, screen, within } from '@testing-library/react';
@@ -57,13 +58,28 @@ jest.mock( '@woocommerce/block-data/schema/selectors', () => ( {
 	} ) ),
 } ) );

+// Mock usePreviewMode to true so preview data is loaded in test environment
+jest.mock( '@woocommerce/base-hooks', () => ( {
+	...jest.requireActual( '@woocommerce/base-hooks' ),
+	usePreviewMode: jest.fn( () => true ),
+} ) );
+
+jest.mock( '@woocommerce/base-context/hooks', () => {
+	const originalModule = jest.requireActual(
+		'@woocommerce/base-context/hooks'
+	);
+	return {
+		...originalModule,
+		useCollectionData: jest.fn( originalModule.useCollectionData ),
+	};
+} );
+
 async function setup( attributes: BlockAttributes ) {
 	const testBlock = [
 		{
 			name: 'woocommerce/product-filter-taxonomy',
 			attributes: {
 				...attributes,
-				isPreview: true,
 			},
 		},
 	];
@@ -109,15 +125,28 @@ describe( 'Taxonomy Filter block', () => {
 		} );

 		test( 'should display taxonomy filter when taxonomy is selected', async () => {
+			jest.mocked( useCollectionData ).mockClear();
 			await setup( { taxonomy: 'product_cat' } );
 			await selectBlock( /Block: Category Filter/i );

-			const block = within(
-				screen.getByLabelText( /Block: Category Filter/i )
+			const blockElement = screen.getByLabelText(
+				/Block: Category Filter/i
 			);
+			const block = within( blockElement );

 			// Should display the taxonomy label as heading
 			expect( block.getByText( /Category/i ) ).toBeInTheDocument();
+			expect( block.getByText( 'Sample Item 1' ) ).toBeInTheDocument();
+			expect(
+				blockElement.querySelector(
+					'.wc-block-product-filter-checkbox-list'
+				)
+			).not.toHaveClass( 'is-loading' );
+			expect( useCollectionData ).toHaveBeenCalledWith(
+				expect.objectContaining( {
+					queryTaxonomy: undefined,
+				} )
+			);
 		} );
 	} );

diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/taxonomy-filter/types.ts b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/taxonomy-filter/types.ts
index 04b32f27267..c37a5df6c40 100644
--- a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/taxonomy-filter/types.ts
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/taxonomy-filter/types.ts
@@ -7,7 +7,6 @@ export type BlockAttributes = {
 	taxonomy: string;
 	showCounts: boolean;
 	displayStyle: string;
-	isPreview: boolean;
 	sortOrder: string;
 	hideEmpty: boolean;
 };
diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/types.ts b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/types.ts
index eb5e28c0a12..ea1f6b2bd56 100644
--- a/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/types.ts
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/types.ts
@@ -58,7 +58,6 @@ export type OverlayMode = 'off' | 'mobile' | 'always';

 export type BlockAttributes = {
 	productId?: string;
-	isPreview: boolean;
 	overlayMode?: OverlayMode;
 	overlayPosition?: 'left' | 'right';
 };