Version Description
- Fix: TM Extra Product Options compatibility (in WC3.0)
- Fix: Tax display in WC3.0
Download this release
Release Info
Developer | pomegranate |
Plugin | WooCommerce PDF Invoices & Packing Slips |
Version | 1.6.2 |
Comparing to | |
See all releases |
Code changes from version 1.6.1 to 1.6.2
includes/class-wcpdf-export.php
CHANGED
@@ -949,7 +949,7 @@ if ( ! class_exists( 'WooCommerce_PDF_Invoices_Export' ) ) {
|
|
949 |
|
950 |
// Set the single price (turned off to use more consistent calculated price)
|
951 |
// $data['single_price'] = woocommerce_price ( $product->get_price() );
|
952 |
-
|
953 |
// Set item SKU
|
954 |
$data['sku'] = $product->get_sku();
|
955 |
|
@@ -965,15 +965,19 @@ if ( ! class_exists( 'WooCommerce_PDF_Invoices_Export' ) ) {
|
|
965 |
}
|
966 |
|
967 |
// Set item meta
|
968 |
-
if (
|
969 |
-
$meta =
|
|
|
|
|
970 |
} else {
|
971 |
-
|
972 |
-
|
|
|
|
|
|
|
|
|
973 |
}
|
974 |
|
975 |
-
$data['meta'] = $meta->display( false, true );
|
976 |
-
|
977 |
$data_list[$item_id] = apply_filters( 'wpo_wcpdf_order_item_data', $data, $this->order );
|
978 |
}
|
979 |
}
|
949 |
|
950 |
// Set the single price (turned off to use more consistent calculated price)
|
951 |
// $data['single_price'] = woocommerce_price ( $product->get_price() );
|
952 |
+
|
953 |
// Set item SKU
|
954 |
$data['sku'] = $product->get_sku();
|
955 |
|
965 |
}
|
966 |
|
967 |
// Set item meta
|
968 |
+
if (function_exists('wc_display_item_meta')) { // WC3.0+
|
969 |
+
$data['meta'] = wc_display_item_meta( $item, array(
|
970 |
+
'echo' => false,
|
971 |
+
) );
|
972 |
} else {
|
973 |
+
if ( version_compare( WOOCOMMERCE_VERSION, '2.4', '<' ) ) {
|
974 |
+
$meta = new WC_Order_Item_Meta( $item['item_meta'], $product );
|
975 |
+
} else { // pass complete item for WC2.4+
|
976 |
+
$meta = new WC_Order_Item_Meta( $item, $product );
|
977 |
+
}
|
978 |
+
$data['meta'] = $meta->display( false, true );
|
979 |
}
|
980 |
|
|
|
|
|
981 |
$data_list[$item_id] = apply_filters( 'wpo_wcpdf_order_item_data', $data, $this->order );
|
982 |
}
|
983 |
}
|
includes/class-wcpdf-functions.php
CHANGED
@@ -496,7 +496,12 @@ class WooCommerce_PDF_Invoices_Functions {
|
|
496 |
if ( get_post_type( $order_id ) != 'shop_order_refund' ) {
|
497 |
// WC2.4 fix order_total for refunded orders
|
498 |
if ( version_compare( WOOCOMMERCE_VERSION, '2.4', '>=' ) && isset($totals['order_total']) ) {
|
499 |
-
|
|
|
|
|
|
|
|
|
|
|
500 |
$totals['order_total']['value'] = wc_price( WPO_WCPDF()->export->order->get_total(), array( 'currency' => WCX_Order::get_prop( WPO_WCPDF()->export->order, 'currency' ) ) );
|
501 |
$order_total = WPO_WCPDF()->export->order->get_total();
|
502 |
$tax_string = '';
|
@@ -504,7 +509,6 @@ class WooCommerce_PDF_Invoices_Functions {
|
|
504 |
// Tax for inclusive prices
|
505 |
if ( wc_tax_enabled() && 'incl' == $tax_display ) {
|
506 |
$tax_string_array = array();
|
507 |
-
|
508 |
if ( 'itemized' == get_option( 'woocommerce_tax_total_display' ) ) {
|
509 |
foreach ( WPO_WCPDF()->export->order->get_tax_totals() as $code => $tax ) {
|
510 |
$tax_amount = $tax->formatted_amount;
|
496 |
if ( get_post_type( $order_id ) != 'shop_order_refund' ) {
|
497 |
// WC2.4 fix order_total for refunded orders
|
498 |
if ( version_compare( WOOCOMMERCE_VERSION, '2.4', '>=' ) && isset($totals['order_total']) ) {
|
499 |
+
if ( version_compare( WOOCOMMERCE_VERSION, '3.0', '>=' ) ) {
|
500 |
+
$tax_display = get_option( 'woocommerce_tax_display_cart' );
|
501 |
+
} else {
|
502 |
+
$tax_display = WCX_Order::get_prop( WPO_WCPDF()->export->order, 'tax_display_cart' );
|
503 |
+
}
|
504 |
+
|
505 |
$totals['order_total']['value'] = wc_price( WPO_WCPDF()->export->order->get_total(), array( 'currency' => WCX_Order::get_prop( WPO_WCPDF()->export->order, 'currency' ) ) );
|
506 |
$order_total = WPO_WCPDF()->export->order->get_total();
|
507 |
$tax_string = '';
|
509 |
// Tax for inclusive prices
|
510 |
if ( wc_tax_enabled() && 'incl' == $tax_display ) {
|
511 |
$tax_string_array = array();
|
|
|
512 |
if ( 'itemized' == get_option( 'woocommerce_tax_total_display' ) ) {
|
513 |
foreach ( WPO_WCPDF()->export->order->get_tax_totals() as $code => $tax ) {
|
514 |
$tax_amount = $tax->formatted_amount;
|
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.7
|
6 |
-
Stable tag: 1.6.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -99,6 +99,10 @@ There's a setting on the Status tab of the settings page that allows you to togg
|
|
99 |
|
100 |
== Changelog ==
|
101 |
|
|
|
|
|
|
|
|
|
102 |
= 1.6.1 =
|
103 |
* Fix: Error with totals in credit notes
|
104 |
* Fix: Always set invoice date when invoice is create (even display is disabled in the settings)
|
@@ -524,5 +528,5 @@ There's a setting on the Status tab of the settings page that allows you to togg
|
|
524 |
|
525 |
== Upgrade Notice ==
|
526 |
|
527 |
-
= 1.6.
|
528 |
Important: Version 1.6 requires PHP 5.3 or higher to run!
|
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.7
|
6 |
+
Stable tag: 1.6.2
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
99 |
|
100 |
== Changelog ==
|
101 |
|
102 |
+
= 1.6.2 =
|
103 |
+
* Fix: TM Extra Product Options compatibility (in WC3.0)
|
104 |
+
* Fix: Tax display in WC3.0
|
105 |
+
|
106 |
= 1.6.1 =
|
107 |
* Fix: Error with totals in credit notes
|
108 |
* Fix: Always set invoice date when invoice is create (even display is disabled in the settings)
|
528 |
|
529 |
== Upgrade Notice ==
|
530 |
|
531 |
+
= 1.6.2 =
|
532 |
Important: Version 1.6 requires PHP 5.3 or higher to run!
|
templates/pdf/Simple/style.css
CHANGED
@@ -204,6 +204,7 @@ table.order-details {
|
|
204 |
}
|
205 |
|
206 |
|
|
|
207 |
dl {
|
208 |
margin: 4px 0;
|
209 |
}
|
@@ -222,6 +223,19 @@ dd:after {
|
|
222 |
content: "\A";
|
223 |
white-space: pre;
|
224 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
|
226 |
/* Notes & Totals */
|
227 |
.customer-notes {
|
204 |
}
|
205 |
|
206 |
|
207 |
+
/* item meta formatting for WC2.6 and older */
|
208 |
dl {
|
209 |
margin: 4px 0;
|
210 |
}
|
223 |
content: "\A";
|
224 |
white-space: pre;
|
225 |
}
|
226 |
+
/* item-meta formatting for WC3.0+ */
|
227 |
+
.wc-item-meta {
|
228 |
+
margin: 4px 0;
|
229 |
+
font-size: 7pt;
|
230 |
+
line-height: 7pt;
|
231 |
+
}
|
232 |
+
.wc-item-meta p {
|
233 |
+
display: inline;
|
234 |
+
}
|
235 |
+
.wc-item-meta li {
|
236 |
+
margin: 0;
|
237 |
+
margin-left: 5px;
|
238 |
+
}
|
239 |
|
240 |
/* Notes & Totals */
|
241 |
.customer-notes {
|
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.6.
|
7 |
* Author: Ewout Fernhout
|
8 |
* Author URI: http://www.wpovernight.com
|
9 |
* License: GPLv2 or later
|
@@ -48,7 +48,7 @@ if ( !class_exists( 'WooCommerce_PDF_Invoices' ) ) {
|
|
48 |
self::$plugin_basename = plugin_basename(__FILE__);
|
49 |
self::$plugin_url = plugin_dir_url(self::$plugin_basename);
|
50 |
self::$plugin_path = trailingslashit(dirname(__FILE__));
|
51 |
-
self::$version = '1.6.
|
52 |
|
53 |
// load the localisation & classes
|
54 |
add_action( 'plugins_loaded', array( $this, 'translations' ) ); // or use init?
|
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.6.2
|
7 |
* Author: Ewout Fernhout
|
8 |
* Author URI: http://www.wpovernight.com
|
9 |
* License: GPLv2 or later
|
48 |
self::$plugin_basename = plugin_basename(__FILE__);
|
49 |
self::$plugin_url = plugin_dir_url(self::$plugin_basename);
|
50 |
self::$plugin_path = trailingslashit(dirname(__FILE__));
|
51 |
+
self::$version = '1.6.2';
|
52 |
|
53 |
// load the localisation & classes
|
54 |
add_action( 'plugins_loaded', array( $this, 'translations' ) ); // or use init?
|