Plugin Directory

Changeset 3387040


Ignore:
Timestamp:
10/30/2025 12:14:17 PM (4 months ago)
Author:
matrixaddons
Message:

Update to version 2.1.1 from GitHub

Location:
easy-invoice
Files:
26 edited
1 copied

Legend:

Unmodified
Added
Removed
  • easy-invoice/tags/2.1.1/assets/js/client-manager.js

    r3346980 r3387040  
    7171            $("#display-client-name").text(clientData.business_client_name || (clientData.first_name + ' ' + clientData.last_name) || 'N/A');
    7272            $("#display-client-email").text(clientData.email || 'N/A');
    73             $("#display-client-phone").text(clientData.extra_info || 'N/A');
     73            $("#display-client-phone").text(clientData.phone || 'N/A');
    7474            $("#display-client-company").text(clientData.business_client_name || 'N/A');
    7575            $("#display-client-address").text(clientData.address || 'N/A');
     
    9494                name: clientData.business_client_name || (clientData.first_name + ' ' + clientData.last_name),
    9595                email: clientData.email,
    96                 phone: clientData.extra_info,
     96                phone: clientData.phone,
    9797                address: clientData.address,
    9898                website: clientData.website,
     
    123123                        $("#display-client-name").text(client.business_client_name || (client.first_name + ' ' + client.last_name) || 'N/A');
    124124                        $("#display-client-email").text(client.email || 'N/A');
    125                         $("#display-client-phone").text(client.extra_info || 'N/A');
     125                        $("#display-client-phone").text(client.phone || 'N/A');
    126126                        $("#display-client-company").text(client.business_client_name || 'N/A');
    127127                        $("#display-client-address").text(client.address || 'N/A');
     
    146146                            name: client.business_client_name || (client.first_name + ' ' + client.last_name),
    147147                            email: client.email,
    148                             phone: client.extra_info,
     148                            phone: client.phone,
    149149                            address: client.address,
    150150                            website: client.website,
     
    293293                    password: password,
    294294                    address: $("#add-client-address").val(),
    295                     extra_info: $("#add-client-extra-info").val(),
     295                    phone: $("#add-client-phone").val(),
    296296                    first_name: $("#add-client-first-name").val(),
    297297                    last_name: $("#add-client-last-name").val(),
     
    317317                        // Always reset the button and clear the form
    318318                        submitBtn.prop("disabled", false).html(originalText);
    319                         $("#add-client-business-name, #add-client-email, #add-client-username, #add-client-password, #add-client-first-name, #add-client-last-name, #add-client-address, #add-client-extra-info, #add-client-website").val("");
     319                        $("#add-client-business-name, #add-client-email, #add-client-username, #add-client-password, #add-client-first-name, #add-client-last-name, #add-client-address, #add-client-phone, #add-client-website").val("");
    320320                       
    321321                        if (response.success) {
     
    330330                                    email: clientData.email,
    331331                                    company: clientData.business_client_name,
    332                                     phone: clientData.extra_info,
     332                                    phone: clientData.phone,
    333333                                    website: clientData.website,
    334334                                    address: clientData.address
     
    542542                    password: $("#edit-client-password").val(),
    543543                    address: $("#edit-client-address").val(),
    544                     extra_info: $("#edit-client-extra-info").val(),
     544                    phone: $("#edit-client-phone").val(),
    545545                    first_name: $("#edit-client-first-name").val(),
    546546                    last_name: $("#edit-client-last-name").val(),
  • easy-invoice/tags/2.1.1/easy-invoice.php

    r3377511 r3387040  
    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.1.0
     6 * Version: 2.1.1
    77 * Author: MatrixAddons
    88 * Author URI: https://matrixaddons.com
     
    2525
    2626// Define plugin constants.
    27 define( 'EASY_INVOICE_VERSION', '2.1.0' );
     27define( 'EASY_INVOICE_VERSION', '2.1.1' );
    2828define( 'EASY_INVOICE_PLUGIN_FILE', __FILE__ );
    2929define( 'EASY_INVOICE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
  • easy-invoice/tags/2.1.1/includes/Admin/EasyInvoiceAjax.php

    r3363158 r3387040  
    10461046            ClientFields::FIRST_NAME => sanitize_text_field($_POST['first_name']),
    10471047            ClientFields::LAST_NAME => sanitize_text_field($_POST['last_name']),
    1048             ClientFields::WEBSITE => esc_url_raw($_POST['website'])
     1048            ClientFields::WEBSITE => esc_url_raw($_POST['website']),
     1049            ClientFields::PHONE => isset($_POST['phone']) ? sanitize_text_field($_POST['phone']) : '',
    10491050        ];
    10501051       
     
    11031104            ClientFields::PASSWORD => $_POST['password'], // Keep password as is, don't sanitize
    11041105            ClientFields::ADDRESS => sanitize_textarea_field($_POST['address']),
     1106            ClientFields::PHONE => isset($_POST['phone']) ? sanitize_text_field($_POST['phone']) : '',
    11051107            ClientFields::EXTRA_INFO => sanitize_textarea_field($_POST['extra_info']),
    11061108            ClientFields::FIRST_NAME => sanitize_text_field($_POST['first_name']),
  • easy-invoice/tags/2.1.1/includes/Constants/ClientFields.php

    r3344524 r3387040  
    2727    public const LAST_NAME = '_easy_invoice_client_last_name';
    2828    public const WEBSITE = '_easy_invoice_client_website';
     29    public const PHONE = '_easy_invoice_client_phone';
    2930}
  • easy-invoice/tags/2.1.1/includes/Controllers/QuoteController.php

    r3377511 r3387040  
    963963       
    964964        if ($invoice_id) {
    965             // Get regular invoice URL
     965            // Always use WordPress permalink
    966966            $invoice_url = get_permalink($invoice_id);
    967            
    968             // If permalink is not available, construct a fallback URL
    969             if (!$invoice_url || $invoice_url === get_permalink(0)) {
    970                 $invoice_url = home_url('/invoice/' . $invoice_id . '/');
    971             }
    972            
    973             // Get secure URL for the new invoice if it exists (Pro version)
     967            // If Pro and secure link available, use secure link
    974968            if (class_exists('\EasyInvoicePro\Controllers\PermalinkController')) {
    975969                $secure_url = \EasyInvoicePro\Controllers\PermalinkController::getInvoiceSecureLinkUrl($invoice_id);
     970                if ($secure_url) {
     971                    $invoice_url = $secure_url;
     972                }
    976973            }
    977974        }
  • easy-invoice/tags/2.1.1/includes/Models/Client.php

    r3344524 r3387040  
    173173        $this->data['last_name'] = get_user_meta($this->id, ClientFields::LAST_NAME, true);
    174174        $this->data['website'] = get_user_meta($this->id, ClientFields::WEBSITE, true);
    175         $this->data['phone'] = get_user_meta($this->id, ClientFields::EXTRA_INFO, true); // Phone is stored in extra_info
     175        $this->data['phone'] = get_user_meta($this->id, ClientFields::PHONE, true); // Now uses dedicated phone key
    176176       
    177177        // If email is not set in meta, try to get it from user data
  • easy-invoice/tags/2.1.1/includes/Repositories/ClientRepository.php

    r3370086 r3387040  
    442442            update_user_meta($client->getId(), ClientFields::WEBSITE, $data[ClientFields::WEBSITE]);
    443443        }
     444        if (isset($data[ClientFields::PHONE])) {
     445            $client->phone = $data[ClientFields::PHONE];
     446            update_user_meta($client->getId(), ClientFields::PHONE, $data[ClientFields::PHONE]);
     447        }
    444448       
    445449        // Reset the dirty flag after saving
  • easy-invoice/tags/2.1.1/includes/Services/EmailManager.php

    r3345595 r3387040  
    321321        $subject = $this->processTemplate($template['subject'], $replacements);
    322322        $message = $this->processTemplate($template['body'], $replacements);
     323        $message = do_shortcode($message); // Render shortcodes like [easy_invoice_url ...]
    323324       
    324325        // Add HTML wrapper if enabled
     
    426427    private function getInvoiceReplacements(Invoice $invoice, array $additional_data = []): array {
    427428        $currency_symbol = get_option('easy_invoice_currency_symbol', '$');
     429       
     430        // Secure link support
     431        $invoice_url = get_permalink($invoice->getId());
     432        $secure_links_enabled = get_option('easy_invoice_pro_enable_secure_links', 'no') === 'yes';
     433        if ($secure_links_enabled && class_exists('\EasyInvoicePro\Controllers\PermalinkController')) {
     434            $secure_url = \EasyInvoicePro\Controllers\PermalinkController::getInvoiceSecureLinkUrl($invoice->getId());
     435            if ($secure_url) {
     436                $invoice_url = $secure_url;
     437            }
     438        }
    428439       
    429440        return array_merge([
     
    444455            '{{due_date}}' => date('F j, Y', strtotime($invoice->getDueDate())),
    445456            '{{issue_date}}' => date('F j, Y', strtotime($invoice->getIssueDate())),
    446             '{{invoice_url}}' => get_permalink($invoice->getId()),
     457            '{{invoice_url}}' => $invoice_url, // Use correct (possibly secure) link
    447458            '{{payment_url}}' => add_query_arg('payment', '1', get_permalink($invoice->getId())),
    448459            '{{site_url}}' => get_site_url(),
     
    461472    private function getQuoteReplacements(Quote $quote, array $additional_data = []): array {
    462473        $currency_symbol = get_option('easy_invoice_currency_symbol', '$');
     474       
     475        $quote_url = get_permalink($quote->getId());
     476        $secure_links_enabled = get_option('easy_invoice_pro_enable_secure_links', 'no') === 'yes';
     477        if ($secure_links_enabled && class_exists('\EasyInvoicePro\Controllers\PermalinkController')) {
     478            $secure_url = \EasyInvoicePro\Controllers\PermalinkController::getQuoteSecureLinkUrl($quote->getId());
     479            if ($secure_url) {
     480                $quote_url = $secure_url;
     481            }
     482        }
    463483       
    464484        return array_merge([
     
    479499            '{{expiry_date}}' => date('F j, Y', strtotime($quote->getExpiryDate())),
    480500            '{{issue_date}}' => date('F j, Y', strtotime($quote->getIssueDate())),
    481             '{{quote_url}}' => get_permalink($quote->getId()),
     501            '{{quote_url}}' => $quote_url,
    482502            '{{site_url}}' => get_site_url(),
    483503            '{{admin_url}}' => admin_url(),
  • easy-invoice/tags/2.1.1/includes/Shortcodes/ShortcodeManager.php

    r3345595 r3387040  
    6161
    6262        $url = get_permalink($invoice->getId());
     63        // Only use secure link if enabled in settings and available
     64        $secure_links_enabled = get_option('easy_invoice_pro_enable_secure_links', 'no') === 'yes';
     65        if ($secure_links_enabled && class_exists('\EasyInvoicePro\Controllers\PermalinkController')) {
     66            $secure_url = \EasyInvoicePro\Controllers\PermalinkController::getInvoiceSecureLinkUrl($invoice->getId());
     67            if ($secure_url) {
     68                $url = $secure_url;
     69            }
     70        }
    6371        $text = !empty($atts['text']) ? $atts['text'] : $invoice->getNumber();
    6472        $class = esc_attr($atts['class']);
     
    102110
    103111        $url = get_permalink($quote->getId());
     112        $secure_links_enabled = get_option('easy_invoice_pro_enable_secure_links', 'no') === 'yes';
     113        if ($secure_links_enabled && class_exists('\EasyInvoicePro\Controllers\PermalinkController')) {
     114            $secure_url = \EasyInvoicePro\Controllers\PermalinkController::getQuoteSecureLinkUrl($quote->getId());
     115            if ($secure_url) {
     116                $url = $secure_url;
     117            }
     118        }
    104119        $text = !empty($atts['text']) ? $atts['text'] : $quote->getNumber();
    105120        $class = esc_attr($atts['class']);
  • easy-invoice/tags/2.1.1/readme.txt

    r3377511 r3387040  
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 2.1.0
     7Stable tag: 2.1.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    139139
    140140
     141= 2.1.1 - 2025-10-30 =
     142* Fixed - Phone number issue fixed
     143* Fixed - Shortcode issue fixed
     144
    141145= 2.1.0 - 2025-10-13 =
    142146* Fixed - Escaping issue fixed
  • easy-invoice/tags/2.1.1/templates/client-form.php

    r3346980 r3387040  
    3535            <input type="email" id="<?php echo $field_prefix; ?>client-email" name="email" required
    3636                value="<?php echo $is_edit_mode ? esc_attr($client->getEmail()) : ''; ?>"
     37                class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
     38        </div>
     39        <div>
     40            <label for="<?php echo $field_prefix; ?>client-phone" class="block text-sm font-medium text-gray-700"><?php _e('Phone', 'easy-invoice'); ?></label>
     41            <input type="text" id="<?php echo $field_prefix; ?>client-phone" name="phone"
     42                value="<?php echo $is_edit_mode ? esc_attr($client->getPhone()) : ''; ?>"
    3743                class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
    3844        </div>
  • easy-invoice/tags/2.1.1/templates/client-view-page.php

    r3345595 r3387040  
    7171                <div class="ml-3">
    7272                    <label class="block text-xs font-medium text-gray-500 uppercase tracking-wider"><?php _e('Phone', 'easy-invoice'); ?></label>
    73                     <p class="text-sm text-gray-800 mt-1"><?php echo esc_html($client->getExtraInfo() ?: 'N/A'); ?></p>
     73                    <p class="text-sm text-gray-800 mt-1"><?php echo esc_html($client->getPhone() ?: 'N/A'); ?></p>
    7474                </div>
    7575            </div>
  • easy-invoice/tags/2.1.1/templates/clients-page.php

    r3346980 r3387040  
    235235                            <div class="flex items-center space-x-1">
    236236                                <span>Email</span>
     237                                <div class="sort-indicator">
     238                                    <i class="fas fa-sort text-gray-400"></i>
     239                                </div>
     240                            </div>
     241                        </th>
     242                        <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100" data-sort="phone">
     243                            <div class="flex items-center space-x-1">
     244                                <span>Phone</span>
    237245                                <div class="sort-indicator">
    238246                                    <i class="fas fa-sort text-gray-400"></i>
     
    322330                            </td>
    323331                            <td class="px-6 py-4 whitespace-nowrap">
     332                                <div class="text-sm text-gray-500"><?php echo esc_html($client->getPhone()); ?></div>
     333                            </td>
     334                            <td class="px-6 py-4 whitespace-nowrap">
    324335                                <div class="text-sm text-gray-500"><?php echo esc_html($client->getUsername()); ?></div>
    325336                            </td>
     
    512523                        bValue = $(b).find('td:nth-child(3) div').text().toLowerCase();
    513524                        break;
    514                     case 'username':
     525                    case 'phone':
    515526                        aValue = $(a).find('td:nth-child(4) div').text().toLowerCase();
    516527                        bValue = $(b).find('td:nth-child(4) div').text().toLowerCase();
    517528                        break;
     529                    case 'username':
     530                        aValue = $(a).find('td:nth-child(5) div').text().toLowerCase();
     531                        bValue = $(b).find('td:nth-child(5) div').text().toLowerCase();
     532                        break;
    518533                    case 'role':
    519                         aValue = $(a).find('td:nth-child(5) span').text().toLowerCase();
    520                         bValue = $(b).find('td:nth-child(5) span').text().toLowerCase();
     534                        aValue = $(a).find('td:nth-child(6) span').text().toLowerCase();
     535                        bValue = $(b).find('td:nth-child(6) span').text().toLowerCase();
    521536                        break;
    522537                    default:
  • easy-invoice/trunk/assets/js/client-manager.js

    r3346980 r3387040  
    7171            $("#display-client-name").text(clientData.business_client_name || (clientData.first_name + ' ' + clientData.last_name) || 'N/A');
    7272            $("#display-client-email").text(clientData.email || 'N/A');
    73             $("#display-client-phone").text(clientData.extra_info || 'N/A');
     73            $("#display-client-phone").text(clientData.phone || 'N/A');
    7474            $("#display-client-company").text(clientData.business_client_name || 'N/A');
    7575            $("#display-client-address").text(clientData.address || 'N/A');
     
    9494                name: clientData.business_client_name || (clientData.first_name + ' ' + clientData.last_name),
    9595                email: clientData.email,
    96                 phone: clientData.extra_info,
     96                phone: clientData.phone,
    9797                address: clientData.address,
    9898                website: clientData.website,
     
    123123                        $("#display-client-name").text(client.business_client_name || (client.first_name + ' ' + client.last_name) || 'N/A');
    124124                        $("#display-client-email").text(client.email || 'N/A');
    125                         $("#display-client-phone").text(client.extra_info || 'N/A');
     125                        $("#display-client-phone").text(client.phone || 'N/A');
    126126                        $("#display-client-company").text(client.business_client_name || 'N/A');
    127127                        $("#display-client-address").text(client.address || 'N/A');
     
    146146                            name: client.business_client_name || (client.first_name + ' ' + client.last_name),
    147147                            email: client.email,
    148                             phone: client.extra_info,
     148                            phone: client.phone,
    149149                            address: client.address,
    150150                            website: client.website,
     
    293293                    password: password,
    294294                    address: $("#add-client-address").val(),
    295                     extra_info: $("#add-client-extra-info").val(),
     295                    phone: $("#add-client-phone").val(),
    296296                    first_name: $("#add-client-first-name").val(),
    297297                    last_name: $("#add-client-last-name").val(),
     
    317317                        // Always reset the button and clear the form
    318318                        submitBtn.prop("disabled", false).html(originalText);
    319                         $("#add-client-business-name, #add-client-email, #add-client-username, #add-client-password, #add-client-first-name, #add-client-last-name, #add-client-address, #add-client-extra-info, #add-client-website").val("");
     319                        $("#add-client-business-name, #add-client-email, #add-client-username, #add-client-password, #add-client-first-name, #add-client-last-name, #add-client-address, #add-client-phone, #add-client-website").val("");
    320320                       
    321321                        if (response.success) {
     
    330330                                    email: clientData.email,
    331331                                    company: clientData.business_client_name,
    332                                     phone: clientData.extra_info,
     332                                    phone: clientData.phone,
    333333                                    website: clientData.website,
    334334                                    address: clientData.address
     
    542542                    password: $("#edit-client-password").val(),
    543543                    address: $("#edit-client-address").val(),
    544                     extra_info: $("#edit-client-extra-info").val(),
     544                    phone: $("#edit-client-phone").val(),
    545545                    first_name: $("#edit-client-first-name").val(),
    546546                    last_name: $("#edit-client-last-name").val(),
  • easy-invoice/trunk/easy-invoice.php

    r3377511 r3387040  
    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.1.0
     6 * Version: 2.1.1
    77 * Author: MatrixAddons
    88 * Author URI: https://matrixaddons.com
     
    2525
    2626// Define plugin constants.
    27 define( 'EASY_INVOICE_VERSION', '2.1.0' );
     27define( 'EASY_INVOICE_VERSION', '2.1.1' );
    2828define( 'EASY_INVOICE_PLUGIN_FILE', __FILE__ );
    2929define( 'EASY_INVOICE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
  • easy-invoice/trunk/includes/Admin/EasyInvoiceAjax.php

    r3363158 r3387040  
    10461046            ClientFields::FIRST_NAME => sanitize_text_field($_POST['first_name']),
    10471047            ClientFields::LAST_NAME => sanitize_text_field($_POST['last_name']),
    1048             ClientFields::WEBSITE => esc_url_raw($_POST['website'])
     1048            ClientFields::WEBSITE => esc_url_raw($_POST['website']),
     1049            ClientFields::PHONE => isset($_POST['phone']) ? sanitize_text_field($_POST['phone']) : '',
    10491050        ];
    10501051       
     
    11031104            ClientFields::PASSWORD => $_POST['password'], // Keep password as is, don't sanitize
    11041105            ClientFields::ADDRESS => sanitize_textarea_field($_POST['address']),
     1106            ClientFields::PHONE => isset($_POST['phone']) ? sanitize_text_field($_POST['phone']) : '',
    11051107            ClientFields::EXTRA_INFO => sanitize_textarea_field($_POST['extra_info']),
    11061108            ClientFields::FIRST_NAME => sanitize_text_field($_POST['first_name']),
  • easy-invoice/trunk/includes/Constants/ClientFields.php

    r3344524 r3387040  
    2727    public const LAST_NAME = '_easy_invoice_client_last_name';
    2828    public const WEBSITE = '_easy_invoice_client_website';
     29    public const PHONE = '_easy_invoice_client_phone';
    2930}
  • easy-invoice/trunk/includes/Controllers/QuoteController.php

    r3377511 r3387040  
    963963       
    964964        if ($invoice_id) {
    965             // Get regular invoice URL
     965            // Always use WordPress permalink
    966966            $invoice_url = get_permalink($invoice_id);
    967            
    968             // If permalink is not available, construct a fallback URL
    969             if (!$invoice_url || $invoice_url === get_permalink(0)) {
    970                 $invoice_url = home_url('/invoice/' . $invoice_id . '/');
    971             }
    972            
    973             // Get secure URL for the new invoice if it exists (Pro version)
     967            // If Pro and secure link available, use secure link
    974968            if (class_exists('\EasyInvoicePro\Controllers\PermalinkController')) {
    975969                $secure_url = \EasyInvoicePro\Controllers\PermalinkController::getInvoiceSecureLinkUrl($invoice_id);
     970                if ($secure_url) {
     971                    $invoice_url = $secure_url;
     972                }
    976973            }
    977974        }
  • easy-invoice/trunk/includes/Models/Client.php

    r3344524 r3387040  
    173173        $this->data['last_name'] = get_user_meta($this->id, ClientFields::LAST_NAME, true);
    174174        $this->data['website'] = get_user_meta($this->id, ClientFields::WEBSITE, true);
    175         $this->data['phone'] = get_user_meta($this->id, ClientFields::EXTRA_INFO, true); // Phone is stored in extra_info
     175        $this->data['phone'] = get_user_meta($this->id, ClientFields::PHONE, true); // Now uses dedicated phone key
    176176       
    177177        // If email is not set in meta, try to get it from user data
  • easy-invoice/trunk/includes/Repositories/ClientRepository.php

    r3370086 r3387040  
    442442            update_user_meta($client->getId(), ClientFields::WEBSITE, $data[ClientFields::WEBSITE]);
    443443        }
     444        if (isset($data[ClientFields::PHONE])) {
     445            $client->phone = $data[ClientFields::PHONE];
     446            update_user_meta($client->getId(), ClientFields::PHONE, $data[ClientFields::PHONE]);
     447        }
    444448       
    445449        // Reset the dirty flag after saving
  • easy-invoice/trunk/includes/Services/EmailManager.php

    r3345595 r3387040  
    321321        $subject = $this->processTemplate($template['subject'], $replacements);
    322322        $message = $this->processTemplate($template['body'], $replacements);
     323        $message = do_shortcode($message); // Render shortcodes like [easy_invoice_url ...]
    323324       
    324325        // Add HTML wrapper if enabled
     
    426427    private function getInvoiceReplacements(Invoice $invoice, array $additional_data = []): array {
    427428        $currency_symbol = get_option('easy_invoice_currency_symbol', '$');
     429       
     430        // Secure link support
     431        $invoice_url = get_permalink($invoice->getId());
     432        $secure_links_enabled = get_option('easy_invoice_pro_enable_secure_links', 'no') === 'yes';
     433        if ($secure_links_enabled && class_exists('\EasyInvoicePro\Controllers\PermalinkController')) {
     434            $secure_url = \EasyInvoicePro\Controllers\PermalinkController::getInvoiceSecureLinkUrl($invoice->getId());
     435            if ($secure_url) {
     436                $invoice_url = $secure_url;
     437            }
     438        }
    428439       
    429440        return array_merge([
     
    444455            '{{due_date}}' => date('F j, Y', strtotime($invoice->getDueDate())),
    445456            '{{issue_date}}' => date('F j, Y', strtotime($invoice->getIssueDate())),
    446             '{{invoice_url}}' => get_permalink($invoice->getId()),
     457            '{{invoice_url}}' => $invoice_url, // Use correct (possibly secure) link
    447458            '{{payment_url}}' => add_query_arg('payment', '1', get_permalink($invoice->getId())),
    448459            '{{site_url}}' => get_site_url(),
     
    461472    private function getQuoteReplacements(Quote $quote, array $additional_data = []): array {
    462473        $currency_symbol = get_option('easy_invoice_currency_symbol', '$');
     474       
     475        $quote_url = get_permalink($quote->getId());
     476        $secure_links_enabled = get_option('easy_invoice_pro_enable_secure_links', 'no') === 'yes';
     477        if ($secure_links_enabled && class_exists('\EasyInvoicePro\Controllers\PermalinkController')) {
     478            $secure_url = \EasyInvoicePro\Controllers\PermalinkController::getQuoteSecureLinkUrl($quote->getId());
     479            if ($secure_url) {
     480                $quote_url = $secure_url;
     481            }
     482        }
    463483       
    464484        return array_merge([
     
    479499            '{{expiry_date}}' => date('F j, Y', strtotime($quote->getExpiryDate())),
    480500            '{{issue_date}}' => date('F j, Y', strtotime($quote->getIssueDate())),
    481             '{{quote_url}}' => get_permalink($quote->getId()),
     501            '{{quote_url}}' => $quote_url,
    482502            '{{site_url}}' => get_site_url(),
    483503            '{{admin_url}}' => admin_url(),
  • easy-invoice/trunk/includes/Shortcodes/ShortcodeManager.php

    r3345595 r3387040  
    6161
    6262        $url = get_permalink($invoice->getId());
     63        // Only use secure link if enabled in settings and available
     64        $secure_links_enabled = get_option('easy_invoice_pro_enable_secure_links', 'no') === 'yes';
     65        if ($secure_links_enabled && class_exists('\EasyInvoicePro\Controllers\PermalinkController')) {
     66            $secure_url = \EasyInvoicePro\Controllers\PermalinkController::getInvoiceSecureLinkUrl($invoice->getId());
     67            if ($secure_url) {
     68                $url = $secure_url;
     69            }
     70        }
    6371        $text = !empty($atts['text']) ? $atts['text'] : $invoice->getNumber();
    6472        $class = esc_attr($atts['class']);
     
    102110
    103111        $url = get_permalink($quote->getId());
     112        $secure_links_enabled = get_option('easy_invoice_pro_enable_secure_links', 'no') === 'yes';
     113        if ($secure_links_enabled && class_exists('\EasyInvoicePro\Controllers\PermalinkController')) {
     114            $secure_url = \EasyInvoicePro\Controllers\PermalinkController::getQuoteSecureLinkUrl($quote->getId());
     115            if ($secure_url) {
     116                $url = $secure_url;
     117            }
     118        }
    104119        $text = !empty($atts['text']) ? $atts['text'] : $quote->getNumber();
    105120        $class = esc_attr($atts['class']);
  • easy-invoice/trunk/readme.txt

    r3377511 r3387040  
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 2.1.0
     7Stable tag: 2.1.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    139139
    140140
     141= 2.1.1 - 2025-10-30 =
     142* Fixed - Phone number issue fixed
     143* Fixed - Shortcode issue fixed
     144
    141145= 2.1.0 - 2025-10-13 =
    142146* Fixed - Escaping issue fixed
  • easy-invoice/trunk/templates/client-form.php

    r3346980 r3387040  
    3535            <input type="email" id="<?php echo $field_prefix; ?>client-email" name="email" required
    3636                value="<?php echo $is_edit_mode ? esc_attr($client->getEmail()) : ''; ?>"
     37                class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
     38        </div>
     39        <div>
     40            <label for="<?php echo $field_prefix; ?>client-phone" class="block text-sm font-medium text-gray-700"><?php _e('Phone', 'easy-invoice'); ?></label>
     41            <input type="text" id="<?php echo $field_prefix; ?>client-phone" name="phone"
     42                value="<?php echo $is_edit_mode ? esc_attr($client->getPhone()) : ''; ?>"
    3743                class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
    3844        </div>
  • easy-invoice/trunk/templates/client-view-page.php

    r3345595 r3387040  
    7171                <div class="ml-3">
    7272                    <label class="block text-xs font-medium text-gray-500 uppercase tracking-wider"><?php _e('Phone', 'easy-invoice'); ?></label>
    73                     <p class="text-sm text-gray-800 mt-1"><?php echo esc_html($client->getExtraInfo() ?: 'N/A'); ?></p>
     73                    <p class="text-sm text-gray-800 mt-1"><?php echo esc_html($client->getPhone() ?: 'N/A'); ?></p>
    7474                </div>
    7575            </div>
  • easy-invoice/trunk/templates/clients-page.php

    r3346980 r3387040  
    235235                            <div class="flex items-center space-x-1">
    236236                                <span>Email</span>
     237                                <div class="sort-indicator">
     238                                    <i class="fas fa-sort text-gray-400"></i>
     239                                </div>
     240                            </div>
     241                        </th>
     242                        <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100" data-sort="phone">
     243                            <div class="flex items-center space-x-1">
     244                                <span>Phone</span>
    237245                                <div class="sort-indicator">
    238246                                    <i class="fas fa-sort text-gray-400"></i>
     
    322330                            </td>
    323331                            <td class="px-6 py-4 whitespace-nowrap">
     332                                <div class="text-sm text-gray-500"><?php echo esc_html($client->getPhone()); ?></div>
     333                            </td>
     334                            <td class="px-6 py-4 whitespace-nowrap">
    324335                                <div class="text-sm text-gray-500"><?php echo esc_html($client->getUsername()); ?></div>
    325336                            </td>
     
    512523                        bValue = $(b).find('td:nth-child(3) div').text().toLowerCase();
    513524                        break;
    514                     case 'username':
     525                    case 'phone':
    515526                        aValue = $(a).find('td:nth-child(4) div').text().toLowerCase();
    516527                        bValue = $(b).find('td:nth-child(4) div').text().toLowerCase();
    517528                        break;
     529                    case 'username':
     530                        aValue = $(a).find('td:nth-child(5) div').text().toLowerCase();
     531                        bValue = $(b).find('td:nth-child(5) div').text().toLowerCase();
     532                        break;
    518533                    case 'role':
    519                         aValue = $(a).find('td:nth-child(5) span').text().toLowerCase();
    520                         bValue = $(b).find('td:nth-child(5) span').text().toLowerCase();
     534                        aValue = $(a).find('td:nth-child(6) span').text().toLowerCase();
     535                        bValue = $(b).find('td:nth-child(6) span').text().toLowerCase();
    521536                        break;
    522537                    default:
Note: See TracChangeset for help on using the changeset viewer.