Plugin Directory

Changeset 3347111


Ignore:
Timestamp:
08/19/2025 03:19:02 PM (7 months ago)
Author:
matrixaddons
Message:

Update to version 2.0.3 from GitHub

Location:
easy-invoice
Files:
46 added
2 deleted
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • easy-invoice/tags/2.0.3/easy-invoice.php

    r3346980 r3347111  
    44 * Plugin URI: https://matrixaddons.com/plugins/easy-invoice
    55 * Description: A beautiful, full-featured invoicing solution for WordPress. Create professional invoices, quotes, and manage payments with ease.
    6  * Version: 2.0.2
     6 * Version: 2.0.3
    77 * Author: MatrixAddons
    88 * Author URI: https://matrixaddons.com
     
    2525
    2626// Define plugin constants.
    27 define( 'EASY_INVOICE_VERSION', '2.0.2' );
     27define( 'EASY_INVOICE_VERSION', '2.0.3' );
    2828define( 'EASY_INVOICE_PLUGIN_FILE', __FILE__ );
    2929define( 'EASY_INVOICE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
     
    5656    $plugin = \EasyInvoice\EasyInvoice::getInstance();
    5757    $plugin->init();
    58    
     58
    5959    // Initialize service providers.
    6060    $invoice_service_provider = new \EasyInvoice\Providers\InvoiceServiceProvider();
     
    6666    $client_service_provider = new \EasyInvoice\Providers\ClientServiceProvider();
    6767    $client_service_provider->register();
    68    
     68
    6969    $invoice_number_service_provider = new \EasyInvoice\Providers\InvoiceNumberServiceProvider();
    7070    $invoice_number_service_provider->register();
    71    
     71
    7272    $quote_number_service_provider = new \EasyInvoice\Providers\QuoteNumberServiceProvider();
    7373    $quote_number_service_provider->register();
    74    
     74
    7575    $quote_service_provider = new \EasyInvoice\Providers\QuoteServiceProvider();
    7676    $quote_service_provider->register();
    77    
     77
    7878    // Initialize EmailManager
    7979    $email_manager = \EasyInvoice\Services\EmailManager::getInstance();
    80    
     80
    8181    // Initialize form manager
    8282    //$form_manager = \EasyInvoice\Forms\FormManager::getInstance();
    8383   // $form_manager->setInvoiceNumberServiceProvider($invoice_number_service_provider);
    84    
     84
    8585    // Initialize controllers.
    8686    $payment_controller = new \EasyInvoice\Controllers\PaymentController();
    8787    $payment_controller->init();
    88    
     88
    8989    $settings_controller = new \EasyInvoice\Controllers\SettingsController();
    9090    $settings_controller->init();
    91    
     91
    9292    $quote_controller = new \EasyInvoice\Controllers\QuoteController();
    9393    $quote_controller->init();
    94    
     94
    9595    // Initialize shortcode manager
    9696    $shortcode_manager = new \EasyInvoice\Shortcodes\ShortcodeManager();
    97    
     97
    9898}
    9999add_action( 'init', 'easy_invoice_init' );
     
    103103 */
    104104function easy_invoice_payment_gateway_log_handler($message, $level, $gateway_name) {
    105     $log_message = sprintf('[%s] Easy Invoice %s Gateway: %s', 
    106         date('Y-m-d H:i:s'), 
    107         ucfirst($gateway_name), 
     105    $log_message = sprintf('[%s] Easy Invoice %s Gateway: %s',
     106        date('Y-m-d H:i:s'),
     107        ucfirst($gateway_name),
    108108        $message
    109109    );
    110    
     110
    111111    if (defined('WP_DEBUG') && WP_DEBUG) {
    112112        error_log($log_message);
     
    117117// Initialize migration system
    118118if ( class_exists( 'EasyInvoice\Migration\MigrationInit' ) ) {
     119
    119120    EasyInvoice\Migration\MigrationInit::init();
    120121}
     
    155156    // Initialization of post types so rewrite rules can be flushed properly.
    156157    \EasyInvoice\EasyInvoice::getInstance()->registerPostTypes();
    157    
     158
    158159    // Initialize default settings
    159160    $settings_controller = new \EasyInvoice\Controllers\SettingsController();
    160161    $settings_controller->initializeSettings();
    161    
     162
    162163    // Record first install timestamp (do not overwrite if it already exists)
    163164    if (!get_option('easy_invoice_installed')) {
    164165        update_option('easy_invoice_installed', current_time('mysql'));
    165166    }
    166    
     167
    167168    // Check if this is a fresh installation or an upgrade
    168169    $stored_version = get_option('easy_invoice_version', '');
    169    
     170
    170171    // If no version is stored, this is a fresh installation
    171172    if (empty($stored_version)) {
     
    175176        // This is an upgrade. Do NOT bump version here; migration will set it when completed.
    176177    }
    177    
     178
    178179    // Flush rewrite rules.
    179180    flush_rewrite_rules();
     
    190191    // Flush rewrite rules.
    191192    flush_rewrite_rules();
    192    
     193
    193194    // Clear scheduled events
    194195    \EasyInvoice\Services\QuoteExpirationService::clear_schedule();
  • easy-invoice/tags/2.0.3/includes/Admin/EasyInvoiceAdmin.php

    r3344524 r3347111  
    2525    /**
    2626     * Invoice controller instance
    27      * 
     27     *
    2828     * @var InvoiceController
    2929     */
    3030    private $invoice_controller;
    31    
     31
    3232    /**
    3333     * Quote controller instance
    34      * 
     34     *
    3535     * @var QuoteController
    3636     */
    3737    private $quote_controller;
    38    
     38
    3939    /**
    4040     * Client controller instance
    41      * 
     41     *
    4242     * @var ClientController
    4343     */
    4444    private $client_controller;
    45    
     45
    4646    /**
    4747     * Settings controller instance
    48      * 
     48     *
    4949     * @var SettingsController
    5050     */
    5151    private $settings_controller;
    52    
     52
    5353    /**
    5454     * Report controller instance
    55      * 
     55     *
    5656     * @var ReportController
    5757     */
    5858    private $report_controller;
    59    
     59
    6060    /**
    6161     * Dashboard controller instance
    62      * 
     62     *
    6363     * @var DashboardController
    6464     */
    6565    private $dashboard_controller;
    66    
     66
    6767    /**
    6868     * Payment controller instance
    69      * 
     69     *
    7070     * @var PaymentController
    7171     */
    7272    private $payment_controller;
    73    
     73
    7474    /**
    7575     * Constructor
     
    8484        $this->payment_controller = new PaymentController();
    8585    }
    86    
     86
    8787    /**
    8888     * Initialize the admin class
     
    9191        // Add menu items
    9292        add_action('admin_menu', array($this, 'registerMenuPages'));
    93        
     93
    9494        // Register admin assets
    9595        $admin_assets = new AdminAssets();
    9696        $admin_assets->register();
    97        
     97
    9898        // Register invoice preview page
    9999        add_action('admin_init', array($this, 'registerPreviewPage'));
    100        
     100
    101101        // Ensure proper page titles to avoid WordPress core issues
    102102        add_filter('admin_title', array($this, 'setAdminTitle'));
    103        
     103
    104104        // Hide admin UI
    105105        add_action('admin_head', array($this, 'hideAdminUi'));
    106        
     106
    107107        // Initialize controllers
    108108        $this->invoice_controller->init();
     
    113113        $this->dashboard_controller->init();
    114114        $this->payment_controller->init();
    115        
     115
    116116        // Main content hook
    117117        add_action('easy_invoice_admin_main_content', array($this, 'mainPageContent'));
    118118    }
    119    
     119
    120120    /**
    121121     * Register admin menu pages
     
    132132            25
    133133        );
    134        
     134
    135135        // Dashboard submenu
    136136        add_submenu_page(
     
    142142            array($this, 'displayMainPage')
    143143        );
    144        
     144
    145145        // All invoices submenu
    146146        add_submenu_page(
     
    152152            array($this, 'displayMainPage')
    153153        );
    154        
     154
    155155        // Add new invoice submenu
    156156        add_submenu_page(
     
    162162            array($this, 'displayMainPage')
    163163        );
    164        
     164
    165165        // All quotes submenu
    166166        add_submenu_page(
     
    172172            array($this, 'displayMainPage')
    173173        );
    174        
     174
    175175        // Add new quote submenu
    176176        add_submenu_page(
     
    182182            array($this, 'displayMainPage')
    183183        );
    184        
     184
    185185        // Payments submenu
    186186        add_submenu_page(
     
    192192            array($this, 'displayMainPage')
    193193        );
    194        
     194
    195195        // Add new payment submenu
    196196        add_submenu_page(
     
    202202            array($this, 'displayMainPage')
    203203        );
    204        
     204
    205205        // Clients submenu
    206206        add_submenu_page(
     
    212212            array($this, 'displayMainPage')
    213213        );
    214        
     214
    215215        // Hidden submenu pages - not shown in the menu but accessible
    216216        add_submenu_page(
     
    222222            array($this, 'displayMainPage')
    223223        );
    224        
     224
    225225        add_submenu_page(
    226226            'easy-invoice', // Use main menu as parent to avoid title issues
     
    231231            array($this, 'displayMainPage')
    232232        );
    233        
     233
    234234        add_submenu_page(
    235235            'easy-invoice', // Use main menu as parent to avoid title issues
     
    240240            array($this, 'displayPreviewPage')
    241241        );
    242        
     242
    243243        add_submenu_page(
    244244            'easy-invoice', // Use main menu as parent to avoid title issues
     
    249249            array($this, 'displayMainPage')
    250250        );
    251        
     251
    252252        add_submenu_page(
    253253            'easy-invoice',
     
    267267            array($this, 'displayMainPage')
    268268        );
    269        
     269
    270270        // Email Settings submenu items - these will appear as submenu items under Email Settings
    271271        add_submenu_page(
     
    277277            array($this, 'displayMainPage')
    278278        );
    279        
     279
    280280        add_submenu_page(
    281281            PagesSlugs::EMAIL_SETTINGS, // Parent is Email Settings
     
    286286            array($this, 'displayMainPage')
    287287        );
    288        
     288
    289289        add_submenu_page(
    290290            PagesSlugs::EMAIL_SETTINGS, // Parent is Email Settings
     
    295295            array($this, 'displayMainPage')
    296296        );
    297        
     297
    298298        add_submenu_page(
    299299            PagesSlugs::EMAIL_SETTINGS, // Parent is Email Settings
     
    304304            array($this, 'displayMainPage')
    305305        );
    306        
     306
    307307        add_submenu_page(
    308308            PagesSlugs::EMAIL_SETTINGS, // Parent is Email Settings
     
    313313            array($this, 'displayMainPage')
    314314        );
    315        
     315
    316316        // Settings submenu
    317317        add_submenu_page(
     
    323323            array($this, 'displayMainPage')
    324324        );
    325        
     325
    326326        // License submenu
    327327        add_submenu_page(
     
    333333            array($this, 'displayMainPage')
    334334        );
    335        
     335
    336336        // Free vs Pro submenu - only show in free version
    337337        if (!easy_invoice_has_pro()) {
     
    346346        }
    347347    }
    348    
     348
    349349    /**
    350350     * Register invoice preview page
     
    353353        //add_action('admin_action_easy_invoice_preview', array($this, 'displayPreviewPage'));
    354354    }
    355    
     355
    356356    /**
    357357     * Display main page
     
    360360        include EASY_INVOICE_PLUGIN_DIR . 'templates/main-template.php';
    361361    }
    362    
     362
    363363    /**
    364364     * Display preview page
     
    367367        $this->invoice_controller->display(['page' => PagesSlugs::INVOICE_PREVIEW]);
    368368    }
    369    
     369
    370370    /**
    371371     * Display license page
     
    374374        include EASY_INVOICE_PLUGIN_DIR . 'templates/admin/license-page.php';
    375375    }
    376    
     376
    377377    /**
    378378     * Handle main page content based on the current page
     
    385385                $this->dashboard_controller->display(['page' => PagesSlugs::DASHBOARD]);
    386386                break;
    387                
     387
    388388            case PagesSlugs::ALL_INVOICES:
    389389                $this->invoice_controller->display(['page' => PagesSlugs::ALL_INVOICES]);
    390390                break;
    391                
     391
    392392            case PagesSlugs::INVOICE_NEW:
    393393                $this->invoice_controller->display(['page' => PagesSlugs::INVOICE_NEW]);
    394394                break;
    395                
     395
    396396            case PagesSlugs::INVOICE_PREVIEW:
    397397                $this->invoice_controller->display(['page' => PagesSlugs::INVOICE_PREVIEW]);
    398398                break;
    399                
     399
    400400            case PagesSlugs::ALL_QUOTES:
    401401                $this->quote_controller->display(['page' => PagesSlugs::ALL_QUOTES]);
    402402                break;
    403                
     403
    404404            case PagesSlugs::QUOTE_NEW:
    405405                $this->quote_controller->display(['page' => PagesSlugs::QUOTE_NEW]);
    406406                break;
    407                
     407
    408408            case PagesSlugs::QUOTE_PREVIEW:
    409409                $this->quote_controller->display(['page' => PagesSlugs::QUOTE_PREVIEW]);
    410410                break;
    411                
     411
    412412            case PagesSlugs::PAYMENTS:
    413413                if (isset($_GET['action'])) {
     
    417417                }
    418418                break;
    419                
     419
    420420            case PagesSlugs::PAYMENT_NEW:
    421421                $this->payment_controller->display(['page' => PagesSlugs::PAYMENT_NEW]);
    422422                break;
    423                
     423
    424424            case PagesSlugs::CLIENTS:
    425425                $this->client_controller->display(['page' => PagesSlugs::CLIENTS]);
    426426                break;
    427                
     427
    428428            case PagesSlugs::CLIENT_EDIT:
    429429                $this->client_controller->display(['page' => PagesSlugs::CLIENT_EDIT]);
    430430                break;
    431                
     431
    432432            case PagesSlugs::CLIENT_VIEW:
    433433                $this->client_controller->display(['page' => PagesSlugs::CLIENT_VIEW]);
    434434                break;
    435                
     435
    436436            case PagesSlugs::REPORTS:
    437437                $this->report_controller->display(['page' => PagesSlugs::REPORTS]);
    438438                break;
    439                
     439
    440440            case PagesSlugs::SETTINGS:
    441441                $this->settings_controller->display(['page' => PagesSlugs::SETTINGS]);
    442442                break;
    443                
     443
    444444            case PagesSlugs::LICENSE:
    445445                $this->displayLicensePage();
    446446                break;
    447                
     447
    448448            case PagesSlugs::EMAIL_SETTINGS:
    449449            case PagesSlugs::EMAIL_SETTINGS_GENERAL:
     
    453453                $this->settings_controller->display(['page' => PagesSlugs::SETTINGS, 'subsection' => $page]);
    454454                break;
    455                
     455
    456456            case 'easy-invoice-migration':
    457                 include EASY_INVOICE_PLUGIN_DIR . 'includes/migration/templates/migration-page.php';
    458                 break;
    459                
     457                include EASY_INVOICE_PLUGIN_DIR . 'includes/Migration/templates/migration-page.php';
     458                break;
     459
    460460            case 'easy-invoice-free-vs-pro':
    461461                include EASY_INVOICE_PLUGIN_DIR . 'templates/admin/free-vs-pro-page.php';
    462462                break;
    463                
     463
    464464            default:
    465465                $this->dashboard_controller->display(['page' => PagesSlugs::DASHBOARD]);
     
    467467        }
    468468    }
    469    
     469
    470470    /**
    471471     * Set proper admin title to avoid WordPress core issues
    472      * 
     472     *
    473473     * @param string $title The current admin title
    474474     * @return string The modified admin title
     
    476476    public function setAdminTitle($title) {
    477477        $current_page = isset($_GET['page']) ? sanitize_text_field($_GET['page']) : '';
    478        
     478
    479479        // Only modify titles for our plugin pages
    480480        if (strpos($current_page, 'easy-invoice') === 0 || strpos($current_page, 'easy-quote') === 0) {
     
    498498                'easy-invoice-free-vs-pro' => __('Free vs Pro', 'easy-invoice'),
    499499            ];
    500            
     500
    501501            if (isset($page_titles[$current_page])) {
    502502                return $page_titles[$current_page] . ' - ' . get_bloginfo('name');
    503503            }
    504504        }
    505        
     505
    506506        return $title;
    507507    }
    508    
     508
    509509    /**
    510510     * Hide the WordPress admin UI for our custom pages
  • easy-invoice/tags/2.0.3/readme.txt

    r3346980 r3347111  
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 2.0.2
     7Stable tag: 2.0.3
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    135135== Changelog ==
    136136
     137= 2.0.3 - 2025-08-19 =
     138* Fixed - migration issue fixed
    137139
    138140= 2.0.2 - 2025-08-19 =
  • easy-invoice/trunk/easy-invoice.php

    r3346980 r3347111  
    44 * Plugin URI: https://matrixaddons.com/plugins/easy-invoice
    55 * Description: A beautiful, full-featured invoicing solution for WordPress. Create professional invoices, quotes, and manage payments with ease.
    6  * Version: 2.0.2
     6 * Version: 2.0.3
    77 * Author: MatrixAddons
    88 * Author URI: https://matrixaddons.com
     
    2525
    2626// Define plugin constants.
    27 define( 'EASY_INVOICE_VERSION', '2.0.2' );
     27define( 'EASY_INVOICE_VERSION', '2.0.3' );
    2828define( 'EASY_INVOICE_PLUGIN_FILE', __FILE__ );
    2929define( 'EASY_INVOICE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
     
    5656    $plugin = \EasyInvoice\EasyInvoice::getInstance();
    5757    $plugin->init();
    58    
     58
    5959    // Initialize service providers.
    6060    $invoice_service_provider = new \EasyInvoice\Providers\InvoiceServiceProvider();
     
    6666    $client_service_provider = new \EasyInvoice\Providers\ClientServiceProvider();
    6767    $client_service_provider->register();
    68    
     68
    6969    $invoice_number_service_provider = new \EasyInvoice\Providers\InvoiceNumberServiceProvider();
    7070    $invoice_number_service_provider->register();
    71    
     71
    7272    $quote_number_service_provider = new \EasyInvoice\Providers\QuoteNumberServiceProvider();
    7373    $quote_number_service_provider->register();
    74    
     74
    7575    $quote_service_provider = new \EasyInvoice\Providers\QuoteServiceProvider();
    7676    $quote_service_provider->register();
    77    
     77
    7878    // Initialize EmailManager
    7979    $email_manager = \EasyInvoice\Services\EmailManager::getInstance();
    80    
     80
    8181    // Initialize form manager
    8282    //$form_manager = \EasyInvoice\Forms\FormManager::getInstance();
    8383   // $form_manager->setInvoiceNumberServiceProvider($invoice_number_service_provider);
    84    
     84
    8585    // Initialize controllers.
    8686    $payment_controller = new \EasyInvoice\Controllers\PaymentController();
    8787    $payment_controller->init();
    88    
     88
    8989    $settings_controller = new \EasyInvoice\Controllers\SettingsController();
    9090    $settings_controller->init();
    91    
     91
    9292    $quote_controller = new \EasyInvoice\Controllers\QuoteController();
    9393    $quote_controller->init();
    94    
     94
    9595    // Initialize shortcode manager
    9696    $shortcode_manager = new \EasyInvoice\Shortcodes\ShortcodeManager();
    97    
     97
    9898}
    9999add_action( 'init', 'easy_invoice_init' );
     
    103103 */
    104104function easy_invoice_payment_gateway_log_handler($message, $level, $gateway_name) {
    105     $log_message = sprintf('[%s] Easy Invoice %s Gateway: %s', 
    106         date('Y-m-d H:i:s'), 
    107         ucfirst($gateway_name), 
     105    $log_message = sprintf('[%s] Easy Invoice %s Gateway: %s',
     106        date('Y-m-d H:i:s'),
     107        ucfirst($gateway_name),
    108108        $message
    109109    );
    110    
     110
    111111    if (defined('WP_DEBUG') && WP_DEBUG) {
    112112        error_log($log_message);
     
    117117// Initialize migration system
    118118if ( class_exists( 'EasyInvoice\Migration\MigrationInit' ) ) {
     119
    119120    EasyInvoice\Migration\MigrationInit::init();
    120121}
     
    155156    // Initialization of post types so rewrite rules can be flushed properly.
    156157    \EasyInvoice\EasyInvoice::getInstance()->registerPostTypes();
    157    
     158
    158159    // Initialize default settings
    159160    $settings_controller = new \EasyInvoice\Controllers\SettingsController();
    160161    $settings_controller->initializeSettings();
    161    
     162
    162163    // Record first install timestamp (do not overwrite if it already exists)
    163164    if (!get_option('easy_invoice_installed')) {
    164165        update_option('easy_invoice_installed', current_time('mysql'));
    165166    }
    166    
     167
    167168    // Check if this is a fresh installation or an upgrade
    168169    $stored_version = get_option('easy_invoice_version', '');
    169    
     170
    170171    // If no version is stored, this is a fresh installation
    171172    if (empty($stored_version)) {
     
    175176        // This is an upgrade. Do NOT bump version here; migration will set it when completed.
    176177    }
    177    
     178
    178179    // Flush rewrite rules.
    179180    flush_rewrite_rules();
     
    190191    // Flush rewrite rules.
    191192    flush_rewrite_rules();
    192    
     193
    193194    // Clear scheduled events
    194195    \EasyInvoice\Services\QuoteExpirationService::clear_schedule();
  • easy-invoice/trunk/includes/Admin/EasyInvoiceAdmin.php

    r3344524 r3347111  
    2525    /**
    2626     * Invoice controller instance
    27      * 
     27     *
    2828     * @var InvoiceController
    2929     */
    3030    private $invoice_controller;
    31    
     31
    3232    /**
    3333     * Quote controller instance
    34      * 
     34     *
    3535     * @var QuoteController
    3636     */
    3737    private $quote_controller;
    38    
     38
    3939    /**
    4040     * Client controller instance
    41      * 
     41     *
    4242     * @var ClientController
    4343     */
    4444    private $client_controller;
    45    
     45
    4646    /**
    4747     * Settings controller instance
    48      * 
     48     *
    4949     * @var SettingsController
    5050     */
    5151    private $settings_controller;
    52    
     52
    5353    /**
    5454     * Report controller instance
    55      * 
     55     *
    5656     * @var ReportController
    5757     */
    5858    private $report_controller;
    59    
     59
    6060    /**
    6161     * Dashboard controller instance
    62      * 
     62     *
    6363     * @var DashboardController
    6464     */
    6565    private $dashboard_controller;
    66    
     66
    6767    /**
    6868     * Payment controller instance
    69      * 
     69     *
    7070     * @var PaymentController
    7171     */
    7272    private $payment_controller;
    73    
     73
    7474    /**
    7575     * Constructor
     
    8484        $this->payment_controller = new PaymentController();
    8585    }
    86    
     86
    8787    /**
    8888     * Initialize the admin class
     
    9191        // Add menu items
    9292        add_action('admin_menu', array($this, 'registerMenuPages'));
    93        
     93
    9494        // Register admin assets
    9595        $admin_assets = new AdminAssets();
    9696        $admin_assets->register();
    97        
     97
    9898        // Register invoice preview page
    9999        add_action('admin_init', array($this, 'registerPreviewPage'));
    100        
     100
    101101        // Ensure proper page titles to avoid WordPress core issues
    102102        add_filter('admin_title', array($this, 'setAdminTitle'));
    103        
     103
    104104        // Hide admin UI
    105105        add_action('admin_head', array($this, 'hideAdminUi'));
    106        
     106
    107107        // Initialize controllers
    108108        $this->invoice_controller->init();
     
    113113        $this->dashboard_controller->init();
    114114        $this->payment_controller->init();
    115        
     115
    116116        // Main content hook
    117117        add_action('easy_invoice_admin_main_content', array($this, 'mainPageContent'));
    118118    }
    119    
     119
    120120    /**
    121121     * Register admin menu pages
     
    132132            25
    133133        );
    134        
     134
    135135        // Dashboard submenu
    136136        add_submenu_page(
     
    142142            array($this, 'displayMainPage')
    143143        );
    144        
     144
    145145        // All invoices submenu
    146146        add_submenu_page(
     
    152152            array($this, 'displayMainPage')
    153153        );
    154        
     154
    155155        // Add new invoice submenu
    156156        add_submenu_page(
     
    162162            array($this, 'displayMainPage')
    163163        );
    164        
     164
    165165        // All quotes submenu
    166166        add_submenu_page(
     
    172172            array($this, 'displayMainPage')
    173173        );
    174        
     174
    175175        // Add new quote submenu
    176176        add_submenu_page(
     
    182182            array($this, 'displayMainPage')
    183183        );
    184        
     184
    185185        // Payments submenu
    186186        add_submenu_page(
     
    192192            array($this, 'displayMainPage')
    193193        );
    194        
     194
    195195        // Add new payment submenu
    196196        add_submenu_page(
     
    202202            array($this, 'displayMainPage')
    203203        );
    204        
     204
    205205        // Clients submenu
    206206        add_submenu_page(
     
    212212            array($this, 'displayMainPage')
    213213        );
    214        
     214
    215215        // Hidden submenu pages - not shown in the menu but accessible
    216216        add_submenu_page(
     
    222222            array($this, 'displayMainPage')
    223223        );
    224        
     224
    225225        add_submenu_page(
    226226            'easy-invoice', // Use main menu as parent to avoid title issues
     
    231231            array($this, 'displayMainPage')
    232232        );
    233        
     233
    234234        add_submenu_page(
    235235            'easy-invoice', // Use main menu as parent to avoid title issues
     
    240240            array($this, 'displayPreviewPage')
    241241        );
    242        
     242
    243243        add_submenu_page(
    244244            'easy-invoice', // Use main menu as parent to avoid title issues
     
    249249            array($this, 'displayMainPage')
    250250        );
    251        
     251
    252252        add_submenu_page(
    253253            'easy-invoice',
     
    267267            array($this, 'displayMainPage')
    268268        );
    269        
     269
    270270        // Email Settings submenu items - these will appear as submenu items under Email Settings
    271271        add_submenu_page(
     
    277277            array($this, 'displayMainPage')
    278278        );
    279        
     279
    280280        add_submenu_page(
    281281            PagesSlugs::EMAIL_SETTINGS, // Parent is Email Settings
     
    286286            array($this, 'displayMainPage')
    287287        );
    288        
     288
    289289        add_submenu_page(
    290290            PagesSlugs::EMAIL_SETTINGS, // Parent is Email Settings
     
    295295            array($this, 'displayMainPage')
    296296        );
    297        
     297
    298298        add_submenu_page(
    299299            PagesSlugs::EMAIL_SETTINGS, // Parent is Email Settings
     
    304304            array($this, 'displayMainPage')
    305305        );
    306        
     306
    307307        add_submenu_page(
    308308            PagesSlugs::EMAIL_SETTINGS, // Parent is Email Settings
     
    313313            array($this, 'displayMainPage')
    314314        );
    315        
     315
    316316        // Settings submenu
    317317        add_submenu_page(
     
    323323            array($this, 'displayMainPage')
    324324        );
    325        
     325
    326326        // License submenu
    327327        add_submenu_page(
     
    333333            array($this, 'displayMainPage')
    334334        );
    335        
     335
    336336        // Free vs Pro submenu - only show in free version
    337337        if (!easy_invoice_has_pro()) {
     
    346346        }
    347347    }
    348    
     348
    349349    /**
    350350     * Register invoice preview page
     
    353353        //add_action('admin_action_easy_invoice_preview', array($this, 'displayPreviewPage'));
    354354    }
    355    
     355
    356356    /**
    357357     * Display main page
     
    360360        include EASY_INVOICE_PLUGIN_DIR . 'templates/main-template.php';
    361361    }
    362    
     362
    363363    /**
    364364     * Display preview page
     
    367367        $this->invoice_controller->display(['page' => PagesSlugs::INVOICE_PREVIEW]);
    368368    }
    369    
     369
    370370    /**
    371371     * Display license page
     
    374374        include EASY_INVOICE_PLUGIN_DIR . 'templates/admin/license-page.php';
    375375    }
    376    
     376
    377377    /**
    378378     * Handle main page content based on the current page
     
    385385                $this->dashboard_controller->display(['page' => PagesSlugs::DASHBOARD]);
    386386                break;
    387                
     387
    388388            case PagesSlugs::ALL_INVOICES:
    389389                $this->invoice_controller->display(['page' => PagesSlugs::ALL_INVOICES]);
    390390                break;
    391                
     391
    392392            case PagesSlugs::INVOICE_NEW:
    393393                $this->invoice_controller->display(['page' => PagesSlugs::INVOICE_NEW]);
    394394                break;
    395                
     395
    396396            case PagesSlugs::INVOICE_PREVIEW:
    397397                $this->invoice_controller->display(['page' => PagesSlugs::INVOICE_PREVIEW]);
    398398                break;
    399                
     399
    400400            case PagesSlugs::ALL_QUOTES:
    401401                $this->quote_controller->display(['page' => PagesSlugs::ALL_QUOTES]);
    402402                break;
    403                
     403
    404404            case PagesSlugs::QUOTE_NEW:
    405405                $this->quote_controller->display(['page' => PagesSlugs::QUOTE_NEW]);
    406406                break;
    407                
     407
    408408            case PagesSlugs::QUOTE_PREVIEW:
    409409                $this->quote_controller->display(['page' => PagesSlugs::QUOTE_PREVIEW]);
    410410                break;
    411                
     411
    412412            case PagesSlugs::PAYMENTS:
    413413                if (isset($_GET['action'])) {
     
    417417                }
    418418                break;
    419                
     419
    420420            case PagesSlugs::PAYMENT_NEW:
    421421                $this->payment_controller->display(['page' => PagesSlugs::PAYMENT_NEW]);
    422422                break;
    423                
     423
    424424            case PagesSlugs::CLIENTS:
    425425                $this->client_controller->display(['page' => PagesSlugs::CLIENTS]);
    426426                break;
    427                
     427
    428428            case PagesSlugs::CLIENT_EDIT:
    429429                $this->client_controller->display(['page' => PagesSlugs::CLIENT_EDIT]);
    430430                break;
    431                
     431
    432432            case PagesSlugs::CLIENT_VIEW:
    433433                $this->client_controller->display(['page' => PagesSlugs::CLIENT_VIEW]);
    434434                break;
    435                
     435
    436436            case PagesSlugs::REPORTS:
    437437                $this->report_controller->display(['page' => PagesSlugs::REPORTS]);
    438438                break;
    439                
     439
    440440            case PagesSlugs::SETTINGS:
    441441                $this->settings_controller->display(['page' => PagesSlugs::SETTINGS]);
    442442                break;
    443                
     443
    444444            case PagesSlugs::LICENSE:
    445445                $this->displayLicensePage();
    446446                break;
    447                
     447
    448448            case PagesSlugs::EMAIL_SETTINGS:
    449449            case PagesSlugs::EMAIL_SETTINGS_GENERAL:
     
    453453                $this->settings_controller->display(['page' => PagesSlugs::SETTINGS, 'subsection' => $page]);
    454454                break;
    455                
     455
    456456            case 'easy-invoice-migration':
    457                 include EASY_INVOICE_PLUGIN_DIR . 'includes/migration/templates/migration-page.php';
    458                 break;
    459                
     457                include EASY_INVOICE_PLUGIN_DIR . 'includes/Migration/templates/migration-page.php';
     458                break;
     459
    460460            case 'easy-invoice-free-vs-pro':
    461461                include EASY_INVOICE_PLUGIN_DIR . 'templates/admin/free-vs-pro-page.php';
    462462                break;
    463                
     463
    464464            default:
    465465                $this->dashboard_controller->display(['page' => PagesSlugs::DASHBOARD]);
     
    467467        }
    468468    }
    469    
     469
    470470    /**
    471471     * Set proper admin title to avoid WordPress core issues
    472      * 
     472     *
    473473     * @param string $title The current admin title
    474474     * @return string The modified admin title
     
    476476    public function setAdminTitle($title) {
    477477        $current_page = isset($_GET['page']) ? sanitize_text_field($_GET['page']) : '';
    478        
     478
    479479        // Only modify titles for our plugin pages
    480480        if (strpos($current_page, 'easy-invoice') === 0 || strpos($current_page, 'easy-quote') === 0) {
     
    498498                'easy-invoice-free-vs-pro' => __('Free vs Pro', 'easy-invoice'),
    499499            ];
    500            
     500
    501501            if (isset($page_titles[$current_page])) {
    502502                return $page_titles[$current_page] . ' - ' . get_bloginfo('name');
    503503            }
    504504        }
    505        
     505
    506506        return $title;
    507507    }
    508    
     508
    509509    /**
    510510     * Hide the WordPress admin UI for our custom pages
  • easy-invoice/trunk/readme.txt

    r3346980 r3347111  
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 2.0.2
     7Stable tag: 2.0.3
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    135135== Changelog ==
    136136
     137= 2.0.3 - 2025-08-19 =
     138* Fixed - migration issue fixed
    137139
    138140= 2.0.2 - 2025-08-19 =
Note: See TracChangeset for help on using the changeset viewer.