From 6c9cae0eb9c017b81f0a52efaa97056aff943ae8 Mon Sep 17 00:00:00 2001
From: Grzegorz Rola <grola@seostudio.pl>
Date: Thu, 12 Aug 2021 13:18:16 +0200
Subject: [PATCH] bugfix(function not exists): add actions when add_action
 function exists

---
 src/Reminder.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/Reminder.php b/src/Reminder.php
index 8bd046a..a3eda41 100644
--- a/src/Reminder.php
+++ b/src/Reminder.php
@@ -7,8 +7,10 @@ class Reminder {
 	private $logo_url = 'logo-url';
 
 	public function __construct() {
-		add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_reminder_script' ) );
-		add_action( 'admin_footer', array( $this, 'display_html_element' ) );
+		if ( function_exists( 'add_action' ) ) {
+			add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_reminder_script' ) );
+			add_action( 'admin_footer', array( $this, 'display_html_element' ) );
+		}
 	}
 
 	public function enqueue_reminder_script() {
-- 
GitLab