File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1+ Significance: patch
2+ Type: changed
3+
4+ Forms: fix preload middleware registration to properly cache API requests and support both path formats.
Original file line number Diff line number Diff line change @@ -101,12 +101,15 @@ public function load_admin_scripts() {
101101 ),
102102 '/wp/v2/feedback '
103103 );
104+ $ filters_path = '/wp/v2/feedback/filters ' ;
105+ $ filters_locale_path = \add_query_arg ( array ( '_locale ' => 'user ' ), $ filters_path );
104106 $ preload_paths = array (
105107 '/wp/v2/types?context=view ' ,
106108 '/wp/v2/feedback/config ' ,
107109 '/wp/v2/feedback/integrations?version=2 ' ,
108110 '/wp/v2/feedback/counts ' ,
109- '/wp/v2/feedback/filters ' ,
111+ $ filters_path ,
112+ $ filters_locale_path ,
110113 $ initial_responses_path ,
111114 $ initial_responses_locale_path ,
112115 );
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export const getFilters =
66 ( ) =>
77 async ( { dispatch } ) => {
88 const results = await apiFetch ( {
9- path : 'wp/v2/feedback/filters' ,
9+ path : '/ wp/v2/feedback/filters' ,
1010 } ) ;
1111 dispatch . receiveFilters ( results ) ;
1212 } ;
You can’t perform that action at this time.
0 commit comments