diff --git a/plugin.php b/plugin.php index ebd49ba1..0e65507f 100644 --- a/plugin.php +++ b/plugin.php @@ -6,7 +6,7 @@ * Description: Enable blocks in WP GraphQL. * Author: pristas-peter * Author URI: - * Version: 0.3.7 + * Version: 0.3.8 * Requires at least: 5.4 * License: GPL-3 * License URI: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/src/Schema/Types/Scalar/Scalar.php b/src/Schema/Types/Scalar/Scalar.php index d4c65595..d7eb1fe7 100644 --- a/src/Schema/Types/Scalar/Scalar.php +++ b/src/Schema/Types/Scalar/Scalar.php @@ -4,7 +4,7 @@ class Scalar { public function __construct() { - add_action('graphql_register_types', function ($type_registry) { + add_action('graphql_register_types_late', function ($type_registry) { register_graphql_scalar('BlockAttributesObject', [ 'serialize' => function ($value) { return json_encode($value);