From 029ee3cb8d0cb27ca696615bb87963503626e1cb Mon Sep 17 00:00:00 2001 From: Felipe Date: Mon, 29 Sep 2025 15:02:46 +0200 Subject: [PATCH] chore: deprecated filter Fix the deprecation warning of `graphql_data_loaders` filter. Warning: > The graphql_data_loaders filter is deprecated and will be removed in a future version. Instead, use the graphql_data_loader_classes filter to add/change data loader classes before they are instantiated. https://github.com/wp-graphql/wp-graphql/blob/131659f1a6118dcf429480002d979c4016440c20/src/AppContext.php#L196-L209 --- src/WPGraphQLAcf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WPGraphQLAcf.php b/src/WPGraphQLAcf.php index a2c30d4..9a6509f 100644 --- a/src/WPGraphQLAcf.php +++ b/src/WPGraphQLAcf.php @@ -46,7 +46,7 @@ public function init(): void { add_filter( 'graphql_resolve_revision_meta_from_parent', [ $this, 'preview_support' ], 10, 4 ); - add_filter( 'graphql_data_loaders', [ $this, 'register_loaders' ], 10, 2 ); + add_filter( 'graphql_data_loader_classes', [ $this, 'register_loaders' ], 10, 2 ); add_filter( 'graphql_resolve_node_type', [ $this, 'resolve_acf_options_page_node' ], 10, 2 ); /** * This filters any field that returns the `ContentTemplate` type