From 536ce5a8cc364558cacf36587e8f7316da2399f2 Mon Sep 17 00:00:00 2001 From: paul sealock Date: Wed, 11 Sep 2024 11:44:07 +1200 Subject: [PATCH] removeAllFilters --- plugins/woocommerce-admin/client/settings/routes.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/woocommerce-admin/client/settings/routes.js b/plugins/woocommerce-admin/client/settings/routes.js index 4c5e2d909b6..55eeb78d7bd 100644 --- a/plugins/woocommerce-admin/client/settings/routes.js +++ b/plugins/woocommerce-admin/client/settings/routes.js @@ -2,7 +2,7 @@ * External dependencies */ import { getQuery } from '@woocommerce/navigation'; -import { applyFilters, addFilter } from '@wordpress/hooks'; +import { applyFilters, addFilter, removeAllFilters } from '@wordpress/hooks'; /** * Internal dependencies @@ -79,6 +79,7 @@ export const getRoute = ( section ) => { } ); const routes = applyFilters( 'woocommerce_admin_settings_pages', [] ); + removeAllFilters( 'woocommerce_admin_settings_pages' ); const pageRoute = routes.find( ( route ) => route.page === page );