$type, 'text' => $text, ); set_transient('e2pdf_notifications', $notifications); } /** * Get notifications * * @return array - List of notifications */ public function get_notifications() { $notifications = get_transient('e2pdf_notifications'); if (!get_option('e2pdf_hide_warnings')) { if (!is_array($notifications)) { $notifications = array(); } if ($this->helper->get('license')->get('status') == 'pre_expired') { array_unshift($notifications, array( 'type' => 'notice', 'text' => sprintf(__("Your E2Pdf License Key will expire at %s. Please renew it at %s.", 'e2pdf'), $this->helper->get('license')->get('expire'), self::UPGRADE_URL, self::UPGRADE_URL) )); } if ($this->helper->get('license')->get('status') == 'expired') { array_unshift($notifications, array( 'type' => 'error', 'text' => sprintf(__("Your E2Pdf License Key has expired. Please renew it at %s.", 'e2pdf'), self::UPGRADE_URL, self::UPGRADE_URL) )); } if ($this->helper->get('license')->get('type') == 'FREE') { array_unshift($notifications, array( 'type' => 'notice', 'text' => sprintf(__("You are using FREE license type. Up to 1 page and up to 1 template allowed. Please check %s for upgrade options.", 'e2pdf'), self::UPGRADE_URL, self::UPGRADE_URL) )); } } set_transient('e2pdf_notifications', array()); return $notifications; } }