$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 click here to renew it.", 'e2pdf'), $this->helper->get('license')->get('expire'), 'https://e2pdf.com/checkout/license/renew/' . get_option('e2pdf_license')) )); } if ($this->helper->get('license')->get('status') == 'expired') { array_unshift($notifications, array( 'type' => 'error', 'text' => sprintf(__("Your E2Pdf License Key has expired. Please click here to renew it.", 'e2pdf'), 'https://e2pdf.com/checkout/license/renew/' . get_option('e2pdf_license')) )); } 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'), 'https://e2pdf.com/price', 'https://e2pdf.com') )); } } set_transient('e2pdf_notifications', array()); return $notifications; } }