WooCommerce PDF Invoices & Packing Slips - Version 1.4.9

Version Description

  • Feature: Order number and date are now displayed by default in the Simple template (invoice number and date still optional)
  • Feature: Display Customer/Order notes with a simple shorthand (see FAQ)
  • Translations: Added Brazilian Portugese (thanks Victor Debone!)
  • Tweak: Fail more gracefully when there are errors during PDF generation
  • Tweak: added template type class to template output body
  • Tweak: cleaned up Simple template style.css
Download this release

Release Info

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

Code changes from version 1.4.8 to 1.4.9

includes/class-wcpdf-export.php CHANGED
@@ -56,7 +56,7 @@ if ( ! class_exists( 'WooCommerce_PDF_Invoices_Export' ) ) {
56
  */
57
  public function process_template( $template_type, $order_ids ) {
58
  $this->template_type = $template_type;
59
- $this->order_ids = $order_ids;
60
 
61
  do_action( 'wpo_wcpdf_process_template', $template_type );
62
 
@@ -68,7 +68,7 @@ if ( ! class_exists( 'WooCommerce_PDF_Invoices_Export' ) ) {
68
  $template = apply_filters( 'wpo_wcpdf_template_file', $template, $template_type );
69
 
70
  if (!file_exists($template)) {
71
- die('Template not found! Check if the following file exists: <pre>'.$template.'</pre><br/>');
72
  }
73
 
74
  // Set the invoice number
@@ -88,9 +88,6 @@ if ( ! class_exists( 'WooCommerce_PDF_Invoices_Export' ) ) {
88
  wp_cache_delete( $order_id, 'post_meta' );
89
  }
90
 
91
- // Try to clean up a bit of memory
92
- unset($this->order);
93
-
94
  $print_script = "<script language=javascript>window.onload = function(){ window.print(); };</script>";
95
  $page_break = "\n<div style=\"page-break-before: always;\"></div>\n";
96
 
@@ -107,7 +104,7 @@ if ( ! class_exists( 'WooCommerce_PDF_Invoices_Export' ) ) {
107
  $template_wrapper = $this->template_path . '/html-document-wrapper.php';
108
 
109
  if (!file_exists($template_wrapper)) {
110
- die('Template wrapper not found! Check if the following file exists: <pre>'.$template_wrapper.'</pre><br/>');
111
  }
112
 
113
  $complete_document = $this->get_template($template_wrapper);
@@ -159,8 +156,14 @@ if ( ! class_exists( 'WooCommerce_PDF_Invoices_Export' ) ) {
159
  * Get PDF
160
  */
161
  public function get_pdf( $template_type, $order_ids ) {
162
- $pdf = $this->generate_pdf( $template_type, $order_ids );
163
- return $pdf->output();
 
 
 
 
 
 
164
  }
165
 
166
  /**
@@ -194,15 +197,10 @@ if ( ! class_exists( 'WooCommerce_PDF_Invoices_Export' ) ) {
194
  }
195
 
196
  // Get user_id of order
197
- $order = new WC_Order ( $order_ids[0] );
198
- $order_user = $order->user_id;
199
- // Destroy object to save memory
200
- unset($order);
201
- // Get user_id of current user
202
- $user_id = get_current_user_id();
203
 
204
  // Check if current user is owner of order IMPORTANT!!!
205
- if ( $order_user != $user_id ) {
206
  wp_die( __( 'You do not have sufficient permissions to access this page.', 'wpo_wcpdf' ) );
207
  }
208
 
@@ -222,31 +220,14 @@ if ( ! class_exists( 'WooCommerce_PDF_Invoices_Export' ) ) {
222
  die($this->process_template( $template_type, $order_ids ));
223
  }
224
 
225
- $invoice = $this->get_pdf( $template_type, $order_ids );
226
-
227
- do_action( 'wpo_wcpdf_after_pdf', $template_type );
228
-
229
- // get template name
230
- if ($template_type == 'invoice' ) {
231
- $template_name = _n( 'invoice', 'invoices', count($order_ids), 'wpo_wcpdf' );
232
- } else {
233
- $template_name = _n( 'packing-slip', 'packing-slips', count($order_ids), 'wpo_wcpdf' );
234
  }
235
 
236
- // Filename
237
- if ( count($order_ids) > 1 ) {
238
- $filename = $template_name . '-' . date('Y-m-d') . '.pdf'; // 'invoices-2020-11-11.pdf'
239
- } else {
240
- $this->order = new WC_Order ( $order_ids[0] );
241
- $display_number = $template_type == 'invoice' ? $this->get_display_number( $order_ids[0] ) : ltrim($this->order->get_order_number(), '#');
242
- $filename = $template_name . '-' . $display_number . '.pdf'; // 'packing-slip-123456.pdf'
243
- }
244
 
245
- $filename = apply_filters( 'wpo_wcpdf_bulk_filename', $filename, $order_ids, $template_name, $template_type );
246
 
247
- // sanitize filename!
248
- $filename = sanitize_file_name( $filename );
249
-
250
  // Get output setting
251
  $output_mode = isset($this->general_settings['download_display'])?$this->general_settings['download_display']:'';
252
 
@@ -271,12 +252,59 @@ if ( ! class_exists( 'WooCommerce_PDF_Invoices_Export' ) ) {
271
  exit;
272
  }
273
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
274
  /**
275
  * Attach invoice to completed order or customer invoice email
276
  */
277
  public function attach_pdf_to_email ( $attachments, $status, $order ) {
278
  $this->order = $order;
279
 
 
 
 
 
280
  if (!isset($this->general_settings['email_pdf']) || !isset( $status ) ) {
281
  return;
282
  }
@@ -286,18 +314,16 @@ if ( ! class_exists( 'WooCommerce_PDF_Invoices_Export' ) ) {
286
  array_map('unlink', ( glob( $tmp_path.'*' ) ? glob( $tmp_path.'*' ) : array() ) );
287
 
288
  $documents = array(
289
- 'invoice' => array(
290
- 'allowed_statuses' => apply_filters( 'wpo_wcpdf_email_allowed_statuses', array_keys( $this->general_settings['email_pdf'] ) ), // Relevant (default) statuses: new_order, customer_invoice, customer_processing_order, customer_completed_order
291
- ),
292
  );
293
 
294
  $documents = apply_filters('wpo_wcpdf_attach_documents', $documents );
 
295
 
296
- foreach ($documents as $document => $document_settings ) {
297
- $allowed_statuses = $document_settings['allowed_statuses'];
298
 
 
299
  foreach ($allowed_statuses as $key => $order_status) {
300
- // convert 'lazy' status name
301
  if ($order_status == 'completed' || $order_status == 'processing') {
302
  $allowed_statuses[$key] = "customer_" . $order_status . "_order";
303
  }
@@ -307,30 +333,25 @@ if ( ! class_exists( 'WooCommerce_PDF_Invoices_Export' ) ) {
307
  $attach_invoice = apply_filters('wpo_wcpdf_custom_email_condition', true, $order, $status );
308
 
309
  // use this filter to add an extra condition - return false to disable the PDF attachment
310
- $attach_document = apply_filters('wpo_wcpdf_custom_attachment_condition', true, $order, $status, $document );
311
 
312
- if( in_array( $status, $allowed_statuses ) && !( ( $document == 'invoice' ) && !$attach_invoice ) && $attach_document ) {
313
  // create pdf data
314
- $pdf_data = $this->get_pdf( $document, (array) $order->id );
315
 
316
- // compose filename
317
- if ( $document == 'invoice' ) {
318
- $display_number = $this->get_display_number( $order->id );
319
- $pdf_filename_prefix = __( 'invoice', 'wpo_wcpdf' );
320
- $pdf_filename = $pdf_filename_prefix . '-' . $display_number . '.pdf';
321
- $pdf_filename = apply_filters( 'wpo_wcpdf_attachment_filename', $pdf_filename, $display_number, $order->id );
322
- } else {
323
- $pdf_filename = $document_settings['filename'];
324
  }
325
 
326
- // sanitize filename!
327
- $pdf_filename = sanitize_file_name( $pdf_filename );
328
 
329
  $pdf_path = $tmp_path . $pdf_filename;
330
  file_put_contents ( $pdf_path, $pdf_data );
331
  $attachments[] = $pdf_path;
332
 
333
- do_action( 'wpo_wcpdf_email_attachment', $pdf_path, $document );
334
  }
335
  }
336
 
56
  */
57
  public function process_template( $template_type, $order_ids ) {
58
  $this->template_type = $template_type;
59
+ $order_ids = $this->order_ids = apply_filters( 'wpo_wcpdf_process_order_ids', $order_ids, $template_type );
60
 
61
  do_action( 'wpo_wcpdf_process_template', $template_type );
62
 
68
  $template = apply_filters( 'wpo_wcpdf_template_file', $template, $template_type );
69
 
70
  if (!file_exists($template)) {
71
+ throw new Exception('Template not found! Check if the following file exists: <pre>'.$template.'</pre><br/>');
72
  }
73
 
74
  // Set the invoice number
88
  wp_cache_delete( $order_id, 'post_meta' );
89
  }
90
 
 
 
 
91
  $print_script = "<script language=javascript>window.onload = function(){ window.print(); };</script>";
92
  $page_break = "\n<div style=\"page-break-before: always;\"></div>\n";
93
 
104
  $template_wrapper = $this->template_path . '/html-document-wrapper.php';
105
 
106
  if (!file_exists($template_wrapper)) {
107
+ throw new Exception('Template wrapper not found! Check if the following file exists: <pre>'.$template_wrapper.'</pre><br/>');
108
  }
109
 
110
  $complete_document = $this->get_template($template_wrapper);
156
  * Get PDF
157
  */
158
  public function get_pdf( $template_type, $order_ids ) {
159
+ try {
160
+ $pdf = $this->generate_pdf( $template_type, $order_ids );
161
+ return $pdf->output();
162
+ } catch (Exception $e) {
163
+ echo $e->getMessage();
164
+ return false;
165
+ }
166
+
167
  }
168
 
169
  /**
197
  }
198
 
199
  // Get user_id of order
200
+ $this->order = new WC_Order ( $order_ids[0] );
 
 
 
 
 
201
 
202
  // Check if current user is owner of order IMPORTANT!!!
203
+ if ( $this->order->user_id != get_current_user_id() ) {
204
  wp_die( __( 'You do not have sufficient permissions to access this page.', 'wpo_wcpdf' ) );
205
  }
206
 
220
  die($this->process_template( $template_type, $order_ids ));
221
  }
222
 
223
+ if ( !($invoice = $this->get_pdf( $template_type, $order_ids )) ) {
224
+ exit;
 
 
 
 
 
 
 
225
  }
226
 
227
+ do_action( 'wpo_wcpdf_after_pdf', $template_type );
 
 
 
 
 
 
 
228
 
229
+ $filename = $this->build_filename( $template_type, $order_ids, 'download' );
230
 
 
 
 
231
  // Get output setting
232
  $output_mode = isset($this->general_settings['download_display'])?$this->general_settings['download_display']:'';
233
 
252
  exit;
253
  }
254
 
255
+ /**
256
+ * Build filename
257
+ */
258
+ public function build_filename( $template_type, $order_ids, $context ) {
259
+ $count = count($order_ids);
260
+
261
+ switch ($template_type) {
262
+ case 'invoice':
263
+ $name = _n( 'invoice', 'invoices', $count, 'wpo_wcpdf' );
264
+ $number = $this->get_display_number( $order_ids[0] );
265
+ break;
266
+ case 'packing-slip':
267
+ $name = _n( 'packing-slip', 'packing-slips', $count, 'wpo_wcpdf' );
268
+ $number = $this->order->get_order_number();
269
+ break;
270
+ default:
271
+ $name = $template_type;
272
+ $number = $this->order->get_order_number();
273
+ break;
274
+ }
275
+
276
+ if ( $count == 1 ) {
277
+ $suffix = $number;
278
+ } else {
279
+ $suffix = date('Y-m-d'); // 2020-11-11
280
+ }
281
+
282
+ $filename = $name . '-' . $suffix . '.pdf';
283
+
284
+ // Filter depending on context (for legacy filter support)
285
+ if ( $context == 'download' ) {
286
+ $filename = apply_filters( 'wpo_wcpdf_bulk_filename', $filename, $order_ids, $name, $template_type );
287
+ } elseif ( $context == 'attachment' ) {
288
+ $filename = apply_filters( 'wpo_wcpdf_attachment_filename', $filename, $number, $order_ids[0] );
289
+ }
290
+
291
+ // Filter filename (use this filter instead of the above legacy filters!)
292
+ $filename = apply_filters( 'wpo_wcpdf_filename', $filename, $template_type, $order_ids, $context );
293
+
294
+ // sanitize filename (after filters to prevent human errors)!
295
+ return sanitize_file_name( $filename );
296
+ }
297
+
298
  /**
299
  * Attach invoice to completed order or customer invoice email
300
  */
301
  public function attach_pdf_to_email ( $attachments, $status, $order ) {
302
  $this->order = $order;
303
 
304
+ if ($order->post->post_type != 'shop_order') {
305
+ return; // do not process low stock notifications etc!
306
+ }
307
+
308
  if (!isset($this->general_settings['email_pdf']) || !isset( $status ) ) {
309
  return;
310
  }
314
  array_map('unlink', ( glob( $tmp_path.'*' ) ? glob( $tmp_path.'*' ) : array() ) );
315
 
316
  $documents = array(
317
+ 'invoice' => apply_filters( 'wpo_wcpdf_email_allowed_statuses', array_keys( $this->general_settings['email_pdf'] ) ), // Relevant (default) statuses: new_order, customer_invoice, customer_processing_order, customer_completed_order
 
 
318
  );
319
 
320
  $documents = apply_filters('wpo_wcpdf_attach_documents', $documents );
321
+
322
 
323
+ foreach ($documents as $template_type => $allowed_statuses ) {
 
324
 
325
+ // convert 'lazy' status name
326
  foreach ($allowed_statuses as $key => $order_status) {
 
327
  if ($order_status == 'completed' || $order_status == 'processing') {
328
  $allowed_statuses[$key] = "customer_" . $order_status . "_order";
329
  }
333
  $attach_invoice = apply_filters('wpo_wcpdf_custom_email_condition', true, $order, $status );
334
 
335
  // use this filter to add an extra condition - return false to disable the PDF attachment
336
+ $attach_document = apply_filters('wpo_wcpdf_custom_attachment_condition', true, $order, $status, $template_type );
337
 
338
+ if( in_array( $status, $allowed_statuses ) && !( ( $template_type == 'invoice' ) && !$attach_invoice ) && $attach_document ) {
339
  // create pdf data
340
+ $pdf_data = $this->get_pdf( $template_type, (array) $order->id );
341
 
342
+ if ( !$pdf_data ) {
343
+ // something went wrong
344
+ break;
 
 
 
 
 
345
  }
346
 
347
+ // compose filename
348
+ $pdf_filename = $this->build_filename( $template_type, (array) $order->id, 'attachment' );
349
 
350
  $pdf_path = $tmp_path . $pdf_filename;
351
  file_put_contents ( $pdf_path, $pdf_data );
352
  $attachments[] = $pdf_path;
353
 
354
+ do_action( 'wpo_wcpdf_email_attachment', $pdf_path, $template_type );
355
  }
356
  }
357
 
includes/class-wcpdf-settings.php CHANGED
@@ -381,20 +381,29 @@ if ( ! class_exists( 'WooCommerce_PDF_Invoices_Settings' ) ) {
381
  )
382
  );
383
 
 
 
 
 
 
 
 
 
 
 
 
 
 
384
  add_settings_field(
385
  'display_number',
386
- __( 'Number to display on invoice', 'wpo_wcpdf' ),
387
- array( &$this, 'select_element_callback' ),
388
  $option,
389
  'template_settings',
390
  array(
391
  'menu' => $option,
392
  'id' => 'display_number',
393
- 'options' => array(
394
- 'order_number' => __( 'WooCommerce order number' , 'wpo_wcpdf' ),
395
- 'invoice_number'=> __( 'Built-in sequential invoice number' , 'wpo_wcpdf' ),
396
- ),
397
- 'description' => __( 'If you are using the WooCommerce Sequential Order Numbers plugin, select the WooCommerce order number', 'wpo_wcpdf' ),
398
  )
399
  );
400
 
@@ -442,24 +451,6 @@ if ( ! class_exists( 'WooCommerce_PDF_Invoices_Settings' ) ) {
442
  )
443
  );
444
 
445
-
446
-
447
- add_settings_field(
448
- 'display_date',
449
- __( 'Date to display on invoice', 'wpo_wcpdf' ),
450
- array( &$this, 'select_element_callback' ),
451
- $option,
452
- 'template_settings',
453
- array(
454
- 'menu' => $option,
455
- 'id' => 'display_date',
456
- 'options' => array(
457
- 'order_date' => __( 'Order date' , 'wpo_wcpdf' ),
458
- 'invoice_date' => __( 'Invoice date' , 'wpo_wcpdf' ),
459
- ),
460
- )
461
- );
462
-
463
  // Section.
464
  add_settings_section(
465
  'extra_template_fields',
@@ -623,6 +614,7 @@ if ( ! class_exists( 'WooCommerce_PDF_Invoices_Settings' ) ) {
623
  public function checkbox_element_callback( $args ) {
624
  $menu = $args['menu'];
625
  $id = $args['id'];
 
626
 
627
  $options = get_option( $menu );
628
 
@@ -632,7 +624,7 @@ if ( ! class_exists( 'WooCommerce_PDF_Invoices_Settings' ) ) {
632
  $current = isset( $args['default'] ) ? $args['default'] : '';
633
  }
634
 
635
- $html = sprintf( '<input type="checkbox" id="%1$s" name="%2$s[%1$s]" value="1"%3$s />', $id, $menu, checked( 1, $current, false ) );
636
 
637
  // Displays option description.
638
  if ( isset( $args['description'] ) ) {
@@ -767,12 +759,12 @@ if ( ! class_exists( 'WooCommerce_PDF_Invoices_Settings' ) ) {
767
 
768
  $html .= sprintf('<img src="%1$s" style="display:block" id="img-%4$s"/>', $attachment_src, $attachment_width, $attachment_height, $id );
769
  $html .= '<div class="attachment-resolution"><p class="description">'.__('Image resolution').': '.$attachment_resolution.'dpi (default height = 3cm)</p></div>';
770
- $html .= sprintf('<span class="button remove_image_button" data-input_id="%1$s">%2$s</span>', $id, $remove_button_text );
771
  }
772
 
773
  $html .= sprintf( '<input id="%1$s" name="%2$s[%1$s]" type="hidden" value="%3$s" />', $id, $menu, $current );
774
 
775
- $html .= sprintf( '<span class="button upload_image_button %4$s" data-uploader_title="%1$s" data-uploader_button_text="%2$s" data-remove_button_text="%3$s" data-input_id="%4$s">%2$s</span>', $uploader_title, $uploader_button_text, $remove_button_text, $id );
776
 
777
  // Displays option description.
778
  if ( isset( $args['description'] ) ) {
381
  )
382
  );
383
 
384
+ add_settings_field(
385
+ 'display_date',
386
+ __( 'Display invoice date', 'wpo_wcpdf' ),
387
+ array( &$this, 'checkbox_element_callback' ),
388
+ $option,
389
+ 'template_settings',
390
+ array(
391
+ 'menu' => $option,
392
+ 'id' => 'display_date',
393
+ 'value' => 'invoice_date',
394
+ )
395
+ );
396
+
397
  add_settings_field(
398
  'display_number',
399
+ __( 'Display built-in sequential invoice number', 'wpo_wcpdf' ),
400
+ array( &$this, 'checkbox_element_callback' ),
401
  $option,
402
  'template_settings',
403
  array(
404
  'menu' => $option,
405
  'id' => 'display_number',
406
+ 'value' => 'invoice_number',
 
 
 
 
407
  )
408
  );
409
 
451
  )
452
  );
453
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
454
  // Section.
455
  add_settings_section(
456
  'extra_template_fields',
614
  public function checkbox_element_callback( $args ) {
615
  $menu = $args['menu'];
616
  $id = $args['id'];
617
+ $value = isset( $args['value'] ) ? $args['value'] : 1;
618
 
619
  $options = get_option( $menu );
620
 
624
  $current = isset( $args['default'] ) ? $args['default'] : '';
625
  }
626
 
627
+ $html = sprintf( '<input type="checkbox" id="%1$s" name="%2$s[%1$s]" value="%3$s"%4$s />', $id, $menu, $value, checked( $value, $current, false ) );
628
 
629
  // Displays option description.
630
  if ( isset( $args['description'] ) ) {
759
 
760
  $html .= sprintf('<img src="%1$s" style="display:block" id="img-%4$s"/>', $attachment_src, $attachment_width, $attachment_height, $id );
761
  $html .= '<div class="attachment-resolution"><p class="description">'.__('Image resolution').': '.$attachment_resolution.'dpi (default height = 3cm)</p></div>';
762
+ $html .= sprintf('<span class="button wpo_remove_image_button" data-input_id="%1$s">%2$s</span>', $id, $remove_button_text );
763
  }
764
 
765
  $html .= sprintf( '<input id="%1$s" name="%2$s[%1$s]" type="hidden" value="%3$s" />', $id, $menu, $current );
766
 
767
+ $html .= sprintf( '<span class="button wpo_upload_image_button %4$s" data-uploader_title="%1$s" data-uploader_button_text="%2$s" data-remove_button_text="%3$s" data-input_id="%4$s">%2$s</span>', $uploader_title, $uploader_button_text, $remove_button_text, $id );
768
 
769
  // Displays option description.
770
  if ( isset( $args['description'] ) ) {
js/media-upload.js CHANGED
@@ -6,7 +6,7 @@ jQuery(document).ready(function($) {
6
  // Uploading files
7
  var file_frame;
8
 
9
- jQuery('.upload_image_button').live('click', function( event ){
10
 
11
  // get input field id from data-input_id
12
  input_id = '#'+jQuery( this ).data( 'input_id' );
@@ -47,7 +47,7 @@ jQuery(document).ready(function($) {
47
  } else {
48
  // show image & remove button
49
  attachment_img = '<img src="'+attachment.url+'" style="display:block" id="img-'+input_id_clean+'"/>';
50
- remove_button = '<span class="button remove_image_button" data-input_id="'+input_id_clean+'">'+remove_button_text+'</span>';
51
  jQuery( input_id ).before(attachment_img+remove_button);
52
 
53
  }
@@ -57,7 +57,7 @@ jQuery(document).ready(function($) {
57
  file_frame.open();
58
  });
59
 
60
- jQuery('.remove_image_button').live('click', function( event ){
61
 
62
 
63
  // get input field from data-input_id
@@ -67,5 +67,6 @@ jQuery(document).ready(function($) {
67
  jQuery( input_id ).val('');
68
  jQuery( img_id ).remove();
69
  jQuery( this ).remove();
 
70
  });
71
  });
6
  // Uploading files
7
  var file_frame;
8
 
9
+ jQuery('.wpo_upload_image_button').live('click', function( event ){
10
 
11
  // get input field id from data-input_id
12
  input_id = '#'+jQuery( this ).data( 'input_id' );
47
  } else {
48
  // show image & remove button
49
  attachment_img = '<img src="'+attachment.url+'" style="display:block" id="img-'+input_id_clean+'"/>';
50
+ remove_button = '<span class="button wpo_remove_image_button" data-input_id="'+input_id_clean+'">'+remove_button_text+'</span>';
51
  jQuery( input_id ).before(attachment_img+remove_button);
52
 
53
  }
57
  file_frame.open();
58
  });
59
 
60
+ jQuery('.wpo_remove_image_button').live('click', function( event ){
61
 
62
 
63
  // get input field from data-input_id
67
  jQuery( input_id ).val('');
68
  jQuery( img_id ).remove();
69
  jQuery( this ).remove();
70
+ jQuery( '.attachment-resolution' ).remove();
71
  });
72
  });
languages/wpo_wcpdf-pt_BR.mo ADDED
Binary file
languages/wpo_wcpdf-pt_BR.po ADDED
@@ -0,0 +1,480 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: WooCommerce PDF Invoices & Packing Slips\n"
4
+ "POT-Creation-Date: 2014-09-01 10:04+0100\n"
5
+ "PO-Revision-Date: 2014-09-12 09:54-0300\n"
6
+ "Last-Translator: Victor Debone <victor@debone.com.br>\n"
7
+ "Language-Team: Victor Debone <victor@debone.com.br>\n"
8
+ "Language: pt_BR\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.6.7\n"
13
+ "X-Poedit-Basepath: ../\n"
14
+ "Plural-Forms: nplurals=2; plural=(n > 1);\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
+ "X-Poedit-KeywordsList: __;_e;_x;_n:1,2\n"
17
+ "X-Poedit-SearchPath-0: .\n"
18
+
19
+ #: includes/class-wcpdf-export.php:168 includes/class-wcpdf-export.php:173
20
+ #: includes/class-wcpdf-export.php:178 includes/class-wcpdf-export.php:189
21
+ #: includes/class-wcpdf-export.php:202
22
+ msgid "You do not have sufficient permissions to access this page."
23
+ msgstr "Você não tem permissões o bastante para acessar essa página."
24
+
25
+ # This is a filename (prefix). do not use spaces or special characters!
26
+ #: includes/class-wcpdf-export.php:223 includes/class-wcpdf-export.php:303
27
+ msgid "invoice"
28
+ msgid_plural "invoices"
29
+ msgstr[0] "fatura"
30
+ msgstr[1] "faturas"
31
+
32
+ # This is a filename (prefix). do not use spaces or special characters!
33
+ #: includes/class-wcpdf-export.php:225
34
+ msgid "packing-slip"
35
+ msgid_plural "packing-slips"
36
+ msgstr[0] "Etiqueta do Pacote"
37
+ msgstr[1] "Etiquetas do pacote"
38
+
39
+ #: includes/class-wcpdf-settings.php:36 includes/class-wcpdf-settings.php:37
40
+ #: includes/class-wcpdf-writepanels.php:176
41
+ #: includes/class-wcpdf-writepanels.php:177
42
+ msgid "PDF Invoices"
43
+ msgstr "Faturas em PDF"
44
+
45
+ #: includes/class-wcpdf-settings.php:60
46
+ msgid "Settings"
47
+ msgstr "Opções"
48
+
49
+ #: includes/class-wcpdf-settings.php:82
50
+ msgid "General"
51
+ msgstr "Geral"
52
+
53
+ #: includes/class-wcpdf-settings.php:83
54
+ msgid "Template"
55
+ msgstr "Modelo"
56
+
57
+ #: includes/class-wcpdf-settings.php:92
58
+ msgid "WooCommerce PDF Invoices"
59
+ msgstr "Faturas em PDF do WooCommerce"
60
+
61
+ #: includes/class-wcpdf-settings.php:98
62
+ msgid "Status"
63
+ msgstr "Status"
64
+
65
+ #: includes/class-wcpdf-settings.php:109
66
+ #, php-format
67
+ msgid ""
68
+ "Upload all invoices automatically to your dropbox!<br/>Check out the %s "
69
+ "extension."
70
+ msgstr ""
71
+ "Envie todas as faturas automaticamente para o seu dropbox! <br/> Dê uma "
72
+ "olhada na extensão %s."
73
+
74
+ #: includes/class-wcpdf-settings.php:119
75
+ #, php-format
76
+ msgid ""
77
+ "Looking for more advanced templates? Check out the Premium PDF Invoice & "
78
+ "Packing Slips templates at %s."
79
+ msgstr ""
80
+ "Está procurando por modelos mais avançados? Confira os modelos Premiums em "
81
+ "%s."
82
+
83
+ #: includes/class-wcpdf-settings.php:120
84
+ #, php-format
85
+ msgid "For custom templates, contact us at %s."
86
+ msgstr "Para modelos personalizados, nos contate em %s."
87
+
88
+ #: includes/class-wcpdf-settings.php:175
89
+ msgid "General settings"
90
+ msgstr "Opções Gerais"
91
+
92
+ #: includes/class-wcpdf-settings.php:182
93
+ msgid "How do you want to view the PDF?"
94
+ msgstr "Como você deseja visualizar o PDF?"
95
+
96
+ #: includes/class-wcpdf-settings.php:190
97
+ msgid "Download the PDF"
98
+ msgstr "Baixar o PDF"
99
+
100
+ #: includes/class-wcpdf-settings.php:191
101
+ msgid "Open the PDF in a new browser tab/window"
102
+ msgstr "Abrir o PDF em uma nova aba/janela"
103
+
104
+ #: includes/class-wcpdf-settings.php:201
105
+ msgid "Attach invoice to:"
106
+ msgstr "Anexar Fatura para:"
107
+
108
+ #: includes/class-wcpdf-settings.php:209
109
+ msgid "Admin New Order email"
110
+ msgstr "Email de Novo Pedido do Administrador"
111
+
112
+ #: includes/class-wcpdf-settings.php:210
113
+ msgid "Customer Processing Order email"
114
+ msgstr "Email de Processando Ordem do Cliente"
115
+
116
+ #: includes/class-wcpdf-settings.php:211
117
+ msgid "Customer Completed Order email"
118
+ msgstr "Email de Pedido Completo do Cliente"
119
+
120
+ #: includes/class-wcpdf-settings.php:212
121
+ msgid "Customer Invoice email"
122
+ msgstr "Email de Fatura do Cliente"
123
+
124
+ #: includes/class-wcpdf-settings.php:214
125
+ #, php-format
126
+ msgid ""
127
+ "It looks like the temp folder (<code>%s</code>) is not writable, check the "
128
+ "permissions for this folder! Without having write access to this folder, the "
129
+ "plugin will not be able to email invoices."
130
+ msgstr ""
131
+ "Parece que a pasta temporária (<code>%s</code>) não tem permissão de "
132
+ "escrita! Sem a permissão de escrita nessa pasta o plugin não poderá enviar "
133
+ "as faturas por email."
134
+
135
+ #: includes/class-wcpdf-settings.php:220
136
+ msgid "Enable invoice number column in the orders list"
137
+ msgstr "Permitir coluna do número da Fatura na lista de Pedidos"
138
+
139
+ #: includes/class-wcpdf-settings.php:259
140
+ msgid "PDF Template settings"
141
+ msgstr "Opções do Template em PDF"
142
+
143
+ #: includes/class-wcpdf-settings.php:266
144
+ msgid "Choose a template"
145
+ msgstr "Escolha um modelo"
146
+
147
+ #: includes/class-wcpdf-settings.php:274
148
+ msgid ""
149
+ "Want to use your own template? Copy all the files from <code>woocommerce-pdf-"
150
+ "invoices-packing-slips/templates/pdf/Simple/</code> to <code>yourtheme/"
151
+ "woocommerce/pdf/yourtemplate/</code> to customize them"
152
+ msgstr ""
153
+ "Quer usar o seu próprio modelo? Copie todos os arquivos de <code>woocommerce-"
154
+ "pdf-invoices-packing-slips/templates/pdf/Simple/</code> para <code>seutema/"
155
+ "woocommerce/pdf/seumodelo/</code> para personalizar ele"
156
+
157
+ #: includes/class-wcpdf-settings.php:280
158
+ msgid "Paper size"
159
+ msgstr "Tamanho do Papel"
160
+
161
+ #: includes/class-wcpdf-settings.php:288
162
+ msgid "A4"
163
+ msgstr "A4"
164
+
165
+ #: includes/class-wcpdf-settings.php:289
166
+ msgid "Letter"
167
+ msgstr "Carta"
168
+
169
+ #: includes/class-wcpdf-settings.php:296
170
+ msgid "Shop header/logo"
171
+ msgstr "Logo/Cabeçalho do Loja"
172
+
173
+ #: includes/class-wcpdf-settings.php:303
174
+ msgid "Select or upload your invoice header/logo"
175
+ msgstr "Selecione ou envie o seu logo/cabeçalho"
176
+
177
+ #: includes/class-wcpdf-settings.php:304
178
+ msgid "Set image"
179
+ msgstr "Definir Imagem"
180
+
181
+ #: includes/class-wcpdf-settings.php:305
182
+ msgid "Remove image"
183
+ msgstr "Remover Imagem"
184
+
185
+ #: includes/class-wcpdf-settings.php:312
186
+ msgid "Shop Name"
187
+ msgstr "Nome da Loja"
188
+
189
+ #: includes/class-wcpdf-settings.php:325
190
+ msgid "Shop Address"
191
+ msgstr "Endereço da Loja"
192
+
193
+ #: includes/class-wcpdf-settings.php:357
194
+ msgid "Footer: terms & conditions, policies, etc."
195
+ msgstr "Rodapé: Termos e condições, políticas, etc..."
196
+
197
+ #: includes/class-wcpdf-settings.php:372
198
+ msgid "Number to display on invoice"
199
+ msgstr "Número a ser mostrado na fatura"
200
+
201
+ #: includes/class-wcpdf-settings.php:380
202
+ msgid "WooCommerce order number"
203
+ msgstr "Número do Pedido do WooCommerce"
204
+
205
+ #: includes/class-wcpdf-settings.php:381
206
+ msgid "Built-in sequential invoice number"
207
+ msgstr "Número da Fatura sequencial embutida"
208
+
209
+ #: includes/class-wcpdf-settings.php:383
210
+ msgid ""
211
+ "If you are using the WooCommerce Sequential Order Numbers plugin, select the "
212
+ "WooCommerce order number"
213
+ msgstr ""
214
+ "Se você estiver usando o plugin de Sequência Numérica de Pedidos do "
215
+ "WooCommerce, por favor selecione o número do pedido do WooCommerce."
216
+
217
+ #: includes/class-wcpdf-settings.php:389
218
+ msgid "Next invoice number (without prefix/suffix etc.)"
219
+ msgstr "Próximo número da fatura (sem prefixo/sufixo etc.)"
220
+
221
+ #: includes/class-wcpdf-settings.php:397
222
+ msgid ""
223
+ "This is the number that will be used on the next invoice that is created. By "
224
+ "default, numbering starts from the WooCommerce Order Number of the first "
225
+ "invoice that is created and increases for every new invoice. Note that if "
226
+ "you override this and set it lower than the highest (PDF) invoice number, "
227
+ "this could create double invoice numbers!"
228
+ msgstr ""
229
+ "Esse é o numero que será usado na próxima fatura que for criada. Por padrão, "
230
+ "o primeiro número começa do número de pedido do WooCommerce da primeira "
231
+ "fatura gerada e depois é incrementado para cada nova fatura. Note que se "
232
+ "você sobrescrever isso e definir um número menor que o atual pode criar "
233
+ "duplicidades nas faturas!"
234
+
235
+ #: includes/class-wcpdf-settings.php:403
236
+ msgid "Invoice number format"
237
+ msgstr "Formato do Número da Fatura"
238
+
239
+ #: includes/class-wcpdf-settings.php:412
240
+ msgid "Prefix"
241
+ msgstr "Prefixo"
242
+
243
+ #: includes/class-wcpdf-settings.php:414
244
+ msgid ""
245
+ "to use the order year and/or month, use [order_year] or [order_month] "
246
+ "respectively"
247
+ msgstr ""
248
+ "para usar o ano e/ou o mês do pedido, use [order_year] ou [order_month] "
249
+ "respectivamente"
250
+
251
+ #: includes/class-wcpdf-settings.php:417
252
+ msgid "Suffix"
253
+ msgstr "Sufixo"
254
+
255
+ #: includes/class-wcpdf-settings.php:422
256
+ msgid "Padding"
257
+ msgstr "Margem"
258
+
259
+ #: includes/class-wcpdf-settings.php:424
260
+ msgid "enter the number of digits here - enter \"6\" to display 42 as 000042"
261
+ msgstr ""
262
+ "insira o número de dígitos aqui - insira \"6\" para mostra 42 como 000042"
263
+
264
+ #: includes/class-wcpdf-settings.php:427
265
+ msgid ""
266
+ "note: if you have already created a custom invoice number format with a "
267
+ "filter, the above settings will be ignored"
268
+ msgstr ""
269
+ "nota: se você já criou um formato de número personalizado de fatura com um "
270
+ "filtro, as opções acima serão ignoradas"
271
+
272
+ #: includes/class-wcpdf-settings.php:435
273
+ msgid "Date to display on invoice"
274
+ msgstr "Data para mostrar na fatura"
275
+
276
+ #: includes/class-wcpdf-settings.php:443
277
+ msgid "Order date"
278
+ msgstr "Data do Pedido"
279
+
280
+ #: includes/class-wcpdf-settings.php:444
281
+ msgid "Invoice date"
282
+ msgstr "Data da Fatura"
283
+
284
+ #: includes/class-wcpdf-settings.php:452
285
+ msgid "Extra template fields"
286
+ msgstr "Campos Extras de Modelos"
287
+
288
+ #: includes/class-wcpdf-settings.php:459
289
+ msgid "Extra field 1"
290
+ msgstr "Campo extra 1"
291
+
292
+ #: includes/class-wcpdf-settings.php:468
293
+ msgid "This is footer column 1 in the <i>Modern (Premium)</i> template"
294
+ msgstr "Essa é a primeira coluna do rodapé"
295
+
296
+ #: includes/class-wcpdf-settings.php:474
297
+ msgid "Extra field 2"
298
+ msgstr "Campo extra 2"
299
+
300
+ #: includes/class-wcpdf-settings.php:483
301
+ msgid "This is footer column 2 in the <i>Modern (Premium)</i> template"
302
+ msgstr "Essa é a primeira coluna do rodapé"
303
+
304
+ #: includes/class-wcpdf-settings.php:489
305
+ msgid "Extra field 3"
306
+ msgstr "Campo extra 3"
307
+
308
+ #: includes/class-wcpdf-settings.php:498
309
+ msgid "This is footer column 3 in the <i>Modern (Premium)</i> template"
310
+ msgstr "Essa é a primeira coluna do rodapé"
311
+
312
+ #: includes/class-wcpdf-settings.php:755
313
+ msgid "Image resolution"
314
+ msgstr "Resolução da Imagem"
315
+
316
+ #: includes/class-wcpdf-settings.php:822
317
+ msgid ""
318
+ "These are used for the (optional) footer columns in the <em>Modern "
319
+ "(Premium)</em> template, but can also be used for other elements in your "
320
+ "custom template"
321
+ msgstr ""
322
+ "Esses são usados para colunas opcionais do rodapé no modelo <em>Premium</"
323
+ "em>, mas também podem ser usados no seu modelo personalizado"
324
+
325
+ #: includes/class-wcpdf-writepanels.php:102
326
+ msgid "Invoice Number"
327
+ msgstr "Número da Fatura"
328
+
329
+ #: includes/class-wcpdf-writepanels.php:139
330
+ msgid "Download invoice (PDF)"
331
+ msgstr "Baixar Fatura (PDF)"
332
+
333
+ #: includes/class-wcpdf-writepanels.php:150
334
+ msgid "Create PDF"
335
+ msgstr "Criar PDF"
336
+
337
+ #: includes/class-wcpdf-writepanels.php:160
338
+ msgid "PDF invoice"
339
+ msgstr "Fatura em PDF"
340
+
341
+ #: includes/class-wcpdf-writepanels.php:161
342
+ msgid "PDF Packing Slip"
343
+ msgstr "Etiqueta do Pacote em PDF"
344
+
345
+ #: includes/class-wcpdf-writepanels.php:178
346
+ #: includes/class-wcpdf-writepanels.php:179
347
+ msgid "PDF Packing Slips"
348
+ msgstr "Etiquetas do Pacote em PDF"
349
+
350
+ #: includes/class-wcpdf-writepanels.php:192
351
+ msgid "PDF Invoice Number (unformatted!)"
352
+ msgstr "Número da Fatura em PDF (não formatado!)"
353
+
354
+ #: includes/class-wcpdf-writepanels.php:195
355
+ msgid "Invoice date:"
356
+ msgstr "Data da Fatura:"
357
+
358
+ #: includes/class-wcpdf-writepanels.php:196
359
+ msgid "h"
360
+ msgstr "h"
361
+
362
+ #: includes/class-wcpdf-writepanels.php:196
363
+ msgid "m"
364
+ msgstr "m"
365
+
366
+ #: templates/pdf/Simple/html-document-wrapper.php:6
367
+ #: templates/pdf/Simple/invoice.php:9 templates/pdf/Simple/invoice.php:21
368
+ msgid "Invoice"
369
+ msgstr "Fatura"
370
+
371
+ #: templates/pdf/Simple/html-document-wrapper.php:6
372
+ #: templates/pdf/Simple/packing-slip.php:9
373
+ #: templates/pdf/Simple/packing-slip.php:21
374
+ msgid "Packing Slip"
375
+ msgstr "Etiqueta do pacote"
376
+
377
+ #: templates/pdf/Simple/invoice.php:37
378
+ msgid "Invoice Date:"
379
+ msgstr "Data da Fatura:"
380
+
381
+ #: templates/pdf/Simple/invoice.php:40
382
+ #: templates/pdf/Simple/packing-slip.php:30
383
+ msgid "Order Date:"
384
+ msgstr "Data do Pedido:"
385
+
386
+ #: templates/pdf/Simple/invoice.php:46
387
+ msgid "Invoice Number:"
388
+ msgstr "Número da Fatura:"
389
+
390
+ #: templates/pdf/Simple/invoice.php:49
391
+ #: templates/pdf/Simple/packing-slip.php:32
392
+ msgid "Order Number:"
393
+ msgstr "Número do Pedido:"
394
+
395
+ #: templates/pdf/Simple/invoice.php:56
396
+ msgid "Payment Method:"
397
+ msgstr "Método de Pagamento:"
398
+
399
+ #: templates/pdf/Simple/invoice.php:69
400
+ #: templates/pdf/Simple/packing-slip.php:45
401
+ msgid "Product"
402
+ msgstr "Produto"
403
+
404
+ #: templates/pdf/Simple/invoice.php:70
405
+ #: templates/pdf/Simple/packing-slip.php:46
406
+ msgid "Quantity"
407
+ msgstr "Quantidade"
408
+
409
+ #: templates/pdf/Simple/invoice.php:71
410
+ msgid "Price"
411
+ msgstr "Preço"
412
+
413
+ #: templates/pdf/Simple/invoice.php:77
414
+ msgid "Description"
415
+ msgstr "Descrição"
416
+
417
+ #: templates/pdf/Simple/invoice.php:80
418
+ msgid "SKU"
419
+ msgstr "SKU"
420
+
421
+ #: templates/pdf/Simple/invoice.php:81
422
+ #: templates/pdf/Simple/packing-slip.php:54
423
+ msgid "SKU:"
424
+ msgstr "SKU:"
425
+
426
+ #: templates/pdf/Simple/invoice.php:82
427
+ #: templates/pdf/Simple/packing-slip.php:55
428
+ msgid "Weight:"
429
+ msgstr "Peso:"
430
+
431
+ #: templates/pdf/Simple/invoice.php:114
432
+ #: templates/pdf/Simple/packing-slip.php:69
433
+ msgid "Customer Notes"
434
+ msgstr "Notas do Cliente"
435
+
436
+ #: woocommerce-pdf-invoices-packingslips.php:96
437
+ #, php-format
438
+ msgid ""
439
+ "WooCommerce PDF Invoices & Packing Slips requires %sWooCommerce%s to be "
440
+ "installed & activated!"
441
+ msgstr ""
442
+ "WooCommerce PDF Invoices & Packing Slips precisa do %sWooCommerce%s "
443
+ "instalado e ativado para funcionar!"
444
+
445
+ #: woocommerce-pdf-invoices-packingslips.php:191
446
+ #: woocommerce-pdf-invoices-packingslips.php:227
447
+ msgid "N/A"
448
+ msgstr "N/A"
449
+
450
+ #: woocommerce-pdf-invoices-packingslips.php:264
451
+ msgid "Payment method"
452
+ msgstr "Método de Pagamento"
453
+
454
+ #: woocommerce-pdf-invoices-packingslips.php:275
455
+ msgid "Shipping method"
456
+ msgstr "Método de Entrega"
457
+
458
+ #: woocommerce-pdf-invoices-packingslips.php:375
459
+ msgid "Subtotal"
460
+ msgstr "Sub-total"
461
+
462
+ #: woocommerce-pdf-invoices-packingslips.php:397
463
+ msgid "Shipping"
464
+ msgstr "Frete"
465
+
466
+ #: woocommerce-pdf-invoices-packingslips.php:431
467
+ msgid "Discount"
468
+ msgstr "Desconto"
469
+
470
+ #: woocommerce-pdf-invoices-packingslips.php:470
471
+ msgid "VAT"
472
+ msgstr "Impostos"
473
+
474
+ #: woocommerce-pdf-invoices-packingslips.php:507
475
+ msgid "Total ex. VAT"
476
+ msgstr "Total s/ impostos"
477
+
478
+ #: woocommerce-pdf-invoices-packingslips.php:510
479
+ msgid "Total"
480
+ msgstr "Total"
languages/wpo_wcpdf.pot CHANGED
@@ -1,123 +1,122 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WooCommerce PDF Invoices & Packing Slips\n"
4
- "POT-Creation-Date: 2014-09-18 15:11+0100\n"
5
- "PO-Revision-Date: 2014-09-18 15:11+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: WP Overnight <support@wpovernight.com>\n"
8
  "Language: en_US\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.6.9\n"
13
  "X-Poedit-Basepath: ../\n"
14
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-KeywordsList: __;_e;_x;_n:1,2\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
 
19
- #: includes/class-wcpdf-export.php:168 includes/class-wcpdf-export.php:173
20
- #: includes/class-wcpdf-export.php:178 includes/class-wcpdf-export.php:189
21
- #: includes/class-wcpdf-export.php:202
22
  msgid "You do not have sufficient permissions to access this page."
23
  msgstr ""
24
 
25
  # This is a filename (prefix). do not use spaces or special characters!
26
- #: includes/class-wcpdf-export.php:223 includes/class-wcpdf-export.php:303
27
  msgid "invoice"
28
  msgid_plural "invoices"
29
  msgstr[0] ""
30
  msgstr[1] ""
31
 
32
  # This is a filename (prefix). do not use spaces or special characters!
33
- #: includes/class-wcpdf-export.php:225
34
  msgid "packing-slip"
35
  msgid_plural "packing-slips"
36
  msgstr[0] ""
37
  msgstr[1] ""
38
 
39
- #: includes/class-wcpdf-settings.php:36 includes/class-wcpdf-settings.php:37
40
- #: includes/class-wcpdf-writepanels.php:176
41
- #: includes/class-wcpdf-writepanels.php:177
42
  msgid "PDF Invoices"
43
  msgstr ""
44
 
45
- #: includes/class-wcpdf-settings.php:60
46
  msgid "Settings"
47
  msgstr ""
48
 
49
- #: includes/class-wcpdf-settings.php:82
50
  msgid "General"
51
  msgstr ""
52
 
53
- #: includes/class-wcpdf-settings.php:83
54
  msgid "Template"
55
  msgstr ""
56
 
57
- #: includes/class-wcpdf-settings.php:92
58
  msgid "WooCommerce PDF Invoices"
59
  msgstr ""
60
 
61
- #: includes/class-wcpdf-settings.php:98
62
  msgid "Status"
63
  msgstr ""
64
 
65
- #: includes/class-wcpdf-settings.php:109
66
  #, php-format
67
  msgid ""
68
  "Upload all invoices automatically to your dropbox!<br/>Check out the %s "
69
  "extension."
70
  msgstr ""
71
 
72
- #: includes/class-wcpdf-settings.php:119
73
  #, php-format
74
  msgid ""
75
  "Looking for more advanced templates? Check out the Premium PDF Invoice & "
76
  "Packing Slips templates at %s."
77
  msgstr ""
78
 
79
- #: includes/class-wcpdf-settings.php:120
80
  #, php-format
81
  msgid "For custom templates, contact us at %s."
82
  msgstr ""
83
 
84
- #: includes/class-wcpdf-settings.php:175
85
  msgid "General settings"
86
  msgstr ""
87
 
88
- #: includes/class-wcpdf-settings.php:182
89
  msgid "How do you want to view the PDF?"
90
  msgstr ""
91
 
92
- #: includes/class-wcpdf-settings.php:190
93
  msgid "Download the PDF"
94
  msgstr ""
95
 
96
- #: includes/class-wcpdf-settings.php:191
97
  msgid "Open the PDF in a new browser tab/window"
98
  msgstr ""
99
 
100
- #: includes/class-wcpdf-settings.php:201
101
  msgid "Attach invoice to:"
102
  msgstr ""
103
 
104
- #: includes/class-wcpdf-settings.php:209
105
  msgid "Admin New Order email"
106
  msgstr ""
107
 
108
- #: includes/class-wcpdf-settings.php:210
109
  msgid "Customer Processing Order email"
110
  msgstr ""
111
 
112
- #: includes/class-wcpdf-settings.php:211
113
  msgid "Customer Completed Order email"
114
  msgstr ""
115
 
116
- #: includes/class-wcpdf-settings.php:212
117
  msgid "Customer Invoice email"
118
  msgstr ""
119
 
120
- #: includes/class-wcpdf-settings.php:214
121
  #, php-format
122
  msgid ""
123
  "It looks like the temp folder (<code>%s</code>) is not writable, check the "
@@ -125,88 +124,78 @@ msgid ""
125
  "plugin will not be able to email invoices."
126
  msgstr ""
127
 
128
- #: includes/class-wcpdf-settings.php:220
129
  msgid "Enable invoice number column in the orders list"
130
  msgstr ""
131
 
132
- #: includes/class-wcpdf-settings.php:259
133
  msgid "PDF Template settings"
134
  msgstr ""
135
 
136
- #: includes/class-wcpdf-settings.php:271
137
  msgid "Choose a template"
138
  msgstr ""
139
 
140
- #: includes/class-wcpdf-settings.php:279
141
  #, php-format
142
  msgid ""
143
  "Want to use your own template? Copy all the files from <code>%s</code> to "
144
  "<code>%s</code> to customize them"
145
  msgstr ""
146
 
147
- #: includes/class-wcpdf-settings.php:285
148
  msgid "Paper size"
149
  msgstr ""
150
 
151
- #: includes/class-wcpdf-settings.php:293
152
  msgid "A4"
153
  msgstr ""
154
 
155
- #: includes/class-wcpdf-settings.php:294
156
  msgid "Letter"
157
  msgstr ""
158
 
159
- #: includes/class-wcpdf-settings.php:301
160
  msgid "Shop header/logo"
161
  msgstr ""
162
 
163
- #: includes/class-wcpdf-settings.php:308
164
  msgid "Select or upload your invoice header/logo"
165
  msgstr ""
166
 
167
- #: includes/class-wcpdf-settings.php:309
168
  msgid "Set image"
169
  msgstr ""
170
 
171
- #: includes/class-wcpdf-settings.php:310
172
  msgid "Remove image"
173
  msgstr ""
174
 
175
- #: includes/class-wcpdf-settings.php:317
176
  msgid "Shop Name"
177
  msgstr ""
178
 
179
- #: includes/class-wcpdf-settings.php:330
180
  msgid "Shop Address"
181
  msgstr ""
182
 
183
- #: includes/class-wcpdf-settings.php:362
184
  msgid "Footer: terms & conditions, policies, etc."
185
  msgstr ""
186
 
187
- #: includes/class-wcpdf-settings.php:377
188
- msgid "Number to display on invoice"
189
- msgstr ""
190
-
191
- #: includes/class-wcpdf-settings.php:385
192
- msgid "WooCommerce order number"
193
- msgstr ""
194
-
195
  #: includes/class-wcpdf-settings.php:386
196
- msgid "Built-in sequential invoice number"
197
  msgstr ""
198
 
199
- #: includes/class-wcpdf-settings.php:388
200
- msgid ""
201
- "If you are using the WooCommerce Sequential Order Numbers plugin, select the "
202
- "WooCommerce order number"
203
  msgstr ""
204
 
205
- #: includes/class-wcpdf-settings.php:394
206
  msgid "Next invoice number (without prefix/suffix etc.)"
207
  msgstr ""
208
 
209
- #: includes/class-wcpdf-settings.php:402
210
  msgid ""
211
  "This is the number that will be used on the next invoice that is created. By "
212
  "default, numbering starts from the WooCommerce Order Number of the first "
@@ -215,50 +204,38 @@ msgid ""
215
  "this could create double invoice numbers!"
216
  msgstr ""
217
 
218
- #: includes/class-wcpdf-settings.php:408
219
  msgid "Invoice number format"
220
  msgstr ""
221
 
222
- #: includes/class-wcpdf-settings.php:417
223
  msgid "Prefix"
224
  msgstr ""
225
 
226
- #: includes/class-wcpdf-settings.php:419
227
  msgid ""
228
  "to use the order year and/or month, use [order_year] or [order_month] "
229
  "respectively"
230
  msgstr ""
231
 
232
- #: includes/class-wcpdf-settings.php:422
233
  msgid "Suffix"
234
  msgstr ""
235
 
236
- #: includes/class-wcpdf-settings.php:427
237
  msgid "Padding"
238
  msgstr ""
239
 
240
- #: includes/class-wcpdf-settings.php:429
241
  msgid "enter the number of digits here - enter \"6\" to display 42 as 000042"
242
  msgstr ""
243
 
244
- #: includes/class-wcpdf-settings.php:432
245
  msgid ""
246
  "note: if you have already created a custom invoice number format with a "
247
  "filter, the above settings will be ignored"
248
  msgstr ""
249
 
250
- #: includes/class-wcpdf-settings.php:440
251
- msgid "Date to display on invoice"
252
- msgstr ""
253
-
254
- #: includes/class-wcpdf-settings.php:448
255
- msgid "Order date"
256
- msgstr ""
257
-
258
- #: includes/class-wcpdf-settings.php:449
259
- msgid "Invoice date"
260
- msgstr ""
261
-
262
  #: includes/class-wcpdf-settings.php:457
263
  msgid "Extra template fields"
264
  msgstr ""
@@ -287,56 +264,55 @@ msgstr ""
287
  msgid "This is footer column 3 in the <i>Modern (Premium)</i> template"
288
  msgstr ""
289
 
290
- #: includes/class-wcpdf-settings.php:760
291
  msgid "Image resolution"
292
  msgstr ""
293
 
294
- #: includes/class-wcpdf-settings.php:871
295
  msgid ""
296
  "These are used for the (optional) footer columns in the <em>Modern "
297
  "(Premium)</em> template, but can also be used for other elements in your "
298
  "custom template"
299
  msgstr ""
300
 
301
- #: includes/class-wcpdf-writepanels.php:102
 
 
 
 
302
  msgid "Invoice Number"
303
  msgstr ""
304
 
305
- #: includes/class-wcpdf-writepanels.php:139
306
  msgid "Download invoice (PDF)"
307
  msgstr ""
308
 
309
- #: includes/class-wcpdf-writepanels.php:150
310
  msgid "Create PDF"
311
  msgstr ""
312
 
313
- #: includes/class-wcpdf-writepanels.php:160
314
- msgid "PDF invoice"
315
  msgstr ""
316
 
317
- #: includes/class-wcpdf-writepanels.php:161
318
  msgid "PDF Packing Slip"
319
  msgstr ""
320
 
321
- #: includes/class-wcpdf-writepanels.php:178
322
- #: includes/class-wcpdf-writepanels.php:179
323
- msgid "PDF Packing Slips"
324
- msgstr ""
325
-
326
- #: includes/class-wcpdf-writepanels.php:192
327
  msgid "PDF Invoice Number (unformatted!)"
328
  msgstr ""
329
 
330
- #: includes/class-wcpdf-writepanels.php:195
331
- #: templates/pdf/Simple/invoice.php:37
332
  msgid "Invoice Date:"
333
  msgstr ""
334
 
335
- #: includes/class-wcpdf-writepanels.php:196
336
  msgid "h"
337
  msgstr ""
338
 
339
- #: includes/class-wcpdf-writepanels.php:196
340
  msgid "m"
341
  msgstr ""
342
 
@@ -351,101 +327,101 @@ msgstr ""
351
  msgid "Packing Slip"
352
  msgstr ""
353
 
354
- #: templates/pdf/Simple/invoice.php:40
355
- #: templates/pdf/Simple/packing-slip.php:30
356
- msgid "Order Date:"
357
- msgstr ""
358
-
359
- #: templates/pdf/Simple/invoice.php:46
360
  msgid "Invoice Number:"
361
  msgstr ""
362
 
363
- #: templates/pdf/Simple/invoice.php:49
364
- #: templates/pdf/Simple/packing-slip.php:32
365
  msgid "Order Number:"
366
  msgstr ""
367
 
368
- #: templates/pdf/Simple/invoice.php:56
 
 
 
 
 
369
  msgid "Payment Method:"
370
  msgstr ""
371
 
372
- #: templates/pdf/Simple/invoice.php:69
373
- #: templates/pdf/Simple/packing-slip.php:45
374
  msgid "Product"
375
  msgstr ""
376
 
377
- #: templates/pdf/Simple/invoice.php:70
378
- #: templates/pdf/Simple/packing-slip.php:46
379
  msgid "Quantity"
380
  msgstr ""
381
 
382
- #: templates/pdf/Simple/invoice.php:71
383
  msgid "Price"
384
  msgstr ""
385
 
386
- #: templates/pdf/Simple/invoice.php:77
387
  msgid "Description"
388
  msgstr ""
389
 
390
- #: templates/pdf/Simple/invoice.php:80
391
  msgid "SKU"
392
  msgstr ""
393
 
394
- #: templates/pdf/Simple/invoice.php:81
395
- #: templates/pdf/Simple/packing-slip.php:54
396
  msgid "SKU:"
397
  msgstr ""
398
 
399
- #: templates/pdf/Simple/invoice.php:82
400
- #: templates/pdf/Simple/packing-slip.php:55
401
  msgid "Weight:"
402
  msgstr ""
403
 
404
- #: templates/pdf/Simple/invoice.php:114
405
- #: templates/pdf/Simple/packing-slip.php:69
406
  msgid "Customer Notes"
407
  msgstr ""
408
 
409
- #: woocommerce-pdf-invoices-packingslips.php:96
410
  #, php-format
411
  msgid ""
412
  "WooCommerce PDF Invoices & Packing Slips requires %sWooCommerce%s to be "
413
  "installed & activated!"
414
  msgstr ""
415
 
416
- #: woocommerce-pdf-invoices-packingslips.php:191
417
- #: woocommerce-pdf-invoices-packingslips.php:227
418
  msgid "N/A"
419
  msgstr ""
420
 
421
- #: woocommerce-pdf-invoices-packingslips.php:264
422
  msgid "Payment method"
423
  msgstr ""
424
 
425
- #: woocommerce-pdf-invoices-packingslips.php:275
426
  msgid "Shipping method"
427
  msgstr ""
428
 
429
- #: woocommerce-pdf-invoices-packingslips.php:375
430
  msgid "Subtotal"
431
  msgstr ""
432
 
433
- #: woocommerce-pdf-invoices-packingslips.php:397
434
  msgid "Shipping"
435
  msgstr ""
436
 
437
- #: woocommerce-pdf-invoices-packingslips.php:431
438
  msgid "Discount"
439
  msgstr ""
440
 
441
- #: woocommerce-pdf-invoices-packingslips.php:470
442
  msgid "VAT"
443
  msgstr ""
444
 
445
- #: woocommerce-pdf-invoices-packingslips.php:507
446
  msgid "Total ex. VAT"
447
  msgstr ""
448
 
449
- #: woocommerce-pdf-invoices-packingslips.php:510
450
  msgid "Total"
451
  msgstr ""
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WooCommerce PDF Invoices & Packing Slips\n"
4
+ "POT-Creation-Date: 2014-10-27 09:23+0100\n"
5
+ "PO-Revision-Date: 2014-10-27 09:24+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: WP Overnight <support@wpovernight.com>\n"
8
  "Language: en_US\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.6.10\n"
13
  "X-Poedit-Basepath: ../\n"
14
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-KeywordsList: __;_e;_x;_n:1,2\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
 
19
+ #: includes/class-wcpdf-export.php:175 includes/class-wcpdf-export.php:180
20
+ #: includes/class-wcpdf-export.php:185 includes/class-wcpdf-export.php:196
21
+ #: includes/class-wcpdf-export.php:204
22
  msgid "You do not have sufficient permissions to access this page."
23
  msgstr ""
24
 
25
  # This is a filename (prefix). do not use spaces or special characters!
26
+ #: includes/class-wcpdf-export.php:263
27
  msgid "invoice"
28
  msgid_plural "invoices"
29
  msgstr[0] ""
30
  msgstr[1] ""
31
 
32
  # This is a filename (prefix). do not use spaces or special characters!
33
+ #: includes/class-wcpdf-export.php:267
34
  msgid "packing-slip"
35
  msgid_plural "packing-slips"
36
  msgstr[0] ""
37
  msgstr[1] ""
38
 
39
+ #: includes/class-wcpdf-settings.php:38 includes/class-wcpdf-settings.php:39
40
+ #: includes/class-wcpdf-writepanels.php:31
 
41
  msgid "PDF Invoices"
42
  msgstr ""
43
 
44
+ #: includes/class-wcpdf-settings.php:69
45
  msgid "Settings"
46
  msgstr ""
47
 
48
+ #: includes/class-wcpdf-settings.php:91
49
  msgid "General"
50
  msgstr ""
51
 
52
+ #: includes/class-wcpdf-settings.php:92
53
  msgid "Template"
54
  msgstr ""
55
 
56
+ #: includes/class-wcpdf-settings.php:101
57
  msgid "WooCommerce PDF Invoices"
58
  msgstr ""
59
 
60
+ #: includes/class-wcpdf-settings.php:107
61
  msgid "Status"
62
  msgstr ""
63
 
64
+ #: includes/class-wcpdf-settings.php:118
65
  #, php-format
66
  msgid ""
67
  "Upload all invoices automatically to your dropbox!<br/>Check out the %s "
68
  "extension."
69
  msgstr ""
70
 
71
+ #: includes/class-wcpdf-settings.php:128
72
  #, php-format
73
  msgid ""
74
  "Looking for more advanced templates? Check out the Premium PDF Invoice & "
75
  "Packing Slips templates at %s."
76
  msgstr ""
77
 
78
+ #: includes/class-wcpdf-settings.php:129
79
  #, php-format
80
  msgid "For custom templates, contact us at %s."
81
  msgstr ""
82
 
83
+ #: includes/class-wcpdf-settings.php:184
84
  msgid "General settings"
85
  msgstr ""
86
 
87
+ #: includes/class-wcpdf-settings.php:191
88
  msgid "How do you want to view the PDF?"
89
  msgstr ""
90
 
91
+ #: includes/class-wcpdf-settings.php:199
92
  msgid "Download the PDF"
93
  msgstr ""
94
 
95
+ #: includes/class-wcpdf-settings.php:200
96
  msgid "Open the PDF in a new browser tab/window"
97
  msgstr ""
98
 
99
+ #: includes/class-wcpdf-settings.php:210
100
  msgid "Attach invoice to:"
101
  msgstr ""
102
 
103
+ #: includes/class-wcpdf-settings.php:218
104
  msgid "Admin New Order email"
105
  msgstr ""
106
 
107
+ #: includes/class-wcpdf-settings.php:219
108
  msgid "Customer Processing Order email"
109
  msgstr ""
110
 
111
+ #: includes/class-wcpdf-settings.php:220
112
  msgid "Customer Completed Order email"
113
  msgstr ""
114
 
115
+ #: includes/class-wcpdf-settings.php:221
116
  msgid "Customer Invoice email"
117
  msgstr ""
118
 
119
+ #: includes/class-wcpdf-settings.php:223
120
  #, php-format
121
  msgid ""
122
  "It looks like the temp folder (<code>%s</code>) is not writable, check the "
124
  "plugin will not be able to email invoices."
125
  msgstr ""
126
 
127
+ #: includes/class-wcpdf-settings.php:229
128
  msgid "Enable invoice number column in the orders list"
129
  msgstr ""
130
 
131
+ #: includes/class-wcpdf-settings.php:268
132
  msgid "PDF Template settings"
133
  msgstr ""
134
 
135
+ #: includes/class-wcpdf-settings.php:280
136
  msgid "Choose a template"
137
  msgstr ""
138
 
139
+ #: includes/class-wcpdf-settings.php:288
140
  #, php-format
141
  msgid ""
142
  "Want to use your own template? Copy all the files from <code>%s</code> to "
143
  "<code>%s</code> to customize them"
144
  msgstr ""
145
 
146
+ #: includes/class-wcpdf-settings.php:294
147
  msgid "Paper size"
148
  msgstr ""
149
 
150
+ #: includes/class-wcpdf-settings.php:302
151
  msgid "A4"
152
  msgstr ""
153
 
154
+ #: includes/class-wcpdf-settings.php:303
155
  msgid "Letter"
156
  msgstr ""
157
 
158
+ #: includes/class-wcpdf-settings.php:310
159
  msgid "Shop header/logo"
160
  msgstr ""
161
 
162
+ #: includes/class-wcpdf-settings.php:317
163
  msgid "Select or upload your invoice header/logo"
164
  msgstr ""
165
 
166
+ #: includes/class-wcpdf-settings.php:318
167
  msgid "Set image"
168
  msgstr ""
169
 
170
+ #: includes/class-wcpdf-settings.php:319
171
  msgid "Remove image"
172
  msgstr ""
173
 
174
+ #: includes/class-wcpdf-settings.php:326
175
  msgid "Shop Name"
176
  msgstr ""
177
 
178
+ #: includes/class-wcpdf-settings.php:339
179
  msgid "Shop Address"
180
  msgstr ""
181
 
182
+ #: includes/class-wcpdf-settings.php:371
183
  msgid "Footer: terms & conditions, policies, etc."
184
  msgstr ""
185
 
 
 
 
 
 
 
 
 
186
  #: includes/class-wcpdf-settings.php:386
187
+ msgid "Display invoice date"
188
  msgstr ""
189
 
190
+ #: includes/class-wcpdf-settings.php:399
191
+ msgid "Display built-in sequential invoice number"
 
 
192
  msgstr ""
193
 
194
+ #: includes/class-wcpdf-settings.php:412
195
  msgid "Next invoice number (without prefix/suffix etc.)"
196
  msgstr ""
197
 
198
+ #: includes/class-wcpdf-settings.php:420
199
  msgid ""
200
  "This is the number that will be used on the next invoice that is created. By "
201
  "default, numbering starts from the WooCommerce Order Number of the first "
204
  "this could create double invoice numbers!"
205
  msgstr ""
206
 
207
+ #: includes/class-wcpdf-settings.php:426
208
  msgid "Invoice number format"
209
  msgstr ""
210
 
211
+ #: includes/class-wcpdf-settings.php:435
212
  msgid "Prefix"
213
  msgstr ""
214
 
215
+ #: includes/class-wcpdf-settings.php:437
216
  msgid ""
217
  "to use the order year and/or month, use [order_year] or [order_month] "
218
  "respectively"
219
  msgstr ""
220
 
221
+ #: includes/class-wcpdf-settings.php:440
222
  msgid "Suffix"
223
  msgstr ""
224
 
225
+ #: includes/class-wcpdf-settings.php:445
226
  msgid "Padding"
227
  msgstr ""
228
 
229
+ #: includes/class-wcpdf-settings.php:447
230
  msgid "enter the number of digits here - enter \"6\" to display 42 as 000042"
231
  msgstr ""
232
 
233
+ #: includes/class-wcpdf-settings.php:450
234
  msgid ""
235
  "note: if you have already created a custom invoice number format with a "
236
  "filter, the above settings will be ignored"
237
  msgstr ""
238
 
 
 
 
 
 
 
 
 
 
 
 
 
239
  #: includes/class-wcpdf-settings.php:457
240
  msgid "Extra template fields"
241
  msgstr ""
264
  msgid "This is footer column 3 in the <i>Modern (Premium)</i> template"
265
  msgstr ""
266
 
267
+ #: includes/class-wcpdf-settings.php:761
268
  msgid "Image resolution"
269
  msgstr ""
270
 
271
+ #: includes/class-wcpdf-settings.php:872
272
  msgid ""
273
  "These are used for the (optional) footer columns in the <em>Modern "
274
  "(Premium)</em> template, but can also be used for other elements in your "
275
  "custom template"
276
  msgstr ""
277
 
278
+ #: includes/class-wcpdf-writepanels.php:32
279
+ msgid "PDF Packing Slips"
280
+ msgstr ""
281
+
282
+ #: includes/class-wcpdf-writepanels.php:123
283
  msgid "Invoice Number"
284
  msgstr ""
285
 
286
+ #: includes/class-wcpdf-writepanels.php:160
287
  msgid "Download invoice (PDF)"
288
  msgstr ""
289
 
290
+ #: includes/class-wcpdf-writepanels.php:171
291
  msgid "Create PDF"
292
  msgstr ""
293
 
294
+ #: includes/class-wcpdf-writepanels.php:184
295
+ msgid "PDF Invoice"
296
  msgstr ""
297
 
298
+ #: includes/class-wcpdf-writepanels.php:189
299
  msgid "PDF Packing Slip"
300
  msgstr ""
301
 
302
+ #: includes/class-wcpdf-writepanels.php:232
 
 
 
 
 
303
  msgid "PDF Invoice Number (unformatted!)"
304
  msgstr ""
305
 
306
+ #: includes/class-wcpdf-writepanels.php:235
307
+ #: templates/pdf/Simple/invoice.php:36
308
  msgid "Invoice Date:"
309
  msgstr ""
310
 
311
+ #: includes/class-wcpdf-writepanels.php:236
312
  msgid "h"
313
  msgstr ""
314
 
315
+ #: includes/class-wcpdf-writepanels.php:236
316
  msgid "m"
317
  msgstr ""
318
 
327
  msgid "Packing Slip"
328
  msgstr ""
329
 
330
+ #: templates/pdf/Simple/invoice.php:32
 
 
 
 
 
331
  msgid "Invoice Number:"
332
  msgstr ""
333
 
334
+ #: templates/pdf/Simple/invoice.php:39
335
+ #: templates/pdf/Simple/packing-slip.php:33
336
  msgid "Order Number:"
337
  msgstr ""
338
 
339
+ #: templates/pdf/Simple/invoice.php:41
340
+ #: templates/pdf/Simple/packing-slip.php:31
341
+ msgid "Order Date:"
342
+ msgstr ""
343
+
344
+ #: templates/pdf/Simple/invoice.php:43
345
  msgid "Payment Method:"
346
  msgstr ""
347
 
348
+ #: templates/pdf/Simple/invoice.php:56
349
+ #: templates/pdf/Simple/packing-slip.php:46
350
  msgid "Product"
351
  msgstr ""
352
 
353
+ #: templates/pdf/Simple/invoice.php:57
354
+ #: templates/pdf/Simple/packing-slip.php:47
355
  msgid "Quantity"
356
  msgstr ""
357
 
358
+ #: templates/pdf/Simple/invoice.php:58
359
  msgid "Price"
360
  msgstr ""
361
 
362
+ #: templates/pdf/Simple/invoice.php:64
363
  msgid "Description"
364
  msgstr ""
365
 
366
+ #: templates/pdf/Simple/invoice.php:67
367
  msgid "SKU"
368
  msgstr ""
369
 
370
+ #: templates/pdf/Simple/invoice.php:68
371
+ #: templates/pdf/Simple/packing-slip.php:55
372
  msgid "SKU:"
373
  msgstr ""
374
 
375
+ #: templates/pdf/Simple/invoice.php:69
376
+ #: templates/pdf/Simple/packing-slip.php:56
377
  msgid "Weight:"
378
  msgstr ""
379
 
380
+ #: templates/pdf/Simple/invoice.php:101
381
+ #: templates/pdf/Simple/packing-slip.php:70
382
  msgid "Customer Notes"
383
  msgstr ""
384
 
385
+ #: woocommerce-pdf-invoices-packingslips.php:98
386
  #, php-format
387
  msgid ""
388
  "WooCommerce PDF Invoices & Packing Slips requires %sWooCommerce%s to be "
389
  "installed & activated!"
390
  msgstr ""
391
 
392
+ #: woocommerce-pdf-invoices-packingslips.php:206
393
+ #: woocommerce-pdf-invoices-packingslips.php:269
394
  msgid "N/A"
395
  msgstr ""
396
 
397
+ #: woocommerce-pdf-invoices-packingslips.php:358
398
  msgid "Payment method"
399
  msgstr ""
400
 
401
+ #: woocommerce-pdf-invoices-packingslips.php:369
402
  msgid "Shipping method"
403
  msgstr ""
404
 
405
+ #: woocommerce-pdf-invoices-packingslips.php:484
406
  msgid "Subtotal"
407
  msgstr ""
408
 
409
+ #: woocommerce-pdf-invoices-packingslips.php:506
410
  msgid "Shipping"
411
  msgstr ""
412
 
413
+ #: woocommerce-pdf-invoices-packingslips.php:540
414
  msgid "Discount"
415
  msgstr ""
416
 
417
+ #: woocommerce-pdf-invoices-packingslips.php:579
418
  msgid "VAT"
419
  msgstr ""
420
 
421
+ #: woocommerce-pdf-invoices-packingslips.php:616
422
  msgid "Total ex. VAT"
423
  msgstr ""
424
 
425
+ #: woocommerce-pdf-invoices-packingslips.php:619
426
  msgid "Total"
427
  msgstr ""
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: pomegranate
3
  Tags: woocommerce, print, pdf, bulk, packing slips, invoices, delivery notes, invoice, packing slip, export, email
4
  Requires at least: 3.5 and WooCommerce 2.0
5
  Tested up to: 4.0 and WooCommerce 2.2
6
- Stable tag: 1.4.8
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -100,39 +100,33 @@ Where you replace 'custom_fieldname' with the name of the field you want to disp
100
  <?php $wpo_wcpdf->custom_field('custom_fieldname', 'Custom field:', true); ?>
101
  `
102
 
103
- = How do can I modify the pdf filename? =
104
-
105
- You can do this via a filter in your theme's `functions.php` (Some themes have a "custom functions" area in the settings).
106
-
107
- For the export filename (from the woocommerce admin or the my account page):
108
 
109
  `
110
- add_filter( 'wpo_wcpdf_bulk_filename', 'my_pdf_bulk_filename', 10, 4 );
111
- function my_pdf_bulk_filename( $filename, $order_ids, $template_name, $template_type ) {
112
- global $wpo_wcpdf;
113
- if (count($order_ids) == 1) {
114
- // single
115
- $invoice_number = $wpo_wcpdf->get_invoice_number();
116
- $filename = 'myshopname_' . $template_name . '-' . $invoice_number . '.pdf';
117
- } else {
118
- // multiple invoices/packing slips export
119
- // create your own rules/ be creative!
120
- }
121
 
122
- return $filename;
123
- }
 
124
  `
125
 
126
- For the email attachment filename:
 
 
 
127
  `
128
- add_filter( 'wpo_wcpdf_attachment_filename', 'my_pdf_attachment_filename', 10, 3 );
129
- function my_pdf_attachment_filename( $filename, $display_number, $order_id ) {
130
- //$display_number is either the order number or invoice number, according to your settings
131
- $filename = 'myshopname_invoice-' . $display_number . '.pdf';
132
 
133
  return $filename;
134
  }
135
  `
 
136
 
137
  = Why does the download link not display on the My Account page? =
138
  To prevent customers from prematurely creating invoices, the default setting is that a customer can only see/download an invoice from an order that already has an invoice - either created automatically for the email attachment, or manually by the shop manager. This means that ultimately the shop mananger determines whether an invoice is available to the customer. If you want to make the invoice available to everyone you can either of the following:
@@ -182,6 +176,14 @@ This usually only happens on batch actions. PDF creation is a memory intensive j
182
 
183
  == Changelog ==
184
 
 
 
 
 
 
 
 
 
185
  = 1.4.8 =
186
  * Translations: Added Finnish (Thanks Sami Mäkelä/Contrast.fi!)
187
 
3
  Tags: woocommerce, print, pdf, bulk, packing slips, invoices, delivery notes, invoice, packing slip, export, email
4
  Requires at least: 3.5 and WooCommerce 2.0
5
  Tested up to: 4.0 and WooCommerce 2.2
6
+ Stable tag: 1.4.9
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
100
  <?php $wpo_wcpdf->custom_field('custom_fieldname', 'Custom field:', true); ?>
101
  `
102
 
103
+ = How can I display order notes in the invoice or packing slip? =
104
+ First, you need to create a custom template following instructions from the first item in this FAQ.
105
+ Then place the following snippet where you would like the order notes to appear:
 
 
106
 
107
  `
108
+ <?php $wpo_wcpdf->order_notes(); ?>
109
+ `
 
 
 
 
 
 
 
 
 
110
 
111
+ if you want to display all order notes, including the (private) admin notes, use:
112
+ `
113
+ <?php $wpo_wcpdf->order_notes('all'); ?>
114
  `
115
 
116
+ = How do can I modify the pdf filename? =
117
+ You can do this via a filter in your theme's `functions.php` (Some themes have a "custom functions" area in the settings).
118
+
119
+ Here's a simple example for putting your shop name in front of the filname.
120
  `
121
+ add_filter( 'wpo_wcpdf_filename', 'wpo_wcpdf_custom_filename', 10, 4 );
122
+ function wpo_wcpdf_custom_filename( $filename, $template_type, $order_ids, $context ) {
123
+ // prepend your shopname to the file
124
+ $new_filename = 'myshopname_' . $filename;
125
 
126
  return $filename;
127
  }
128
  `
129
+ You can also use the $template_type ('invoice' or 'packing-slip'), $order_ids (single array) or $context ('download' or 'attachment') variables to make more complex rules for the filename.
130
 
131
  = Why does the download link not display on the My Account page? =
132
  To prevent customers from prematurely creating invoices, the default setting is that a customer can only see/download an invoice from an order that already has an invoice - either created automatically for the email attachment, or manually by the shop manager. This means that ultimately the shop mananger determines whether an invoice is available to the customer. If you want to make the invoice available to everyone you can either of the following:
176
 
177
  == Changelog ==
178
 
179
+ = 1.4.9 =
180
+ * Feature: Order number and date are now displayed by default in the Simple template (invoice number and date still optional)
181
+ * Feature: Display Customer/Order notes with a simple shorthand (see FAQ)
182
+ * Translations: Added Brazilian Portugese (thanks Victor Debone!)
183
+ * Tweak: Fail more gracefully when there are errors during PDF generation
184
+ * Tweak: added template type class to template output body
185
+ * Tweak: cleaned up Simple template style.css
186
+
187
  = 1.4.8 =
188
  * Translations: Added Finnish (Thanks Sami Mäkelä/Contrast.fi!)
189
 
templates/pdf/Simple/html-document-wrapper.php CHANGED
@@ -6,7 +6,7 @@
6
  <title><?php echo ($wpo_wcpdf->export->template_type == 'invoice')?__( 'Invoice', 'wpo_wcpdf' ):__( 'Packing Slip', 'wpo_wcpdf' ) ?></title>
7
  <style><?php $wpo_wcpdf->template_styles(); ?></style>
8
  </head>
9
- <body>
10
  <?php echo $wpo_wcpdf->export->output_body; ?>
11
  </body>
12
  </html>
6
  <title><?php echo ($wpo_wcpdf->export->template_type == 'invoice')?__( 'Invoice', 'wpo_wcpdf' ):__( 'Packing Slip', 'wpo_wcpdf' ) ?></title>
7
  <style><?php $wpo_wcpdf->template_styles(); ?></style>
8
  </head>
9
+ <body class="<?php echo $wpo_wcpdf->export->template_type; ?>">
10
  <?php echo $wpo_wcpdf->export->output_body; ?>
11
  </body>
12
  </html>
templates/pdf/Simple/invoice.php CHANGED
@@ -20,6 +20,7 @@
20
  <h3 class="document-type-label">
21
  <?php if( $wpo_wcpdf->get_header_logo_id() ) _e( 'Invoice', 'wpo_wcpdf' ); ?>
22
  </h3>
 
23
  </td>
24
  <td>&nbsp;</td>
25
  </tr>
@@ -27,32 +28,18 @@
27
  <tr>
28
  <td>
29
  <div class="order-information">
30
- <?php
31
- $date_setting = isset($wpo_wcpdf->settings->template_settings['display_date'])?$wpo_wcpdf->settings->template_settings['display_date']:'order_date';
32
- $number_setting = isset($wpo_wcpdf->settings->template_settings['display_number'])?$wpo_wcpdf->settings->template_settings['display_number']:'order_number';
33
-
34
- // set $display date & label to user setting
35
- if ( $date_setting == 'invoice_date' ) {
36
- $display_date = $wpo_wcpdf->get_invoice_date();
37
- $display_date_label = __( 'Invoice Date:', 'wpo_wcpdf' );
38
- } else {
39
- $display_date = $wpo_wcpdf->get_order_date();
40
- $display_date_label = __( 'Order Date:', 'wpo_wcpdf' );
41
- }
42
-
43
- // set $display number & label to user setting
44
- if ( $number_setting == 'invoice_number' ) {
45
- $display_number = $wpo_wcpdf->get_invoice_number();
46
- $display_number_label = __( 'Invoice Number:', 'wpo_wcpdf' );
47
- } else {
48
- $display_number = $wpo_wcpdf->get_order_number();
49
- $display_number_label = __( 'Order Number:', 'wpo_wcpdf' );
50
- }
51
- ?>
52
- <span class="order-date-label"><?php echo $display_date_label; ?></span>
53
- <span class="order-date"><?php echo $display_date; ?></span><br />
54
- <span class="order-number-label"><?php echo $display_number_label; ?></span>
55
- <span class="order-number"><?php echo $display_number; ?></span><br />
56
  <span class="order-payment-label"><?php _e( 'Payment Method:', 'wpo_wcpdf' ); ?></span>
57
  <span class="order-payment"><?php $wpo_wcpdf->payment_method(); ?></span><br />
58
  </div>
20
  <h3 class="document-type-label">
21
  <?php if( $wpo_wcpdf->get_header_logo_id() ) _e( 'Invoice', 'wpo_wcpdf' ); ?>
22
  </h3>
23
+ <?php do_action( 'wpo_wcpdf_after_document_label', 'invoice' ); ?>
24
  </td>
25
  <td>&nbsp;</td>
26
  </tr>
28
  <tr>
29
  <td>
30
  <div class="order-information">
31
+ <?php if ( isset($wpo_wcpdf->settings->template_settings['display_number']) && $wpo_wcpdf->settings->template_settings['display_number'] == 'invoice_number') { ?>
32
+ <span class="order-number-label"><?php _e( 'Invoice Number:', 'wpo_wcpdf' ); ?></span>
33
+ <span class="order-number"><?php $wpo_wcpdf->invoice_number(); ?></span><br />
34
+ <?php } ?>
35
+ <?php if ( isset($wpo_wcpdf->settings->template_settings['display_date']) && $wpo_wcpdf->settings->template_settings['display_date'] == 'invoice_date') { ?>
36
+ <span class="order-date-label"><?php _e( 'Invoice Date:', 'wpo_wcpdf' ); ?></span>
37
+ <span class="order-date"><?php $wpo_wcpdf->invoice_date(); ?></span><br />
38
+ <?php } ?>
39
+ <span class="order-number-label"><?php _e( 'Order Number:', 'wpo_wcpdf' ); ?></span>
40
+ <span class="order-number"><?php $wpo_wcpdf->order_number(); ?></span><br />
41
+ <span class="order-date-label"><?php _e( 'Order Date:', 'wpo_wcpdf' ); ?></span>
42
+ <span class="order-date"><?php $wpo_wcpdf->order_date(); ?></span><br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  <span class="order-payment-label"><?php _e( 'Payment Method:', 'wpo_wcpdf' ); ?></span>
44
  <span class="order-payment"><?php $wpo_wcpdf->payment_method(); ?></span><br />
45
  </div>
templates/pdf/Simple/packing-slip.php CHANGED
@@ -20,6 +20,7 @@
20
  <h3 class="document-type-label">
21
  <?php if( $wpo_wcpdf->get_header_logo_id() ) _e( 'Packing Slip', 'wpo_wcpdf' ); ?>
22
  </h3>
 
23
  </td>
24
  <td>&nbsp;</td>
25
  </tr>
20
  <h3 class="document-type-label">
21
  <?php if( $wpo_wcpdf->get_header_logo_id() ) _e( 'Packing Slip', 'wpo_wcpdf' ); ?>
22
  </h3>
23
+ <?php do_action( 'wpo_wcpdf_after_document_label', 'packing-slip' ); ?>
24
  </td>
25
  <td>&nbsp;</td>
26
  </tr>
templates/pdf/Simple/style.css CHANGED
@@ -1,27 +1,27 @@
1
  /* Main Body */
2
  @font-face {
3
- font-family: 'Open Sans';
4
- font-style: normal;
5
- font-weight: normal;
6
- src: local('Open Sans'), local('OpenSans'), url(http://themes.googleusercontent.com/static/fonts/opensans/v7/yYRnAC2KygoXnEC8IdU0gQLUuEpTyoUstqEm5AMlJo4.ttf) format('truetype');
7
- }
8
- @font-face {
9
- font-family: 'Open Sans';
10
- font-style: normal;
11
- font-weight: bold;
12
- src: local('Open Sans Bold'), local('OpenSans-Bold'), url(http://themes.googleusercontent.com/static/fonts/opensans/v7/k3k702ZOKiLJc3WVjuplzMDdSZkkecOE1hvV7ZHvhyU.ttf) format('truetype');
13
  }
14
  @font-face {
15
- font-family: 'Open Sans';
16
- font-style: italic;
17
- font-weight: normal;
18
- src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://themes.googleusercontent.com/static/fonts/opensans/v7/O4NhV7_qs9r9seTo7fnsVCZ2oysoEQEeKwjgmXLRnTc.ttf) format('truetype');
19
  }
20
  @font-face {
21
- font-family: 'Open Sans';
22
- font-style: italic;
23
- font-weight: bold;
24
- src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), url(http://themes.googleusercontent.com/static/fonts/opensans/v7/PRmiXeptR36kaC0GEAetxrQhS7CD3GIaelOwHPAPh9w.ttf) format('truetype');
25
  }
26
 
27
  @page {
@@ -89,7 +89,8 @@ table.container {
89
  border: 0;
90
  }
91
 
92
- tr.no-borders, td.no-borders {
 
93
  border: 0 !important;
94
  border-top: 0 !important;
95
  border-bottom: 0 !important;
@@ -97,10 +98,6 @@ tr.no-borders, td.no-borders {
97
  width: auto;
98
  }
99
 
100
- span.force-width-you {
101
- display: block;
102
- }
103
-
104
  /* Header */
105
  td.header img {
106
  max-height: 3cm;
@@ -112,7 +109,8 @@ td.header {
112
  font-weight: 700;
113
  }
114
 
115
- td.header, td.shop-info {
 
116
  margin-bottom: 10mm !important;
117
  }
118
 
@@ -127,7 +125,7 @@ td.shop-info {
127
  .order-date-label,
128
  .order-number-label,
129
  .order-payment-label {
130
- width: 3cm;
131
  display: inline-block;
132
  }
133
 
@@ -150,7 +148,7 @@ table.order-details {
150
  }
151
 
152
  .order-details td,
153
- th {
154
  border-bottom: 1px #ccc solid;
155
  padding: 0.375em;
156
  }
@@ -171,7 +169,8 @@ th {
171
  height: auto;
172
  }
173
 
174
- table.product, table.product td {
 
175
  margin: 0;
176
  border: 0;
177
  padding: 0;
@@ -206,7 +205,8 @@ table.totals {
206
  margin-top: 5mm;
207
  }
208
 
209
- table.totals th, table.totals td {
 
210
  border: 0;
211
  border-top: 1px solid #ccc;
212
  border-bottom: 1px solid #ccc;
@@ -217,7 +217,8 @@ table.totals td.price {
217
  width: 20%;
218
  }
219
 
220
- table.totals tr:last-child td, table.totals tr:last-child th {
 
221
  border-top: 2px solid #000;
222
  border-bottom: 2px solid #000;
223
  font-weight: bold;
1
  /* Main Body */
2
  @font-face {
3
+ font-family: 'Open Sans';
4
+ font-style: normal;
5
+ font-weight: normal;
6
+ src: local('Open Sans'), local('OpenSans'), url(http://themes.googleusercontent.com/static/fonts/opensans/v7/yYRnAC2KygoXnEC8IdU0gQLUuEpTyoUstqEm5AMlJo4.ttf) format('truetype');
7
+ }
8
+ @font-face {
9
+ font-family: 'Open Sans';
10
+ font-style: normal;
11
+ font-weight: bold;
12
+ src: local('Open Sans Bold'), local('OpenSans-Bold'), url(http://themes.googleusercontent.com/static/fonts/opensans/v7/k3k702ZOKiLJc3WVjuplzMDdSZkkecOE1hvV7ZHvhyU.ttf) format('truetype');
13
  }
14
  @font-face {
15
+ font-family: 'Open Sans';
16
+ font-style: italic;
17
+ font-weight: normal;
18
+ src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://themes.googleusercontent.com/static/fonts/opensans/v7/O4NhV7_qs9r9seTo7fnsVCZ2oysoEQEeKwjgmXLRnTc.ttf) format('truetype');
19
  }
20
  @font-face {
21
+ font-family: 'Open Sans';
22
+ font-style: italic;
23
+ font-weight: bold;
24
+ src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), url(http://themes.googleusercontent.com/static/fonts/opensans/v7/PRmiXeptR36kaC0GEAetxrQhS7CD3GIaelOwHPAPh9w.ttf) format('truetype');
25
  }
26
 
27
  @page {
89
  border: 0;
90
  }
91
 
92
+ tr.no-borders,
93
+ td.no-borders {
94
  border: 0 !important;
95
  border-top: 0 !important;
96
  border-bottom: 0 !important;
98
  width: auto;
99
  }
100
 
 
 
 
 
101
  /* Header */
102
  td.header img {
103
  max-height: 3cm;
109
  font-weight: 700;
110
  }
111
 
112
+ td.header,
113
+ td.shop-info {
114
  margin-bottom: 10mm !important;
115
  }
116
 
125
  .order-date-label,
126
  .order-number-label,
127
  .order-payment-label {
128
+ width: 4cm;
129
  display: inline-block;
130
  }
131
 
148
  }
149
 
150
  .order-details td,
151
+ .order-details th {
152
  border-bottom: 1px #ccc solid;
153
  padding: 0.375em;
154
  }
169
  height: auto;
170
  }
171
 
172
+ table.product,
173
+ table.product td {
174
  margin: 0;
175
  border: 0;
176
  padding: 0;
205
  margin-top: 5mm;
206
  }
207
 
208
+ table.totals th,
209
+ table.totals td {
210
  border: 0;
211
  border-top: 1px solid #ccc;
212
  border-bottom: 1px solid #ccc;
217
  width: 20%;
218
  }
219
 
220
+ table.totals tr:last-child td,
221
+ table.totals tr:last-child th {
222
  border-top: 2px solid #000;
223
  border-bottom: 2px solid #000;
224
  font-weight: bold;
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.4.8
7
  * Author: Ewout Fernhout
8
  * Author URI: http://www.wpovernight.com
9
  * License: GPLv2 or later
@@ -188,11 +188,25 @@ if ( !class_exists( 'WooCommerce_PDF_Invoices' ) ) {
188
  * Return/Show billing address
189
  */
190
  public function get_billing_address() {
191
- $address = $this->export->order->get_formatted_billing_address();
192
- if( !$address ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
193
  $address = __('N/A', 'wpo_wcpdf');
194
  }
195
- return apply_filters( 'wpo_wcpdf_billing_address', $address );
 
196
  }
197
  public function billing_address() {
198
  echo $this->get_billing_address();
@@ -202,7 +216,14 @@ if ( !class_exists( 'WooCommerce_PDF_Invoices' ) ) {
202
  * Return/Show billing email
203
  */
204
  public function get_billing_email() {
205
- $billing_email =$this->export->order->billing_email;
 
 
 
 
 
 
 
206
  return apply_filters( 'wpo_wcpdf_billing_email', $billing_email );
207
  }
208
  public function billing_email() {
@@ -213,7 +234,13 @@ if ( !class_exists( 'WooCommerce_PDF_Invoices' ) ) {
213
  * Return/Show billing phone
214
  */
215
  public function get_billing_phone() {
216
- $billing_phone =$this->export->order->billing_phone;
 
 
 
 
 
 
217
  return apply_filters( 'wpo_wcpdf_billing_phone', $billing_phone );
218
  }
219
  public function billing_phone() {
@@ -224,11 +251,25 @@ if ( !class_exists( 'WooCommerce_PDF_Invoices' ) ) {
224
  * Return/Show shipping address
225
  */
226
  public function get_shipping_address() {
227
- $address = $this->export->order->get_formatted_shipping_address();
228
- if( !$address ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  $address = __('N/A', 'wpo_wcpdf');
230
  }
231
- return apply_filters( 'wpo_wcpdf_shipping_address', $address );
 
232
  }
233
  public function shipping_address() {
234
  echo $this->get_shipping_address();
@@ -237,8 +278,18 @@ if ( !class_exists( 'WooCommerce_PDF_Invoices' ) ) {
237
  /**
238
  * Return/Show a custom field
239
  */
240
- public function custom_field( $field_name, $field_label = '', $display_empty = false ) {
241
  $custom_field = get_post_meta($this->export->order->id,$field_name,true);
 
 
 
 
 
 
 
 
 
 
242
  if (!empty($field_label)){
243
  // add a a trailing space to the label
244
  $field_label .= ' ';
@@ -248,7 +299,48 @@ if ( !class_exists( 'WooCommerce_PDF_Invoices' ) ) {
248
  echo $field_label . nl2br ($custom_field);
249
  }
250
  }
251
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
  /**
253
  * Return/Show the current date
254
  */
@@ -285,9 +377,17 @@ if ( !class_exists( 'WooCommerce_PDF_Invoices' ) ) {
285
  * Return/Show order number (or invoice number)
286
  */
287
  public function get_order_number() {
 
 
 
 
 
 
 
 
288
  // Trim the hash to have a clean number but still
289
  // support any filters that were applied before.
290
- $order_number = ltrim($this->export->order->get_order_number(), '#');
291
  return apply_filters( 'wpo_wcpdf_order_number', $order_number);
292
  }
293
  public function order_number() {
@@ -309,7 +409,14 @@ if ( !class_exists( 'WooCommerce_PDF_Invoices' ) ) {
309
  * Return/Show the order date
310
  */
311
  public function get_order_date() {
312
- $date = date_i18n( get_option( 'date_format' ), strtotime( $this->export->order->order_date ) );
 
 
 
 
 
 
 
313
  return apply_filters( 'wpo_wcpdf_order_date', $date );
314
  }
315
  public function order_date() {
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.4.9
7
  * Author: Ewout Fernhout
8
  * Author URI: http://www.wpovernight.com
9
  * License: GPLv2 or later
188
  * Return/Show billing address
189
  */
190
  public function get_billing_address() {
191
+ if ( $address = $this->export->order->get_formatted_billing_address() ) {
192
+ return apply_filters( 'wpo_wcpdf_billing_address', $address );
193
+ }
194
+
195
+ if ( !$address && $this->export->order->post->post_parent > 0 ) {
196
+ // try parent address
197
+
198
+ // temporarily switch order to make all filters / order calls work correctly
199
+ $current_order = $this->export->order;
200
+ $this->export->order = new WC_Order( $this->export->order->post->post_parent );
201
+ $address = apply_filters( 'wpo_wcpdf_billing_address', $this->export->order->get_formatted_billing_address() );
202
+ // switch back & unset
203
+ $this->export->order = $current_order;
204
+ unset($current_order);
205
+ } else {
206
  $address = __('N/A', 'wpo_wcpdf');
207
  }
208
+
209
+ return $address;
210
  }
211
  public function billing_address() {
212
  echo $this->get_billing_address();
216
  * Return/Show billing email
217
  */
218
  public function get_billing_email() {
219
+ $billing_email = $this->export->order->billing_email;
220
+
221
+
222
+ if ( !$billing_email && $this->export->order->post->post_parent > 0 ) {
223
+ // try parent
224
+ $billing_email = get_post_meta( $this->export->order->post->post_parent, '_billing_email', true );
225
+ }
226
+
227
  return apply_filters( 'wpo_wcpdf_billing_email', $billing_email );
228
  }
229
  public function billing_email() {
234
  * Return/Show billing phone
235
  */
236
  public function get_billing_phone() {
237
+ $billing_phone = $this->export->order->billing_phone;
238
+
239
+ if ( !$billing_phone && $this->export->order->post->post_parent > 0 ) {
240
+ // try parent
241
+ $billing_phone = get_post_meta( $this->export->order->post->post_parent, '_billing_phone', true );
242
+ }
243
+
244
  return apply_filters( 'wpo_wcpdf_billing_phone', $billing_phone );
245
  }
246
  public function billing_phone() {
251
  * Return/Show shipping address
252
  */
253
  public function get_shipping_address() {
254
+ if ( $address = $this->export->order->get_formatted_shipping_address() ) {
255
+ return apply_filters( 'wpo_wcpdf_shipping_address', $address );
256
+ }
257
+
258
+ if ( !$address && $this->export->order->post->post_parent > 0 ) {
259
+ // try parent address
260
+
261
+ // temporarily switch order to make all filters / order calls work correctly
262
+ $current_order = $this->export->order;
263
+ $this->export->order = new WC_Order( $this->export->order->post->post_parent );
264
+ $address = apply_filters( 'wpo_wcpdf_shipping_address', $this->export->order->get_formatted_shipping_address() );
265
+ // switch back & unset
266
+ $this->export->order = $current_order;
267
+ unset($current_order);
268
+ } else {
269
  $address = __('N/A', 'wpo_wcpdf');
270
  }
271
+
272
+ return $address;
273
  }
274
  public function shipping_address() {
275
  echo $this->get_shipping_address();
278
  /**
279
  * Return/Show a custom field
280
  */
281
+ public function get_custom_field( $field_name ) {
282
  $custom_field = get_post_meta($this->export->order->id,$field_name,true);
283
+
284
+ if ( !$custom_field && $this->export->order->post->post_parent > 0 ) {
285
+ // try parent
286
+ $custom_field = get_post_meta( $this->export->order->post->post_parent, $field_name, true );
287
+ }
288
+
289
+ return apply_filters( 'wpo_wcpdf_billing_custom_field', $custom_field );
290
+ }
291
+ public function custom_field( $field_name, $field_label = '', $display_empty = false ) {
292
+ $custom_field = $this->get_custom_field( $field_name );
293
  if (!empty($field_label)){
294
  // add a a trailing space to the label
295
  $field_label .= ' ';
299
  echo $field_label . nl2br ($custom_field);
300
  }
301
  }
302
+
303
+ /**
304
+ * Return/Show order notes
305
+ */
306
+ public function get_order_notes( $filter = 'customer' ) {
307
+ $args = array(
308
+ 'post_id' => $this->export->order->id,
309
+ 'approve' => 'approve',
310
+ 'type' => 'order_note'
311
+ );
312
+
313
+ remove_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10, 1 );
314
+
315
+ $notes = get_comments( $args );
316
+
317
+ add_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10, 1 );
318
+
319
+ if ( $notes ) {
320
+ foreach( $notes as $key => $note ) {
321
+ if ( $filter == 'customer' && !get_comment_meta( $note->comment_ID, 'is_customer_note', true ) ) {
322
+ unset($notes[$key]);
323
+ }
324
+ if ( $filter == 'private' && get_comment_meta( $note->comment_ID, 'is_customer_note', true ) ) {
325
+ unset($notes[$key]);
326
+ }
327
+ }
328
+ return $notes;
329
+ }
330
+ }
331
+ public function order_notes( $filter = 'customer' ) {
332
+ $notes = $this->get_order_notes( $filter );
333
+ if ( $notes ) {
334
+ foreach( $notes as $note ) {
335
+ ?>
336
+ <div class="note_content">
337
+ <?php echo wpautop( wptexturize( wp_kses_post( $note->comment_content ) ) ); ?>
338
+ </div>
339
+ <?php
340
+ }
341
+ }
342
+ }
343
+
344
  /**
345
  * Return/Show the current date
346
  */
377
  * Return/Show order number (or invoice number)
378
  */
379
  public function get_order_number() {
380
+ // try parent first
381
+ if ( $this->export->order->post->post_parent > 0 && $this->export->order->post->post_type == 'shop_order_refund' ) {
382
+ $parent_order = new WC_Order( $this->export->order->post->post_parent );
383
+ $order_number = $parent_order->get_order_number();
384
+ } else {
385
+ $order_number = $this->export->order->get_order_number();
386
+ }
387
+
388
  // Trim the hash to have a clean number but still
389
  // support any filters that were applied before.
390
+ $order_number = ltrim($order_number, '#');
391
  return apply_filters( 'wpo_wcpdf_order_number', $order_number);
392
  }
393
  public function order_number() {
409
  * Return/Show the order date
410
  */
411
  public function get_order_date() {
412
+ if ( $this->export->order->post->post_parent > 0 && $this->export->order->post->post_type == 'shop_order_refund' ) {
413
+ $parent_order = new WC_Order( $this->export->order->post->post_parent );
414
+ $date = $parent_order->order_date;
415
+ } else {
416
+ $date = $this->export->order->order_date;
417
+ }
418
+
419
+ $date = date_i18n( get_option( 'date_format' ), strtotime( $date ) );
420
  return apply_filters( 'wpo_wcpdf_order_date', $date );
421
  }
422
  public function order_date() {