Flexible Shipping for WooCommerce - Version 3.9.10

Version Description

  • 2020-03-02 =
  • Added bulk labels functionality - ability to print multiple labels in one file
Download this release

Release Info

Developer wpdesk
Plugin Icon 128x128 Flexible Shipping for WooCommerce
Version 3.9.10
Comparing to
See all releases

Code changes from version 3.9.9 to 3.9.10

classes/table-rate/bulk-actions.php CHANGED
@@ -32,7 +32,7 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping_Bulk_Actions' ) ) {
32
 
33
  add_action( 'admin_notices', array( $this, 'admin_notices' ) );
34
 
35
- add_action( 'admin_init', array( $this, 'admin_init' ), 1 );
36
 
37
  add_filter( 'flexible_shipping_status', array( $this, 'flexible_shipping_status' ) );
38
 
@@ -313,53 +313,35 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping_Bulk_Actions' ) ) {
313
  $redirect_to = add_query_arg( 'bulk_flexible_shipping_send', count( $post_ids ), $redirect_to );
314
  return $redirect_to;
315
  }
316
- if ( $do_action == 'flexible_shipping_labels' ) {
317
- $labels = array();
318
- foreach ( $post_ids as $post_id ) {
319
- $shipments = fs_get_order_shipments( $post_id );
320
- foreach ($shipments as $shipment) {
321
- /* @var $shipment WPDesk_Flexible_Shipping_Shipment|WPDesk_Flexible_Shipping_Shipment_Interface */
322
- try {
323
- $label = $shipment->get_label();
324
- $labels[] = array(
325
- 'status' => 'created',
326
- 'message' => __('Label downloaded.', 'flexible-shipping'),
327
- 'content' => $label['content'],
328
- 'file_name' => $label['file_name']
329
- );
330
- }
331
- catch ( Exception $e ) {
332
- }
333
- }
334
- $labels = apply_filters( 'flexible_shipping_bulk_label', $labels, $post_id );
335
- }
336
- if ( count( $labels ) == 0 ) {
337
  $redirect_to = add_query_arg( 'bulk_flexible_shipping_labels', count( $post_ids ), $redirect_to );
338
  $redirect_to = add_query_arg( 'bulk_flexible_shipping_no_labels_created', 1, $redirect_to );
339
  return $redirect_to;
340
  }
341
- $tmp_zip = tempnam ( 'tmp', 'labels_' );
342
- if ( $tmp_zip ) {
343
- $tmp_zip .= '.zip';
344
- $zip = new ZipArchive();
345
- }
346
- if ( empty( $tmp_zip ) || !$zip->open( $tmp_zip, ZIPARCHIVE::CREATE) ) {
 
347
  $labels['error'] = __( 'Unable to create temporary zip archive for labels. Check temporary folder configuration on server.', 'flexible-shipping' );
 
 
348
  }
349
- else {
350
- foreach ( $labels as $label ) {
351
- if ( isset( $label['content'] ) ) {
352
- $zip->addFromString( $label['file_name'], $label['content'] );
353
- }
354
- }
355
- $labels['tmp_zip'] = $tmp_zip;
356
- $zip->close();
357
- if ( ! session_id() ) {
358
- session_start();
359
- }
360
  }
361
  $_SESSION['flexible_shipping_bulk_labels'] = $labels;
 
362
  $redirect_to = add_query_arg( 'bulk_flexible_shipping_labels', count( $post_ids ), $redirect_to );
 
363
  return $redirect_to;
364
  }
365
  if ( $do_action == 'flexible_shipping_manifest' ) {
@@ -464,7 +446,6 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping_Bulk_Actions' ) ) {
464
  $labels = null;
465
  if ( isset( $_SESSION['flexible_shipping_bulk_labels'] ) ) {
466
  $labels = $_SESSION['flexible_shipping_bulk_labels'];
467
- unset( $_SESSION['flexible_shipping_bulk_labels'] );
468
  }
469
  if ( is_array( $labels ) ) {
470
  if ( isset( $labels['error'] ) ) {
@@ -473,7 +454,7 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping_Bulk_Actions' ) ) {
473
  $nonce = wp_create_nonce( 'flexible_shipping_labels' );
474
  printf( '<div id="message" class="updated fade"><p>' .
475
  __( 'Bulk labels - processed orders: %d. If download not start automatically click %shere%s.', 'flexible-shipping' ) .
476
- '</p></div>', $bulk_flexible_shipping_labels_count, '<a id="flexible_shipping_labels_url" target="_blank" href=' . admin_url( '?flexible_shipping_labels=' . basename( $labels['tmp_zip'] ) . '&nonce=' . $nonce ) . '>', '</a>'
477
  );
478
  }
479
  }
@@ -499,19 +480,21 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping_Bulk_Actions' ) ) {
499
  }
500
  }
501
 
502
- public function admin_init() {
503
- if ( isset( $_GET['flexible_shipping_labels'] ) && isset( $_GET['nonce'] ) ) {
504
- if ( wp_verify_nonce( $_GET['nonce'], 'flexible_shipping_labels' ) ) {
505
- $file = trailingslashit( sys_get_temp_dir() ) . $_GET['flexible_shipping_labels'];
506
- header( 'Content-Description: File Transfer' );
507
- header( 'Content-Type: application/octet-stream' );
508
- header( 'Content-Disposition: attachment; filename="' . basename( $file ) . '"' );
509
- header( 'Expires: 0' );
510
- header( 'Cache-Control: must-revalidate' );
511
- header( 'Pragma: public' );
512
- header( 'Content-Length: ' . filesize( $file ) );
513
- readfile( $file );
514
- unlink( $file );
 
 
515
  die();
516
  }
517
  }
32
 
33
  add_action( 'admin_notices', array( $this, 'admin_notices' ) );
34
 
35
+ add_action( 'admin_init', array( $this, 'dispatch_labels_file_if_expected' ), 1 );
36
 
37
  add_filter( 'flexible_shipping_status', array( $this, 'flexible_shipping_status' ) );
38
 
313
  $redirect_to = add_query_arg( 'bulk_flexible_shipping_send', count( $post_ids ), $redirect_to );
314
  return $redirect_to;
315
  }
316
+ if ( 'flexible_shipping_labels' === $do_action ) {
317
+ $labels_bulk_actions_handler = WPDesk_Flexible_Shipping_Labels_Bulk_Action_Handler::get_labels_bulk_actions_handler();
318
+ $labels_bulk_actions_handler->bulk_process_orders( $post_ids );
319
+
320
+ $labels = $labels_bulk_actions_handler->get_labels_for_shipments();
321
+ if ( 0 === count( $labels ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
322
  $redirect_to = add_query_arg( 'bulk_flexible_shipping_labels', count( $post_ids ), $redirect_to );
323
  $redirect_to = add_query_arg( 'bulk_flexible_shipping_no_labels_created', 1, $redirect_to );
324
  return $redirect_to;
325
  }
326
+
327
+ try {
328
+ $labels_file_creator = new WPDesk_Flexible_Shipping_Labels_File_Creator( $labels );
329
+ $labels_file_creator->create_labels_file();
330
+ $labels['tmp_file'] = $labels_file_creator->get_tmp_file_name();
331
+ $labels['client_file'] = $labels_file_creator->get_file_name();
332
+ } catch ( WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_Zip_File_Exception $zip_file_exception ) {
333
  $labels['error'] = __( 'Unable to create temporary zip archive for labels. Check temporary folder configuration on server.', 'flexible-shipping' );
334
+ } catch ( WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_File_Exception $tmp_file_exception ) {
335
+ $labels['error'] = __( 'Unable to create temporary file for labels. Check temporary folder configuration on server.', 'flexible-shipping' );
336
  }
337
+
338
+ if ( ! session_id() ) {
339
+ session_start();
 
 
 
 
 
 
 
 
340
  }
341
  $_SESSION['flexible_shipping_bulk_labels'] = $labels;
342
+
343
  $redirect_to = add_query_arg( 'bulk_flexible_shipping_labels', count( $post_ids ), $redirect_to );
344
+
345
  return $redirect_to;
346
  }
347
  if ( $do_action == 'flexible_shipping_manifest' ) {
446
  $labels = null;
447
  if ( isset( $_SESSION['flexible_shipping_bulk_labels'] ) ) {
448
  $labels = $_SESSION['flexible_shipping_bulk_labels'];
 
449
  }
450
  if ( is_array( $labels ) ) {
451
  if ( isset( $labels['error'] ) ) {
454
  $nonce = wp_create_nonce( 'flexible_shipping_labels' );
455
  printf( '<div id="message" class="updated fade"><p>' .
456
  __( 'Bulk labels - processed orders: %d. If download not start automatically click %shere%s.', 'flexible-shipping' ) .
457
+ '</p></div>', $bulk_flexible_shipping_labels_count, '<a id="flexible_shipping_labels_url" target="_blank" href=' . admin_url( '?flexible_shipping_labels=' . basename( $labels['client_file'] ) . '&tmp_file=' . basename( $labels['tmp_file'] ) . '&nonce=' . $nonce ) . '>', '</a>'
458
  );
459
  }
460
  }
480
  }
481
  }
482
 
483
+ /**
484
+ * Dispatch labels file if requested.
485
+ */
486
+ public function dispatch_labels_file_if_expected() {
487
+ if ( isset( $_GET['flexible_shipping_labels'] ) && isset( $_GET['tmp_file'] ) && isset( $_GET['nonce'] ) ) {
488
+ if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['nonce'] ) ), 'flexible_shipping_labels' ) ) {
489
+ $file = trailingslashit( sys_get_temp_dir() ) . sanitize_text_field( wp_unslash( $_GET['flexible_shipping_labels'] ) );
490
+ $tmp_file = trailingslashit( sys_get_temp_dir() ) . sanitize_text_field( wp_unslash( $_GET['tmp_file'] ) );
491
+
492
+ if ( ! file_exists( $tmp_file ) ) {
493
+ die( 'This file was already downloaded! Please retry bulk action!' );
494
+ }
495
+
496
+ $labels_file_dispatcher = new WPDesk_Flexible_Shipping_Labels_File_Dispatcher();
497
+ $labels_file_dispatcher->dispatch_and_delete_labels_file( $file, $tmp_file );
498
  die();
499
  }
500
  }
classes/wp-wpdesk-fs-shipment/exception/class-shipment-unable-to-create-tmp-file-exception.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * .
5
+ */
6
+ class WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_File_Exception extends RuntimeException {
7
+ }
classes/wp-wpdesk-fs-shipment/exception/class-shipment-unable-to-create-tmp-zip-file-exception.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * .
5
+ */
6
+ class WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_Zip_File_Exception extends RuntimeException {
7
+ }
classes/wp-wpdesk-fs-shipment/label/class-integration-label-builder.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Labels builder.
4
+ *
5
+ * @package Flexible Shipping
6
+ */
7
+
8
+ /**
9
+ * Abstract for labels builders.
10
+ */
11
+ abstract class WPDesk_Flexible_Shipping_Integration_Label_Builder implements WPDesk_Flexible_Shipping_Labels_Builder {
12
+
13
+ /**
14
+ * Integration ID.
15
+ *
16
+ * @var string
17
+ */
18
+ private $integration_id;
19
+
20
+ /**
21
+ * Shipments.
22
+ *
23
+ * @var WPDesk_Flexible_Shipping_Shipment_Interface[]
24
+ */
25
+ protected $shipments = array();
26
+
27
+ /**
28
+ * .
29
+ *
30
+ * @param string $integration_id .
31
+ */
32
+ public function __construct( $integration_id ) {
33
+ $this->integration_id = $integration_id;
34
+ }
35
+
36
+ /**
37
+ * Get integration id.
38
+ *
39
+ * @return string
40
+ */
41
+ public function get_integration_id() {
42
+ return $this->integration_id;
43
+ }
44
+
45
+ /**
46
+ * .
47
+ *
48
+ * @param WPDesk_Flexible_Shipping_Shipment $shipment .
49
+ */
50
+ public function add_shipment( WPDesk_Flexible_Shipping_Shipment $shipment ) {
51
+ $this->shipments[] = $shipment;
52
+ }
53
+
54
+ /**
55
+ * Get labels for shipments.
56
+ *
57
+ * @return array
58
+ */
59
+ abstract public function get_labels_for_shipments();
60
+
61
+ }
classes/wp-wpdesk-fs-shipment/label/class-labels-bulk-action-handler.php ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Labels builders.
4
+ *
5
+ * @package Flexible Shipping
6
+ */
7
+
8
+ /**
9
+ * Can create labels for shipments.
10
+ */
11
+ class WPDesk_Flexible_Shipping_Labels_Bulk_Action_Handler {
12
+
13
+ /**
14
+ * Builders.
15
+ *
16
+ * @var WPDesk_Flexible_Shipping_Labels_Bulk_Action_Handler
17
+ */
18
+ private static $labels_builder;
19
+
20
+ /**
21
+ * Labels builders collection.
22
+ *
23
+ * @var WPDesk_Flexible_Shipping_Labels_Builder[]
24
+ */
25
+ private $builders_collection = array();
26
+
27
+ /**
28
+ * Shipments.
29
+ *
30
+ * @var WPDesk_Flexible_Shipping_Shipment_Interface[]
31
+ */
32
+ private $shipments = array();
33
+
34
+ /**
35
+ * Add builder to builders collection.
36
+ *
37
+ * @param WPDesk_Flexible_Shipping_Labels_Builder $builder .
38
+ */
39
+ public function add_builder( WPDesk_Flexible_Shipping_Labels_Builder $builder ) {
40
+ $this->builders_collection[ $builder->get_integration_id() ] = $builder;
41
+ }
42
+
43
+ /**
44
+ * Bulk process orders.
45
+ *
46
+ * @param array $orders_ids .
47
+ */
48
+ public function bulk_process_orders( array $orders_ids ) {
49
+ foreach ( $orders_ids as $order_id ) {
50
+ $shipments = fs_get_order_shipments( $order_id );
51
+ foreach ( $shipments as $shipment ) {
52
+ $this->add_shipment( $shipment );
53
+ }
54
+ }
55
+ }
56
+
57
+ /**
58
+ * Add shipment to labels builder.
59
+ *
60
+ * @param WPDesk_Flexible_Shipping_Shipment $shipment .
61
+ */
62
+ public function add_shipment( WPDesk_Flexible_Shipping_Shipment $shipment ) {
63
+ if ( isset( $this->builders_collection[ $shipment->get_integration() ] ) ) {
64
+ $this->builders_collection[ $shipment->get_integration() ]->add_shipment( $shipment );
65
+ } else {
66
+ $this->shipments[] = $shipment;
67
+ }
68
+ }
69
+
70
+ /**
71
+ * Get labels for shipments from builders.
72
+ *
73
+ * @return array
74
+ */
75
+ private function get_labels_for_shipments_from_builders() {
76
+ $labels = array();
77
+ foreach ( $this->builders_collection as $labels_builder ) {
78
+ $labels += $labels_builder->get_labels_for_shipments();
79
+ }
80
+ return $labels;
81
+ }
82
+
83
+ /**
84
+ * Get labels for shipments.
85
+ *
86
+ * @return array
87
+ */
88
+ public function get_labels_for_shipments() {
89
+ $labels = $this->get_labels_for_shipments_from_builders();
90
+ foreach ( $this->shipments as $shipment ) {
91
+ try {
92
+ $labels[] = $shipment->get_label();
93
+ } catch ( Exception $e ) { // phpcs:ignore
94
+ // do nothing.
95
+ }
96
+ }
97
+ return $labels;
98
+ }
99
+
100
+ /**
101
+ * Get builders.
102
+ *
103
+ * @return WPDesk_Flexible_Shipping_Labels_Bulk_Action_Handler
104
+ */
105
+ public static function get_labels_bulk_actions_handler() {
106
+ if ( empty( static::$labels_builder ) ) {
107
+ static::$labels_builder = new self();
108
+ }
109
+ return static::$labels_builder;
110
+ }
111
+
112
+ }
classes/wp-wpdesk-fs-shipment/label/class-labels-file-creator.php ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Labels file creator.
4
+ *
5
+ * @package Flexible Shipping
6
+ */
7
+
8
+ /**
9
+ * Can create labels file.
10
+ * When there is one label file it creates file from this label.
11
+ * When there is more than one label file it creates zip file with all labels.
12
+ */
13
+ class WPDesk_Flexible_Shipping_Labels_File_Creator {
14
+
15
+ /**
16
+ * Labels.
17
+ *
18
+ * @var array
19
+ */
20
+ private $labels = array();
21
+
22
+ /**
23
+ * File name.
24
+ *
25
+ * @var string
26
+ */
27
+ private $file_name;
28
+
29
+ /**
30
+ * Tmp file name.
31
+ *
32
+ * @var string
33
+ */
34
+ private $tmp_file_name;
35
+
36
+ /**
37
+ * .
38
+ *
39
+ * @param array $labels .
40
+ * @see WPDesk_Flexible_Shipping_Integration_Label_Builder::get_labels_for_shipments()
41
+ */
42
+ public function __construct( array $labels ) {
43
+ $this->labels = $labels;
44
+ $this->prepare_file_names();
45
+ }
46
+
47
+ /**
48
+ * Create labels file.
49
+ *
50
+ * @throws WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_Zip_File_Exception .
51
+ */
52
+ public function create_labels_file() {
53
+ if ( 1 === count( $this->labels ) ) {
54
+ file_put_contents( $this->tmp_file_name, $this->labels[0]['content'] ); // phpcs:ignore
55
+ } else {
56
+ $zip = new ZipArchive();
57
+ if ( ! $zip->open( $this->tmp_file_name, ZipArchive::CREATE ) ) {
58
+ throw new WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_Zip_File_Exception();
59
+ }
60
+ foreach ( $this->labels as $label ) {
61
+ if ( isset( $label['content'] ) ) {
62
+ $zip->addFromString( $label['file_name'], $label['content'] );
63
+ }
64
+ }
65
+ }
66
+ }
67
+
68
+ /**
69
+ * Prepare file names.
70
+ *
71
+ * @throws WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_File_Exception .
72
+ */
73
+ private function prepare_file_names() {
74
+ if ( 1 === count( $this->labels ) ) {
75
+ $this->file_name = $this->labels[0]['file_name'];
76
+ } else {
77
+ $this->file_name = 'labels.zip';
78
+ }
79
+ $this->tmp_file_name = @tempnam( 'tmp', 'labels_' ); // phpcs:ignore
80
+ if ( ! $this->tmp_file_name ) {
81
+ throw new WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_File_Exception();
82
+ }
83
+ }
84
+
85
+ /**
86
+ * Get file name.
87
+ *
88
+ * @return string
89
+ */
90
+ public function get_file_name() {
91
+ return $this->file_name;
92
+ }
93
+
94
+ /**
95
+ * Get temporary file name.
96
+ * In this file we save labels.
97
+ *
98
+ * @return string
99
+ */
100
+ public function get_tmp_file_name() {
101
+ return $this->tmp_file_name;
102
+ }
103
+
104
+ }
classes/wp-wpdesk-fs-shipment/label/class-labels-file-dispatcher.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Labels file dispatcher.
4
+ *
5
+ * @package Flexible Shipping
6
+ */
7
+
8
+ /**
9
+ * Can dispatch file to browser.
10
+ */
11
+ class WPDesk_Flexible_Shipping_Labels_File_Dispatcher {
12
+
13
+ /**
14
+ * Dispatches and delete temporary labels file.
15
+ *
16
+ * @param string $file_name Filename to send to browser.
17
+ * @param string $tmp_file_path Temporary labels file name.
18
+ */
19
+ public function dispatch_and_delete_labels_file( $file_name, $tmp_file_path ) {
20
+ header( 'Content-Description: File Transfer' );
21
+ header( 'Content-Type: application/octet-stream' );
22
+ header( 'Content-Disposition: attachment; filename="' . basename( $file_name ) . '"' );
23
+ header( 'Expires: 0' );
24
+ header( 'Cache-Control: must-revalidate' );
25
+ header( 'Pragma: public' );
26
+ header( 'Content-Length: ' . filesize( $tmp_file_path ) );
27
+ readfile( $tmp_file_path ); // phpcs:ignore
28
+ unlink( $tmp_file_path );
29
+ }
30
+
31
+ }
classes/wp-wpdesk-fs-shipment/label/interface-labels-builder.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Label builder.
4
+ *
5
+ * @package Flexible Shipping
6
+ */
7
+
8
+ /**
9
+ * Interface for labels builder.
10
+ */
11
+ interface WPDesk_Flexible_Shipping_Labels_Builder {
12
+
13
+ /**
14
+ * Get integration id.
15
+ *
16
+ * @return string
17
+ */
18
+ public function get_integration_id();
19
+
20
+ /**
21
+ * Get labels for shipments.
22
+ *
23
+ * @return array
24
+ * Returns array of labels. Each label is array with fields:
25
+ * content: label file content (ie. pdf file content) as string
26
+ * file_name: label file name
27
+ */
28
+ public function get_labels_for_shipments();
29
+
30
+ /**
31
+ * .
32
+ *
33
+ * @param WPDesk_Flexible_Shipping_Shipment $shipment .
34
+ */
35
+ public function add_shipment( WPDesk_Flexible_Shipping_Shipment $shipment );
36
+
37
+ }
flexible-shipping.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Flexible Shipping
4
  * Plugin URI: https://wordpress.org/plugins/flexible-shipping/
5
  * Description: Create additional shipment methods in WooCommerce and enable pricing based on cart weight or total.
6
- * Version: 3.9.9
7
  * Author: WP Desk
8
  * Author URI: https://www.wpdesk.net/
9
  * Text Domain: flexible-shipping
@@ -38,7 +38,7 @@ if ( ! defined( 'ABSPATH' ) ) {
38
  } // Exit if accessed directly
39
 
40
  /* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
41
- $plugin_version = '3.9.9';
42
  $plugin_release_timestamp = '2020-02-17 14:35';
43
 
44
  $plugin_name = 'Flexible Shipping';
3
  * Plugin Name: Flexible Shipping
4
  * Plugin URI: https://wordpress.org/plugins/flexible-shipping/
5
  * Description: Create additional shipment methods in WooCommerce and enable pricing based on cart weight or total.
6
+ * Version: 3.9.10
7
  * Author: WP Desk
8
  * Author URI: https://www.wpdesk.net/
9
  * Text Domain: flexible-shipping
38
  } // Exit if accessed directly
39
 
40
  /* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
41
+ $plugin_version = '3.9.10';
42
  $plugin_release_timestamp = '2020-02-17 14:35';
43
 
44
  $plugin_name = 'Flexible Shipping';
readme.txt CHANGED
@@ -4,79 +4,78 @@ Donate link: https://flexibleshipping.com/table-rate/
4
  Tags: table rate, table rate shipping, woocommerce shipping, flexible shipping, woocommerce table rate shipping, cart based shipping, weight shipping, weight based shipping, totals based shipping, order based shipping, shipping zones, shipping classes
5
  Requires at least: 4.5
6
  Tested up to: 5.3.2
7
- Stable tag: 3.9.9
8
  Requires PHP: 5.6
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
12
- The most flexible Table Rate Shipping WooCommerce plugin. Create virtually any shipping scenario you need based on totals, weight, quantity and more.
13
 
14
  == Description ==
15
 
16
  = Table Rate Shipping Killer =
17
 
18
- Flexible Shipping is the most advanced shipping plugin for WooCommerce stores allowing you to calculate shipping costs based on weight and/or cart total. Combine it with the PRO version and it will become the only WooCommerce Shipping plugin you'll ever need.
19
 
20
  [youtube https://www.youtube.com/watch?v=C7dQ2jQ-iVc]
21
 
22
  > **Upgrade to Flexible Shipping PRO**<br />
23
- > Get priority e-mail support and access all PRO features, upgrade to [Flexible Shipping PRO now &rarr;](https://flexibleshipping.com/table-rate/)
24
 
25
  = Possible Shipping Scenarios =
26
 
27
  * Shipping costs based on cart weight
28
  * Shipping costs based on cart total
29
- * Adding handling or insurance costs above a certain value
30
- * Creating COD (cash on delivery) shipping method with additional costs
31
  * Different shipping costs for different shipping classes (PRO)
32
- * Disable shipping method if a rule is matched in the cart (PRO)
33
- * Add a cost for order and per every product (PRO)
34
 
35
- These are just a few examples. The possibilities are probably endless ;) We described some of the in our [DIY section](https://docs.flexibleshipping.com/category/24-ready-to-use-scenarios).
36
 
37
  = Features =
38
 
39
- * Unlimited shipping methods and cost rules
40
- * Add titles and **descriptions** to your shipping methods
41
  * Shipping cost based on cart total and/or weight
42
  * Minimum and maximum values for cart total and/or weight
43
- * Summing cost rules if they are matched - option to add costs based on cart total and weight at the same time
44
  * Free shipping override
45
- * Show selected shipping methods only for logged in users
46
- * Integrations (see below for details)
47
- * Compatible with WooCommerce 2.6 Shipping Zones (see below for details)
48
- * WPML and Polylang support
49
  * CSV Import
50
- * Integrations with couriers
51
 
52
  = PRO Features =
53
 
54
  * All free features
55
- * Support for shipping classes
56
- * Shipping costs based on product item count and/or cart line item count
57
  * Additional costs for price, weight, item, cart line item
58
- * Stopping a rule (if the rule is matched the following rules are not calculated)
59
- * Cancelling a rule (if the rule is matched it is removed from available shipping methods at the checkout)
60
  * Additional calculation methods (sum, lowest cost, highest cost)
61
  * Maximum shipping cost per shipping method
62
- * Coupons support for free shipping
63
  * CSV Export
64
 
65
  [Upgrade to PRO Now &rarr;](https://flexibleshipping.com/table-rate/)
66
 
67
- = Locations Based Shipping Add-On =
68
 
69
- The Location Based Shipping Add-On extends Flexible Shipping for WooCommerce with additional rules based on locations. Works with both the free and PRO versions, so you can buy it separately if you don’t need the PRO features.
70
 
71
- [Buy Locations Add-On Now &rarr;](https://flexibleshipping.com/products/flexible-shipping-locations-woocommerce/)
72
 
73
  = WooCommerce Compatibility =
74
 
75
- **WooCommerce 3.8 ready!** In Flexible Shipping 3.9.2 we added support for WooCommerce 3.8.
76
 
77
- **Shipping Zones ready!** Flexible Shipping is compatible with WooCommerce Shipping Zones introduced in version 2.6. Read more about [WooCommerce Shipping Zones](https://flexibleshipping.com/woocommerce-shipping-zones-explained/).
78
 
79
- Flexible Shipping also plays well with older versions of WooCommerce. We tested the plugin with WooCommerce 3.1.0 and up.
80
 
81
  = Docs =
82
 
@@ -84,19 +83,17 @@ Flexible Shipping also plays well with older versions of WooCommerce. We tested
84
 
85
  = Support Policy =
86
 
87
- We provide a limited support for the free version in the [plugin Support Forum](https://wordpress.org/support/plugin/flexible-shipping/). Please upgrade to PRO version to get priority e-mail support as well as all pro features. [Upgrade Now &rarr;](https://flexibleshipping.com/table-rate/)
88
 
89
- = Integrations =
90
-
91
- Flexible Shipping Connect supports UPS (Worldwide) by default.
92
 
93
  **United Kingdom**
94
 
95
- We created WooCommerce DPD UK integration for Flexible Shipping. [Check DPD UK for WooCommerce &rarr;](https://flexibleshipping.com/products/dpd-uk-dpd-local-woocommerce/)
96
 
97
  **Poland**
98
 
99
- There are several integrations that we provide for Flexible Shipping in Poland:
100
 
101
  * DPD - WooCommerce
102
  * DHL - WooCommerce
@@ -104,10 +101,10 @@ There are several integrations that we provide for Flexible Shipping in Poland:
104
  * eNadawca Poczta Polska - WooCommerce
105
  * Paczka w Ruchu - WooCommerce
106
 
107
- [View the Polish integrations &rarr;](https://www.wpdesk.pl/kategoria-produktu/wysylka/)
108
 
109
  > **Get more WooCommerce plugins from WP Desk**<br />
110
- > We provide premium plugins for customizing checkout, shipping, invoicing and more. Check out our [premium WooCommerce plugins here →](https://www.wpdesk.net/products/)
111
 
112
  = Supported Currency Switchers =
113
 
@@ -126,9 +123,9 @@ There are several integrations that we provide for Flexible Shipping in Poland:
126
 
127
  Key features:
128
 
129
- * improved user experience related to shipping,
130
  * create custom shipping rules,
131
- * offer free shipping based on the price or quantity of products in the basket,
132
  * cost based shipping cost
133
  * weight based shipping cost
134
  * total order based shipping cost,
@@ -136,30 +133,29 @@ Key features:
136
  * shipping class based shipping cost,
137
  * WooCommerce shipping cost rules,
138
  * WooCommerce shipping plugin,
139
- * WooCommerce table rate shipping,
140
- * WooCommerce UPS shipping.
141
 
142
- Check out this WooCommerce Table Rate Shipping Plugin today!
143
 
144
  == Installation ==
145
 
146
- You can install this plugin like any other WordPress plugin.
147
 
148
- 1. Download and unzip the latest release zip file.
149
- 2. Upload the entire plugin directory to your /wp-content/plugins/ directory.
150
- 3. Activate the plugin through the Plugins menu in WordPress Administration.
151
 
152
- You can also use WordPress uploader to upload plugin zip file in menu Plugins -> Add New -> Upload Plugin. Then go directly to point 3.
153
 
154
  == Frequently Asked Questions ==
155
 
156
  = How to configure the plugin? =
157
 
158
- Just check out our [Flexible Shipping Docs here](https://docs.flexibleshipping.com/collection/20-fs-table-rate).
159
 
160
  = Do you offer support? =
161
 
162
- We provide a limited support for the free version in the [plugin Support Forum](https://wordpress.org/support/plugin/flexible-shipping/). Please upgrade to PRO version to get priority e-mail support as well as all pro features. [Upgrade Now &rarr;](https://flexibleshipping.com/table-rate/)
163
 
164
  == Screenshots ==
165
 
@@ -171,10 +167,13 @@ We provide a limited support for the free version in the [plugin Support Forum](
171
 
172
  == Upgrade Notice ==
173
 
174
- If you are upgrading from the old Flexible Shipping version (1.3.2, woo-flexible-shipping) make sure to completely delete the old version first. If you install the new version without deleting the old one you may break your WordPress installation.
175
 
176
  == Changelog ==
177
 
 
 
 
178
  = 3.9.9 - 2020-02-17 =
179
  * Added log messages in WPDesk_Flexible_Shipping_Shipment class.
180
  * Fixed fatal error in checkout: strongly typed array in woocommerce_shipping_chosen_method filter
4
  Tags: table rate, table rate shipping, woocommerce shipping, flexible shipping, woocommerce table rate shipping, cart based shipping, weight shipping, weight based shipping, totals based shipping, order based shipping, shipping zones, shipping classes
5
  Requires at least: 4.5
6
  Tested up to: 5.3.2
7
+ Stable tag: 3.9.10
8
  Requires PHP: 5.6
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
12
+ The most flexible Table Rate Shipping WooCommerce plugin. Create almost every shipping scenario you need based on totals, weight, quantity and more.
13
 
14
  == Description ==
15
 
16
  = Table Rate Shipping Killer =
17
 
18
+ Flexible Shipping is the most advanced shipping plugin for WooCommerce stores allowing you to calculate the shipping costs based on weight and/or cart total. Combine it with the PRO version and it will become the only WooCommerce shipping plugin you'll ever need.
19
 
20
  [youtube https://www.youtube.com/watch?v=C7dQ2jQ-iVc]
21
 
22
  > **Upgrade to Flexible Shipping PRO**<br />
23
+ > Upgrade to [Flexible Shipping PRO now](https://flexibleshipping.com/table-rate/) to get the priority e-mail support and gain an access to all the PRO features!
24
 
25
  = Possible Shipping Scenarios =
26
 
27
  * Shipping costs based on cart weight
28
  * Shipping costs based on cart total
29
+ * Adding handling fee or an insurance cost after reaching a certain order value
30
+ * Creating COD (Cash On Delivery) shipping method with additional costs
31
  * Different shipping costs for different shipping classes (PRO)
32
+ * Disable/hide shipping method if a defined rule has been matched in the cart (PRO)
33
+ * Add a cost per whole order and per each one product in the cart (PRO)
34
 
35
+ These are only a few examples of the Flexible Shipping usage, however, its possibilities are almost endless and sky is the limit ;) We have described some of them in our docs and [Ready to use scenarios](https://docs.flexibleshipping.com/category/24-ready-to-use-scenarios).
36
 
37
  = Features =
38
 
39
+ * Unlimited shipping methods and costs calculation rules
40
+ * Possibility of adding the titles and **descriptions** to your shipping methods
41
  * Shipping cost based on cart total and/or weight
42
  * Minimum and maximum values for cart total and/or weight
43
+ * Summing up the costs of e.g. two different rules at the same time e.g. one based on cart total and the second based on weight
44
  * Free shipping override
45
+ * Option to display the selected shipping methods only for logged-in users
46
+ * Further shipping companies integrations (see the info below for details)
47
+ * Compatible with WooCommerce 2.6 Shipping Zones (see the info below for details)
48
+ * WPML and Polylang compatibility
49
  * CSV Import
 
50
 
51
  = PRO Features =
52
 
53
  * All free features
54
+ * **Shipping classes support**
55
+ * Shipping costs based on products' quantity and/or cart line item count
56
  * Additional costs for price, weight, item, cart line item
57
+ * Stopping a rule (if the rule is matched the following rules will not be calculated)
58
+ * Cancelling a rule (if the rule is matched it will remain hidden and not be displayed among the shipping methods at the checkout)
59
  * Additional calculation methods (sum, lowest cost, highest cost)
60
  * Maximum shipping cost per shipping method
61
+ * Free shipping coupons support
62
  * CSV Export
63
 
64
  [Upgrade to PRO Now &rarr;](https://flexibleshipping.com/table-rate/)
65
 
66
+ = Flexible Shipping Locations Add-On =
67
 
68
+ Flexible Shipping Locations Add-On extends the default Flexible Shipping for WooCommerce functionalities and adds the possiblity to create the additional rules based on locations. It works with both ,the free and PRO versions so you can buy it separately if you do not need the PRO features.
69
 
70
+ [Buy Flexible Shipping Locations Add-On now &rarr;](https://flexibleshipping.com/products/flexible-shipping-locations-woocommerce/)
71
 
72
  = WooCommerce Compatibility =
73
 
74
+ **WooCommerce 3.9 ready!** In the 3.9.5 Flexible Shipping version we added the WooCommerce 3.9 support.
75
 
76
+ **Shipping Zones ready!** Flexible Shipping is compatible with WooCommerce Shipping Zones introduced in the 2.6 release. Read more about [WooCommerce Shipping Zones &rarr;](https://flexibleshipping.com/woocommerce-shipping-zones-explained/).
77
 
78
+ Flexible Shipping also goes well with the older versions of WooCommerce. It has been tested with WooCommerce 3.1.0 release and later ones.
79
 
80
  = Docs =
81
 
83
 
84
  = Support Policy =
85
 
86
+ We provide a limited support for the free version of our Flexible Shipping plugin on the [dedicated plugin Support Forum](https://wordpress.org/support/plugin/flexible-shipping/). Please upgrade to PRO version to get the priority e-mail support as well as all PRO features. [Upgrade Now &rarr;](https://flexibleshipping.com/table-rate/)
87
 
88
+ = Further Integrations =
 
 
89
 
90
  **United Kingdom**
91
 
92
+ We have released a DPD UK WooCommerce integration for Flexible Shipping covering the whole UK teritory. Check our plugin and [offer your customers the DPD UK services at your shop &rarr;](https://flexibleshipping.com/products/dpd-uk-dpd-local-woocommerce/)
93
 
94
  **Poland**
95
 
96
+ There are also some more further integrations that we provide for Flexible Shipping in Poland:
97
 
98
  * DPD - WooCommerce
99
  * DHL - WooCommerce
101
  * eNadawca Poczta Polska - WooCommerce
102
  * Paczka w Ruchu - WooCommerce
103
 
104
+ [View all the Polish integrations here &rarr;](https://www.wpdesk.pl/kategoria-produktu/wysylka/)
105
 
106
  > **Get more WooCommerce plugins from WP Desk**<br />
107
+ > We provide premium plugins for the checkout/products' customization, shipping, invoicing and more. Check our [premium WooCommerce plugins here →](https://www.wpdesk.net/products/)
108
 
109
  = Supported Currency Switchers =
110
 
123
 
124
  Key features:
125
 
126
+ * improve shipping-related user experience,
127
  * create custom shipping rules,
128
+ * offer the free shipping based on the price or products' in the cart quantity,
129
  * cost based shipping cost
130
  * weight based shipping cost
131
  * total order based shipping cost,
133
  * shipping class based shipping cost,
134
  * WooCommerce shipping cost rules,
135
  * WooCommerce shipping plugin,
136
+ * WooCommerce table rate shipping.
 
137
 
138
+ Give it a try and find out that our Flexible Shipping is the only one Table Rate Shipping plugin you need!
139
 
140
  == Installation ==
141
 
142
+ This plugin can be easilly installed like any other WordPress integration by following the steps below:
143
 
144
+ 1. Download and unzip the latest zip file release.
145
+ 2. Upload the entire plugin directory to your /wp-content/plugins/ path.
146
+ 3. Activate the plugin using the Plugins menu in WordPress sidebar menu.
147
 
148
+ Optionally you can also try to upload the plugin zip file using Plugins -> Add New -> Upload Plugin option from the WordPress sidebar menu. Then go directly to point 3.
149
 
150
  == Frequently Asked Questions ==
151
 
152
  = How to configure the plugin? =
153
 
154
+ To make it clear and as easy as possible we have prepared the detailed step-by-step guides in our [Flexible Shipping Docs here](https://docs.flexibleshipping.com/collection/20-fs-table-rate).
155
 
156
  = Do you offer support? =
157
 
158
+ We provide a limited support for the free version of our Flexible Shipping plugin on the [dedicated plugin Support Forum](https://wordpress.org/support/plugin/flexible-shipping/). Please upgrade to PRO version to get the priority e-mail support as well as all PRO features. [Upgrade Now &rarr;](https://flexibleshipping.com/table-rate/)
159
 
160
  == Screenshots ==
161
 
167
 
168
  == Upgrade Notice ==
169
 
170
+ If you are upgrading from the old Flexible Shipping version (1.3.2, woo-flexible-shipping) make sure to completely delete the old version first. If you install the new version without deleting the old one it may break your WordPress installation.
171
 
172
  == Changelog ==
173
 
174
+ = 3.9.10 - 2020-03-02 =
175
+ * Added bulk labels functionality - ability to print multiple labels in one file
176
+
177
  = 3.9.9 - 2020-02-17 =
178
  * Added log messages in WPDesk_Flexible_Shipping_Shipment class.
179
  * Fixed fatal error in checkout: strongly typed array in woocommerce_shipping_chosen_method filter
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit7841873284f105a308ea8b8843703f31::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit57fb0a1fdd483f653392652aa77134ec::getLoader();
vendor/composer/autoload_classmap.php CHANGED
@@ -300,7 +300,12 @@ return array(
300
  'WPDesk_Flexible_Shipping_Deactivation_Thickbox_Factory' => $baseDir . '/classes/table-rate/abtests/class-deactivation-thickbox-factory.php',
301
  'WPDesk_Flexible_Shipping_Export' => $baseDir . '/classes/table-rate/csv/flexible-shipping-export.php',
302
  'WPDesk_Flexible_Shipping_Get_Label_Exception' => $baseDir . '/classes/wp-wpdesk-fs-shipment/exception/class-get-label-exception.php',
 
303
  'WPDesk_Flexible_Shipping_Label_Not_Available_Exception' => $baseDir . '/classes/wp-wpdesk-fs-shipment/exception/class-label-not-available-exception.php',
 
 
 
 
304
  'WPDesk_Flexible_Shipping_Logger_Downloader' => $baseDir . '/classes/table-rate/logger/class-logger-downloader.php',
305
  'WPDesk_Flexible_Shipping_Logger_Factory' => $baseDir . '/classes/table-rate/logger/class-logger-factory.php',
306
  'WPDesk_Flexible_Shipping_Logger_Settings' => $baseDir . '/classes/table-rate/logger/class-logger-settings.php',
@@ -326,6 +331,8 @@ return array(
326
  'WPDesk_Flexible_Shipping_Shorcode_Unit_Dimension' => $baseDir . '/classes/table-rate/class-shortcode-unit-dimension.php',
327
  'WPDesk_Flexible_Shipping_Shorcode_Unit_Weight' => $baseDir . '/classes/table-rate/class-shortcode-unit-weight.php',
328
  'WPDesk_Flexible_Shipping_Tracker' => $baseDir . '/classes/tracker/tracker.php',
 
 
329
  'WPDesk_Flexible_Shipping_WooCommerce_Context_Logger' => $baseDir . '/classes/table-rate/logger/class-woocommerce-context-logger.php',
330
  'WPDesk_Tracker_Data_Provider' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-data-provider.php',
331
  'WPDesk_Tracker_Factory' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Helper/TrackerFactory.php',
300
  'WPDesk_Flexible_Shipping_Deactivation_Thickbox_Factory' => $baseDir . '/classes/table-rate/abtests/class-deactivation-thickbox-factory.php',
301
  'WPDesk_Flexible_Shipping_Export' => $baseDir . '/classes/table-rate/csv/flexible-shipping-export.php',
302
  'WPDesk_Flexible_Shipping_Get_Label_Exception' => $baseDir . '/classes/wp-wpdesk-fs-shipment/exception/class-get-label-exception.php',
303
+ 'WPDesk_Flexible_Shipping_Integration_Label_Builder' => $baseDir . '/classes/wp-wpdesk-fs-shipment/label/class-integration-label-builder.php',
304
  'WPDesk_Flexible_Shipping_Label_Not_Available_Exception' => $baseDir . '/classes/wp-wpdesk-fs-shipment/exception/class-label-not-available-exception.php',
305
+ 'WPDesk_Flexible_Shipping_Labels_Builder' => $baseDir . '/classes/wp-wpdesk-fs-shipment/label/interface-labels-builder.php',
306
+ 'WPDesk_Flexible_Shipping_Labels_Bulk_Action_Handler' => $baseDir . '/classes/wp-wpdesk-fs-shipment/label/class-labels-bulk-action-handler.php',
307
+ 'WPDesk_Flexible_Shipping_Labels_File_Creator' => $baseDir . '/classes/wp-wpdesk-fs-shipment/label/class-labels-file-creator.php',
308
+ 'WPDesk_Flexible_Shipping_Labels_File_Dispatcher' => $baseDir . '/classes/wp-wpdesk-fs-shipment/label/class-labels-file-dispatcher.php',
309
  'WPDesk_Flexible_Shipping_Logger_Downloader' => $baseDir . '/classes/table-rate/logger/class-logger-downloader.php',
310
  'WPDesk_Flexible_Shipping_Logger_Factory' => $baseDir . '/classes/table-rate/logger/class-logger-factory.php',
311
  'WPDesk_Flexible_Shipping_Logger_Settings' => $baseDir . '/classes/table-rate/logger/class-logger-settings.php',
331
  'WPDesk_Flexible_Shipping_Shorcode_Unit_Dimension' => $baseDir . '/classes/table-rate/class-shortcode-unit-dimension.php',
332
  'WPDesk_Flexible_Shipping_Shorcode_Unit_Weight' => $baseDir . '/classes/table-rate/class-shortcode-unit-weight.php',
333
  'WPDesk_Flexible_Shipping_Tracker' => $baseDir . '/classes/tracker/tracker.php',
334
+ 'WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_File_Exception' => $baseDir . '/classes/wp-wpdesk-fs-shipment/exception/class-shipment-unable-to-create-tmp-file-exception.php',
335
+ 'WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_Zip_File_Exception' => $baseDir . '/classes/wp-wpdesk-fs-shipment/exception/class-shipment-unable-to-create-tmp-zip-file-exception.php',
336
  'WPDesk_Flexible_Shipping_WooCommerce_Context_Logger' => $baseDir . '/classes/table-rate/logger/class-woocommerce-context-logger.php',
337
  'WPDesk_Tracker_Data_Provider' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-data-provider.php',
338
  'WPDesk_Tracker_Factory' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Helper/TrackerFactory.php',
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit7841873284f105a308ea8b8843703f31
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit7841873284f105a308ea8b8843703f31
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit7841873284f105a308ea8b8843703f31', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit7841873284f105a308ea8b8843703f31', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit7841873284f105a308ea8b8843703f31::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit57fb0a1fdd483f653392652aa77134ec
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit57fb0a1fdd483f653392652aa77134ec', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit57fb0a1fdd483f653392652aa77134ec', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit57fb0a1fdd483f653392652aa77134ec::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit7841873284f105a308ea8b8843703f31
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'P' =>
@@ -315,7 +315,12 @@ class ComposerStaticInit7841873284f105a308ea8b8843703f31
315
  'WPDesk_Flexible_Shipping_Deactivation_Thickbox_Factory' => __DIR__ . '/../..' . '/classes/table-rate/abtests/class-deactivation-thickbox-factory.php',
316
  'WPDesk_Flexible_Shipping_Export' => __DIR__ . '/../..' . '/classes/table-rate/csv/flexible-shipping-export.php',
317
  'WPDesk_Flexible_Shipping_Get_Label_Exception' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/exception/class-get-label-exception.php',
 
318
  'WPDesk_Flexible_Shipping_Label_Not_Available_Exception' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/exception/class-label-not-available-exception.php',
 
 
 
 
319
  'WPDesk_Flexible_Shipping_Logger_Downloader' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-logger-downloader.php',
320
  'WPDesk_Flexible_Shipping_Logger_Factory' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-logger-factory.php',
321
  'WPDesk_Flexible_Shipping_Logger_Settings' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-logger-settings.php',
@@ -341,6 +346,8 @@ class ComposerStaticInit7841873284f105a308ea8b8843703f31
341
  'WPDesk_Flexible_Shipping_Shorcode_Unit_Dimension' => __DIR__ . '/../..' . '/classes/table-rate/class-shortcode-unit-dimension.php',
342
  'WPDesk_Flexible_Shipping_Shorcode_Unit_Weight' => __DIR__ . '/../..' . '/classes/table-rate/class-shortcode-unit-weight.php',
343
  'WPDesk_Flexible_Shipping_Tracker' => __DIR__ . '/../..' . '/classes/tracker/tracker.php',
 
 
344
  'WPDesk_Flexible_Shipping_WooCommerce_Context_Logger' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-woocommerce-context-logger.php',
345
  'WPDesk_Tracker_Data_Provider' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-data-provider.php',
346
  'WPDesk_Tracker_Factory' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Helper/TrackerFactory.php',
@@ -351,9 +358,9 @@ class ComposerStaticInit7841873284f105a308ea8b8843703f31
351
  public static function getInitializer(ClassLoader $loader)
352
  {
353
  return \Closure::bind(function () use ($loader) {
354
- $loader->prefixLengthsPsr4 = ComposerStaticInit7841873284f105a308ea8b8843703f31::$prefixLengthsPsr4;
355
- $loader->prefixDirsPsr4 = ComposerStaticInit7841873284f105a308ea8b8843703f31::$prefixDirsPsr4;
356
- $loader->classMap = ComposerStaticInit7841873284f105a308ea8b8843703f31::$classMap;
357
 
358
  }, null, ClassLoader::class);
359
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit57fb0a1fdd483f653392652aa77134ec
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'P' =>
315
  'WPDesk_Flexible_Shipping_Deactivation_Thickbox_Factory' => __DIR__ . '/../..' . '/classes/table-rate/abtests/class-deactivation-thickbox-factory.php',
316
  'WPDesk_Flexible_Shipping_Export' => __DIR__ . '/../..' . '/classes/table-rate/csv/flexible-shipping-export.php',
317
  'WPDesk_Flexible_Shipping_Get_Label_Exception' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/exception/class-get-label-exception.php',
318
+ 'WPDesk_Flexible_Shipping_Integration_Label_Builder' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/label/class-integration-label-builder.php',
319
  'WPDesk_Flexible_Shipping_Label_Not_Available_Exception' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/exception/class-label-not-available-exception.php',
320
+ 'WPDesk_Flexible_Shipping_Labels_Builder' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/label/interface-labels-builder.php',
321
+ 'WPDesk_Flexible_Shipping_Labels_Bulk_Action_Handler' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/label/class-labels-bulk-action-handler.php',
322
+ 'WPDesk_Flexible_Shipping_Labels_File_Creator' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/label/class-labels-file-creator.php',
323
+ 'WPDesk_Flexible_Shipping_Labels_File_Dispatcher' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/label/class-labels-file-dispatcher.php',
324
  'WPDesk_Flexible_Shipping_Logger_Downloader' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-logger-downloader.php',
325
  'WPDesk_Flexible_Shipping_Logger_Factory' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-logger-factory.php',
326
  'WPDesk_Flexible_Shipping_Logger_Settings' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-logger-settings.php',
346
  'WPDesk_Flexible_Shipping_Shorcode_Unit_Dimension' => __DIR__ . '/../..' . '/classes/table-rate/class-shortcode-unit-dimension.php',
347
  'WPDesk_Flexible_Shipping_Shorcode_Unit_Weight' => __DIR__ . '/../..' . '/classes/table-rate/class-shortcode-unit-weight.php',
348
  'WPDesk_Flexible_Shipping_Tracker' => __DIR__ . '/../..' . '/classes/tracker/tracker.php',
349
+ 'WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_File_Exception' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/exception/class-shipment-unable-to-create-tmp-file-exception.php',
350
+ 'WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_Zip_File_Exception' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/exception/class-shipment-unable-to-create-tmp-zip-file-exception.php',
351
  'WPDesk_Flexible_Shipping_WooCommerce_Context_Logger' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-woocommerce-context-logger.php',
352
  'WPDesk_Tracker_Data_Provider' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-data-provider.php',
353
  'WPDesk_Tracker_Factory' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Helper/TrackerFactory.php',
358
  public static function getInitializer(ClassLoader $loader)
359
  {
360
  return \Closure::bind(function () use ($loader) {
361
+ $loader->prefixLengthsPsr4 = ComposerStaticInit57fb0a1fdd483f653392652aa77134ec::$prefixLengthsPsr4;
362
+ $loader->prefixDirsPsr4 = ComposerStaticInit57fb0a1fdd483f653392652aa77134ec::$prefixDirsPsr4;
363
+ $loader->classMap = ComposerStaticInit57fb0a1fdd483f653392652aa77134ec::$classMap;
364
 
365
  }, null, ClassLoader::class);
366
  }