Commit c04f67eb813 for woocommerce
commit c04f67eb81366b2e857b026c69e88ca514abaf86
Author: Luigi Teschio <gigitux@gmail.com>
Date: Tue May 19 13:33:17 2026 +0200
Fix products app bulk editing action label (#65148)
* Fix products app bulk editing action label
* Add changelog entry for bulk editing label fix
diff --git a/packages/js/experimental-products-app/changelog/fix-products-app-bulk-editing-label b/packages/js/experimental-products-app/changelog/fix-products-app-bulk-editing-label
new file mode 100644
index 00000000000..8d19a83ff24
--- /dev/null
+++ b/packages/js/experimental-products-app/changelog/fix-products-app-bulk-editing-label
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Rename quick edit to bulk editing when multiple products are selected.
diff --git a/packages/js/experimental-products-app/src/dataviews-actions/actions.test.tsx b/packages/js/experimental-products-app/src/dataviews-actions/actions.test.tsx
index ceadb2d9efa..88b6c593eae 100644
--- a/packages/js/experimental-products-app/src/dataviews-actions/actions.test.tsx
+++ b/packages/js/experimental-products-app/src/dataviews-actions/actions.test.tsx
@@ -12,6 +12,7 @@ import { renderHook } from '@testing-library/react';
import {
duplicateProductAction,
moveToTrashAction,
+ quickEditAction,
selectAllVariationsAction,
useProductActions,
} from './actions';
@@ -82,6 +83,15 @@ function getCallbackAction( action: Action< ProductEntityRecord > ) {
};
}
+function getActionLabel(
+ action: Action< ProductEntityRecord >,
+ items: ProductEntityRecord[]
+) {
+ return typeof action.label === 'string'
+ ? action.label
+ : action.label( items );
+}
+
describe( 'product list actions', () => {
const product = {
id: 12,
@@ -188,6 +198,17 @@ describe( 'product list actions', () => {
expect( quickEditProductAction?.supportsBulk ).toBe( true );
} );
+ it( 'renames Quick edit to Bulk editing when multiple products are selected', () => {
+ const action = quickEditAction( {
+ navigate,
+ } );
+
+ expect( getActionLabel( action, [ product ] ) ).toBe( 'Quick edit' );
+ expect( getActionLabel( action, [ product, hoodie ] ) ).toBe(
+ 'Bulk editing'
+ );
+ } );
+
it( 'opens quick edit panel with all selected products when triggered as a bulk action', () => {
const { result } = renderHook( () => useProductActions() );
const quickEditProductAction = result.current.find(
diff --git a/packages/js/experimental-products-app/src/dataviews-actions/actions.tsx b/packages/js/experimental-products-app/src/dataviews-actions/actions.tsx
index 5bc1363142b..5dc6d971b12 100644
--- a/packages/js/experimental-products-app/src/dataviews-actions/actions.tsx
+++ b/packages/js/experimental-products-app/src/dataviews-actions/actions.tsx
@@ -148,7 +148,10 @@ export const quickEditAction = ( {
query = {},
}: EditActionOptions ): Action< ProductEntityRecord > => ( {
id: 'quick-edit-product',
- label: __( 'Quick edit', 'woocommerce' ),
+ label: ( items ) =>
+ items.length > 1
+ ? __( 'Bulk editing', 'woocommerce' )
+ : __( 'Quick edit', 'woocommerce' ),
isPrimary: true,
supportsBulk: true,
icon: edit,