Changeset 3387040
- Timestamp:
- 10/30/2025 12:14:17 PM (4 months ago)
- Location:
- easy-invoice
- Files:
-
- 26 edited
- 1 copied
-
tags/2.1.1 (copied) (copied from easy-invoice/trunk)
-
tags/2.1.1/assets/js/client-manager.js (modified) (8 diffs)
-
tags/2.1.1/easy-invoice.php (modified) (2 diffs)
-
tags/2.1.1/includes/Admin/EasyInvoiceAjax.php (modified) (2 diffs)
-
tags/2.1.1/includes/Constants/ClientFields.php (modified) (1 diff)
-
tags/2.1.1/includes/Controllers/QuoteController.php (modified) (1 diff)
-
tags/2.1.1/includes/Models/Client.php (modified) (1 diff)
-
tags/2.1.1/includes/Repositories/ClientRepository.php (modified) (1 diff)
-
tags/2.1.1/includes/Services/EmailManager.php (modified) (5 diffs)
-
tags/2.1.1/includes/Shortcodes/ShortcodeManager.php (modified) (2 diffs)
-
tags/2.1.1/readme.txt (modified) (2 diffs)
-
tags/2.1.1/templates/client-form.php (modified) (1 diff)
-
tags/2.1.1/templates/client-view-page.php (modified) (1 diff)
-
tags/2.1.1/templates/clients-page.php (modified) (3 diffs)
-
trunk/assets/js/client-manager.js (modified) (8 diffs)
-
trunk/easy-invoice.php (modified) (2 diffs)
-
trunk/includes/Admin/EasyInvoiceAjax.php (modified) (2 diffs)
-
trunk/includes/Constants/ClientFields.php (modified) (1 diff)
-
trunk/includes/Controllers/QuoteController.php (modified) (1 diff)
-
trunk/includes/Models/Client.php (modified) (1 diff)
-
trunk/includes/Repositories/ClientRepository.php (modified) (1 diff)
-
trunk/includes/Services/EmailManager.php (modified) (5 diffs)
-
trunk/includes/Shortcodes/ShortcodeManager.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/templates/client-form.php (modified) (1 diff)
-
trunk/templates/client-view-page.php (modified) (1 diff)
-
trunk/templates/clients-page.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easy-invoice/tags/2.1.1/assets/js/client-manager.js
r3346980 r3387040 71 71 $("#display-client-name").text(clientData.business_client_name || (clientData.first_name + ' ' + clientData.last_name) || 'N/A'); 72 72 $("#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'); 74 74 $("#display-client-company").text(clientData.business_client_name || 'N/A'); 75 75 $("#display-client-address").text(clientData.address || 'N/A'); … … 94 94 name: clientData.business_client_name || (clientData.first_name + ' ' + clientData.last_name), 95 95 email: clientData.email, 96 phone: clientData. extra_info,96 phone: clientData.phone, 97 97 address: clientData.address, 98 98 website: clientData.website, … … 123 123 $("#display-client-name").text(client.business_client_name || (client.first_name + ' ' + client.last_name) || 'N/A'); 124 124 $("#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'); 126 126 $("#display-client-company").text(client.business_client_name || 'N/A'); 127 127 $("#display-client-address").text(client.address || 'N/A'); … … 146 146 name: client.business_client_name || (client.first_name + ' ' + client.last_name), 147 147 email: client.email, 148 phone: client. extra_info,148 phone: client.phone, 149 149 address: client.address, 150 150 website: client.website, … … 293 293 password: password, 294 294 address: $("#add-client-address").val(), 295 extra_info: $("#add-client-extra-info").val(),295 phone: $("#add-client-phone").val(), 296 296 first_name: $("#add-client-first-name").val(), 297 297 last_name: $("#add-client-last-name").val(), … … 317 317 // Always reset the button and clear the form 318 318 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(""); 320 320 321 321 if (response.success) { … … 330 330 email: clientData.email, 331 331 company: clientData.business_client_name, 332 phone: clientData. extra_info,332 phone: clientData.phone, 333 333 website: clientData.website, 334 334 address: clientData.address … … 542 542 password: $("#edit-client-password").val(), 543 543 address: $("#edit-client-address").val(), 544 extra_info: $("#edit-client-extra-info").val(),544 phone: $("#edit-client-phone").val(), 545 545 first_name: $("#edit-client-first-name").val(), 546 546 last_name: $("#edit-client-last-name").val(), -
easy-invoice/tags/2.1.1/easy-invoice.php
r3377511 r3387040 4 4 * Plugin URI: https://matrixaddons.com/plugins/easy-invoice 5 5 * Description: A beautiful, full-featured invoicing solution for WordPress. Create professional invoices, quotes, and manage payments with ease. 6 * Version: 2.1. 06 * Version: 2.1.1 7 7 * Author: MatrixAddons 8 8 * Author URI: https://matrixaddons.com … … 25 25 26 26 // Define plugin constants. 27 define( 'EASY_INVOICE_VERSION', '2.1. 0' );27 define( 'EASY_INVOICE_VERSION', '2.1.1' ); 28 28 define( 'EASY_INVOICE_PLUGIN_FILE', __FILE__ ); 29 29 define( 'EASY_INVOICE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); -
easy-invoice/tags/2.1.1/includes/Admin/EasyInvoiceAjax.php
r3363158 r3387040 1046 1046 ClientFields::FIRST_NAME => sanitize_text_field($_POST['first_name']), 1047 1047 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']) : '', 1049 1050 ]; 1050 1051 … … 1103 1104 ClientFields::PASSWORD => $_POST['password'], // Keep password as is, don't sanitize 1104 1105 ClientFields::ADDRESS => sanitize_textarea_field($_POST['address']), 1106 ClientFields::PHONE => isset($_POST['phone']) ? sanitize_text_field($_POST['phone']) : '', 1105 1107 ClientFields::EXTRA_INFO => sanitize_textarea_field($_POST['extra_info']), 1106 1108 ClientFields::FIRST_NAME => sanitize_text_field($_POST['first_name']), -
easy-invoice/tags/2.1.1/includes/Constants/ClientFields.php
r3344524 r3387040 27 27 public const LAST_NAME = '_easy_invoice_client_last_name'; 28 28 public const WEBSITE = '_easy_invoice_client_website'; 29 public const PHONE = '_easy_invoice_client_phone'; 29 30 } -
easy-invoice/tags/2.1.1/includes/Controllers/QuoteController.php
r3377511 r3387040 963 963 964 964 if ($invoice_id) { 965 // Get regular invoice URL965 // Always use WordPress permalink 966 966 $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 974 968 if (class_exists('\EasyInvoicePro\Controllers\PermalinkController')) { 975 969 $secure_url = \EasyInvoicePro\Controllers\PermalinkController::getInvoiceSecureLinkUrl($invoice_id); 970 if ($secure_url) { 971 $invoice_url = $secure_url; 972 } 976 973 } 977 974 } -
easy-invoice/tags/2.1.1/includes/Models/Client.php
r3344524 r3387040 173 173 $this->data['last_name'] = get_user_meta($this->id, ClientFields::LAST_NAME, true); 174 174 $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_info175 $this->data['phone'] = get_user_meta($this->id, ClientFields::PHONE, true); // Now uses dedicated phone key 176 176 177 177 // 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 442 442 update_user_meta($client->getId(), ClientFields::WEBSITE, $data[ClientFields::WEBSITE]); 443 443 } 444 if (isset($data[ClientFields::PHONE])) { 445 $client->phone = $data[ClientFields::PHONE]; 446 update_user_meta($client->getId(), ClientFields::PHONE, $data[ClientFields::PHONE]); 447 } 444 448 445 449 // Reset the dirty flag after saving -
easy-invoice/tags/2.1.1/includes/Services/EmailManager.php
r3345595 r3387040 321 321 $subject = $this->processTemplate($template['subject'], $replacements); 322 322 $message = $this->processTemplate($template['body'], $replacements); 323 $message = do_shortcode($message); // Render shortcodes like [easy_invoice_url ...] 323 324 324 325 // Add HTML wrapper if enabled … … 426 427 private function getInvoiceReplacements(Invoice $invoice, array $additional_data = []): array { 427 428 $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 } 428 439 429 440 return array_merge([ … … 444 455 '{{due_date}}' => date('F j, Y', strtotime($invoice->getDueDate())), 445 456 '{{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 447 458 '{{payment_url}}' => add_query_arg('payment', '1', get_permalink($invoice->getId())), 448 459 '{{site_url}}' => get_site_url(), … … 461 472 private function getQuoteReplacements(Quote $quote, array $additional_data = []): array { 462 473 $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 } 463 483 464 484 return array_merge([ … … 479 499 '{{expiry_date}}' => date('F j, Y', strtotime($quote->getExpiryDate())), 480 500 '{{issue_date}}' => date('F j, Y', strtotime($quote->getIssueDate())), 481 '{{quote_url}}' => get_permalink($quote->getId()),501 '{{quote_url}}' => $quote_url, 482 502 '{{site_url}}' => get_site_url(), 483 503 '{{admin_url}}' => admin_url(), -
easy-invoice/tags/2.1.1/includes/Shortcodes/ShortcodeManager.php
r3345595 r3387040 61 61 62 62 $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 } 63 71 $text = !empty($atts['text']) ? $atts['text'] : $invoice->getNumber(); 64 72 $class = esc_attr($atts['class']); … … 102 110 103 111 $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 } 104 119 $text = !empty($atts['text']) ? $atts['text'] : $quote->getNumber(); 105 120 $class = esc_attr($atts['class']); -
easy-invoice/tags/2.1.1/readme.txt
r3377511 r3387040 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 2.1. 07 Stable tag: 2.1.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 139 139 140 140 141 = 2.1.1 - 2025-10-30 = 142 * Fixed - Phone number issue fixed 143 * Fixed - Shortcode issue fixed 144 141 145 = 2.1.0 - 2025-10-13 = 142 146 * Fixed - Escaping issue fixed -
easy-invoice/tags/2.1.1/templates/client-form.php
r3346980 r3387040 35 35 <input type="email" id="<?php echo $field_prefix; ?>client-email" name="email" required 36 36 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()) : ''; ?>" 37 43 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 44 </div> -
easy-invoice/tags/2.1.1/templates/client-view-page.php
r3345595 r3387040 71 71 <div class="ml-3"> 72 72 <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->get ExtraInfo() ?: 'N/A'); ?></p>73 <p class="text-sm text-gray-800 mt-1"><?php echo esc_html($client->getPhone() ?: 'N/A'); ?></p> 74 74 </div> 75 75 </div> -
easy-invoice/tags/2.1.1/templates/clients-page.php
r3346980 r3387040 235 235 <div class="flex items-center space-x-1"> 236 236 <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> 237 245 <div class="sort-indicator"> 238 246 <i class="fas fa-sort text-gray-400"></i> … … 322 330 </td> 323 331 <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"> 324 335 <div class="text-sm text-gray-500"><?php echo esc_html($client->getUsername()); ?></div> 325 336 </td> … … 512 523 bValue = $(b).find('td:nth-child(3) div').text().toLowerCase(); 513 524 break; 514 case ' username':525 case 'phone': 515 526 aValue = $(a).find('td:nth-child(4) div').text().toLowerCase(); 516 527 bValue = $(b).find('td:nth-child(4) div').text().toLowerCase(); 517 528 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; 518 533 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(); 521 536 break; 522 537 default: -
easy-invoice/trunk/assets/js/client-manager.js
r3346980 r3387040 71 71 $("#display-client-name").text(clientData.business_client_name || (clientData.first_name + ' ' + clientData.last_name) || 'N/A'); 72 72 $("#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'); 74 74 $("#display-client-company").text(clientData.business_client_name || 'N/A'); 75 75 $("#display-client-address").text(clientData.address || 'N/A'); … … 94 94 name: clientData.business_client_name || (clientData.first_name + ' ' + clientData.last_name), 95 95 email: clientData.email, 96 phone: clientData. extra_info,96 phone: clientData.phone, 97 97 address: clientData.address, 98 98 website: clientData.website, … … 123 123 $("#display-client-name").text(client.business_client_name || (client.first_name + ' ' + client.last_name) || 'N/A'); 124 124 $("#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'); 126 126 $("#display-client-company").text(client.business_client_name || 'N/A'); 127 127 $("#display-client-address").text(client.address || 'N/A'); … … 146 146 name: client.business_client_name || (client.first_name + ' ' + client.last_name), 147 147 email: client.email, 148 phone: client. extra_info,148 phone: client.phone, 149 149 address: client.address, 150 150 website: client.website, … … 293 293 password: password, 294 294 address: $("#add-client-address").val(), 295 extra_info: $("#add-client-extra-info").val(),295 phone: $("#add-client-phone").val(), 296 296 first_name: $("#add-client-first-name").val(), 297 297 last_name: $("#add-client-last-name").val(), … … 317 317 // Always reset the button and clear the form 318 318 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(""); 320 320 321 321 if (response.success) { … … 330 330 email: clientData.email, 331 331 company: clientData.business_client_name, 332 phone: clientData. extra_info,332 phone: clientData.phone, 333 333 website: clientData.website, 334 334 address: clientData.address … … 542 542 password: $("#edit-client-password").val(), 543 543 address: $("#edit-client-address").val(), 544 extra_info: $("#edit-client-extra-info").val(),544 phone: $("#edit-client-phone").val(), 545 545 first_name: $("#edit-client-first-name").val(), 546 546 last_name: $("#edit-client-last-name").val(), -
easy-invoice/trunk/easy-invoice.php
r3377511 r3387040 4 4 * Plugin URI: https://matrixaddons.com/plugins/easy-invoice 5 5 * Description: A beautiful, full-featured invoicing solution for WordPress. Create professional invoices, quotes, and manage payments with ease. 6 * Version: 2.1. 06 * Version: 2.1.1 7 7 * Author: MatrixAddons 8 8 * Author URI: https://matrixaddons.com … … 25 25 26 26 // Define plugin constants. 27 define( 'EASY_INVOICE_VERSION', '2.1. 0' );27 define( 'EASY_INVOICE_VERSION', '2.1.1' ); 28 28 define( 'EASY_INVOICE_PLUGIN_FILE', __FILE__ ); 29 29 define( 'EASY_INVOICE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); -
easy-invoice/trunk/includes/Admin/EasyInvoiceAjax.php
r3363158 r3387040 1046 1046 ClientFields::FIRST_NAME => sanitize_text_field($_POST['first_name']), 1047 1047 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']) : '', 1049 1050 ]; 1050 1051 … … 1103 1104 ClientFields::PASSWORD => $_POST['password'], // Keep password as is, don't sanitize 1104 1105 ClientFields::ADDRESS => sanitize_textarea_field($_POST['address']), 1106 ClientFields::PHONE => isset($_POST['phone']) ? sanitize_text_field($_POST['phone']) : '', 1105 1107 ClientFields::EXTRA_INFO => sanitize_textarea_field($_POST['extra_info']), 1106 1108 ClientFields::FIRST_NAME => sanitize_text_field($_POST['first_name']), -
easy-invoice/trunk/includes/Constants/ClientFields.php
r3344524 r3387040 27 27 public const LAST_NAME = '_easy_invoice_client_last_name'; 28 28 public const WEBSITE = '_easy_invoice_client_website'; 29 public const PHONE = '_easy_invoice_client_phone'; 29 30 } -
easy-invoice/trunk/includes/Controllers/QuoteController.php
r3377511 r3387040 963 963 964 964 if ($invoice_id) { 965 // Get regular invoice URL965 // Always use WordPress permalink 966 966 $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 974 968 if (class_exists('\EasyInvoicePro\Controllers\PermalinkController')) { 975 969 $secure_url = \EasyInvoicePro\Controllers\PermalinkController::getInvoiceSecureLinkUrl($invoice_id); 970 if ($secure_url) { 971 $invoice_url = $secure_url; 972 } 976 973 } 977 974 } -
easy-invoice/trunk/includes/Models/Client.php
r3344524 r3387040 173 173 $this->data['last_name'] = get_user_meta($this->id, ClientFields::LAST_NAME, true); 174 174 $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_info175 $this->data['phone'] = get_user_meta($this->id, ClientFields::PHONE, true); // Now uses dedicated phone key 176 176 177 177 // If email is not set in meta, try to get it from user data -
easy-invoice/trunk/includes/Repositories/ClientRepository.php
r3370086 r3387040 442 442 update_user_meta($client->getId(), ClientFields::WEBSITE, $data[ClientFields::WEBSITE]); 443 443 } 444 if (isset($data[ClientFields::PHONE])) { 445 $client->phone = $data[ClientFields::PHONE]; 446 update_user_meta($client->getId(), ClientFields::PHONE, $data[ClientFields::PHONE]); 447 } 444 448 445 449 // Reset the dirty flag after saving -
easy-invoice/trunk/includes/Services/EmailManager.php
r3345595 r3387040 321 321 $subject = $this->processTemplate($template['subject'], $replacements); 322 322 $message = $this->processTemplate($template['body'], $replacements); 323 $message = do_shortcode($message); // Render shortcodes like [easy_invoice_url ...] 323 324 324 325 // Add HTML wrapper if enabled … … 426 427 private function getInvoiceReplacements(Invoice $invoice, array $additional_data = []): array { 427 428 $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 } 428 439 429 440 return array_merge([ … … 444 455 '{{due_date}}' => date('F j, Y', strtotime($invoice->getDueDate())), 445 456 '{{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 447 458 '{{payment_url}}' => add_query_arg('payment', '1', get_permalink($invoice->getId())), 448 459 '{{site_url}}' => get_site_url(), … … 461 472 private function getQuoteReplacements(Quote $quote, array $additional_data = []): array { 462 473 $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 } 463 483 464 484 return array_merge([ … … 479 499 '{{expiry_date}}' => date('F j, Y', strtotime($quote->getExpiryDate())), 480 500 '{{issue_date}}' => date('F j, Y', strtotime($quote->getIssueDate())), 481 '{{quote_url}}' => get_permalink($quote->getId()),501 '{{quote_url}}' => $quote_url, 482 502 '{{site_url}}' => get_site_url(), 483 503 '{{admin_url}}' => admin_url(), -
easy-invoice/trunk/includes/Shortcodes/ShortcodeManager.php
r3345595 r3387040 61 61 62 62 $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 } 63 71 $text = !empty($atts['text']) ? $atts['text'] : $invoice->getNumber(); 64 72 $class = esc_attr($atts['class']); … … 102 110 103 111 $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 } 104 119 $text = !empty($atts['text']) ? $atts['text'] : $quote->getNumber(); 105 120 $class = esc_attr($atts['class']); -
easy-invoice/trunk/readme.txt
r3377511 r3387040 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 2.1. 07 Stable tag: 2.1.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 139 139 140 140 141 = 2.1.1 - 2025-10-30 = 142 * Fixed - Phone number issue fixed 143 * Fixed - Shortcode issue fixed 144 141 145 = 2.1.0 - 2025-10-13 = 142 146 * Fixed - Escaping issue fixed -
easy-invoice/trunk/templates/client-form.php
r3346980 r3387040 35 35 <input type="email" id="<?php echo $field_prefix; ?>client-email" name="email" required 36 36 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()) : ''; ?>" 37 43 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 44 </div> -
easy-invoice/trunk/templates/client-view-page.php
r3345595 r3387040 71 71 <div class="ml-3"> 72 72 <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->get ExtraInfo() ?: 'N/A'); ?></p>73 <p class="text-sm text-gray-800 mt-1"><?php echo esc_html($client->getPhone() ?: 'N/A'); ?></p> 74 74 </div> 75 75 </div> -
easy-invoice/trunk/templates/clients-page.php
r3346980 r3387040 235 235 <div class="flex items-center space-x-1"> 236 236 <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> 237 245 <div class="sort-indicator"> 238 246 <i class="fas fa-sort text-gray-400"></i> … … 322 330 </td> 323 331 <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"> 324 335 <div class="text-sm text-gray-500"><?php echo esc_html($client->getUsername()); ?></div> 325 336 </td> … … 512 523 bValue = $(b).find('td:nth-child(3) div').text().toLowerCase(); 513 524 break; 514 case ' username':525 case 'phone': 515 526 aValue = $(a).find('td:nth-child(4) div').text().toLowerCase(); 516 527 bValue = $(b).find('td:nth-child(4) div').text().toLowerCase(); 517 528 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; 518 533 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(); 521 536 break; 522 537 default:
Note: See TracChangeset
for help on using the changeset viewer.