WooCommerce PDF Invoices & Packing Slips - Version 2.1.6

Version Description

  • Fix: Extended currency symbol setting for WooCommerce Currency Switcher by realmag777
  • Fix: Apply WooCommerce decimal settings to tax rates with decimals
  • Tweak: Pass document object to wpo_wcpdf_email_attachment filter
Download this release

Release Info

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

Code changes from version 2.1.5 to 2.1.6

includes/class-wcpdf-main.php CHANGED
@@ -99,7 +99,7 @@ class Main {
99
  file_put_contents ( $pdf_path, $pdf_data );
100
  $attachments[] = $pdf_path;
101
 
102
- do_action( 'wpo_wcpdf_email_attachment', $pdf_path, $document_type );
103
  } catch (Exception $e) {
104
  error_log($e->getMessage());
105
  continue;
@@ -446,7 +446,7 @@ class Main {
446
  * Use currency symbol font (when enabled in options)
447
  */
448
  public function use_currency_font ( $document_type, $document ) {
449
- add_filter( 'woocommerce_currency_symbol', array( $this, 'wrap_currency_symbol' ), 999, 2);
450
  add_action( 'wpo_wcpdf_custom_styles', array($this, 'currency_symbol_font_styles' ) );
451
  }
452
 
99
  file_put_contents ( $pdf_path, $pdf_data );
100
  $attachments[] = $pdf_path;
101
 
102
+ do_action( 'wpo_wcpdf_email_attachment', $pdf_path, $document_type, $document );
103
  } catch (Exception $e) {
104
  error_log($e->getMessage());
105
  continue;
446
  * Use currency symbol font (when enabled in options)
447
  */
448
  public function use_currency_font ( $document_type, $document ) {
449
+ add_filter( 'woocommerce_currency_symbol', array( $this, 'wrap_currency_symbol' ), 10001, 2);
450
  add_action( 'wpo_wcpdf_custom_styles', array($this, 'currency_symbol_font_styles' ) );
451
  }
452
 
includes/documents/abstract-wcpdf-order-document-methods.php CHANGED
@@ -572,6 +572,13 @@ abstract class Order_Document_Methods extends Order_Document {
572
  }
573
  }
574
 
 
 
 
 
 
 
 
575
  $tax_rates = implode(' ,', $tax_rates );
576
  return $tax_rates;
577
  }
572
  }
573
  }
574
 
575
+ // apply decimal setting
576
+ if (function_exists('wc_get_price_decimal_separator')) {
577
+ foreach ($tax_rates as &$tax_rate) {
578
+ $tax_rate = str_replace('.', wc_get_price_decimal_separator(), strval($tax_rate) );
579
+ }
580
+ }
581
+
582
  $tax_rates = implode(' ,', $tax_rates );
583
  return $tax_rates;
584
  }
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: 4.9
7
  Requires PHP: 5.3
8
- Stable tag: 2.1.5
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -103,6 +103,10 @@ There's a setting on the Status tab of the settings page that allows you to togg
103
 
104
  == Changelog ==
105
 
 
 
 
 
106
 
107
  = 2.1.5 =
108
  * Feature: Filter for number store table (wpo_wcpdf_number_store_table_name)
@@ -237,5 +241,5 @@ There's a setting on the Status tab of the settings page that allows you to togg
237
 
238
  == Upgrade Notice ==
239
 
240
- = 2.1.5 =
241
- 2.0 is a BIG update! Make a full site backup before upgrading!
5
  Requires at least: 3.5
6
  Tested up to: 4.9
7
  Requires PHP: 5.3
8
+ Stable tag: 2.1.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
103
 
104
  == Changelog ==
105
 
106
+ = 2.1.6 =
107
+ * Fix: Extended currency symbol setting for WooCommerce Currency Switcher by realmag777
108
+ * Fix: Apply WooCommerce decimal settings to tax rates with decimals
109
+ * Tweak: Pass document object to `wpo_wcpdf_email_attachment` filter
110
 
111
  = 2.1.5 =
112
  * Feature: Filter for number store table (wpo_wcpdf_number_store_table_name)
241
 
242
  == Upgrade Notice ==
243
 
244
+ = 2.1.6 =
245
+ 2.X is a BIG update! Make a full site backup before upgrading!
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: 2.1.5
7
  * Author: Ewout Fernhout
8
  * Author URI: http://www.wpovernight.com
9
  * License: GPLv2 or later
@@ -21,7 +21,7 @@ if ( !class_exists( 'WPO_WCPDF' ) ) :
21
 
22
  class WPO_WCPDF {
23
 
24
- public $version = '2.1.5';
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.1.6
7
  * Author: Ewout Fernhout
8
  * Author URI: http://www.wpovernight.com
9
  * License: GPLv2 or later
21
 
22
  class WPO_WCPDF {
23
 
24
+ public $version = '2.1.6';
25
  public $plugin_basename;
26
  public $legacy_mode;
27