# easy-invoice/2.4.0/includes/Helpers/BrandHelper.php

Easy Invoice – Invoice Generator, PDF Quotes &amp; Payments, version 2.4.0. 61 lines.

- Page: https://pluginprobe.com/plugins/easy-invoice/2.4.0/code/includes/Helpers/BrandHelper.php
- Raw: https://pluginprobe.com/plugins/easy-invoice/2.4.0/raw/includes/Helpers/BrandHelper.php
- Modified: 2026-05-21T08:29:24+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.0/code/includes/Helpers/BrandHelper.php#L10-L20`.

```php
<?php
/**
 * Brand-aware helper for display strings.
 *
 * The Easy Invoice Pro License page (and a handful of other places) hard-
 * code the literal text "MatrixAddons" / "matrixaddons.com" in user-visible
 * messages — "your license key from your MatrixAddons.com account",
 * "HTTP request sent to matrixaddons.com", etc. When an agency uses the
 * White-Label addon to rebrand the plugin, these strings would otherwise
 * leak the original brand back to the end-client.
 *
 * IMPORTANT: this helper deliberately does NOT change the actual license-
 * server URL. The EDD license check still hits matrixaddons.com because
 * that's where the license actually lives. Changing the URL would break
 * activation. Only the display-side text changes.
 *
 * Filters lets the White-Label addon override the brand strings; without it,
 * defaults are returned.
 */

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

if (!function_exists('easy_invoice_brand_name')) {
    /**
     * Brand display name. Defaults to "MatrixAddons". Override via
     * the White-Label addon's `plugin_name` or `author_name` settings.
     */
    function easy_invoice_brand_name(): string {
        $default = 'MatrixAddons';
        if (class_exists('\\EasyInvoicePro\\Addons\\WhiteLabel\\WhiteLabel')) {
            $s = \EasyInvoicePro\Addons\WhiteLabel\WhiteLabel::get();
            if (!empty($s['author_name']))  return $s['author_name'];
            if (!empty($s['plugin_name']))  return $s['plugin_name'];
        }
        return (string) apply_filters('easy_invoice_brand_name', $default);
    }
}

if (!function_exists('easy_invoice_brand_domain')) {
    /**
     * Brand display domain (for "your account at <domain>" copy). Defaults
     * to "matrixaddons.com". Override via the White-Label addon's
     * `plugin_url` or `author_url` settings (host part is extracted).
     */
    function easy_invoice_brand_domain(): string {
        $default = 'matrixaddons.com';
        if (class_exists('\\EasyInvoicePro\\Addons\\WhiteLabel\\WhiteLabel')) {
            $s = \EasyInvoicePro\Addons\WhiteLabel\WhiteLabel::get();
            foreach (['plugin_url', 'author_url'] as $key) {
                if (!empty($s[$key])) {
                    $host = wp_parse_url($s[$key], PHP_URL_HOST);
                    if ($host) return $host;
                }
            }
        }
        return (string) apply_filters('easy_invoice_brand_domain', $default);
    }
}

```
