Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify args for wp.data resolution in marketing page to support WP 5.9 #37198

Merged
merged 3 commits into from Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -40,7 +40,7 @@ export const useRecommendedChannels = (): UseRecommendedChannels => {
} );

return {
loading: ! hasFinishedResolution( 'getRecommendedChannels' ),
loading: ! hasFinishedResolution( 'getRecommendedChannels', [] ),
data: nonActiveRecommendedChannels,
error,
};
Expand Down
Expand Up @@ -63,7 +63,7 @@ export const useRegisteredChannels = (): UseRegisteredChannels => {
const { invalidateResolution } = useDispatch( STORE_KEY );

const refetch = useCallback( () => {
invalidateResolution( 'getRegisteredChannels' );
invalidateResolution( 'getRegisteredChannels', [] );
}, [ invalidateResolution ] );

return useSelect( ( select ) => {
Expand All @@ -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,
Expand Down
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Fix WP data resolution (`invalidateResolution`) not working with WP 5.9 in marketing page.