# easy-invoice/2.4.1/includes/Helpers/NotificationHelper.php

Easy Invoice – Invoice Generator, PDF Quotes &amp; Payments, version 2.4.1. 50 lines.

- Page: https://pluginprobe.com/plugins/easy-invoice/2.4.1/code/includes/Helpers/NotificationHelper.php
- Raw: https://pluginprobe.com/plugins/easy-invoice/2.4.1/raw/includes/Helpers/NotificationHelper.php
- Modified: 2025-08-14T09:51:16+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/easy-invoice/2.4.1/code/includes/Helpers/NotificationHelper.php#L10-L20`.

```php
<?php
/**
 * Notification Helper for Easy Invoice
 *
 * @package Easy_Invoice
 */

if (!defined('ABSPATH')) {
    exit;
}

/**
 * Display notification messages
 *
 * @param string $type    The type of notification (success, error, warning, info)
 * @param string $message The message to display
 */
function easy_invoice_display_notification($type, $message) {
    $bg_class = '';
    $icon_class = '';
    
    switch ($type) {
        case 'success':
            $bg_class = 'bg-green-100 border-green-400 text-green-700';
            $icon_class = 'fas fa-check-circle';
            break;
        case 'error':
            $bg_class = 'bg-red-100 border-red-400 text-red-700';
            $icon_class = 'fas fa-exclamation-circle';
            break;
        case 'warning':
            $bg_class = 'bg-yellow-100 border-yellow-400 text-yellow-700';
            $icon_class = 'fas fa-exclamation-triangle';
            break;
        default:
            $bg_class = 'bg-blue-100 border-blue-400 text-blue-700';
            $icon_class = 'fas fa-info-circle';
    }
    
    echo '<div class="border-l-4 p-4 mb-4 ' . esc_attr($bg_class) . '">';
    echo '<div class="flex">';
    echo '<div class="flex-shrink-0">';
    echo '<i class="' . esc_attr($icon_class) . '"></i>';
    echo '</div>';
    echo '<div class="ml-3">';
    echo '<p class="text-sm">' . esc_html($message) . '</p>';
    echo '</div>';
    echo '</div>';
    echo '</div>';
} 
```
