PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.4.0
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.4.0
2.4.0 2.4.1 2.3.8 2.3.7 2.3.6 2.3.5 2.3.4 2.3.3 2.3.2 2.3.1 2.2.0 2.1.21 2.1.20 2.1.19 2.1.18 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.2 All 57 releases
← All changes | includes/Helpers/QuoteInvoiceHelper.php +4 -3 2.2.02.4.0 View file →
@@ -15,9 +15,9 @@
15 15 */
16 16 public static function isInvoiceConvertedFromQuote($invoice_id)
17 17 {
18 18 // Check if this invoice was converted from a quote
19 - $quote_id = get_post_meta($invoice_id, '_converted_from_quote', true);
19 + $quote_id = get_post_meta($invoice_id, '_converted_from_quote', true) ?: get_post_meta($invoice_id, '_easy_invoice_converted_from_quote', true);
20 20 return !empty($quote_id);
21 21 }
22 22
23 23 /**
@@ -28,9 +28,9 @@
28 28 */
29 29 public static function getQuoteInfoFromInvoice($invoice_id)
30 30 {
31 31 // Check if this invoice was converted from a quote
32 - $quote_id = get_post_meta($invoice_id, '_converted_from_quote', true);
32 + $quote_id = get_post_meta($invoice_id, '_converted_from_quote', true) ?: get_post_meta($invoice_id, '_easy_invoice_converted_from_quote', true);
33 33
34 34 if (!$quote_id) {
35 35 return false;
36 36 }
@@ -41,9 +41,9 @@
41 41 return false;
42 42 }
43 43
44 44 // Get quote number
45 - $quote_number = get_post_meta($quote_id, '_quote_number', true);
45 + $quote_number = get_post_meta($quote_id, '_easy_invoice_quote_number', true) ?: get_post_meta($quote_id, '_quote_number', true);
46 46
47 47 // Get quote title
48 48 $quote_title = $quote_post->post_title;
49 49
@@ -48,8 +48,9 @@
48 48 $quote_title = $quote_post->post_title;
49 49
50 50 // Determine icon and tooltip
51 51 $icon_class = 'fas fa-exchange-alt';
52 + /* translators: %s: quote number. */
52 53 $tooltip_text = sprintf(__('Converted from Quote %s', 'easy-invoice'), $quote_number ?: $quote_title);
53 54
54 55 return [
55 56 'id' => $quote_id,