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
easy-invoice / templates / invoice-view.php

invoice-view.php in Easy Invoice – Invoice Generator, PDF Quotes & Payments 2.4.0, at templates/invoice-view.php

34 lines 930 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit;
4 }
5 // Enqueue PDF scripts
6 EasyInvoice\Includes\Helpers\PdfHelper::enqueuePdfScripts();
7 ?>
8
9 <div class="wrap">
10 <h1>Invoice #<?php echo esc_html($invoice->getNumber()); ?></h1>
11
12 <div class="invoice-actions">
13 <button type="button" class="button button-primary" id="generate-pdf">
14 Download PDF
15 </button>
16 </div>
17
18 </div>
19
20 <script>
21 document.addEventListener('DOMContentLoaded', function() {
22 const generatePdfButton = document.getElementById('generate-pdf');
23
24 generatePdfButton.addEventListener('click', function() {
25 // Use the new PDF generator that captures HTML directly
26 if (typeof InvoicePdfGenerator !== 'undefined') {
27 const pdfGenerator = new InvoicePdfGenerator();
28 pdfGenerator.generatePDF();
29 } else {
30 alert('PDF generator not available');
31 }
32 });
33 });
34 </script>