diff --git a/hide_node_field.info.yml b/hide_node_field.info.yml
index 9d62af6..097d743 100644
--- a/hide_node_field.info.yml
+++ b/hide_node_field.info.yml
@@ -2,4 +2,5 @@ name: Hide Node Field
 type: module
 description: Hiding field for a particular node.
 package: Other
-core: 8.x
\ No newline at end of file
+core: 8.x
+core_version_requirement: ^8 || ^9
\ No newline at end of file
diff --git a/hide_node_field.install b/hide_node_field.install
index d07d849..28b48c1 100644
--- a/hide_node_field.install
+++ b/hide_node_field.install
@@ -35,5 +35,5 @@ function hide_node_field_schema() {
  * Implements hook_install().
  */
 function hide_node_field_install() {
-  drupal_set_message('Hide node field was installed. Check README.txt before using the module');
+  \Drupal::messenger()->addStatus('Hide node field was installed. Check README.txt before using the module');
 }
\ No newline at end of file
diff --git a/hide_node_field.module b/hide_node_field.module
index 97c3446..d6c3085 100644
--- a/hide_node_field.module
+++ b/hide_node_field.module
@@ -105,7 +105,7 @@ function hide_node_field_update($nid){
 	if(!empty($data)){
 		// Delete field information for the node.
 		\Drupal::database()->delete('hide_node_field_settings')->condition('nid', $nid)->execute();
-		drupal_set_message('Delete action performed on nodehidefield settings row');
+		\Drupal::messenger()->addStatus('Delete action performed on nodehidefield settings row');
 	}
 }
 /**
