Version Description
- Feature: Option to 'never' display My Account invoice link
- Fix: Order total for refunds in WC2.4
- Fix: notice when no custom statuses selected for My Account display
- Tweak: Product bundles styles
Download this release
Release Info
Developer | pomegranate |
Plugin | WooCommerce PDF Invoices & Packing Slips |
Version | 1.5.20 |
Comparing to | |
See all releases |
Code changes from version 1.5.19 to 1.5.20
includes/class-wcpdf-settings.php
CHANGED
@@ -306,6 +306,7 @@ if ( ! class_exists( 'WooCommerce_PDF_Invoices_Settings' ) ) {
|
|
306 |
'available' => __( 'Only when an invoice is already created/emailed' , 'wpo_wcpdf' ),
|
307 |
'custom' => __( 'Only for specific order statuses (define below)' , 'wpo_wcpdf' ),
|
308 |
'always' => __( 'Always' , 'wpo_wcpdf' ),
|
|
|
309 |
),
|
310 |
'custom' => array(
|
311 |
'type' => 'multiple_checkbox_element_callback',
|
306 |
'available' => __( 'Only when an invoice is already created/emailed' , 'wpo_wcpdf' ),
|
307 |
'custom' => __( 'Only for specific order statuses (define below)' , 'wpo_wcpdf' ),
|
308 |
'always' => __( 'Always' , 'wpo_wcpdf' ),
|
309 |
+
'never' => __( 'Never' , 'wpo_wcpdf' ),
|
310 |
),
|
311 |
'custom' => array(
|
312 |
'type' => 'multiple_checkbox_element_callback',
|
includes/class-wcpdf-writepanels.php
CHANGED
@@ -179,8 +179,11 @@ if ( !class_exists( 'WooCommerce_PDF_Invoices_Writepanels' ) ) {
|
|
179 |
case 'always':
|
180 |
$invoice_allowed = true;
|
181 |
break;
|
|
|
|
|
|
|
182 |
case 'custom':
|
183 |
-
if ( in_array( $order->status, array_keys( $this->general_settings['my_account_restrict'] ) ) ) {
|
184 |
$invoice_allowed = true;
|
185 |
} else {
|
186 |
$invoice_allowed = false;
|
179 |
case 'always':
|
180 |
$invoice_allowed = true;
|
181 |
break;
|
182 |
+
case 'never':
|
183 |
+
$invoice_allowed = false;
|
184 |
+
break;
|
185 |
case 'custom':
|
186 |
+
if ( isset( $this->general_settings['my_account_restrict'] ) && in_array( $order->status, array_keys( $this->general_settings['my_account_restrict'] ) ) ) {
|
187 |
$invoice_allowed = true;
|
188 |
} else {
|
189 |
$invoice_allowed = false;
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: pomegranate
|
|
3 |
Tags: woocommerce, pdf, invoices, packing slips, print, delivery notes, invoice, packing slip, export, email, bulk, automatic
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 4.2
|
6 |
-
Stable tag: 1.5.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -235,6 +235,12 @@ This usually only happens on batch actions. PDF creation is a memory intensive j
|
|
235 |
|
236 |
== Changelog ==
|
237 |
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
= 1.5.19 =
|
239 |
* Fix: Invoice number search (broke other custom searches)
|
240 |
|
3 |
Tags: woocommerce, pdf, invoices, packing slips, print, delivery notes, invoice, packing slip, export, email, bulk, automatic
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 4.2
|
6 |
+
Stable tag: 1.5.20
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
235 |
|
236 |
== Changelog ==
|
237 |
|
238 |
+
= 1.5.20 =
|
239 |
+
* Feature: Option to 'never' display My Account invoice link
|
240 |
+
* Fix: Order total for refunds in WC2.4
|
241 |
+
* Fix: notice when no custom statuses selected for My Account display
|
242 |
+
* Tweak: Product bundles styles
|
243 |
+
|
244 |
= 1.5.19 =
|
245 |
* Fix: Invoice number search (broke other custom searches)
|
246 |
|
templates/pdf/Simple/style.css
CHANGED
@@ -178,6 +178,7 @@ table.order-details {
|
|
178 |
.order-details td,
|
179 |
.order-details th {
|
180 |
border-bottom: 1px #ccc solid;
|
|
|
181 |
padding: 0.375em;
|
182 |
}
|
183 |
|
@@ -198,15 +199,8 @@ table.order-details {
|
|
198 |
}
|
199 |
|
200 |
.order-details tr.product-bundle td,
|
201 |
-
.order-details tr.
|
202 |
-
|
203 |
-
.order-details tr.bundled-item th {
|
204 |
-
border-bottom: 0;
|
205 |
-
}
|
206 |
-
|
207 |
-
.order-details tr.bundled-item:last-child td,
|
208 |
-
.order-details tr.bundled-item:last-child th {
|
209 |
-
border-bottom: 1px #ccc solid;
|
210 |
}
|
211 |
|
212 |
|
178 |
.order-details td,
|
179 |
.order-details th {
|
180 |
border-bottom: 1px #ccc solid;
|
181 |
+
border-top: 1px #ccc solid;
|
182 |
padding: 0.375em;
|
183 |
}
|
184 |
|
199 |
}
|
200 |
|
201 |
.order-details tr.product-bundle td,
|
202 |
+
.order-details tr.bundled-item td {
|
203 |
+
border: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
}
|
205 |
|
206 |
|
woocommerce-pdf-invoices-packingslips.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WooCommerce PDF Invoices & Packing Slips
|
4 |
* Plugin URI: http://www.wpovernight.com
|
5 |
* Description: Create, print & email PDF invoices & packing slips for WooCommerce orders.
|
6 |
-
* Version: 1.5.
|
7 |
* Author: Ewout Fernhout
|
8 |
* Author URI: http://www.wpovernight.com
|
9 |
* License: GPLv2 or later
|
@@ -33,7 +33,7 @@ if ( !class_exists( 'WooCommerce_PDF_Invoices' ) ) {
|
|
33 |
self::$plugin_basename = plugin_basename(__FILE__);
|
34 |
self::$plugin_url = plugin_dir_url(self::$plugin_basename);
|
35 |
self::$plugin_path = trailingslashit(dirname(__FILE__));
|
36 |
-
self::$version = '1.5.
|
37 |
|
38 |
// load the localisation & classes
|
39 |
add_action( 'plugins_loaded', array( $this, 'translations' ) ); // or use init?
|
@@ -669,6 +669,33 @@ if ( !class_exists( 'WooCommerce_PDF_Invoices' ) ) {
|
|
669 |
}
|
670 |
$totals[$key]['label'] = $label;
|
671 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
672 |
|
673 |
return apply_filters( 'wpo_wcpdf_woocommerce_totals', $totals, $this->export->order );
|
674 |
}
|
3 |
* Plugin Name: WooCommerce PDF Invoices & Packing Slips
|
4 |
* Plugin URI: http://www.wpovernight.com
|
5 |
* Description: Create, print & email PDF invoices & packing slips for WooCommerce orders.
|
6 |
+
* Version: 1.5.20
|
7 |
* Author: Ewout Fernhout
|
8 |
* Author URI: http://www.wpovernight.com
|
9 |
* License: GPLv2 or later
|
33 |
self::$plugin_basename = plugin_basename(__FILE__);
|
34 |
self::$plugin_url = plugin_dir_url(self::$plugin_basename);
|
35 |
self::$plugin_path = trailingslashit(dirname(__FILE__));
|
36 |
+
self::$version = '1.5.20';
|
37 |
|
38 |
// load the localisation & classes
|
39 |
add_action( 'plugins_loaded', array( $this, 'translations' ) ); // or use init?
|
669 |
}
|
670 |
$totals[$key]['label'] = $label;
|
671 |
}
|
672 |
+
|
673 |
+
// WC2.4 fix order_total for refunded orders
|
674 |
+
if ( version_compare( WOOCOMMERCE_VERSION, '2.4', '>=' ) && isset($totals['order_total']) ) {
|
675 |
+
$tax_display = $this->export->order->tax_display_cart;
|
676 |
+
$totals['order_total']['value'] = wc_price( $this->export->order->get_total(), array( 'currency' => $this->export->order->get_order_currency() ) );
|
677 |
+
$order_total = $this->export->order->get_total();
|
678 |
+
$tax_string = '';
|
679 |
+
|
680 |
+
// Tax for inclusive prices
|
681 |
+
if ( wc_tax_enabled() && 'incl' == $tax_display ) {
|
682 |
+
$tax_string_array = array();
|
683 |
+
|
684 |
+
if ( 'itemized' == get_option( 'woocommerce_tax_total_display' ) ) {
|
685 |
+
foreach ( $this->export->order->get_tax_totals() as $code => $tax ) {
|
686 |
+
$tax_amount = $tax->formatted_amount;
|
687 |
+
$tax_string_array[] = sprintf( '%s %s', $tax_amount, $tax->label );
|
688 |
+
}
|
689 |
+
} else {
|
690 |
+
$tax_string_array[] = sprintf( '%s %s', wc_price( $this->export->order->get_total_tax() - $this->export->order->get_total_tax_refunded(), array( 'currency' => $this->export->order->get_order_currency() ) ), WC()->countries->tax_or_vat() );
|
691 |
+
}
|
692 |
+
if ( ! empty( $tax_string_array ) ) {
|
693 |
+
$tax_string = ' ' . sprintf( __( '(Includes %s)', 'woocommerce' ), implode( ', ', $tax_string_array ) );
|
694 |
+
}
|
695 |
+
}
|
696 |
+
|
697 |
+
$totals['order_total']['value'] .= $tax_string;
|
698 |
+
}
|
699 |
|
700 |
return apply_filters( 'wpo_wcpdf_woocommerce_totals', $totals, $this->export->order );
|
701 |
}
|