diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php index 02a03cd1a5..bfb1b098ee 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php @@ -198,7 +198,7 @@ class WP_REST_Post_Types_Controller extends WP_REST_Controller { $data['hierarchical'] = $post_type->hierarchical; } - if ( rest_is_field_included( 'hierarchical', $fields ) ) { + if ( rest_is_field_included( 'has_archive', $fields ) ) { $data['has_archive'] = $post_type->has_archive; }