| @@ -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, |