Version Description
- Tweak: Added new 'item-' prefix to item row class ID
- New: filter to set sort order for bulk documents (
wpo_wcpdf_bulk_document_sort_order
) - Marked tested up to WooCommerce 5.6
Download this release
Release Info
Developer | pomegranate |
Plugin | WooCommerce PDF Invoices & Packing Slips |
Version | 2.9.2 |
Comparing to | |
See all releases |
Code changes from version 2.9.1 to 2.9.2
includes/class-wcpdf-main.php
CHANGED
@@ -290,7 +290,9 @@ class Main {
|
|
290 |
$order_ids = (array) array_map( 'absint', explode( 'x', $_GET['order_ids'] ) );
|
291 |
|
292 |
// Process oldest first: reverse $order_ids array if required
|
293 |
-
|
|
|
|
|
294 |
$order_ids = array_reverse( $order_ids );
|
295 |
}
|
296 |
|
290 |
$order_ids = (array) array_map( 'absint', explode( 'x', $_GET['order_ids'] ) );
|
291 |
|
292 |
// Process oldest first: reverse $order_ids array if required
|
293 |
+
$sort_order = apply_filters( 'wpo_wcpdf_bulk_document_sort_order', 'ASC' );
|
294 |
+
$current_sort_order = ( count( $order_ids ) > 1 && end( $order_ids ) < reset( $order_ids ) ) ? 'DESC' : 'ASC';
|
295 |
+
if ( in_array( $sort_order, array( 'ASC', 'DESC' ) ) && $sort_order != $current_sort_order ) {
|
296 |
$order_ids = array_reverse( $order_ids );
|
297 |
}
|
298 |
|
includes/class-wcpdf-settings-callbacks.php
CHANGED
@@ -235,12 +235,13 @@ class Settings_Callbacks {
|
|
235 |
$this->{$custom['type']}( $custom['args'] );
|
236 |
}
|
237 |
echo '</div>';
|
|
|
238 |
?>
|
239 |
<script type="text/javascript">
|
240 |
jQuery(document).ready(function($) {
|
241 |
function check_<?php echo $id; ?>_custom() {
|
242 |
var custom = $('#<?php echo $id; ?>').val();
|
243 |
-
if (custom == '
|
244 |
$( '.<?php echo $id; ?>_custom').show();
|
245 |
} else {
|
246 |
$( '.<?php echo $id; ?>_custom').hide();
|
235 |
$this->{$custom['type']}( $custom['args'] );
|
236 |
}
|
237 |
echo '</div>';
|
238 |
+
$custom_option = ! empty( $custom['custom_option'] ) ? $custom['custom_option'] : 'custom';
|
239 |
?>
|
240 |
<script type="text/javascript">
|
241 |
jQuery(document).ready(function($) {
|
242 |
function check_<?php echo $id; ?>_custom() {
|
243 |
var custom = $('#<?php echo $id; ?>').val();
|
244 |
+
if (custom == '<?php echo $custom_option; ?>') {
|
245 |
$( '.<?php echo $id; ?>_custom').show();
|
246 |
} else {
|
247 |
$( '.<?php echo $id; ?>_custom').hide();
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: woocommerce, pdf, invoices, packing slips, print, delivery notes, invoice,
|
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 5.8
|
7 |
Requires PHP: 7.1
|
8 |
-
Stable tag: 2.9.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -102,6 +102,11 @@ There's a setting on the Status tab of the settings page that allows you to togg
|
|
102 |
|
103 |
== Changelog ==
|
104 |
|
|
|
|
|
|
|
|
|
|
|
105 |
= 2.9.1 =
|
106 |
* New: Log manual invoice creation (with logging enabled)
|
107 |
* New: Filters to override body class and content (`wpo_wcpdf_body_class` & `wpo_wcpdf_html_content`)
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 5.8
|
7 |
Requires PHP: 7.1
|
8 |
+
Stable tag: 2.9.2
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
102 |
|
103 |
== Changelog ==
|
104 |
|
105 |
+
= 2.9.2 =
|
106 |
+
* Tweak: Added new 'item-' prefix to item row class ID
|
107 |
+
* New: filter to set sort order for bulk documents (`wpo_wcpdf_bulk_document_sort_order`)
|
108 |
+
* Marked tested up to WooCommerce 5.6
|
109 |
+
|
110 |
= 2.9.1 =
|
111 |
* New: Log manual invoice creation (with logging enabled)
|
112 |
* New: Filters to override body class and content (`wpo_wcpdf_body_class` & `wpo_wcpdf_html_content`)
|
templates/Simple/invoice.php
CHANGED
@@ -96,7 +96,7 @@
|
|
96 |
</thead>
|
97 |
<tbody>
|
98 |
<?php $items = $this->get_order_items(); if( sizeof( $items ) > 0 ) : foreach( $items as $item_id => $item ) : ?>
|
99 |
-
<tr class="<?php echo apply_filters( 'wpo_wcpdf_item_row_class',
|
100 |
<td class="product">
|
101 |
<?php $description_label = __( 'Description', 'woocommerce-pdf-invoices-packing-slips' ); // registering alternate label translation ?>
|
102 |
<span class="item-name"><?php echo $item['name']; ?></span>
|
96 |
</thead>
|
97 |
<tbody>
|
98 |
<?php $items = $this->get_order_items(); if( sizeof( $items ) > 0 ) : foreach( $items as $item_id => $item ) : ?>
|
99 |
+
<tr class="<?php echo apply_filters( 'wpo_wcpdf_item_row_class', 'item-'.$item_id, $this->type, $this->order, $item_id ); ?>">
|
100 |
<td class="product">
|
101 |
<?php $description_label = __( 'Description', 'woocommerce-pdf-invoices-packing-slips' ); // registering alternate label translation ?>
|
102 |
<span class="item-name"><?php echo $item['name']; ?></span>
|
templates/Simple/packing-slip.php
CHANGED
@@ -83,7 +83,7 @@
|
|
83 |
</thead>
|
84 |
<tbody>
|
85 |
<?php $items = $this->get_order_items(); if( sizeof( $items ) > 0 ) : foreach( $items as $item_id => $item ) : ?>
|
86 |
-
<tr class="<?php echo apply_filters( 'wpo_wcpdf_item_row_class',
|
87 |
<td class="product">
|
88 |
<?php $description_label = __( 'Description', 'woocommerce-pdf-invoices-packing-slips' ); // registering alternate label translation ?>
|
89 |
<span class="item-name"><?php echo $item['name']; ?></span>
|
83 |
</thead>
|
84 |
<tbody>
|
85 |
<?php $items = $this->get_order_items(); if( sizeof( $items ) > 0 ) : foreach( $items as $item_id => $item ) : ?>
|
86 |
+
<tr class="<?php echo apply_filters( 'wpo_wcpdf_item_row_class', 'item-'.$item_id, $this->type, $this->order, $item_id ); ?>">
|
87 |
<td class="product">
|
88 |
<?php $description_label = __( 'Description', 'woocommerce-pdf-invoices-packing-slips' ); // registering alternate label translation ?>
|
89 |
<span class="item-name"><?php echo $item['name']; ?></span>
|
woocommerce-pdf-invoices-packingslips.php
CHANGED
@@ -3,14 +3,14 @@
|
|
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: 2.9.
|
7 |
* Author: Ewout Fernhout
|
8 |
* Author URI: http://www.wpovernight.com
|
9 |
* License: GPLv2 or later
|
10 |
* License URI: http://www.opensource.org/licenses/gpl-license.php
|
11 |
* Text Domain: woocommerce-pdf-invoices-packing-slips
|
12 |
* WC requires at least: 2.2.0
|
13 |
-
* WC tested up to: 5.
|
14 |
*/
|
15 |
|
16 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -21,7 +21,7 @@ if ( !class_exists( 'WPO_WCPDF' ) ) :
|
|
21 |
|
22 |
class WPO_WCPDF {
|
23 |
|
24 |
-
public $version = '2.9.
|
25 |
public $plugin_basename;
|
26 |
public $legacy_mode;
|
27 |
public $legacy_textdomain;
|
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: 2.9.2
|
7 |
* Author: Ewout Fernhout
|
8 |
* Author URI: http://www.wpovernight.com
|
9 |
* License: GPLv2 or later
|
10 |
* License URI: http://www.opensource.org/licenses/gpl-license.php
|
11 |
* Text Domain: woocommerce-pdf-invoices-packing-slips
|
12 |
* WC requires at least: 2.2.0
|
13 |
+
* WC tested up to: 5.6.0
|
14 |
*/
|
15 |
|
16 |
if ( ! defined( 'ABSPATH' ) ) {
|
21 |
|
22 |
class WPO_WCPDF {
|
23 |
|
24 |
+
public $version = '2.9.2';
|
25 |
public $plugin_basename;
|
26 |
public $legacy_mode;
|
27 |
public $legacy_textdomain;
|