diff --git a/plugins/woocommerce-admin/client/marketing/hooks/useRecommendedChannels.ts b/plugins/woocommerce-admin/client/marketing/hooks/useRecommendedChannels.ts index 0e69e63e2eb..babc45e6cbe 100644 --- a/plugins/woocommerce-admin/client/marketing/hooks/useRecommendedChannels.ts +++ b/plugins/woocommerce-admin/client/marketing/hooks/useRecommendedChannels.ts @@ -40,7 +40,7 @@ export const useRecommendedChannels = (): UseRecommendedChannels => { } ); return { - loading: ! hasFinishedResolution( 'getRecommendedChannels' ), + loading: ! hasFinishedResolution( 'getRecommendedChannels', [] ), data: nonActiveRecommendedChannels, error, }; diff --git a/plugins/woocommerce-admin/client/marketing/hooks/useRegisteredChannels.ts b/plugins/woocommerce-admin/client/marketing/hooks/useRegisteredChannels.ts index bafbd5b6f2e..199bdd584b1 100644 --- a/plugins/woocommerce-admin/client/marketing/hooks/useRegisteredChannels.ts +++ b/plugins/woocommerce-admin/client/marketing/hooks/useRegisteredChannels.ts @@ -63,7 +63,7 @@ export const useRegisteredChannels = (): UseRegisteredChannels => { const { invalidateResolution } = useDispatch( STORE_KEY ); const refetch = useCallback( () => { - invalidateResolution( 'getRegisteredChannels' ); + invalidateResolution( 'getRegisteredChannels', [] ); }, [ invalidateResolution ] ); return useSelect( ( select ) => { @@ -72,7 +72,7 @@ export const useRegisteredChannels = (): UseRegisteredChannels => { const state = getRegisteredChannels< RegisteredChannelsState >(); return { - loading: ! hasFinishedResolution( 'getRegisteredChannels' ), + loading: ! hasFinishedResolution( 'getRegisteredChannels', [] ), data: state.data?.map( convert ), error: state.error, refetch, diff --git a/plugins/woocommerce/changelog/feature-37176-specify-wp-data-resolution-args b/plugins/woocommerce/changelog/feature-37176-specify-wp-data-resolution-args new file mode 100644 index 00000000000..2224143fc8e --- /dev/null +++ b/plugins/woocommerce/changelog/feature-37176-specify-wp-data-resolution-args @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Fix WP data resolution (`invalidateResolution`) not working with WP 5.9 in marketing page.