Version Description
December 7, 2013 =
Improved: Changed individual address fields to one textarea field.
Improved: Automatic linebreaks in textarea fields.
Improved: Added notes to the settings page.
Download this release
Release Info
Developer | baaaaas |
Plugin | WooCommerce PDF Invoices |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.0.1
- assets/screenshot-1.png +0 -0
- assets/screenshot-2.png +0 -0
- includes/class-invoice.php +3 -11
- includes/views/settings-page.php +35 -46
- index.php +1 -1
- readme.txt +40 -14
assets/screenshot-1.png
ADDED
Binary file
|
assets/screenshot-2.png
ADDED
Binary file
|
includes/class-invoice.php
CHANGED
@@ -105,9 +105,7 @@ function generate_invoice($val, $id, $order){
|
|
105 |
<span style="font-size: 16pt; font-weight: bold;"><?php echo $options['company_name']; ?></span><br />
|
106 |
<?php echo $options['company_slogan']; ?><br /><br />
|
107 |
<?php }
|
108 |
-
echo $options['address']; ?><br />
|
109 |
-
<?php echo $options['zip_code'] . " " . $options['city']; ?><br />
|
110 |
-
<?php echo $options['country']; ?><br />
|
111 |
</td>
|
112 |
<td width="50%" style="text-align: right;">
|
113 |
<span style="font-size:22pt;">
|
@@ -115,15 +113,9 @@ function generate_invoice($val, $id, $order){
|
|
115 |
</span>
|
116 |
</td>
|
117 |
</tr>
|
118 |
-
<tr>
|
119 |
-
<td>
|
120 |
-
<?php echo __( 'Tel: ', 'woocommerce-pdf-invoices' ) . $options['telephone']; ?><br />
|
121 |
-
<?php echo __( 'Email: ', 'woocommerce-pdf-invoices' ) . $options['email']; ?>
|
122 |
-
</td>
|
123 |
-
</tr>
|
124 |
<tr>
|
125 |
<td width="50%">
|
126 |
-
<?php echo $options['extra_company_info']; ?><br />
|
127 |
</td>
|
128 |
<td width="50%" style="font-size: 9pt; text-align:right;">
|
129 |
<?php echo sprintf( __( 'INVOICE NUMBER: ', 'woocommerce-pdf-invoices' )); echo $invoice_number; ?><br />
|
@@ -194,7 +186,7 @@ function generate_invoice($val, $id, $order){
|
|
194 |
<table style="text-align: left; font-style: italic;">
|
195 |
<tr>
|
196 |
<td>
|
197 |
-
<?php echo $options['extra_info']; ?>
|
198 |
</td>
|
199 |
</tr>
|
200 |
</table>
|
105 |
<span style="font-size: 16pt; font-weight: bold;"><?php echo $options['company_name']; ?></span><br />
|
106 |
<?php echo $options['company_slogan']; ?><br /><br />
|
107 |
<?php }
|
108 |
+
echo nl2br($options['address']); ?><br />
|
|
|
|
|
109 |
</td>
|
110 |
<td width="50%" style="text-align: right;">
|
111 |
<span style="font-size:22pt;">
|
113 |
</span>
|
114 |
</td>
|
115 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
<tr>
|
117 |
<td width="50%">
|
118 |
+
<?php echo nl2br($options['extra_company_info']); ?><br />
|
119 |
</td>
|
120 |
<td width="50%" style="font-size: 9pt; text-align:right;">
|
121 |
<?php echo sprintf( __( 'INVOICE NUMBER: ', 'woocommerce-pdf-invoices' )); echo $invoice_number; ?><br />
|
186 |
<table style="text-align: left; font-style: italic;">
|
187 |
<tr>
|
188 |
<td>
|
189 |
+
<?php echo nl2br($options['extra_info']); ?>
|
190 |
</td>
|
191 |
</tr>
|
192 |
</table>
|
includes/views/settings-page.php
CHANGED
@@ -5,11 +5,19 @@
|
|
5 |
document.getElementById('hiddenField').value = '';
|
6 |
}
|
7 |
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
<div class="wrap">
|
9 |
-
<h2>Woocommerc PDF Invoices</h2>
|
10 |
<h3>Woocommerce PDF Invoices Settings</h3>
|
11 |
-
<p>Please fill in the settings below. Woocommerce PDF Invoices generates a PDF invoice based upon the customer order and attaches it to the confirmation email
|
12 |
-
You can leave the custom logo blank, the plugin will use your company name.</p>
|
13 |
|
14 |
<form method="post" action="options.php" enctype="multipart/form-data">
|
15 |
<?php
|
@@ -21,21 +29,30 @@
|
|
21 |
<tr valign="top">
|
22 |
<th scope="row"><strong>Company name:</strong></th>
|
23 |
<td>
|
24 |
-
<input required type="text" size="40" name="be_woocommerce_pdf_invoices[company_name]" value="<?php echo $options['company_name']; ?>" />
|
|
|
|
|
|
|
25 |
</td>
|
26 |
</tr>
|
27 |
|
28 |
<tr valign="top">
|
29 |
<th scope="row"><strong>Company slogan:</strong></th>
|
30 |
<td>
|
31 |
-
<input type="text" size="40" name="be_woocommerce_pdf_invoices[company_slogan]" value="<?php echo $options['company_slogan']; ?>" />
|
|
|
|
|
|
|
32 |
</td>
|
33 |
</tr>
|
34 |
|
35 |
<tr valign="top">
|
36 |
<th scope="row"><strong>Custom logo:</strong></th>
|
37 |
<td>
|
38 |
-
<input type="file" name="logo" accept="image/*" /><br />
|
|
|
|
|
|
|
39 |
<?php if($options['file_upload'] != ''){ ?>
|
40 |
<style>
|
41 |
#delete{
|
@@ -59,58 +76,30 @@
|
|
59 |
<tr valign="top">
|
60 |
<th scope="row"><strong>Company address:</strong></th>
|
61 |
<td>
|
62 |
-
<
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
<tr valign="top">
|
67 |
-
<th scope="row"><strong>Company ZIP code:</strong></th>
|
68 |
-
<td>
|
69 |
-
<input required type="text" size="40" name="be_woocommerce_pdf_invoices[zip_code]" value="<?php echo esc_attr($options['zip_code']); ?>" />
|
70 |
-
</td>
|
71 |
-
</tr>
|
72 |
-
|
73 |
-
<tr valign="top">
|
74 |
-
<th scope="row"><strong>Company city:</strong></th>
|
75 |
-
<td>
|
76 |
-
<input required type="text" size="40" name="be_woocommerce_pdf_invoices[city]" value="<?php echo esc_attr($options['city']); ?>" />
|
77 |
-
</td>
|
78 |
-
</tr>
|
79 |
-
|
80 |
-
<tr valign="top">
|
81 |
-
<th scope="row"><strong>Company country:</strong></th>
|
82 |
-
<td>
|
83 |
-
<input required type="text" size="40" name="be_woocommerce_pdf_invoices[country]" value="<?php echo esc_attr($options['country']); ?>" />
|
84 |
-
</td>
|
85 |
-
</tr>
|
86 |
-
|
87 |
-
<tr valign="top">
|
88 |
-
<th scope="row"><strong>Company telephone number:</strong></th>
|
89 |
-
<td>
|
90 |
-
<input type="text" size="40" name="be_woocommerce_pdf_invoices[telephone]" value="<?php echo esc_attr($options['telephone']); ?>" />
|
91 |
-
</td>
|
92 |
-
</tr>
|
93 |
-
|
94 |
-
<tr valign="top">
|
95 |
-
<th scope="row"><strong>Company email:</strong></th>
|
96 |
-
<td>
|
97 |
-
<input required type="text" size="40" name="be_woocommerce_pdf_invoices[email]" value="<?php echo esc_attr($options['email']); ?>" />
|
98 |
</td>
|
99 |
</tr>
|
100 |
|
101 |
<tr valign="top">
|
102 |
-
<th scope="row"><strong>
|
103 |
<td>
|
104 |
<textarea name="be_woocommerce_pdf_invoices[extra_company_info]" rows=6 cols=120 ><?php echo esc_textarea($options['extra_company_info']); ?></textarea><br/>
|
105 |
-
<
|
|
|
|
|
106 |
</td>
|
107 |
</tr>
|
108 |
|
109 |
<tr valign="top">
|
110 |
-
<th scope="row"><strong>
|
111 |
<td>
|
112 |
<textarea name="be_woocommerce_pdf_invoices[extra_info]" rows=6 cols=120 ><?php echo esc_textarea($options['extra_info']);?></textarea><br/>
|
113 |
-
<
|
|
|
|
|
114 |
</td>
|
115 |
</tr>
|
116 |
</table>
|
5 |
document.getElementById('hiddenField').value = '';
|
6 |
}
|
7 |
</script>
|
8 |
+
<style>
|
9 |
+
textarea{
|
10 |
+
width:670px;
|
11 |
+
height:90px;
|
12 |
+
}
|
13 |
+
input[type='text']{
|
14 |
+
width:670px;
|
15 |
+
margin-bottom:7px;
|
16 |
+
}
|
17 |
+
</style>
|
18 |
<div class="wrap">
|
|
|
19 |
<h3>Woocommerce PDF Invoices Settings</h3>
|
20 |
+
<p>Please fill in the settings below. Woocommerce PDF Invoices generates a PDF invoice based upon the customer order and attaches it to the confirmation email.</p>
|
|
|
21 |
|
22 |
<form method="post" action="options.php" enctype="multipart/form-data">
|
23 |
<?php
|
29 |
<tr valign="top">
|
30 |
<th scope="row"><strong>Company name:</strong></th>
|
31 |
<td>
|
32 |
+
<input required type="text" size="40" name="be_woocommerce_pdf_invoices[company_name]" value="<?php echo $options['company_name']; ?>" /><br/>
|
33 |
+
<div style="font-style:italic;">
|
34 |
+
<span style="color:grey;">Add your company name here.</span>
|
35 |
+
<div>
|
36 |
</td>
|
37 |
</tr>
|
38 |
|
39 |
<tr valign="top">
|
40 |
<th scope="row"><strong>Company slogan:</strong></th>
|
41 |
<td>
|
42 |
+
<input type="text" size="40" name="be_woocommerce_pdf_invoices[company_slogan]" value="<?php echo $options['company_slogan']; ?>" /><br/>
|
43 |
+
<div style="font-style:italic;">
|
44 |
+
<span style="color:grey;">Add your company slogan here. You can leave it blank.</span>
|
45 |
+
<div>
|
46 |
</td>
|
47 |
</tr>
|
48 |
|
49 |
<tr valign="top">
|
50 |
<th scope="row"><strong>Custom logo:</strong></th>
|
51 |
<td>
|
52 |
+
<input style="width:660px; margin-bottom:7px;" type="file" name="logo" accept="image/*" /><br />
|
53 |
+
<div style="font-style:italic;">
|
54 |
+
<span style="color:grey;">Add your custom company logo. You can leave it blank, the plugin will use your company name.</span>
|
55 |
+
<div>
|
56 |
<?php if($options['file_upload'] != ''){ ?>
|
57 |
<style>
|
58 |
#delete{
|
76 |
<tr valign="top">
|
77 |
<th scope="row"><strong>Company address:</strong></th>
|
78 |
<td>
|
79 |
+
<textarea required style="width:670px;" name="be_woocommerce_pdf_invoices[address]" ><?php echo esc_textarea($options['address']); ?></textarea><br/>
|
80 |
+
<div style="font-style:italic;">
|
81 |
+
<span style="color:grey;">Add your company address here.</span>
|
82 |
+
<div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
</td>
|
84 |
</tr>
|
85 |
|
86 |
<tr valign="top">
|
87 |
+
<th scope="row"><strong>Additional company information:</strong></th>
|
88 |
<td>
|
89 |
<textarea name="be_woocommerce_pdf_invoices[extra_company_info]" rows=6 cols=120 ><?php echo esc_textarea($options['extra_company_info']); ?></textarea><br/>
|
90 |
+
<div style="font-style:italic;">
|
91 |
+
<span style="color:grey;">Add some additional company information like a email address, telephone number, company number and tax number. You can leave it blank.</span>
|
92 |
+
<div>
|
93 |
</td>
|
94 |
</tr>
|
95 |
|
96 |
<tr valign="top">
|
97 |
+
<th scope="row"><strong>Refunds policy, conditions etc.:</strong></th>
|
98 |
<td>
|
99 |
<textarea name="be_woocommerce_pdf_invoices[extra_info]" rows=6 cols=120 ><?php echo esc_textarea($options['extra_info']);?></textarea><br/>
|
100 |
+
<div style="font-style:italic;">
|
101 |
+
<span style="color:grey;">Add some policies, conditions etc. It will be placed beyond the products table. You can leave it blank.</span>
|
102 |
+
<div>
|
103 |
</td>
|
104 |
</tr>
|
105 |
</table>
|
index.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/**
|
4 |
* Plugin Name: Woocommerce PDF Invoices
|
5 |
* Description: Generate PDF invoice and automatically attach to Woocommerce confirmation email.
|
6 |
-
* Version: 1.0.
|
7 |
* Author: Bas Elbers
|
8 |
* License: GPL2
|
9 |
*/
|
3 |
/**
|
4 |
* Plugin Name: Woocommerce PDF Invoices
|
5 |
* Description: Generate PDF invoice and automatically attach to Woocommerce confirmation email.
|
6 |
+
* Version: 1.0.1
|
7 |
* Author: Bas Elbers
|
8 |
* License: GPL2
|
9 |
*/
|
readme.txt
CHANGED
@@ -1,37 +1,51 @@
|
|
1 |
=== Plugin Name ===
|
2 |
Contributors: Bas Elbers
|
3 |
Donate link:
|
4 |
-
Tags:
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.7.1
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
Simple plugin to generate a PDF invoice based upon the customers order and automatically attaches it to the
|
12 |
|
13 |
== Description ==
|
14 |
-
This plugin simply generates a PDF Invoice based upon the customers order and automatically attaches it to the
|
15 |
-
Download the
|
16 |
-
The plugin adds a new settings page as a submenu within the
|
17 |
|
18 |
= CUSTOMIZABLE =
|
19 |
-
|
20 |
|
21 |
-
=
|
22 |
-
|
23 |
|
24 |
= FEATURES =
|
25 |
- Change your company name
|
26 |
- Add your company slogan
|
27 |
- Upload and use your company logo
|
28 |
-
- Add company address
|
29 |
-
- Add
|
30 |
-
- Add
|
31 |
-
- Auto
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
== Screenshots ==
|
34 |
|
|
|
|
|
|
|
35 |
== Installation ==
|
36 |
|
37 |
= Automatic installation =
|
@@ -44,4 +58,16 @@ The manual installation method involves downloading our eCommerce plugin and upl
|
|
44 |
|
45 |
1. Download the plugin file to your computer and unzip it
|
46 |
2. Using an FTP program, or your hosting control panel, upload the unzipped plugin folder to your WordPress installation's wp-content/plugins/ directory.
|
47 |
-
3. Activate the plugin from the Plugins menu within the WordPress admin.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
=== Plugin Name ===
|
2 |
Contributors: Bas Elbers
|
3 |
Donate link:
|
4 |
+
Tags: wooCommerce pdf invoices, invoice, generate, pdf, wooCommerce, attachment, customer invoice, completed order, attach, automatic
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.7.1
|
7 |
+
Stable tag: 1.0.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
Simple plugin to generate a PDF invoice based upon the customers order and automatically attaches it to the customer invoice email.
|
12 |
|
13 |
== Description ==
|
14 |
+
This plugin simply generates a PDF Invoice based upon the customers order and automatically attaches it to the customer invoice email.
|
15 |
+
Download the WooCommerce PDF Invoices plugin now!
|
16 |
+
The plugin adds a new settings page as a submenu within the WooCommerce main menu and gives the option to customize your invoice by adding a company logo, company address, additional company information, refunds policies, conditions etc. and more!
|
17 |
|
18 |
= CUSTOMIZABLE =
|
19 |
+
An invoice is a proffesional way of conducting business and every business is unique. That's why it is very important that your invoice contains the details your customers need. The WooCommerce PDF Invoices settings page gives you the possibility to fully customize your invoice.
|
20 |
|
21 |
+
= AUTOMATIC =
|
22 |
+
No more singly drafting invoices and manually sending invoices to your customers. No more waste of time. From now on, WooCommerce PDF Invoices does the job for you!
|
23 |
|
24 |
= FEATURES =
|
25 |
- Change your company name
|
26 |
- Add your company slogan
|
27 |
- Upload and use your company logo
|
28 |
+
- Add your company address
|
29 |
+
- Add additional company information
|
30 |
+
- Add refunds policies, conditions etc.
|
31 |
+
- Auto generating invoice numbers
|
32 |
+
- Auto attaching to the customer invoice email
|
33 |
+
|
34 |
+
== Frequently Asked Questions ==
|
35 |
+
|
36 |
+
= Do I need to tell the plugin to show the logo instead of my company name? =
|
37 |
+
|
38 |
+
No, there is no need to tell. If you upload your custom company logo, WooCommerce PDF Invoices will use your logo to show on the invoice. If you remove the logo again and save the changes, the company name and optionally the company slogan will be used.
|
39 |
+
|
40 |
+
= Can I make a request to add some particular functionality? =
|
41 |
+
|
42 |
+
Of course you can! Please open a support thread and I will try to answer as soon as possible. Don't hesitate to contact me for questions.
|
43 |
|
44 |
== Screenshots ==
|
45 |
|
46 |
+
1. The WooCommerce PDF Invoices settings page.
|
47 |
+
2. The generated PDF invoice.
|
48 |
+
|
49 |
== Installation ==
|
50 |
|
51 |
= Automatic installation =
|
58 |
|
59 |
1. Download the plugin file to your computer and unzip it
|
60 |
2. Using an FTP program, or your hosting control panel, upload the unzipped plugin folder to your WordPress installation's wp-content/plugins/ directory.
|
61 |
+
3. Activate the plugin from the Plugins menu within the WordPress admin.
|
62 |
+
|
63 |
+
== Changelog ==
|
64 |
+
|
65 |
+
= 1.0.1 - December 7, 2013 =
|
66 |
+
|
67 |
+
- Improved: Changed individual address fields to one textarea field.
|
68 |
+
- Improved: Automatic linebreaks in textarea fields.
|
69 |
+
- Improved: Added notes to the settings page.
|
70 |
+
|
71 |
+
= 1.0 - December 6, 2013 =
|
72 |
+
|
73 |
+
- Initial release.
|