WooCommerce PDF Invoices & Packing Slips - Version 2.4.10

Version Description

  • Tested up to WooCommerce 4.1
Download this release

Release Info

Developer pomegranate
Plugin Icon 128x128 WooCommerce PDF Invoices & Packing Slips
Version 2.4.10
Comparing to
See all releases

Code changes from version 2.4.9 to 2.4.10

includes/class-wcpdf-admin.php CHANGED
@@ -370,7 +370,13 @@ class Admin {
370
  $invoice_date = $invoice->get_date();
371
  ?>
372
  <div class="wcpdf-data-fields" data-document="invoice" data-order_id="<?php echo WCX_Order::get_id( $order ); ?>">
373
- <h4><?php echo $invoice->get_title(); ?><?php if ($invoice->exists()) : ?><span class="wpo-wcpdf-edit-date-number dashicons dashicons-edit"></span><span class="wpo-wcpdf-delete-document dashicons dashicons-trash" data-nonce="<?php echo wp_create_nonce( "wpo_wcpdf_delete_document" ); ?>"></span><?php endif; ?></h4>
 
 
 
 
 
 
374
 
375
  <!-- Read only -->
376
  <div class="read-only">
370
  $invoice_date = $invoice->get_date();
371
  ?>
372
  <div class="wcpdf-data-fields" data-document="invoice" data-order_id="<?php echo WCX_Order::get_id( $order ); ?>">
373
+ <h4>
374
+ <?php echo $invoice->get_title(); ?><?php if ($invoice->exists()) : ?>
375
+ <span class="wpo-wcpdf-edit-date-number dashicons dashicons-edit"></span>
376
+ <span class="wpo-wcpdf-delete-document dashicons dashicons-trash" data-nonce="<?php echo wp_create_nonce( "wpo_wcpdf_delete_document" ); ?>"></span>
377
+ <?php do_action( 'wpo_wcpdf_document_actions', $invoice ); ?>
378
+ <?php endif; ?>
379
+ </h4>
380
 
381
  <!-- Read only -->
382
  <div class="read-only">
includes/class-wcpdf-assets.php CHANGED
@@ -85,10 +85,10 @@ class Assets {
85
  'wpo-wcpdf',
86
  'wpo_wcpdf_ajax',
87
  array(
88
- 'ajaxurl' => admin_url( 'admin-ajax.php' ), // URL to WordPress ajax handling page
89
- 'nonce' => wp_create_nonce('generate_wpo_wcpdf'),
90
- 'bulk_actions' => array_keys( $bulk_actions ),
91
- 'confirm_delete' => __( 'Are you sure you want to delete this document? This cannot be undone.', 'woocommerce-pdf-invoices-packing-slips'),
92
  )
93
  );
94
  }
85
  'wpo-wcpdf',
86
  'wpo_wcpdf_ajax',
87
  array(
88
+ 'ajaxurl' => admin_url( 'admin-ajax.php' ), // URL to WordPress ajax handling page
89
+ 'nonce' => wp_create_nonce('generate_wpo_wcpdf'),
90
+ 'bulk_actions' => array_keys( $bulk_actions ),
91
+ 'confirm_delete' => __( 'Are you sure you want to delete this document? This cannot be undone.', 'woocommerce-pdf-invoices-packing-slips'),
92
  )
93
  );
94
  }
includes/class-wcpdf-main.php CHANGED
@@ -20,7 +20,7 @@ class Main {
20
  // email
21
  add_filter( 'woocommerce_email_attachments', array( $this, 'attach_pdf_to_email' ), 99, 4 );
22
  add_filter( 'wpo_wcpdf_custom_attachment_condition', array( $this, 'disable_free_attachment'), 1001, 4 );
23
- add_filter( 'wp_mail', array( $this, 'set_phpmailer_validator'), 10, 1 );
24
 
25
  if ( isset(WPO_WCPDF()->settings->debug_settings['enable_debug']) ) {
26
  $this->enable_debug();
20
  // email
21
  add_filter( 'woocommerce_email_attachments', array( $this, 'attach_pdf_to_email' ), 99, 4 );
22
  add_filter( 'wpo_wcpdf_custom_attachment_condition', array( $this, 'disable_free_attachment'), 1001, 4 );
23
+ add_filter( 'wp_mail', array( $this, 'set_phpmailer_validator'), 10, 1 );
24
 
25
  if ( isset(WPO_WCPDF()->settings->debug_settings['enable_debug']) ) {
26
  $this->enable_debug();
includes/documents/abstract-wcpdf-order-document-methods.php CHANGED
@@ -859,7 +859,7 @@ abstract class Order_Document_Methods extends Order_Document {
859
 
860
  // WC2.4 fix order_total for refunded orders
861
  // not if this is the actual refund!
862
- if ( ! $this->is_refund( $this->order ) ) {
863
  $total_refunded = method_exists($this->order, 'get_total_refunded') ? $this->order->get_total_refunded() : 0;
864
  if ( version_compare( WOOCOMMERCE_VERSION, '2.4', '>=' ) && isset($totals['order_total']) && $total_refunded ) {
865
  if ( version_compare( WOOCOMMERCE_VERSION, '3.0', '>=' ) ) {
859
 
860
  // WC2.4 fix order_total for refunded orders
861
  // not if this is the actual refund!
862
+ if ( ! $this->is_refund( $this->order ) && apply_filters( 'wpo_wcpdf_remove_refund_totals', true, $this ) ) {
863
  $total_refunded = method_exists($this->order, 'get_total_refunded') ? $this->order->get_total_refunded() : 0;
864
  if ( version_compare( WOOCOMMERCE_VERSION, '2.4', '>=' ) && isset($totals['order_total']) && $total_refunded ) {
865
  if ( version_compare( WOOCOMMERCE_VERSION, '3.0', '>=' ) ) {
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.4
7
  Requires PHP: 5.3
8
- Stable tag: 2.4.9
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -102,6 +102,9 @@ There's a setting on the Status tab of the settings page that allows you to togg
102
 
103
  == Changelog ==
104
 
 
 
 
105
  = 2.4.9 =
106
  * Fix: Backwards compatibility with WooCommerce 2.6
107
  * Fix: Description of the setting to disable invoice for free orders
5
  Requires at least: 3.5
6
  Tested up to: 5.4
7
  Requires PHP: 5.3
8
+ Stable tag: 2.4.10
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
102
 
103
  == Changelog ==
104
 
105
+ = 2.4.10 =
106
+ * Tested up to WooCommerce 4.1
107
+
108
  = 2.4.9 =
109
  * Fix: Backwards compatibility with WooCommerce 2.6
110
  * Fix: Description of the setting to disable invoice for free orders
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.4.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: 4.0.0
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.4.9';
25
  public $plugin_basename;
26
  public $legacy_mode;
27
 
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.4.10
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: 4.1.0
14
  */
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
21
 
22
  class WPO_WCPDF {
23
 
24
+ public $version = '2.4.10';
25
  public $plugin_basename;
26
  public $legacy_mode;
27