Commit 5395ff3d77c for woocommerce

commit 5395ff3d77cb07d4cd7937513111da90cf09d72e
Author: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
Date:   Wed Apr 1 08:23:26 2026 +0200

    Fix 404 requests for category-title and category-description frontend scripts (#63945)

    * Fix 404 requests for category-title and category-description frontend scripts

    These server-rendered blocks inherit get_block_type_script() from
    AbstractBlock which constructs a path to a non-existent -frontend.js
    file. Override it to return null, matching the pattern used by other
    server-only blocks like PageContentWrapper and Breadcrumbs.

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

    * Add changelog entry for 404 frontend script fix

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

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

    * Remove duplicate CI-generated changelog entry

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

    ---------

    Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    Co-authored-by: woocommercebot <woocommercebot@users.noreply.github.com>

diff --git a/plugins/woocommerce/changelog/fix-404-requests b/plugins/woocommerce/changelog/fix-404-requests
new file mode 100644
index 00000000000..b25d02da227
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-404-requests
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Fix 404 requests for category-title and category-description block frontend scripts
diff --git a/plugins/woocommerce/src/Blocks/BlockTypes/CategoryDescription.php b/plugins/woocommerce/src/Blocks/BlockTypes/CategoryDescription.php
index c9f779eb6e6..a88c83e6e7e 100644
--- a/plugins/woocommerce/src/Blocks/BlockTypes/CategoryDescription.php
+++ b/plugins/woocommerce/src/Blocks/BlockTypes/CategoryDescription.php
@@ -69,6 +69,16 @@ class CategoryDescription extends AbstractBlock {
 		return [ 'termId', 'termTaxonomy' ];
 	}

+	/**
+	 * Disable the frontend script for this block.
+	 *
+	 * @param string|null $key Data to get, or default to everything.
+	 * @return null
+	 */
+	protected function get_block_type_script( $key = null ) {
+		return null;
+	}
+
 	/**
 	 * Disable the style handle for this block.
 	 *
diff --git a/plugins/woocommerce/src/Blocks/BlockTypes/CategoryTitle.php b/plugins/woocommerce/src/Blocks/BlockTypes/CategoryTitle.php
index 9f5078e48a9..8c939dce34a 100644
--- a/plugins/woocommerce/src/Blocks/BlockTypes/CategoryTitle.php
+++ b/plugins/woocommerce/src/Blocks/BlockTypes/CategoryTitle.php
@@ -82,6 +82,16 @@ class CategoryTitle extends AbstractBlock {
 		return [ 'termId', 'termTaxonomy' ];
 	}

+	/**
+	 * Disable the frontend script for this block.
+	 *
+	 * @param string|null $key Data to get, or default to everything.
+	 * @return null
+	 */
+	protected function get_block_type_script( $key = null ) {
+		return null;
+	}
+
 	/**
 	 * Disable the style handle for this block.
 	 *