Flexible Shipping for WooCommerce - Version 4.15.0

Version Description

  • 2022-10-18 =
  • Added compatibility with WooCommerce High-Performance Order Storage (HPOS)
  • Added support for WordPress 6.1
Download this release

Release Info

Developer octolize
Plugin Icon 128x128 Flexible Shipping for WooCommerce
Version 4.15.0
Comparing to
See all releases

Code changes from version 4.14.2 to 4.15.0

Files changed (37) hide show
  1. classes/class-flexible-shipping-plugin.php +19 -41
  2. classes/table-rate/bulk-actions.php +0 -521
  3. classes/table-rate/flexible-shipping-settings.php +0 -3
  4. classes/table-rate/views/html-column-shipping-shipping.php +0 -20
  5. classes/table-rate/views/html-orders-filter-form.php +0 -19
  6. flexible-shipping.php +8 -7
  7. lang/flexible-shipping.pot +693 -128
  8. readme.txt +6 -2
  9. src/WPDesk/FS/Shipment/AdminNotices.php +95 -0
  10. src/WPDesk/FS/Shipment/BulkAction.php +137 -0
  11. src/WPDesk/FS/Shipment/BulkAction/HandleAction.php +38 -0
  12. src/WPDesk/FS/Shipment/BulkAction/HandleActionLabels.php +72 -0
  13. src/WPDesk/FS/Shipment/BulkAction/HandleActionManifest.php +112 -0
  14. src/WPDesk/FS/Shipment/BulkAction/HandleActionSend.php +72 -0
  15. src/WPDesk/FS/Shipment/BulkAction/HandleActionStrategy.php +40 -0
  16. src/WPDesk/FS/Shipment/BulkAction/HandleActionStrategyInterface.php +19 -0
  17. src/WPDesk/FS/Shipment/DispatchLabelFile.php +46 -0
  18. src/WPDesk/FS/Shipment/FilterOrders.php +133 -0
  19. src/WPDesk/FS/Shipment/ModifyOrderTable.php +169 -0
  20. src/WPDesk/FS/Shipment/ModifyStatuses.php +38 -0
  21. src/WPDesk/FS/Shipment/views/html-column-shipping-shipping.php +34 -0
  22. src/WPDesk/FS/Shipment/views/html-orders-filter-form.php +29 -0
  23. vendor/composer/autoload_classmap.php +12 -1
  24. vendor/composer/autoload_static.php +12 -1
  25. vendor/composer/installed.json +8 -11
  26. vendor/wpdesk/wp-wpdesk-fs-shipment-interfaces/CHANGELOG.md +4 -0
  27. vendor/wpdesk/wp-wpdesk-fs-shipment-interfaces/classes/shipment/class-shipment.php +1 -1
  28. vendor_prefixed/wpdesk/wp-helpscout-beacon/composer.json +5 -4
  29. vendor_prefixed/wpdesk/wp-helpscout-beacon/src/Beacon/Beacon.php +1 -1
  30. vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/composer.json +3 -3
  31. vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Assets.php +9 -5
  32. vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php +22 -11
  33. vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Metabox/Ajax.php +1 -2
  34. vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Order/AddShippingMetabox.php +5 -4
  35. vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/RestApi/OrderDataProvidersFactory.php +2 -1
  36. vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/RestApi/OrderResponseDataAppender.php +9 -1
  37. vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/ShipmentFunctionality.php +4 -2
classes/class-flexible-shipping-plugin.php CHANGED
@@ -71,6 +71,7 @@ use WPDesk\FS\TableRate\Tax\Tracker;
71
  use WPDesk\FS\TableRate\UserFeedback;
72
  use WPDesk\FS\TableRate\ContextualInfo;
73
  use WPDesk\FS\Tracker\TrackerNotices;
 
74
 
75
  /**
76
  * Class Flexible_Shipping_Plugin
@@ -190,7 +191,12 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
190
 
191
  $this->add_hookable( new ShipmentFunctionality( $this->logger, trailingslashit( $this->get_plugin_assets_url() ) . '../vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/assets/', $this->scripts_version ) );
192
 
193
- $this->add_hookable( new WPDesk_Flexible_Shipping_Bulk_Actions( $session_factory ) );
 
 
 
 
 
194
 
195
  new WPDesk_Flexible_Shipping_Multilingual( $this );
196
 
@@ -397,7 +403,7 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
397
  'woocommerce_shipping_methods_filter',
398
  ], self::PRIORITY_AFTER_DEFAULT );
399
 
400
- add_action(
401
  'flexible_shipping_method_rate_id',
402
  [
403
  $this,
@@ -417,14 +423,6 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
417
  3
418
  );
419
 
420
- add_action(
421
- 'woocommerce_checkout_update_order_meta',
422
- [
423
- $this,
424
- 'add_flexible_shipping_order_meta_on_checkout_woo_pre_27',
425
- ]
426
- );
427
-
428
  add_action(
429
  'woocommerce_checkout_create_order',
430
  [
@@ -638,32 +636,6 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
638
  }
639
  }
640
 
641
- /**
642
- * Add flexible shipping order meta on checkout (for WooCommerce versions before 2.7).
643
- *
644
- * @param int $order_id Order id.
645
- */
646
- public function add_flexible_shipping_order_meta_on_checkout_woo_pre_27( $order_id ) {
647
- if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
648
- if ( ! $this->is_order_processed_on_checkout ) {
649
- $this->is_order_processed_on_checkout = true;
650
- $order = wc_get_order( $order_id );
651
- $order_shipping_methods = $order->get_shipping_methods();
652
- foreach ( $order_shipping_methods as $shipping_id => $shipping_method ) {
653
- if ( isset( $shipping_method['item_meta'] )
654
- && isset( $shipping_method['item_meta']['_fs_method'] )
655
- && isset( $shipping_method['item_meta']['_fs_method'][0] )
656
- ) {
657
- $fs_method = unserialize( $shipping_method['item_meta']['_fs_method'][0] );
658
- if ( ! empty( $fs_method['method_integration'] ) ) {
659
- add_post_meta( $order->id, '_flexible_shipping_integration', $fs_method['method_integration'] );
660
- }
661
- }
662
- }
663
- }
664
- }
665
- }
666
-
667
  /**
668
  * Set appropriate default FS method if no method chosen.
669
  *
@@ -785,11 +757,17 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
785
  */
786
  private function should_enqueue_admin_scripts() {
787
  $current_screen = get_current_screen();
788
- $wc_screen_id = sanitize_title( __( 'WooCommerce', 'woocommerce' ) );
789
- if ( in_array( $current_screen->post_type, [
790
- 'shop_order',
791
- 'shop_subscription',
792
- ], true ) || $wc_screen_id . '_page_wc-settings' === $current_screen->id ) {
 
 
 
 
 
 
793
  return true;
794
  }
795
 
71
  use WPDesk\FS\TableRate\UserFeedback;
72
  use WPDesk\FS\TableRate\ContextualInfo;
73
  use WPDesk\FS\Tracker\TrackerNotices;
74
+ use WPDesk\FS\Shipment;
75
 
76
  /**
77
  * Class Flexible_Shipping_Plugin
191
 
192
  $this->add_hookable( new ShipmentFunctionality( $this->logger, trailingslashit( $this->get_plugin_assets_url() ) . '../vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/assets/', $this->scripts_version ) );
193
 
194
+ $this->add_hookable( new Shipment\FilterOrders() );
195
+ $this->add_hookable( new Shipment\ModifyStatuses() );
196
+ $this->add_hookable( new Shipment\DispatchLabelFile() );
197
+ $this->add_hookable( new Shipment\BulkAction( $session_factory ) );
198
+ $this->add_hookable( new Shipment\AdminNotices( $session_factory ) );
199
+ $this->add_hookable( new Shipment\ModifyOrderTable( $session_factory ) );
200
 
201
  new WPDesk_Flexible_Shipping_Multilingual( $this );
202
 
403
  'woocommerce_shipping_methods_filter',
404
  ], self::PRIORITY_AFTER_DEFAULT );
405
 
406
+ add_filter(
407
  'flexible_shipping_method_rate_id',
408
  [
409
  $this,
423
  3
424
  );
425
 
 
 
 
 
 
 
 
 
426
  add_action(
427
  'woocommerce_checkout_create_order',
428
  [
636
  }
637
  }
638
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
639
  /**
640
  * Set appropriate default FS method if no method chosen.
641
  *
757
  */
758
  private function should_enqueue_admin_scripts() {
759
  $current_screen = get_current_screen();
760
+
761
+ if ( ! $current_screen ) {
762
+ return false;
763
+ }
764
+
765
+ $wc_screen_id = sanitize_title( __( 'WooCommerce', 'woocommerce' ) );
766
+
767
+ if (
768
+ 'woocommerce_page_wc-orders' === $current_screen->id
769
+ || in_array( $current_screen->post_type, [ 'shop_order', 'shop_subscription', ], true )
770
+ || $wc_screen_id . '_page_wc-settings' === $current_screen->id ) {
771
  return true;
772
  }
773
 
classes/table-rate/bulk-actions.php DELETED
@@ -1,521 +0,0 @@
1
- <?php
2
- /**
3
- * Bulk actions.
4
- *
5
- * @package Flexible Shipping
6
- */
7
-
8
- use FSVendor\WPDesk\Notice\Notice;
9
- use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
10
- use FSVendor\WPDesk\Session\Session;
11
- use FSVendor\WPDesk\Session\SessionFactory;
12
-
13
- /**
14
- * Can handle bulk actions on shipments.
15
- */
16
- class WPDesk_Flexible_Shipping_Bulk_Actions implements Hookable {
17
-
18
- /**
19
- * .
20
- *
21
- * @var SessionFactory
22
- */
23
- private $session_factory;
24
-
25
- /**
26
- * WPDesk_Flexible_Shipping_Bulk_Actions constructor.
27
- *
28
- * @param SessionFactory $session_factory .
29
- */
30
- public function __construct( SessionFactory $session_factory ) {
31
- $this->session_factory = $session_factory;
32
- }
33
-
34
- /**
35
- * @return Session
36
- */
37
- public function get_session() {
38
- return $this->session_factory->get_woocommerce_session_adapter();
39
- }
40
-
41
- /**
42
- * Hooks.
43
- */
44
- public function hooks() {
45
-
46
- add_filter( 'manage_edit-shop_order_columns', array( $this, 'manage_edit_shop_order_columns' ), 11 );
47
- add_action( 'manage_shop_order_posts_custom_column', array(
48
- $this,
49
- 'manage_shop_order_posts_custom_column'
50
- ), 11 );
51
-
52
- add_filter( 'bulk_actions-edit-shop_order', array( $this, 'bulk_actions_edit_shop_order' ) );
53
- add_filter( 'handle_bulk_actions-edit-shop_order', array(
54
- $this,
55
- 'handle_bulk_actions_edit_shop_order'
56
- ), 10, 3 );
57
-
58
- add_action( 'restrict_manage_posts', array( $this, 'restrict_manage_posts' ), 9999 );
59
-
60
- add_filter( 'posts_where', array( $this, 'posts_where' ), 999 );
61
-
62
- add_action( 'admin_notices', array( $this, 'admin_notices' ) );
63
-
64
- add_action( 'admin_init', array( $this, 'dispatch_labels_file_if_expected' ), 1 );
65
-
66
- add_filter( 'flexible_shipping_status', array( $this, 'flexible_shipping_status' ) );
67
-
68
- }
69
-
70
- /**
71
- * .
72
- *
73
- * @param array $statuses .
74
- *
75
- * @return mixed
76
- */
77
- public function flexible_shipping_status( $statuses ) {
78
- $statuses['new'] = __( 'New', 'flexible-shipping' );
79
- $statuses['created'] = __( 'Created', 'flexible-shipping' );
80
- $statuses['confirmed'] = __( 'Confirmed', 'flexible-shipping' );
81
- $statuses['manifest'] = __( 'Manifest', 'flexible-shipping' );
82
- $statuses['failed'] = __( 'Failed', 'flexible-shipping' );
83
-
84
- return $statuses;
85
- }
86
-
87
- /**
88
- * @param string $where .
89
- *
90
- * @return string
91
- */
92
- public function posts_where( $where = '' ) {
93
- global $pagenow;
94
- global $wp_query;
95
- global $wpdb;
96
- $query = $wp_query;
97
- if ( 'edit.php' === $pagenow && is_admin()
98
- && isset( $query->query_vars['post_type'] )
99
- && 'shop_order' === $query->query_vars['post_type']
100
- ) {
101
- $integration = '';
102
- if ( isset( $_GET['flexible_shipping_integration_filter'] ) ) {
103
- $integration = sanitize_key( $_GET['flexible_shipping_integration_filter'] );
104
- }
105
- $status = '';
106
- if ( isset( $_GET['flexible_shipping_status_filter'] ) ) {
107
- $status = sanitize_key( $_GET['flexible_shipping_status_filter'] );
108
- }
109
- if ( '' !== $integration || '' !== $status ) {
110
- $add_where_meta_integration = '';
111
- $add_where_meta_status = '';
112
- $add_where_shipment_integration = '';
113
- $add_where_shipment_status = '';
114
- $add_where = '';
115
- if ( '' !== $integration ) {
116
- $add_where_meta_integration = " EXISTS ( SELECT 1 FROM {$wpdb->postmeta} fs_postmeta WHERE {$wpdb->posts}.ID = fs_postmeta.post_id AND fs_postmeta.meta_key = '_flexible_shipping_integration' AND fs_postmeta.meta_value = '$integration' ) ";
117
- $add_where_shipment_integration = " EXISTS ( SELECT 1 FROM {$wpdb->posts} fs_posts, {$wpdb->postmeta} fs_postmeta WHERE {$wpdb->posts}.ID = fs_posts.post_parent AND fs_posts.ID = fs_postmeta.post_id AND fs_postmeta.meta_key = '_integration' AND fs_postmeta.meta_value = '$integration' ) ";
118
- }
119
- if ( '' !== $status ) {
120
- $add_where_meta_status = " EXISTS ( SELECT 1 FROM {$wpdb->postmeta} fs_postmeta WHERE {$wpdb->posts}.ID = fs_postmeta.post_id AND fs_postmeta.meta_key = '_flexible_shipping_status' AND fs_postmeta.meta_value = '$status' ) ";
121
- $add_where_shipment_status = " EXISTS ( SELECT 1 FROM {$wpdb->posts} fs_posts WHERE {$wpdb->posts}.ID = fs_posts.post_parent AND fs_posts.post_status = 'fs-{$status}' ) ";
122
- }
123
- $add_where_meta = '';
124
- if ( '' !== $add_where_meta_integration ) {
125
- $add_where_meta .= $add_where_meta_integration;
126
- }
127
- if ( '' !== $add_where_meta_status ) {
128
- if ( '' !== $add_where_meta ) {
129
- $add_where_meta .= ' AND ';
130
- }
131
- $add_where_meta .= $add_where_meta_status;
132
- }
133
- $add_where_shipment = '';
134
- if ( '' !== $add_where_shipment_integration ) {
135
- $add_where_shipment .= $add_where_shipment_integration;
136
- }
137
- if ( '' !== $add_where_shipment_status ) {
138
- if ( '' !== $add_where_shipment ) {
139
- $add_where_shipment .= ' AND ';
140
- }
141
- $add_where_shipment .= $add_where_shipment_status;
142
- }
143
- $add_where_meta = ' ( ' . $add_where_meta . ' ) ';
144
- $add_where_shipment = ' ( ' . $add_where_shipment . ' ) ';
145
- $add_where = ' AND ( ' . $add_where_meta . ' OR ' . $add_where_shipment . ' ) ';
146
- $where .= $add_where;
147
- }
148
- }
149
-
150
- return $where;
151
- }
152
-
153
- /**
154
- * .
155
- */
156
- public function restrict_manage_posts() {
157
- if ( apply_filters( 'flexible_shipping_disable_order_filters', false ) ) {
158
- return;
159
- }
160
-
161
- $integrations = apply_filters( 'flexible_shipping_integration_options', array() );
162
- if ( 0 === count( $integrations ) ) {
163
- return;
164
- }
165
-
166
- global $typenow;
167
- if ( 'shop_order' === $typenow ) {
168
- $integrations = apply_filters( 'flexible_shipping_integration_options', array() );
169
- $statuses = apply_filters( 'flexible_shipping_status', array() );
170
- $integration = '';
171
- if ( isset( $_GET['flexible_shipping_integration_filter'] ) ) {
172
- $integration = sanitize_key( $_GET['flexible_shipping_integration_filter'] );
173
- }
174
- $status = '';
175
- if ( isset( $_GET['flexible_shipping_status_filter'] ) ) {
176
- $status = sanitize_key( $_GET['flexible_shipping_status_filter'] );
177
- }
178
- include( 'views/html-orders-filter-form.php' );
179
- }
180
- }
181
-
182
- /**
183
- * @param string $column .
184
- */
185
- public function manage_shop_order_posts_custom_column( $column ) {
186
- global $post;
187
- if ( 'flexible_shipping' === $column ) {
188
- $classes = array(
189
- 'error' => 'failed',
190
- 'new' => 'on-hold',
191
- 'created' => 'processing created',
192
- 'confirmed' => 'processing confirmed',
193
- 'manifest' => 'processing manifest',
194
- );
195
- $statuses = array(
196
- 'error' => __( 'Error', 'flexible-shipping' ),
197
- 'new' => __( 'New shipment', 'flexible-shipping' ),
198
- 'created' => __( 'Created', 'flexible-shipping' ),
199
- 'confirmed' => __( 'Confirmed', 'flexible-shipping' ),
200
- 'manifest' => __( 'Manifest created', 'flexible-shipping' ),
201
- );
202
- $shippings = array();
203
- $shipments = fs_get_order_shipments( $post->ID );
204
- foreach ( $shipments as $shipment ) {
205
- /* @var $shipment WPDesk_Flexible_Shipping_Shipment|WPDesk_Flexible_Shipping_Shipment_Interface */
206
- $shipping = array();
207
- $shipping['order_id'] = $post->ID;
208
- $shipping['integration'] = $shipment->get_integration();
209
- $shipping['url'] = $shipment->get_order_metabox_url();
210
- $shipping['error'] = $shipment->get_error_message();
211
- $shipping['status'] = $shipment->get_status_for_shipping_column();
212
- $shipping['tracking_number'] = $shipment->get_tracking_number();
213
- $shipping['label_url'] = $shipment->get_label_url();
214
- $shipping['tracking_url'] = $shipment->get_tracking_url();
215
- $shipping['shipment'] = $shipment;
216
- $shippings[] = $shipping;
217
- }
218
- $shippings = apply_filters( 'flexible_shipping_shipping_data', $shippings );
219
- foreach ( $shippings as $shipping ) {
220
- if ( 'error' === $shipping['status'] ) {
221
- $statuses['error'] = $shipping['error'];
222
- } else {
223
- $statuses['error'] = __( 'Error', 'flexible-shipping' );
224
- }
225
- include( 'views/html-column-shipping-shipping.php' );
226
- }
227
- $messages = $this->get_session()->get( 'flexible_shipping_bulk_send', array() );
228
- if ( isset( $messages[ $post->ID ] ) ) {
229
- unset( $messages[ $post->ID ] );
230
- }
231
- $this->get_session()->set( 'flexible_shipping_bulk_send', $messages );
232
- }
233
- }
234
-
235
- /**
236
- * @param array $columns .
237
- *
238
- * @return array
239
- */
240
- public function manage_edit_shop_order_columns( $columns ) {
241
- $integrations = apply_filters( 'flexible_shipping_integration_options', array() );
242
- if ( count( $integrations ) == 0 ) {
243
- return $columns;
244
- }
245
- if ( isset( $columns['flexible_shipping'] ) ) {
246
- return $columns;
247
- }
248
- $ret = array();
249
-
250
- $col_added = false;
251
-
252
- foreach ( $columns as $key => $column ) {
253
- if ( ! $col_added && ( 'order_actions' === $key || 'wc_actions' === $key ) ) {
254
- $ret['flexible_shipping'] = __( 'Shipping', 'flexible-shipping' );
255
- $col_added = true;
256
- }
257
- $ret[ $key ] = $column;
258
- }
259
- if ( ! $col_added ) {
260
- $ret['flexible_shipping'] = __( 'Shipping', 'flexible-shipping' );
261
- }
262
-
263
- return $ret;
264
- }
265
-
266
- /**
267
- * @param array $bulk_actions .
268
- *
269
- * @return mixed
270
- */
271
- public function bulk_actions_edit_shop_order( $bulk_actions ) {
272
- $integrations = apply_filters( 'flexible_shipping_integration_options', array() );
273
- if ( count( $integrations ) ) {
274
- $bulk_actions['flexible_shipping_send'] = __( 'Send shipment', 'flexible-shipping' );
275
- $bulk_actions['flexible_shipping_labels'] = __( 'Get labels', 'flexible-shipping' );
276
- if ( apply_filters( 'flexible_shipping_has_manifests', false ) ) {
277
- $bulk_actions['flexible_shipping_manifest'] = __( 'Create shipping manifest', 'flexible-shipping' );
278
- }
279
- }
280
-
281
- return $bulk_actions;
282
- }
283
-
284
- /**
285
- * @param string $redirect_to .
286
- * @param string $do_action .
287
- * @param array $post_ids .
288
- *
289
- * @return bool|string
290
- */
291
- public function handle_bulk_actions_edit_shop_order( $redirect_to, $do_action, $post_ids ) {
292
- $redirect_to = remove_query_arg( 'bulk_flexible_shipping_send', $redirect_to );
293
- $redirect_to = remove_query_arg( 'bulk_flexible_shipping_labels', $redirect_to );
294
- $redirect_to = remove_query_arg( 'bulk_flexible_shipping_manifests', $redirect_to );
295
- if ( 'flexible_shipping_send' === $do_action ) {
296
- $messages = array();
297
- foreach ( $post_ids as $post_id ) {
298
- $shipments = fs_get_order_shipments( $post_id );
299
- $messages[ $post_id ] = array();
300
- foreach ( $shipments as $shipment ) {
301
- /* @var $shipment WPDesk_Flexible_Shipping_Shipment|WPDesk_Flexible_Shipping_Shipment_Interface */
302
- try {
303
- $shipment->set_sent_via_bulk();
304
- $shipment->api_create();
305
- $messages[ $post_id ][ $shipment->get_id() ] = array(
306
- 'status' => 'created',
307
- 'message' => __( 'Shipment created.', 'flexible-shipping' ),
308
- );
309
- } catch ( Exception $e ) {
310
- $messages[ $post_id ][ $shipment->get_id() ] = array(
311
- 'status' => 'error',
312
- 'message' => $e->getMessage(),
313
- );
314
- }
315
- }
316
- $messages[ $post_id ][] = apply_filters(
317
- 'flexible_shipping_bulk_send',
318
- array(
319
- 'status' => 'none',
320
- 'message' => __( 'No action performed.', 'flexible-shipping' ),
321
- ),
322
- $post_id
323
- );
324
- }
325
- $this->get_session()->set( 'flexible_shipping_bulk_send', $messages );
326
- $redirect_to = add_query_arg( 'bulk_flexible_shipping_send', count( $post_ids ), $redirect_to );
327
-
328
- return $redirect_to;
329
- }
330
- if ( 'flexible_shipping_labels' === $do_action ) {
331
- $labels_bulk_actions_handler = \FSVendor\WPDesk\FS\Shipment\Label\LabelsBulkActionHandler::get_labels_bulk_actions_handler();
332
- $labels_bulk_actions_handler->bulk_process_orders( $post_ids );
333
-
334
- try {
335
- $labels = $labels_bulk_actions_handler->get_labels_for_shipments();
336
- if ( 0 === count( $labels ) ) {
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
-
340
- return $redirect_to;
341
- }
342
-
343
- $labels_file_creator = new \FSVendor\WPDesk\FS\Shipment\Label\LabelsFileCreator( $labels );
344
- $labels_file_creator->create_labels_file();
345
- $labels['tmp_file'] = $labels_file_creator->get_tmp_file_name();
346
- $labels['client_file'] = $labels_file_creator->get_file_name();
347
- foreach ( $labels as $key => $label ) {
348
- if ( is_array( $labels[ $key ] ) && isset( $labels[ $key ]['content'] ) ) {
349
- unset( $labels[ $key ]['content'] );
350
- }
351
- }
352
- } catch ( WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_Zip_File_Exception $zip_file_exception ) {
353
- $labels['error'] = __( 'Unable to create temporary zip archive for labels. Check temporary folder configuration on server.', 'flexible-shipping' );
354
- } catch ( WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_File_Exception $tmp_file_exception ) {
355
- $labels['error'] = __( 'Unable to create temporary file for labels. Check temporary folder configuration on server.', 'flexible-shipping' );
356
- } catch ( Exception $e ) {
357
- $labels['error'] = $e->getMessage();
358
- }
359
-
360
- $this->get_session()->set( 'flexible_shipping_bulk_labels', $labels );
361
-
362
- $redirect_to = add_query_arg( 'bulk_flexible_shipping_labels', count( $post_ids ), $redirect_to );
363
-
364
- return $redirect_to;
365
- }
366
- if ( 'flexible_shipping_manifest' === $do_action ) {
367
- $manifests = array();
368
- foreach ( $post_ids as $post_id ) {
369
- $shipments = fs_get_order_shipments( $post_id );
370
- foreach ( $shipments as $shipment ) {
371
- /* @var $shipment WPDesk_Flexible_Shipping_Shipment|WPDesk_Flexible_Shipping_Shipment_Interface */
372
- if ( $shipment->get_status() != 'fs-confirmed' || $shipment->get_meta( '_manifest', '' ) != '' ) {
373
- continue;
374
- }
375
- try {
376
- $integration = $shipment->get_integration();
377
- $manifest_name = $integration;
378
- if ( method_exists( $shipment, 'get_manifest_name' ) ) {
379
- $manifest_name = $shipment->get_manifest_name();
380
- }
381
- $manifest = null;
382
- if ( empty( $manifests[ $manifest_name ] ) ) {
383
- if ( fs_manifest_integration_exists( $integration ) ) {
384
- $manifest = fs_create_manifest( $integration );
385
- }
386
- } else {
387
- $manifest = $manifests[ $manifest_name ];
388
- }
389
- if ( null !== $manifest ) {
390
- $manifest->add_shipments( $shipment );
391
- $manifest->save();
392
- $shipment->update_status( 'fs-manifest' );
393
- $shipment->save();
394
- $manifests[ $manifest_name ] = $manifest;
395
- }
396
- } catch ( Exception $e ) { // phpcs:ignore
397
- // Do nothing.
398
- }
399
- }
400
- }
401
- $messages = array();
402
- $integrations = apply_filters( 'flexible_shipping_integration_options', array() );
403
- foreach ( $manifests as $manifest ) {
404
- try {
405
- $manifest->generate();
406
- $manifest->save();
407
- $download_manifest_url = admin_url( 'edit.php?post_type=shipping_manifest&flexible_shipping_download_manifest=' . $manifest->get_id() . '&nonce=' . wp_create_nonce( 'flexible_shipping_download_manifest' ) );
408
- $messages[] = array(
409
- 'type' => 'updated',
410
- 'message' => sprintf(
411
- // Translators: manifests count and integration.
412
- __( 'Created manifest: %s (%s). If download not start automatically click %shere%s.', 'flexible-shipping' ), // phpcs:ignore
413
- $manifest->get_number(),
414
- $integrations[ $manifest->get_integration() ],
415
- '<a class="shipping_manifest_download" target="_blank" href="' . $download_manifest_url . '">',
416
- '</a>'
417
- ),
418
- );
419
- } catch ( Exception $e ) {
420
- $messages[] = array(
421
- 'type' => 'error',
422
- 'message' => sprintf(
423
- __( 'Manifest creation error: %s (%s).', 'flexible-shipping' ), // phpcs:ignore
424
- $e->getMessage(),
425
- $integrations[ $manifest->get_integration() ]
426
- ),
427
- );
428
- fs_delete_manifest( $manifest );
429
- }
430
- }
431
- if ( count( $messages ) == 0 ) {
432
- $messages[] = array(
433
- 'type' => 'updated',
434
- 'message' => __( 'No manifests created.', 'flexible-shipping' ),
435
- );
436
- }
437
- $this->get_session()->set( 'flexible_shipping_bulk_manifests', $messages );
438
-
439
- $redirect_to = add_query_arg( 'bulk_flexible_shipping_manifests', count( $post_ids ), $redirect_to );
440
-
441
- return $redirect_to;
442
- }
443
-
444
- return $redirect_to;
445
- }
446
-
447
- /**
448
- * .
449
- */
450
- public function admin_notices() {
451
- if ( ! empty( $_REQUEST['bulk_flexible_shipping_send'] ) ) {
452
- $bulk_flexible_shipping_send_count = intval( sanitize_text_field( wp_unslash( $_REQUEST['bulk_flexible_shipping_send'] ) ) );
453
- new Notice(
454
- sprintf( __( 'Bulk send shipment - processed orders: %d', 'flexible-shipping' ), $bulk_flexible_shipping_send_count ) // phpcs:ignore
455
- );
456
- }
457
- if ( ! empty( $_REQUEST['bulk_flexible_shipping_labels'] ) ) {
458
- $bulk_flexible_shipping_labels_count = intval( sanitize_text_field( wp_unslash( $_REQUEST['bulk_flexible_shipping_labels'] ) ) );
459
- if ( ! empty( $_REQUEST['bulk_flexible_shipping_no_labels_created'] ) ) {
460
- new Notice(
461
- sprintf( __( 'Bulk labels - processed orders: %d. No labels for processed orders.', 'flexible-shipping' ), $bulk_flexible_shipping_send_count ) // phpcs:ignore
462
- );
463
- } else {
464
- $labels = $this->get_session()->get( 'flexible_shipping_bulk_labels' );
465
- if ( is_array( $labels ) ) {
466
- if ( isset( $labels['error'] ) ) {
467
- new Notice( $labels['error'], Notice::NOTICE_TYPE_ERROR, true, 20 );
468
- } else {
469
- $nonce = wp_create_nonce( 'flexible_shipping_labels' );
470
- new Notice(
471
- sprintf(
472
- __( 'Bulk labels - processed orders: %d. If download not start automatically click %shere%s.', 'flexible-shipping' ), // phpcs:ignore
473
- $bulk_flexible_shipping_labels_count,
474
- '<a id="flexible_shipping_labels_url" target="_blank" href=' . admin_url( 'admin.php?flexible_shipping_labels=' . basename( $labels['client_file'] ) . '&tmp_file=' . basename( $labels['tmp_file'] ) . '&nonce=' . $nonce ) . '>',
475
- '</a>'
476
- )
477
- );
478
- }
479
- }
480
- }
481
- }
482
- if ( ! empty( $_REQUEST['bulk_flexible_shipping_manifests'] ) ) {
483
- $bulk_flexible_shipping_manifest_count = intval( sanitize_text_field( wp_unslash( $_REQUEST['bulk_flexible_shipping_manifests'] ) ) );
484
- new Notice(
485
- sprintf( __( 'Bulk shipping manifest - processed orders: %d', 'flexible-shipping' ), $bulk_flexible_shipping_manifest_count ) // phpcs:ignore
486
- );
487
- if ( $this->get_session()->get( 'flexible_shipping_bulk_manifests' ) ) {
488
- $messages = $this->get_session()->get( 'flexible_shipping_bulk_manifests' );
489
- foreach ( $messages as $message ) {
490
- new Notice(
491
- $message['message'],
492
- $message['type']
493
- );
494
- }
495
- $this->get_session()->set( 'flexible_shipping_bulk_manifests', null );
496
- }
497
- }
498
- }
499
-
500
- /**
501
- * Dispatch labels file if requested.
502
- */
503
- public function dispatch_labels_file_if_expected() {
504
- if ( isset( $_GET['flexible_shipping_labels'] ) && isset( $_GET['tmp_file'] ) && isset( $_GET['nonce'] ) ) {
505
- if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['nonce'] ) ), 'flexible_shipping_labels' ) ) {
506
- $file = trailingslashit( sys_get_temp_dir() ) . sanitize_text_field( wp_unslash( $_GET['flexible_shipping_labels'] ) );
507
- $tmp_file = trailingslashit( sys_get_temp_dir() ) . sanitize_text_field( wp_unslash( $_GET['tmp_file'] ) );
508
-
509
- if ( ! file_exists( $tmp_file ) ) {
510
- die( 'This file was already downloaded! Please retry bulk action!' );
511
- }
512
-
513
- $labels_file_dispatcher = new \FSVendor\WPDesk\FS\Shipment\Label\LabelsFileDispatcher();
514
- $labels_file_dispatcher->dispatch_and_delete_labels_file( $file, $tmp_file );
515
- die();
516
- }
517
- }
518
- }
519
-
520
- }
521
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/table-rate/flexible-shipping-settings.php CHANGED
@@ -164,9 +164,6 @@ class WPDesk_Flexible_Shipping_Settings extends WC_Shipping_Method {
164
 
165
  if ( ! wpdesk_is_plugin_active( 'flexible-shipping-pro/flexible-shipping-pro.php' ) ) {
166
  $metaboxes[] = new FSPro();
167
- }
168
-
169
- if ( wpdesk_is_plugin_active( 'flexible-shipping-pro/flexible-shipping-pro.php' ) && ! wpdesk_is_plugin_active( 'flexible-shipping-import-export/flexible-shipping-import-export.php' ) ) {
170
  $metaboxes[] = new FSIE();
171
  }
172
 
164
 
165
  if ( ! wpdesk_is_plugin_active( 'flexible-shipping-pro/flexible-shipping-pro.php' ) ) {
166
  $metaboxes[] = new FSPro();
 
 
 
167
  $metaboxes[] = new FSIE();
168
  }
169
 
classes/table-rate/views/html-column-shipping-shipping.php DELETED
@@ -1,20 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
2
- <div class="shipping">
3
- <div class="shipping-status">
4
- <a class="icon-status icon-status-<?php echo $shipping['status']; ?> tips" href="<?php echo $shipping['url']; ?>" data-tip="<?php echo esc_html( $statuses[$shipping['status']] ); ?>">
5
- <?php echo esc_html( $statuses[$shipping['status']] ); ?>
6
- </a>
7
- <?php do_action( 'flexible_shipping_shipping_status_html', $shipping ); ?>
8
- </div>
9
- <div class="shipping-actions order_actions">
10
- <?php if ( !empty( $shipping['label_url'] ) ) : ?>
11
- <a class="button tips get-label" target="_blank" href="<?php echo $shipping['label_url']; ?>" data-tip="<?php _e( 'Get label for: ', 'flexible-shipping' ); ?><?php echo $shipping['tracking_number']; ?>"><?php _e( 'Get label for: ', 'flexible-shipping' ); ?><?php echo $shipping['tracking_number']; ?></a>
12
- <?php endif; ?>
13
- <?php if ( !empty( $shipping['tracking_url'] ) ) : ?>
14
- <a class="button tips track" target="_blank" href="<?php echo $shipping['tracking_url']; ?>" data-tip="<?php _e( 'Track shipment for: ', 'flexible-shipping' ); ?><?php echo $shipping['tracking_number']; ?>"><?php _e( 'Track shipment for: ', 'flexible-shipping' ); ?><?php echo $shipping['tracking_number']; ?></a>
15
- <?php endif; ?>
16
- <?php do_action( 'flexible_shipping_shipping_actions_html', $shipping ); ?>
17
- </div>
18
- <div style="clear: both;"></div>
19
- <?php do_action( 'flexible_shipping_shipping_html', $shipping ); ?>
20
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/table-rate/views/html-orders-filter-form.php DELETED
@@ -1,19 +0,0 @@
1
- <?php ?>
2
- <div class="alignleft actions">
3
- <select name="flexible_shipping_integration_filter">
4
- <option value=""><?php _e( 'All shippings', 'flexible-shipping' ); ?></option>
5
- <optgroup label="<?php _e( 'Integration', 'flexible-shipping' ); ?>">
6
- <?php foreach ( $integrations as $key => $val ) : ?>
7
- <option value="<?php echo $key; ?>" <?php echo ($key == $integration ? 'selected' : '' ); ?>><?php echo $val; ?></option>
8
- <?php endforeach; ?>
9
- </optgroup>
10
- </select>
11
- <select name="flexible_shipping_status_filter">
12
- <option value=""><?php _e( 'All shippings', 'flexible-shipping' ); ?></option>
13
- <optgroup label="<?php _e( 'Shipment status', 'flexible-shipping' ); ?>">
14
- <?php foreach ( $statuses as $key => $val ) : ?>
15
- <option value="<?php echo $key; ?>" <?php echo ($key == $status ? 'selected' : '' ); ?>><?php echo $val; ?></option>
16
- <?php endforeach; ?>
17
- </optgroup>
18
- </select>
19
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
flexible-shipping.php CHANGED
@@ -3,14 +3,14 @@
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: 4.14.2
7
  * Author: Octolize
8
  * Author URI: https://octol.io/fs-author
9
  * Text Domain: flexible-shipping
10
  * Domain Path: /lang/
11
  * Requires at least: 5.7
12
- * Tested up to: 6.0
13
- * WC requires at least: 6.6
14
  * WC tested up to: 7.0
15
  * Requires PHP: 7.0
16
  *
@@ -38,7 +38,7 @@ if ( ! defined( 'ABSPATH' ) ) {
38
  } // Exit if accessed directly
39
 
40
  /* THIS VARIABLE CAN BE CHANGED AUTOMATICALLY */
41
- $plugin_version = '4.14.2';
42
 
43
  $plugin_name = 'Flexible Shipping';
44
  $product_id = 'Flexible Shipping';
@@ -51,12 +51,13 @@ define( 'FLEXIBLE_SHIPPING_VERSION', $plugin_version );
51
  define( $plugin_class_name, $plugin_version );
52
 
53
  $requirements = [
54
- 'php' => '5.6',
55
- 'wp' => '4.5',
56
- 'plugins' => [
57
  [
58
  'name' => 'woocommerce/woocommerce.php',
59
  'nice_name' => 'WooCommerce',
 
60
  ],
61
  ],
62
  ];
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: 4.15.0
7
  * Author: Octolize
8
  * Author URI: https://octol.io/fs-author
9
  * Text Domain: flexible-shipping
10
  * Domain Path: /lang/
11
  * Requires at least: 5.7
12
+ * Tested up to: 6.1
13
+ * WC requires at least: 6.7
14
  * WC tested up to: 7.0
15
  * Requires PHP: 7.0
16
  *
38
  } // Exit if accessed directly
39
 
40
  /* THIS VARIABLE CAN BE CHANGED AUTOMATICALLY */
41
+ $plugin_version = '4.15.0';
42
 
43
  $plugin_name = 'Flexible Shipping';
44
  $product_id = 'Flexible Shipping';
51
  define( $plugin_class_name, $plugin_version );
52
 
53
  $requirements = [
54
+ 'php' => '5.6',
55
+ 'wp' => '4.5',
56
+ 'repo_plugins' => [
57
  [
58
  'name' => 'woocommerce/woocommerce.php',
59
  'nice_name' => 'WooCommerce',
60
+ 'version' => '6.6',
61
  ],
62
  ],
63
  ];
lang/flexible-shipping.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the Flexible Shipping plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Flexible Shipping 4.14.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/flexible-shipping\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2022-10-03T15:24:10+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: flexible-shipping\n"
@@ -25,6 +25,7 @@ msgstr ""
25
  #: src/WPDesk/FS/TableRate/ShippingMethod/Duplicate/DuplicateAction.php:76
26
  #: src/WPDesk/FS/TableRate/ShippingMethod/Duplicate/DuplicateScript.php:67
27
  #: src/WPDesk/FS/TableRate/ShippingMethodSingle.php:63
 
28
  msgid "Flexible Shipping"
29
  msgstr ""
30
 
@@ -45,23 +46,23 @@ msgid "https://octol.io/fs-author"
45
  msgstr ""
46
 
47
  #. Translators: link.
48
- #: classes/class-flexible-shipping-plugin.php:741
49
  msgid "How can We make Flexible Shipping better for you? %1$sJust write to us.%2$s"
50
  msgstr ""
51
 
52
- #: classes/class-flexible-shipping-plugin.php:820
53
  msgid "Settings"
54
  msgstr ""
55
 
56
- #: classes/class-flexible-shipping-plugin.php:824
57
  msgid "Docs"
58
  msgstr ""
59
 
60
- #: classes/class-flexible-shipping-plugin.php:825
61
  msgid "Support"
62
  msgstr ""
63
 
64
- #: classes/class-flexible-shipping-plugin.php:830
65
  msgid "Upgrade"
66
  msgstr ""
67
 
@@ -96,104 +97,6 @@ msgstr ""
96
  msgid "Awesome, you've been using Flexible Shipping for more than 2 weeks. Could you please do me a BIG favor and give it a 5-star rating on WordPress? ~Octolize Team"
97
  msgstr ""
98
 
99
- #: classes/table-rate/bulk-actions.php:78
100
- msgid "New"
101
- msgstr ""
102
-
103
- #: classes/table-rate/bulk-actions.php:79
104
- #: classes/table-rate/bulk-actions.php:198
105
- #: classes/wp-wpdesk-fs-shipment/metabox/ajax.php:55
106
- msgid "Created"
107
- msgstr ""
108
-
109
- #: classes/table-rate/bulk-actions.php:80
110
- #: classes/table-rate/bulk-actions.php:199
111
- msgid "Confirmed"
112
- msgstr ""
113
-
114
- #: classes/table-rate/bulk-actions.php:81
115
- msgid "Manifest"
116
- msgstr ""
117
-
118
- #: classes/table-rate/bulk-actions.php:82
119
- msgid "Failed"
120
- msgstr ""
121
-
122
- #: classes/table-rate/bulk-actions.php:196
123
- #: classes/table-rate/bulk-actions.php:223
124
- msgid "Error"
125
- msgstr ""
126
-
127
- #: classes/table-rate/bulk-actions.php:197
128
- msgid "New shipment"
129
- msgstr ""
130
-
131
- #: classes/table-rate/bulk-actions.php:200
132
- msgid "Manifest created"
133
- msgstr ""
134
-
135
- #: classes/table-rate/bulk-actions.php:254
136
- #: classes/table-rate/bulk-actions.php:260
137
- msgid "Shipping"
138
- msgstr ""
139
-
140
- #: classes/table-rate/bulk-actions.php:274
141
- msgid "Send shipment"
142
- msgstr ""
143
-
144
- #: classes/table-rate/bulk-actions.php:275
145
- msgid "Get labels"
146
- msgstr ""
147
-
148
- #: classes/table-rate/bulk-actions.php:277
149
- msgid "Create shipping manifest"
150
- msgstr ""
151
-
152
- #: classes/table-rate/bulk-actions.php:307
153
- msgid "Shipment created."
154
- msgstr ""
155
-
156
- #: classes/table-rate/bulk-actions.php:320
157
- msgid "No action performed."
158
- msgstr ""
159
-
160
- #: classes/table-rate/bulk-actions.php:353
161
- msgid "Unable to create temporary zip archive for labels. Check temporary folder configuration on server."
162
- msgstr ""
163
-
164
- #: classes/table-rate/bulk-actions.php:355
165
- msgid "Unable to create temporary file for labels. Check temporary folder configuration on server."
166
- msgstr ""
167
-
168
- #. Translators: manifests count and integration.
169
- #: classes/table-rate/bulk-actions.php:412
170
- msgid "Created manifest: %s (%s). If download not start automatically click %shere%s."
171
- msgstr ""
172
-
173
- #: classes/table-rate/bulk-actions.php:423
174
- msgid "Manifest creation error: %s (%s)."
175
- msgstr ""
176
-
177
- #: classes/table-rate/bulk-actions.php:434
178
- msgid "No manifests created."
179
- msgstr ""
180
-
181
- #: classes/table-rate/bulk-actions.php:454
182
- msgid "Bulk send shipment - processed orders: %d"
183
- msgstr ""
184
-
185
- #: classes/table-rate/bulk-actions.php:461
186
- msgid "Bulk labels - processed orders: %d. No labels for processed orders."
187
- msgstr ""
188
-
189
- #: classes/table-rate/bulk-actions.php:472
190
- msgid "Bulk labels - processed orders: %d. If download not start automatically click %shere%s."
191
- msgstr ""
192
-
193
- #: classes/table-rate/bulk-actions.php:485
194
- msgid "Bulk shipping manifest - processed orders: %d"
195
- msgstr ""
196
-
197
  #: classes/table-rate/flexible-shipping-settings.php:46
198
  msgid "Flexible Shipping Info"
199
  msgstr ""
@@ -258,11 +161,13 @@ msgstr ""
258
 
259
  #: classes/table-rate/settings/flexible-shipping.php:40
260
  #: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:59
 
261
  msgid "Taxable"
262
  msgstr ""
263
 
264
  #: classes/table-rate/settings/flexible-shipping.php:41
265
  #: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:60
 
266
  msgctxt "Tax status"
267
  msgid "None"
268
  msgstr ""
@@ -388,14 +293,6 @@ msgstr ""
388
  msgid "Buy Flexible Shipping Add-ons &rarr;"
389
  msgstr ""
390
 
391
- #: classes/table-rate/views/html-column-shipping-shipping.php:11
392
- msgid "Get label for: "
393
- msgstr ""
394
-
395
- #: classes/table-rate/views/html-column-shipping-shipping.php:14
396
- msgid "Track shipment for: "
397
- msgstr ""
398
-
399
  #: classes/table-rate/views/html-custom-services.php:14
400
  msgid "Code"
401
  msgstr ""
@@ -413,21 +310,6 @@ msgstr ""
413
  msgid "Drag and drop the services to control their display order. Confirm by clicking Save changes button below."
414
  msgstr ""
415
 
416
- #: classes/table-rate/views/html-orders-filter-form.php:4
417
- #: classes/table-rate/views/html-orders-filter-form.php:12
418
- msgid "All shippings"
419
- msgstr ""
420
-
421
- #: classes/table-rate/views/html-orders-filter-form.php:5
422
- #: classes/table-rate/views/html-shipping-method-settings.php:17
423
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:189
424
- msgid "Integration"
425
- msgstr ""
426
-
427
- #: classes/table-rate/views/html-orders-filter-form.php:13
428
- msgid "Shipment status"
429
- msgstr ""
430
-
431
  #: classes/table-rate/views/html-shipping-method-scripts.php:25
432
  #: classes/table-rate/views/html-shipping-method-settings.php:131
433
  #: src/WPDesk/FS/Info/WooCommerceABC.php:33
@@ -449,6 +331,14 @@ msgstr ""
449
  msgid "Default"
450
  msgstr ""
451
 
 
 
 
 
 
 
 
 
452
  #: classes/table-rate/views/html-shipping-method-settings.php:20
453
  msgid "Select all"
454
  msgstr ""
@@ -464,6 +354,7 @@ msgstr ""
464
  #: src/WPDesk/FS/TableRate/ShippingMethod/RateCalculator.php:252
465
  #: src/WPDesk/FS/TableRate/ShippingMethod/RateCalculator.php:258
466
  #: src/WPDesk/FS/TableRate/ShippingMethod/RateCalculator.php:269
 
467
  msgid "yes"
468
  msgstr ""
469
 
@@ -560,27 +451,36 @@ msgid "Enable integration with Flexible Shipping Connect"
560
  msgstr ""
561
 
562
  #: classes/tracker/tracker.php:204
 
563
  msgid "Opt-in"
564
  msgstr ""
565
 
566
  #: classes/tracker/tracker.php:207
 
567
  msgid "Opt-out"
568
  msgstr ""
569
 
570
  #. Translators: plugin name.
571
  #: classes/views/deactivation_thickbox.php:25
 
 
572
  msgid "You are deactivating %s plugin."
573
  msgstr ""
574
 
575
  #: classes/views/deactivation_thickbox.php:36
 
576
  msgid "If you have a moment, please let us know why you are deactivating the plugin (anonymous feedback):"
577
  msgstr ""
578
 
579
  #: classes/views/deactivation_thickbox.php:44
 
 
580
  msgid "The plugin suddenly stopped working"
581
  msgstr ""
582
 
583
  #: classes/views/deactivation_thickbox.php:52
 
 
584
  msgid "The plugin broke my site"
585
  msgstr ""
586
 
@@ -593,61 +493,91 @@ msgid "Please let us know how we can improve it"
593
  msgstr ""
594
 
595
  #: classes/views/deactivation_thickbox.php:71
 
596
  msgid "I have found a better plugin"
597
  msgstr ""
598
 
599
  #: classes/views/deactivation_thickbox.php:74
 
 
600
  msgid "What's the plugin's name?"
601
  msgstr ""
602
 
603
  #: classes/views/deactivation_thickbox.php:82
 
 
604
  msgid "I only needed the plugin for a short period"
605
  msgstr ""
606
 
607
  #: classes/views/deactivation_thickbox.php:90
 
 
608
  msgid "I no longer need the plugin"
609
  msgstr ""
610
 
611
  #: classes/views/deactivation_thickbox.php:98
 
 
612
  msgid "It's a temporary deactivation. I'm just debugging an issue."
613
  msgstr ""
614
 
615
  #: classes/views/deactivation_thickbox.php:106
 
 
616
  msgid "Other"
617
  msgstr ""
618
 
619
  #: classes/views/deactivation_thickbox.php:109
 
620
  msgid "Please let us know how we can improve our plugin"
621
  msgstr ""
622
 
623
  #: classes/views/deactivation_thickbox.php:116
 
 
 
 
624
  msgid "Cancel"
625
  msgstr ""
626
 
627
  #: classes/views/deactivation_thickbox.php:117
 
 
628
  msgid "Skip &amp; Deactivate"
629
  msgstr ""
630
 
631
  #: classes/wp-wpdesk-fs-shipment/metabox/ajax.php:22
 
632
  msgid "Unknown error!"
633
  msgstr ""
634
 
635
  #: classes/wp-wpdesk-fs-shipment/metabox/ajax.php:25
 
636
  msgid "Nonce verification error! Invalid request."
637
  msgstr ""
638
 
639
  #: classes/wp-wpdesk-fs-shipment/metabox/ajax.php:29
 
640
  msgid "No shipment id!"
641
  msgstr ""
642
 
643
  #: classes/wp-wpdesk-fs-shipment/metabox/ajax.php:33
 
644
  msgid "No data!"
645
  msgstr ""
646
 
647
  #: classes/wp-wpdesk-fs-shipment/metabox/ajax.php:52
 
648
  msgid "Saved"
649
  msgstr ""
650
 
 
 
 
 
 
 
 
651
  #. Translators: redirect URL.
652
  #: inc/functions.php:77
653
  msgid "Redirecting. If page not redirects click %1$s here %2$s."
@@ -739,6 +669,7 @@ msgstr ""
739
 
740
  #. translators: open tag, close tag.
741
  #: src/WPDesk/FS/Nps/NpsHooks.php:107
 
742
  msgid "By using the 'Send feedback' button I hereby agree and consent to the terms of %1$sPrivacy Policy%2$s."
743
  msgstr ""
744
 
@@ -868,6 +799,126 @@ msgstr ""
868
  msgid "The %1$sFlexible Shipping PRO %2$s%3$s version you are currently using is severely %4$soutdated%5$s. Its further use may result in onward %4$scompatibility issues%5$s. In order to perform the update, please copy your plugin API key from %6$sMy Account / API keys%7$s tab and activate it in your store. If your subscription expired and you don’t own an active one at the moment, please %8$srenew the subscription →%9$s"
869
  msgstr ""
870
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
871
  #. Translators: link.
872
  #: src/WPDesk/FS/TableRate/ContextualInfo/Creator.php:150
873
  msgid "Want to show your customers the DHL Express live rates? %1$sCheck our DHL Express plugin →%2$s"
@@ -1057,6 +1108,7 @@ msgstr ""
1057
  #: src/WPDesk/FS/TableRate/ShippingMethod/RateCalculator.php:252
1058
  #: src/WPDesk/FS/TableRate/ShippingMethod/RateCalculator.php:258
1059
  #: src/WPDesk/FS/TableRate/ShippingMethod/RateCalculator.php:269
 
1060
  msgid "no"
1061
  msgstr ""
1062
 
@@ -1070,6 +1122,7 @@ msgstr ""
1070
 
1071
  #: src/WPDesk/FS/TableRate/Rule/Condition/Price.php:31
1072
  #: src/WPDesk/FS/TableRate/Rule/PreconfiguredScenarios/PreconfiguredScenariosFactory.php:55
 
1073
  msgid "Price"
1074
  msgstr ""
1075
 
@@ -1236,6 +1289,7 @@ msgstr ""
1236
 
1237
  #: src/WPDesk/FS/TableRate/Rule/Condition/Weight.php:31
1238
  #: src/WPDesk/FS/TableRate/Rule/PreconfiguredScenarios/PreconfiguredScenariosFactory.php:36
 
1239
  msgid "Weight"
1240
  msgstr ""
1241
 
@@ -1342,6 +1396,7 @@ msgstr ""
1342
  msgid " Matched items weight: %1$s"
1343
  msgstr ""
1344
 
 
1345
  #: src/WPDesk/FS/TableRate/Rule/Rule.php:159
1346
  msgid "Rule costs:"
1347
  msgstr ""
@@ -1353,6 +1408,8 @@ msgstr ""
1353
 
1354
  #: src/WPDesk/FS/TableRate/Rule/SpecialAction/None.php:19
1355
  #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:181
 
 
1356
  msgid "None"
1357
  msgstr ""
1358
 
@@ -1627,6 +1684,9 @@ msgstr ""
1627
 
1628
  #. Translators: username.
1629
  #: src/WPDesk/FS/Tracker/TrackerNotices.php:42
 
 
 
1630
  msgid "Hey %s,"
1631
  msgstr ""
1632
 
@@ -1645,6 +1705,9 @@ msgstr ""
1645
 
1646
  #: templates/email/after_order_table.php:12
1647
  #: templates/myaccount/after_order_table.php:15
 
 
 
1648
  msgid "Shipment"
1649
  msgstr ""
1650
 
@@ -1653,6 +1716,508 @@ msgstr ""
1653
  msgid "Track shipment: "
1654
  msgstr ""
1655
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1656
  #: assets-src/rules-settings/js/components/html-woo-select.js:37
1657
  #: assets-src/rules-settings/js/components/html-woo-select.js:233
1658
  msgid "Enter 3 or more characters"
2
  # This file is distributed under the same license as the Flexible Shipping plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Flexible Shipping 4.15.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/flexible-shipping\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2022-10-18T16:26:25+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: flexible-shipping\n"
25
  #: src/WPDesk/FS/TableRate/ShippingMethod/Duplicate/DuplicateAction.php:76
26
  #: src/WPDesk/FS/TableRate/ShippingMethod/Duplicate/DuplicateScript.php:67
27
  #: src/WPDesk/FS/TableRate/ShippingMethodSingle.php:63
28
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/PluginCompatibilityChecker.php:94
29
  msgid "Flexible Shipping"
30
  msgstr ""
31
 
46
  msgstr ""
47
 
48
  #. Translators: link.
49
+ #: classes/class-flexible-shipping-plugin.php:713
50
  msgid "How can We make Flexible Shipping better for you? %1$sJust write to us.%2$s"
51
  msgstr ""
52
 
53
+ #: classes/class-flexible-shipping-plugin.php:798
54
  msgid "Settings"
55
  msgstr ""
56
 
57
+ #: classes/class-flexible-shipping-plugin.php:802
58
  msgid "Docs"
59
  msgstr ""
60
 
61
+ #: classes/class-flexible-shipping-plugin.php:803
62
  msgid "Support"
63
  msgstr ""
64
 
65
+ #: classes/class-flexible-shipping-plugin.php:808
66
  msgid "Upgrade"
67
  msgstr ""
68
 
97
  msgid "Awesome, you've been using Flexible Shipping for more than 2 weeks. Could you please do me a BIG favor and give it a 5-star rating on WordPress? ~Octolize Team"
98
  msgstr ""
99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  #: classes/table-rate/flexible-shipping-settings.php:46
101
  msgid "Flexible Shipping Info"
102
  msgstr ""
161
 
162
  #: classes/table-rate/settings/flexible-shipping.php:40
163
  #: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:59
164
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/Settings/MethodSettingsImplementation.php:279
165
  msgid "Taxable"
166
  msgstr ""
167
 
168
  #: classes/table-rate/settings/flexible-shipping.php:41
169
  #: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:60
170
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/Settings/MethodSettingsImplementation.php:279
171
  msgctxt "Tax status"
172
  msgid "None"
173
  msgstr ""
293
  msgid "Buy Flexible Shipping Add-ons &rarr;"
294
  msgstr ""
295
 
 
 
 
 
 
 
 
 
296
  #: classes/table-rate/views/html-custom-services.php:14
297
  msgid "Code"
298
  msgstr ""
310
  msgid "Drag and drop the services to control their display order. Confirm by clicking Save changes button below."
311
  msgstr ""
312
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
313
  #: classes/table-rate/views/html-shipping-method-scripts.php:25
314
  #: classes/table-rate/views/html-shipping-method-settings.php:131
315
  #: src/WPDesk/FS/Info/WooCommerceABC.php:33
331
  msgid "Default"
332
  msgstr ""
333
 
334
+ #: classes/table-rate/views/html-shipping-method-settings.php:17
335
+ #: src/WPDesk/FS/Shipment/views/html-orders-filter-form.php:13
336
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:189
337
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/CustomPostType.php:95
338
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/views/filter-form.php:14
339
+ msgid "Integration"
340
+ msgstr ""
341
+
342
  #: classes/table-rate/views/html-shipping-method-settings.php:20
343
  msgid "Select all"
344
  msgstr ""
354
  #: src/WPDesk/FS/TableRate/ShippingMethod/RateCalculator.php:252
355
  #: src/WPDesk/FS/TableRate/ShippingMethod/RateCalculator.php:258
356
  #: src/WPDesk/FS/TableRate/ShippingMethod/RateCalculator.php:269
357
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/Settings/CheckboxValue.php:23
358
  msgid "yes"
359
  msgstr ""
360
 
451
  msgstr ""
452
 
453
  #: classes/tracker/tracker.php:204
454
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/PluginActionLinks.php:50
455
  msgid "Opt-in"
456
  msgstr ""
457
 
458
  #: classes/tracker/tracker.php:207
459
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/PluginActionLinks.php:53
460
  msgid "Opt-out"
461
  msgstr ""
462
 
463
  #. Translators: plugin name.
464
  #: classes/views/deactivation_thickbox.php:25
465
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/views/thickbox.php:20
466
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-deactivate.php:11
467
  msgid "You are deactivating %s plugin."
468
  msgstr ""
469
 
470
  #: classes/views/deactivation_thickbox.php:36
471
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/views/thickbox.php:29
472
  msgid "If you have a moment, please let us know why you are deactivating the plugin (anonymous feedback):"
473
  msgstr ""
474
 
475
  #: classes/views/deactivation_thickbox.php:44
476
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/views/thickbox.php:38
477
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-deactivate.php:28
478
  msgid "The plugin suddenly stopped working"
479
  msgstr ""
480
 
481
  #: classes/views/deactivation_thickbox.php:52
482
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/views/thickbox.php:48
483
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-deactivate.php:38
484
  msgid "The plugin broke my site"
485
  msgstr ""
486
 
493
  msgstr ""
494
 
495
  #: classes/views/deactivation_thickbox.php:71
496
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/views/thickbox.php:58
497
  msgid "I have found a better plugin"
498
  msgstr ""
499
 
500
  #: classes/views/deactivation_thickbox.php:74
501
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/views/thickbox.php:63
502
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-deactivate.php:53
503
  msgid "What's the plugin's name?"
504
  msgstr ""
505
 
506
  #: classes/views/deactivation_thickbox.php:82
507
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/views/thickbox.php:73
508
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-deactivate.php:63
509
  msgid "I only needed the plugin for a short period"
510
  msgstr ""
511
 
512
  #: classes/views/deactivation_thickbox.php:90
513
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/views/thickbox.php:83
514
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-deactivate.php:73
515
  msgid "I no longer need the plugin"
516
  msgstr ""
517
 
518
  #: classes/views/deactivation_thickbox.php:98
519
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/views/thickbox.php:93
520
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-deactivate.php:83
521
  msgid "It's a temporary deactivation. I'm just debugging an issue."
522
  msgstr ""
523
 
524
  #: classes/views/deactivation_thickbox.php:106
525
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/views/thickbox.php:103
526
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-deactivate.php:93
527
  msgid "Other"
528
  msgstr ""
529
 
530
  #: classes/views/deactivation_thickbox.php:109
531
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/views/thickbox.php:108
532
  msgid "Please let us know how we can improve our plugin"
533
  msgstr ""
534
 
535
  #: classes/views/deactivation_thickbox.php:116
536
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/views/column-actions.php:16
537
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/views/thickbox.php:117
538
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/views/thickbox.php:98
539
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-deactivate.php:107
540
  msgid "Cancel"
541
  msgstr ""
542
 
543
  #: classes/views/deactivation_thickbox.php:117
544
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/views/thickbox.php:120
545
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-deactivate.php:110
546
  msgid "Skip &amp; Deactivate"
547
  msgstr ""
548
 
549
  #: classes/wp-wpdesk-fs-shipment/metabox/ajax.php:22
550
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Metabox/Ajax.php:15
551
  msgid "Unknown error!"
552
  msgstr ""
553
 
554
  #: classes/wp-wpdesk-fs-shipment/metabox/ajax.php:25
555
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Metabox/Ajax.php:18
556
  msgid "Nonce verification error! Invalid request."
557
  msgstr ""
558
 
559
  #: classes/wp-wpdesk-fs-shipment/metabox/ajax.php:29
560
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Metabox/Ajax.php:22
561
  msgid "No shipment id!"
562
  msgstr ""
563
 
564
  #: classes/wp-wpdesk-fs-shipment/metabox/ajax.php:33
565
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Metabox/Ajax.php:26
566
  msgid "No data!"
567
  msgstr ""
568
 
569
  #: classes/wp-wpdesk-fs-shipment/metabox/ajax.php:52
570
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Metabox/Ajax.php:43
571
  msgid "Saved"
572
  msgstr ""
573
 
574
+ #: classes/wp-wpdesk-fs-shipment/metabox/ajax.php:55
575
+ #: src/WPDesk/FS/Shipment/ModifyOrderTable.php:164
576
+ #: src/WPDesk/FS/Shipment/ModifyStatuses.php:31
577
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Metabox/Ajax.php:46
578
+ msgid "Created"
579
+ msgstr ""
580
+
581
  #. Translators: redirect URL.
582
  #: inc/functions.php:77
583
  msgid "Redirecting. If page not redirects click %1$s here %2$s."
669
 
670
  #. translators: open tag, close tag.
671
  #: src/WPDesk/FS/Nps/NpsHooks.php:107
672
+ #: vendor_prefixed/wpdesk/wp-nps/src/Nps.php:129
673
  msgid "By using the 'Send feedback' button I hereby agree and consent to the terms of %1$sPrivacy Policy%2$s."
674
  msgstr ""
675
 
799
  msgid "The %1$sFlexible Shipping PRO %2$s%3$s version you are currently using is severely %4$soutdated%5$s. Its further use may result in onward %4$scompatibility issues%5$s. In order to perform the update, please copy your plugin API key from %6$sMy Account / API keys%7$s tab and activate it in your store. If your subscription expired and you don’t own an active one at the moment, please %8$srenew the subscription →%9$s"
800
  msgstr ""
801
 
802
+ #: src/WPDesk/FS/Shipment/AdminNotices.php:44
803
+ msgid "Bulk send shipment - processed orders: %d"
804
+ msgstr ""
805
+
806
+ #: src/WPDesk/FS/Shipment/AdminNotices.php:53
807
+ msgid "Bulk labels - processed orders: %d. No labels for processed orders."
808
+ msgstr ""
809
+
810
+ #: src/WPDesk/FS/Shipment/AdminNotices.php:64
811
+ msgid "Bulk labels - processed orders: %d. If download not start automatically click %shere%s."
812
+ msgstr ""
813
+
814
+ #: src/WPDesk/FS/Shipment/AdminNotices.php:78
815
+ msgid "Bulk shipping manifest - processed orders: %d"
816
+ msgstr ""
817
+
818
+ #: src/WPDesk/FS/Shipment/BulkAction.php:74
819
+ msgid "Send shipment"
820
+ msgstr ""
821
+
822
+ #: src/WPDesk/FS/Shipment/BulkAction.php:75
823
+ msgid "Get labels"
824
+ msgstr ""
825
+
826
+ #: src/WPDesk/FS/Shipment/BulkAction.php:78
827
+ msgid "Create shipping manifest"
828
+ msgstr ""
829
+
830
+ #: src/WPDesk/FS/Shipment/BulkAction/HandleActionLabels.php:61
831
+ msgid "Unable to create temporary zip archive for labels. Check temporary folder configuration on server."
832
+ msgstr ""
833
+
834
+ #: src/WPDesk/FS/Shipment/BulkAction/HandleActionLabels.php:63
835
+ msgid "Unable to create temporary file for labels. Check temporary folder configuration on server."
836
+ msgstr ""
837
+
838
+ #. Translators: manifests count and integration.
839
+ #: src/WPDesk/FS/Shipment/BulkAction/HandleActionManifest.php:83
840
+ msgid "Created manifest: %s (%s). If download not start automatically click %shere%s."
841
+ msgstr ""
842
+
843
+ #: src/WPDesk/FS/Shipment/BulkAction/HandleActionManifest.php:94
844
+ msgid "Manifest creation error: %s (%s)."
845
+ msgstr ""
846
+
847
+ #: src/WPDesk/FS/Shipment/BulkAction/HandleActionManifest.php:105
848
+ msgid "No manifests created."
849
+ msgstr ""
850
+
851
+ #: src/WPDesk/FS/Shipment/BulkAction/HandleActionSend.php:49
852
+ msgid "Shipment created."
853
+ msgstr ""
854
+
855
+ #: src/WPDesk/FS/Shipment/BulkAction/HandleActionSend.php:62
856
+ msgid "No action performed."
857
+ msgstr ""
858
+
859
+ #: src/WPDesk/FS/Shipment/BulkAction/HandleActionStrategy.php:37
860
+ msgid "Bulk Handle action not found"
861
+ msgstr ""
862
+
863
+ #: src/WPDesk/FS/Shipment/DispatchLabelFile.php:39
864
+ msgid "This file was already downloaded! Please retry bulk action!"
865
+ msgstr ""
866
+
867
+ #: src/WPDesk/FS/Shipment/ModifyOrderTable.php:66
868
+ #: src/WPDesk/FS/Shipment/ModifyOrderTable.php:73
869
+ msgid "Shipping"
870
+ msgstr ""
871
+
872
+ #: src/WPDesk/FS/Shipment/ModifyOrderTable.php:100
873
+ #: src/WPDesk/FS/Shipment/ModifyOrderTable.php:162
874
+ #: vendor_prefixed/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:59
875
+ msgid "Error"
876
+ msgstr ""
877
+
878
+ #: src/WPDesk/FS/Shipment/ModifyOrderTable.php:163
879
+ msgid "New shipment"
880
+ msgstr ""
881
+
882
+ #: src/WPDesk/FS/Shipment/ModifyOrderTable.php:165
883
+ #: src/WPDesk/FS/Shipment/ModifyStatuses.php:32
884
+ msgid "Confirmed"
885
+ msgstr ""
886
+
887
+ #: src/WPDesk/FS/Shipment/ModifyOrderTable.php:166
888
+ msgid "Manifest created"
889
+ msgstr ""
890
+
891
+ #: src/WPDesk/FS/Shipment/ModifyStatuses.php:30
892
+ msgid "New"
893
+ msgstr ""
894
+
895
+ #: src/WPDesk/FS/Shipment/ModifyStatuses.php:33
896
+ msgid "Manifest"
897
+ msgstr ""
898
+
899
+ #: src/WPDesk/FS/Shipment/ModifyStatuses.php:34
900
+ msgid "Failed"
901
+ msgstr ""
902
+
903
+ #: src/WPDesk/FS/Shipment/views/html-column-shipping-shipping.php:19
904
+ #: src/WPDesk/FS/Shipment/views/html-column-shipping-shipping.php:20
905
+ msgid "Get label for: "
906
+ msgstr ""
907
+
908
+ #: src/WPDesk/FS/Shipment/views/html-column-shipping-shipping.php:25
909
+ #: src/WPDesk/FS/Shipment/views/html-column-shipping-shipping.php:26
910
+ msgid "Track shipment for: "
911
+ msgstr ""
912
+
913
+ #: src/WPDesk/FS/Shipment/views/html-orders-filter-form.php:12
914
+ #: src/WPDesk/FS/Shipment/views/html-orders-filter-form.php:22
915
+ msgid "All shippings"
916
+ msgstr ""
917
+
918
+ #: src/WPDesk/FS/Shipment/views/html-orders-filter-form.php:23
919
+ msgid "Shipment status"
920
+ msgstr ""
921
+
922
  #. Translators: link.
923
  #: src/WPDesk/FS/TableRate/ContextualInfo/Creator.php:150
924
  msgid "Want to show your customers the DHL Express live rates? %1$sCheck our DHL Express plugin →%2$s"
1108
  #: src/WPDesk/FS/TableRate/ShippingMethod/RateCalculator.php:252
1109
  #: src/WPDesk/FS/TableRate/ShippingMethod/RateCalculator.php:258
1110
  #: src/WPDesk/FS/TableRate/ShippingMethod/RateCalculator.php:269
1111
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/Settings/CheckboxValue.php:23
1112
  msgid "no"
1113
  msgstr ""
1114
 
1122
 
1123
  #: src/WPDesk/FS/TableRate/Rule/Condition/Price.php:31
1124
  #: src/WPDesk/FS/TableRate/Rule/PreconfiguredScenarios/PreconfiguredScenariosFactory.php:55
1125
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/BasedOnOptions.php:20
1126
  msgid "Price"
1127
  msgstr ""
1128
 
1289
 
1290
  #: src/WPDesk/FS/TableRate/Rule/Condition/Weight.php:31
1291
  #: src/WPDesk/FS/TableRate/Rule/PreconfiguredScenarios/PreconfiguredScenariosFactory.php:36
1292
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/BasedOnOptions.php:20
1293
  msgid "Weight"
1294
  msgstr ""
1295
 
1396
  msgid " Matched items weight: %1$s"
1397
  msgstr ""
1398
 
1399
+ #. Translators: items weight.
1400
  #: src/WPDesk/FS/TableRate/Rule/Rule.php:159
1401
  msgid "Rule costs:"
1402
  msgstr ""
1408
 
1409
  #: src/WPDesk/FS/TableRate/Rule/SpecialAction/None.php:19
1410
  #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:181
1411
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/BasedOnOptions.php:20
1412
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/Settings/IntegrationSettingsImplementation.php:40
1413
  msgid "None"
1414
  msgstr ""
1415
 
1684
 
1685
  #. Translators: username.
1686
  #: src/WPDesk/FS/Tracker/TrackerNotices.php:42
1687
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/views/tracker-connect.php:23
1688
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-connect.php:15
1689
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-notice.php:19
1690
  msgid "Hey %s,"
1691
  msgstr ""
1692
 
1705
 
1706
  #: templates/email/after_order_table.php:12
1707
  #: templates/myaccount/after_order_table.php:15
1708
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php:44
1709
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/views/manifest-metabox.php:15
1710
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/views/manifest-metabox.php:74
1711
  msgid "Shipment"
1712
  msgstr ""
1713
 
1716
  msgid "Track shipment: "
1717
  msgstr ""
1718
 
1719
+ #: vendor_prefixed/wpdesk/wp-forms/templates/input-image.php:46
1720
+ msgid "Set image"
1721
+ msgstr ""
1722
+
1723
+ #: vendor_prefixed/wpdesk/wp-forms/templates/input-image.php:57
1724
+ msgid "Remove image"
1725
+ msgstr ""
1726
+
1727
+ #: vendor_prefixed/wpdesk/wp-forms/templates/input-image.php:82
1728
+ msgid "Select or Upload Media"
1729
+ msgstr ""
1730
+
1731
+ #: vendor_prefixed/wpdesk/wp-forms/templates/input-image.php:86
1732
+ msgid "Use this media"
1733
+ msgstr ""
1734
+
1735
+ #: vendor_prefixed/wpdesk/wp-forms/templates/product-select.php:22
1736
+ msgid "Search for a product&hellip;"
1737
+ msgstr ""
1738
+
1739
+ #: vendor_prefixed/wpdesk/wp-helpscout-beacon/src/Beacon/Beacon.php:51
1740
+ #: vendor_prefixed/wpdesk/wp-helpscout-beacon/src/Beacon/Beacon.php:92
1741
+ msgid "When you click OK we will open our HelpScout beacon where you can find answers to your questions. This beacon will load our help articles and also potentially set cookies."
1742
+ msgstr ""
1743
+
1744
+ #: vendor_prefixed/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:59
1745
+ msgid "Disabled"
1746
+ msgstr ""
1747
+
1748
+ #: vendor_prefixed/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:59
1749
+ msgid "Emergency"
1750
+ msgstr ""
1751
+
1752
+ #: vendor_prefixed/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:59
1753
+ msgid "Alert"
1754
+ msgstr ""
1755
+
1756
+ #: vendor_prefixed/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:59
1757
+ msgid "Critical"
1758
+ msgstr ""
1759
+
1760
+ #: vendor_prefixed/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:59
1761
+ msgid "Warning"
1762
+ msgstr ""
1763
+
1764
+ #: vendor_prefixed/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:59
1765
+ msgid "Notice"
1766
+ msgstr ""
1767
+
1768
+ #: vendor_prefixed/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:59
1769
+ msgid "Info"
1770
+ msgstr ""
1771
+
1772
+ #: vendor_prefixed/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:59
1773
+ msgid "Debug"
1774
+ msgstr ""
1775
+
1776
+ #. Translators: directory.
1777
+ #: vendor_prefixed/wpdesk/wp-logs/src/WP/WPCapture.php:23
1778
+ msgid "Can not enable WP Desk Debug log! Cannot create directory %s or this directory is not writeable!"
1779
+ msgstr ""
1780
+
1781
+ #. Translators: directory.
1782
+ #: vendor_prefixed/wpdesk/wp-logs/src/WP/WPCapture.php:36
1783
+ msgid "Can not enable WP Desk Debug log! Cannot create file %s!"
1784
+ msgstr ""
1785
+
1786
+ #: vendor_prefixed/wpdesk/wp-nps/src/Nps.php:125
1787
+ msgid "Not likely at all"
1788
+ msgstr ""
1789
+
1790
+ #: vendor_prefixed/wpdesk/wp-nps/src/Nps.php:126
1791
+ msgid "Extremely likely"
1792
+ msgstr ""
1793
+
1794
+ #: vendor_prefixed/wpdesk/wp-nps/src/Nps.php:127
1795
+ msgid "How likely are you to recommend our plugin to your friends?"
1796
+ msgstr ""
1797
+
1798
+ #: vendor_prefixed/wpdesk/wp-nps/src/Nps.php:128
1799
+ msgid "What could we do to improve it?"
1800
+ msgstr ""
1801
+
1802
+ #: vendor_prefixed/wpdesk/wp-nps/src/Nps.php:130
1803
+ msgid "Send feedback"
1804
+ msgstr ""
1805
+
1806
+ #: vendor_prefixed/wpdesk/wp-nps/src/Nps.php:131
1807
+ msgid "Sending feedback"
1808
+ msgstr ""
1809
+
1810
+ #: vendor_prefixed/wpdesk/wp-nps/src/Nps.php:132
1811
+ msgid "Thank you!"
1812
+ msgstr ""
1813
+
1814
+ #: vendor_prefixed/wpdesk/wp-nps/src/Nps.php:133
1815
+ msgid "This field is required"
1816
+ msgstr ""
1817
+
1818
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/BlockSettings.php:100
1819
+ msgid "In order to prevent any further issues with the plugin configuration or its proper functioning, before saving the changes please update the following: %s."
1820
+ msgstr ""
1821
+
1822
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/BlockSettings.php:107
1823
+ msgid "Go to the plugins list &rarr;"
1824
+ msgstr ""
1825
+
1826
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/Notice.php:46
1827
+ msgid "If the WordPress updater hasn't informed you about the newer versions available, please %sfollow these instructions &rarr;%s"
1828
+ msgstr ""
1829
+
1830
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/Notice.php:46
1831
+ msgid "https://octol.io/fs-2-docs"
1832
+ msgstr ""
1833
+
1834
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/Notice.php:49
1835
+ msgid "%sFlexible Shipping%s plugin you are currently using is not compatible with the installed version of Flexible Shipping PRO and Flexible Shipping Locations. Please update the %sFlexible Shipping%s plugin to %s version or newer."
1836
+ msgstr ""
1837
+
1838
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/Notice.php:51
1839
+ msgid "%sFlexible Shipping%s plugin you are currently using is not compatible with the installed version of Flexible Shipping PRO. Please update the %sFlexible Shipping%s plugin to %s version or newer."
1840
+ msgstr ""
1841
+
1842
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/Notice.php:53
1843
+ msgid "%sFlexible Shipping%s plugin you are currently using is not compatible with the installed version of Flexible Shipping Locations. Please update the %sFlexible Shipping%s plugin to %s version or newer."
1844
+ msgstr ""
1845
+
1846
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/Notice.php:57
1847
+ msgid "%sFlexible Shipping PRO%s plugin you are currently using is not compatible with the installed version of Flexible Shipping free. Please update the %sFlexible Shipping PRO%s plugin to %s version or newer."
1848
+ msgstr ""
1849
+
1850
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/Notice.php:60
1851
+ msgid "%sFlexible Shipping Locations%s plugin you are currently using is not compatible with the installed version of Flexible Shipping free. Please update the %sFlexible Shipping Locations%s plugin to %s version or newer."
1852
+ msgstr ""
1853
+
1854
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/PluginCompatibilityChecker.php:97
1855
+ msgid "Flexible Shipping PRO"
1856
+ msgstr ""
1857
+
1858
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/PluginCompatibilityChecker.php:100
1859
+ msgid "Flexible Shipping Locations"
1860
+ msgstr ""
1861
+
1862
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php:44
1863
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/CustomPostType.php:55
1864
+ msgid "Shipments"
1865
+ msgstr ""
1866
+
1867
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php:44
1868
+ msgid "View Shipments"
1869
+ msgstr ""
1870
+
1871
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php:44
1872
+ msgid "Add new Shipment"
1873
+ msgstr ""
1874
+
1875
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php:44
1876
+ msgid "Edit Shipment"
1877
+ msgstr ""
1878
+
1879
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php:44
1880
+ msgid "Save Shipment"
1881
+ msgstr ""
1882
+
1883
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php:44
1884
+ msgid "Search Shipments"
1885
+ msgstr ""
1886
+
1887
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php:44
1888
+ msgid "Shipment not found"
1889
+ msgstr ""
1890
+
1891
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php:44
1892
+ msgid "Shipment not found in trash"
1893
+ msgstr ""
1894
+
1895
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php:44
1896
+ msgid "Shipments."
1897
+ msgstr ""
1898
+
1899
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php:45
1900
+ msgctxt "Shipment status"
1901
+ msgid "New"
1902
+ msgstr ""
1903
+
1904
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php:45
1905
+ msgid "New <span class=\"count\">(%s)</span>"
1906
+ msgid_plural "New <span class=\"count\">(%s)</span>"
1907
+ msgstr[0] ""
1908
+ msgstr[1] ""
1909
+
1910
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php:45
1911
+ msgctxt "Shipment status"
1912
+ msgid "Created"
1913
+ msgstr ""
1914
+
1915
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php:45
1916
+ msgid "Created <span class=\"count\">(%s)</span>"
1917
+ msgid_plural "Created <span class=\"count\">(%s)</span>"
1918
+ msgstr[0] ""
1919
+ msgstr[1] ""
1920
+
1921
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php:45
1922
+ msgctxt "Shipment status"
1923
+ msgid "Confirmed"
1924
+ msgstr ""
1925
+
1926
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php:45
1927
+ msgid "Confirmed <span class=\"count\">(%s)</span>"
1928
+ msgid_plural "Confirmed <span class=\"count\">(%s)</span>"
1929
+ msgstr[0] ""
1930
+ msgstr[1] ""
1931
+
1932
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php:45
1933
+ msgctxt "Shipment status"
1934
+ msgid "Manifest created"
1935
+ msgstr ""
1936
+
1937
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php:45
1938
+ msgctxt "Shipment status"
1939
+ msgid "Failed"
1940
+ msgstr ""
1941
+
1942
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php:45
1943
+ msgid "Failed <span class=\"count\">(%s)</span>"
1944
+ msgid_plural "Failed <span class=\"count\">(%s)</span>"
1945
+ msgstr[0] ""
1946
+ msgstr[1] ""
1947
+
1948
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php:68
1949
+ msgid "Shipment data"
1950
+ msgstr ""
1951
+
1952
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Label/SingleLabelFileDispatcher.php:86
1953
+ msgid "Integration doesn't exists."
1954
+ msgstr ""
1955
+
1956
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Label/SingleLabelFileDispatcher.php:92
1957
+ msgid "Label error"
1958
+ msgstr ""
1959
+
1960
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/CustomPostType.php:33
1961
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/CustomPostType.php:39
1962
+ msgid "Shipping Manifests"
1963
+ msgstr ""
1964
+
1965
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/CustomPostType.php:33
1966
+ msgid "Shipping Manifest"
1967
+ msgstr ""
1968
+
1969
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/CustomPostType.php:33
1970
+ msgid "View Shipping Manifests"
1971
+ msgstr ""
1972
+
1973
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/CustomPostType.php:33
1974
+ msgid "Add new Shipping Manifest"
1975
+ msgstr ""
1976
+
1977
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/CustomPostType.php:33
1978
+ msgid "Add new Shipping Manifests"
1979
+ msgstr ""
1980
+
1981
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/CustomPostType.php:33
1982
+ msgid "Edit Shipping Manifest"
1983
+ msgstr ""
1984
+
1985
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/CustomPostType.php:33
1986
+ msgid "Save Shipping Manifest"
1987
+ msgstr ""
1988
+
1989
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/CustomPostType.php:33
1990
+ msgid "Search Shipping Manifests"
1991
+ msgstr ""
1992
+
1993
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/CustomPostType.php:33
1994
+ msgid "Shipping Manifests not found"
1995
+ msgstr ""
1996
+
1997
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/CustomPostType.php:33
1998
+ msgid "Shipping Manifests not found in trash"
1999
+ msgstr ""
2000
+
2001
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/CustomPostType.php:33
2002
+ msgid "Shipping Manifests."
2003
+ msgstr ""
2004
+
2005
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/CustomPostType.php:94
2006
+ msgid "Date"
2007
+ msgstr ""
2008
+
2009
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/CustomPostType.php:96
2010
+ msgid "Number"
2011
+ msgstr ""
2012
+
2013
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/CustomPostType.php:97
2014
+ msgid "Shipments count"
2015
+ msgstr ""
2016
+
2017
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/CustomPostType.php:98
2018
+ msgid "Actions"
2019
+ msgstr ""
2020
+
2021
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/CustomPostType.php:153
2022
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/CustomPostType.php:175
2023
+ msgid "Invalid nonce!"
2024
+ msgstr ""
2025
+
2026
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/views/column-actions.php:11
2027
+ msgid "Download"
2028
+ msgstr ""
2029
+
2030
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/views/filter-form.php:11
2031
+ msgid "All manifests"
2032
+ msgstr ""
2033
+
2034
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/views/manifest-metabox.php:20
2035
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Manifest/views/manifest-metabox.php:79
2036
+ msgid "Order"
2037
+ msgstr ""
2038
+
2039
+ #. Translators: order id and integration.
2040
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Order/AddShippingMetabox.php:45
2041
+ msgid "Shipment for order %1$s, %2$s"
2042
+ msgstr ""
2043
+
2044
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Order/AddShippingMetabox.php:83
2045
+ msgid "Select integration"
2046
+ msgstr ""
2047
+
2048
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Order/AddShippingMetabox.php:85
2049
+ msgid "Add shipping"
2050
+ msgstr ""
2051
+
2052
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Order/views/html-order-add_shipping-metabox.php:18
2053
+ msgid "Add"
2054
+ msgstr ""
2055
+
2056
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/CalculationMethodOptions.php:20
2057
+ msgid "Sum"
2058
+ msgstr ""
2059
+
2060
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/Logger/ShippingMethodLogger.php:71
2061
+ msgid "shipping method configuration"
2062
+ msgstr ""
2063
+
2064
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/Logger/ShippingMethodLogger.php:78
2065
+ msgid "input data"
2066
+ msgstr ""
2067
+
2068
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/Logger/ShippingMethodLogger.php:85
2069
+ msgid "rules (%1$s)"
2070
+ msgstr ""
2071
+
2072
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/Logger/ShippingMethodLogger.php:85
2073
+ msgid "triggered"
2074
+ msgstr ""
2075
+
2076
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/Logger/ShippingMethodLogger.php:85
2077
+ msgid "not triggered"
2078
+ msgstr ""
2079
+
2080
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/Logger/ShippingMethodLogger.php:92
2081
+ msgid "the result of shipping method's usage"
2082
+ msgstr ""
2083
+
2084
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/Logger/view/display-notice-content-single-value.php:12
2085
+ msgid "Show %1$s"
2086
+ msgstr ""
2087
+
2088
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/Logger/view/display-notice-content-single-value.php:15
2089
+ msgid "Hide %1$s"
2090
+ msgstr ""
2091
+
2092
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/Logger/view/display-notice-content-single-value.php:18
2093
+ msgid "Copy %1$s"
2094
+ msgstr ""
2095
+
2096
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/Logger/view/display-notice-footer.php:9
2097
+ msgid "Copy all data"
2098
+ msgstr ""
2099
+
2100
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/Logger/view/display-notice-header.php:9
2101
+ msgid "FS Debug mode for %1$s%2$s%3$s shipping method."
2102
+ msgstr ""
2103
+
2104
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/Settings/CartCalculationOptions.php:23
2105
+ msgid "Cart value"
2106
+ msgstr ""
2107
+
2108
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/Settings/CartCalculationOptions.php:23
2109
+ msgid "Package value"
2110
+ msgstr ""
2111
+
2112
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/Settings/IntegrationSettingsImplementation.php:41
2113
+ msgid "Integration: %1$s"
2114
+ msgstr ""
2115
+
2116
+ #: vendor_prefixed/wpdesk/wp-wpdesk-fs-table-rate/src/Settings/MethodSettingsImplementation.php:272
2117
+ msgid "Method settings:%1$s Enabled: %2$s Method Title: %3$s Method Description: %4$s Tax status: %5$s Costs includes tax: %6$s Free Shipping: %7$s Free Shipping Label: %8$s 'Left to free shipping' notice: %9$s Rules Calculation: %10$s Cart Calculation: %11$s Visibility (Show only for logged in users): %12$s Default: %13$s Debug mode: %14$s"
2118
+ msgstr ""
2119
+
2120
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/views/scripts.php:44
2121
+ msgid "Plugin deactivation"
2122
+ msgstr ""
2123
+
2124
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/views/scripts.php:115
2125
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-deactivate.php:126
2126
+ msgid "Submit &amp; Deactivate"
2127
+ msgstr ""
2128
+
2129
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/UserFeedbackContent.php:31
2130
+ msgid "Proceed"
2131
+ msgstr ""
2132
+
2133
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/views/thickbox.php:103
2134
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/views/tracker-connect.php:40
2135
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-connect.php:32
2136
+ msgid "Skip"
2137
+ msgstr ""
2138
+
2139
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/OptOut.php:41
2140
+ msgid "You successfully opted out of collecting usage data by %1$s. If you change your mind, you can always opt in later in the plugin's quick links."
2141
+ msgstr ""
2142
+
2143
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/views/tracker-connect.php:26
2144
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-connect.php:18
2145
+ msgid "Please help us improve our plugins! If you opt-in, we will collect some non-sensitive data and usage information anonymously. If you skip this, that's okay! All plugins will work just fine."
2146
+ msgstr ""
2147
+
2148
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/views/tracker-connect.php:35
2149
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-connect.php:27
2150
+ msgid "Allow & Continue &rarr;"
2151
+ msgstr ""
2152
+
2153
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/views/tracker-connect.php:47
2154
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-connect.php:39
2155
+ msgid "What permissions are being granted?"
2156
+ msgstr ""
2157
+
2158
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/views/tracker-connect.php:56
2159
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-connect.php:48
2160
+ msgid "Your Site Overview"
2161
+ msgstr ""
2162
+
2163
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/views/tracker-connect.php:59
2164
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-connect.php:51
2165
+ msgid "WP version, PHP info"
2166
+ msgstr ""
2167
+
2168
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/views/tracker-connect.php:67
2169
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-connect.php:59
2170
+ msgid "Plugin Usage"
2171
+ msgstr ""
2172
+
2173
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/views/tracker-connect.php:70
2174
+ msgid "Current settings and usage information of %1$s plugins"
2175
+ msgstr ""
2176
+
2177
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/views/tracker-connect.php:78
2178
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-connect.php:70
2179
+ msgid "Your Store Overview"
2180
+ msgstr ""
2181
+
2182
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/views/tracker-connect.php:81
2183
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-connect.php:73
2184
+ msgid "Anonymized and non-sensitive store usage information"
2185
+ msgstr ""
2186
+
2187
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/views/tracker-connect.php:91
2188
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-connect.php:83
2189
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-notice.php:27
2190
+ msgid "Find out more &raquo;"
2191
+ msgstr ""
2192
+
2193
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-connect.php:62
2194
+ msgid "Current settings and usage information of WP Desk plugins"
2195
+ msgstr ""
2196
+
2197
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-deactivate.php:19
2198
+ msgid " If you have a moment, please let us know why you are deactivating plugin (anonymous feedback):"
2199
+ msgstr ""
2200
+
2201
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-deactivate.php:48
2202
+ msgid "I found a better plugin"
2203
+ msgstr ""
2204
+
2205
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-deactivate.php:98
2206
+ msgid "Kindly tell us the reason so we can improve"
2207
+ msgstr ""
2208
+
2209
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-notice.php:22
2210
+ msgid "We need your help to improve <strong>WP Desk plugins</strong>, so they are more useful for you and the rest of <strong>30,000+ users</strong>. By collecting data on how you use our plugins, you will help us a lot. We will not collect any sensitive data, so you can feel safe."
2211
+ msgstr ""
2212
+
2213
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-notice.php:41
2214
+ msgid "Allow"
2215
+ msgstr ""
2216
+
2217
+ #: vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/views/tracker-opt-out-notice.php:11
2218
+ msgid "You successfully opted out of collecting usage data by WP Desk. If you change your mind, you can always opt in later in the plugin's quick links."
2219
+ msgstr ""
2220
+
2221
  #: assets-src/rules-settings/js/components/html-woo-select.js:37
2222
  #: assets-src/rules-settings/js/components/html-woo-select.js:233
2223
  msgid "Enter 3 or more characters"
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: octolize,grola,sebastianpisula
3
  Donate link: https://octol.io/fs-repo-up
4
  Tags: table rate, table rate shipping, conditional shipping, free shipping, woocommerce shipping, woocommerce table rate shipping, cart based shipping, weight based shipping, totals based shipping, order based shipping, advanced shipping
5
  Requires at least: 5.7
6
- Tested up to: 6.0
7
- Stable tag: 4.14.2
8
  Requires PHP: 7.0
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -222,6 +222,10 @@ If you are upgrading from the old Flexible Shipping version (1.3.2, woo-flexible
222
 
223
  == Changelog ==
224
 
 
 
 
 
225
  = 4.14.2 - 2022-10-03 =
226
  * Added support for WooCommerce 7.0
227
 
3
  Donate link: https://octol.io/fs-repo-up
4
  Tags: table rate, table rate shipping, conditional shipping, free shipping, woocommerce shipping, woocommerce table rate shipping, cart based shipping, weight based shipping, totals based shipping, order based shipping, advanced shipping
5
  Requires at least: 5.7
6
+ Tested up to: 6.1
7
+ Stable tag: 4.15.0
8
  Requires PHP: 7.0
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
222
 
223
  == Changelog ==
224
 
225
+ = 4.15.0 - 2022-10-18 =
226
+ * Added compatibility with WooCommerce High-Performance Order Storage (HPOS)
227
+ * Added support for WordPress 6.1
228
+
229
  = 4.14.2 - 2022-10-03 =
230
  * Added support for WooCommerce 7.0
231
 
src/WPDesk/FS/Shipment/AdminNotices.php ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class AdminNotices
4
+ */
5
+
6
+ namespace WPDesk\FS\Shipment;
7
+
8
+ use FSVendor\WPDesk\Notice\Notice;
9
+ use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
10
+ use FSVendor\WPDesk\Session\SessionFactory;
11
+
12
+ /**
13
+ * Display admin notices.
14
+ */
15
+ class AdminNotices implements Hookable {
16
+
17
+ /**
18
+ * @var SessionFactory
19
+ */
20
+ private $session_factory;
21
+
22
+ /**
23
+ * @param SessionFactory $session_factory .
24
+ */
25
+ public function __construct( SessionFactory $session_factory ) {
26
+ $this->session_factory = $session_factory;
27
+ }
28
+
29
+ /**
30
+ * @return void
31
+ */
32
+ public function hooks() {
33
+ add_action( 'admin_notices', [ $this, 'admin_notices' ] );
34
+ }
35
+
36
+ /**
37
+ * .
38
+ */
39
+ public function admin_notices() {
40
+ if ( ! empty( $_REQUEST['bulk_flexible_shipping_send'] ) ) {
41
+ $bulk_flexible_shipping_send_count = (int) sanitize_text_field( wp_unslash( $_REQUEST['bulk_flexible_shipping_send'] ) );
42
+
43
+ new Notice(
44
+ sprintf( __( 'Bulk send shipment - processed orders: %d', 'flexible-shipping' ), $bulk_flexible_shipping_send_count ) // phpcs:ignore
45
+ );
46
+ }
47
+
48
+ if ( ! empty( $_REQUEST['bulk_flexible_shipping_labels'] ) ) {
49
+ $bulk_flexible_shipping_labels_count = (int) sanitize_text_field( wp_unslash( $_REQUEST['bulk_flexible_shipping_labels'] ) );
50
+
51
+ if ( ! empty( $_REQUEST['bulk_flexible_shipping_no_labels_created'] ) ) {
52
+ new Notice(
53
+ sprintf( __( 'Bulk labels - processed orders: %d. No labels for processed orders.', 'flexible-shipping' ), $bulk_flexible_shipping_labels_count ) // phpcs:ignore
54
+ );
55
+ } else {
56
+ $labels = $this->session_factory->get_woocommerce_session_adapter()->get( 'flexible_shipping_bulk_labels' );
57
+ if ( is_array( $labels ) ) {
58
+ if ( isset( $labels['error'] ) ) {
59
+ new Notice( $labels['error'], Notice::NOTICE_TYPE_ERROR, true, 20 );
60
+ } else {
61
+ $nonce = wp_create_nonce( 'flexible_shipping_labels' );
62
+ new Notice(
63
+ sprintf(
64
+ __( 'Bulk labels - processed orders: %d. If download not start automatically click %shere%s.', 'flexible-shipping' ), // phpcs:ignore
65
+ $bulk_flexible_shipping_labels_count,
66
+ '<a id="flexible_shipping_labels_url" target="_blank" href=' . esc_url( admin_url( 'admin.php?flexible_shipping_labels=' . basename( $labels['client_file'] ) . '&tmp_file=' . basename( $labels['tmp_file'] ) . '&nonce=' . $nonce ) ) . '>',
67
+ '</a>'
68
+ )
69
+ );
70
+ }
71
+ }
72
+ }
73
+ }
74
+
75
+ if ( ! empty( $_REQUEST['bulk_flexible_shipping_manifests'] ) ) {
76
+ $bulk_flexible_shipping_manifest_count = (int) sanitize_text_field( wp_unslash( $_REQUEST['bulk_flexible_shipping_manifests'] ) );
77
+ new Notice(
78
+ sprintf( __( 'Bulk shipping manifest - processed orders: %d', 'flexible-shipping' ), $bulk_flexible_shipping_manifest_count ) // phpcs:ignore
79
+ );
80
+
81
+ if ( $this->session_factory->get_woocommerce_session_adapter()->get( 'flexible_shipping_bulk_manifests' ) ) {
82
+ $messages = $this->session_factory->get_woocommerce_session_adapter()->get( 'flexible_shipping_bulk_manifests' );
83
+
84
+ foreach ( $messages as $message ) {
85
+ new Notice(
86
+ $message['message'],
87
+ $message['type']
88
+ );
89
+ }
90
+
91
+ $this->session_factory->get_woocommerce_session_adapter()->set( 'flexible_shipping_bulk_manifests', null );
92
+ }
93
+ }
94
+ }
95
+ }
src/WPDesk/FS/Shipment/BulkAction.php ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class BulkAction
4
+ */
5
+
6
+ namespace WPDesk\FS\Shipment;
7
+
8
+ use Exception;
9
+ use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
10
+ use FSVendor\WPDesk\Session\SessionFactory;
11
+ use WPDesk\FS\Shipment\BulkAction\HandleAction;
12
+ use WPDesk\FS\Shipment\BulkAction\HandleActionStrategy;
13
+ use WPDesk\FS\Shipment\BulkAction\HandleActionStrategyInterface;
14
+
15
+ /**
16
+ * Bulk actions on order screen.
17
+ */
18
+ class BulkAction implements Hookable {
19
+
20
+ /**
21
+ * @var SessionFactory
22
+ */
23
+ private $session_factory;
24
+
25
+ /**
26
+ * @param SessionFactory $session_factory .
27
+ */
28
+ public function __construct( SessionFactory $session_factory ) {
29
+ $this->session_factory = $session_factory;
30
+ }
31
+
32
+ /**
33
+ * @return void
34
+ */
35
+ public function hooks() {
36
+ // Old Screen.
37
+ add_filter( 'bulk_actions-edit-shop_order', [ $this, 'add_bulk_action_options' ] );
38
+ add_filter( 'handle_bulk_actions-edit-shop_order', [ $this, 'handle_bulk_action' ], 10, 3 );
39
+
40
+ // New Screen.
41
+ add_filter( 'bulk_actions-woocommerce_page_wc-orders', [ $this, 'add_bulk_action_options' ] );
42
+ add_action( 'admin_init', [ $this, 'handle_bulk_action_new_screen' ] );
43
+ }
44
+
45
+ public function handle_bulk_action_new_screen() {
46
+ if ( ! isset( $_GET['page'], $_GET['action'], $_GET['order'] ) || empty( $_GET['order'] ) || 'wc-orders' !== wp_unslash( $_GET['page'] ) ) { //phpcs:ignore
47
+ return;
48
+ }
49
+
50
+ check_admin_referer( 'bulk-orders' );
51
+
52
+ $action = wp_unslash( $_GET['action'] ); //phpcs:ignore
53
+ $orders = wp_parse_id_list( wp_unslash( $_GET['order'] ) );
54
+
55
+ try {
56
+ $this->get_handle_action_strategy( $action );
57
+ } catch ( Exception $e ) {
58
+ return;
59
+ }
60
+
61
+ wp_safe_redirect( $this->handle_action( wp_get_referer(), $action, $orders ) );
62
+ die();
63
+ }
64
+
65
+ /**
66
+ * @param array $bulk_actions .
67
+ *
68
+ * @return mixed
69
+ */
70
+ public function add_bulk_action_options( $bulk_actions ) {
71
+ $integrations = apply_filters( 'flexible_shipping_integration_options', [] );
72
+
73
+ if ( count( $integrations ) ) {
74
+ $bulk_actions['flexible_shipping_send'] = __( 'Send shipment', 'flexible-shipping' );
75
+ $bulk_actions['flexible_shipping_labels'] = __( 'Get labels', 'flexible-shipping' );
76
+
77
+ if ( apply_filters( 'flexible_shipping_has_manifests', false ) ) {
78
+ $bulk_actions['flexible_shipping_manifest'] = __( 'Create shipping manifest', 'flexible-shipping' );
79
+ }
80
+ }
81
+
82
+ return $bulk_actions;
83
+ }
84
+
85
+ /**
86
+ * @param string $redirect_to .
87
+ * @param string $do_action .
88
+ * @param array $post_ids .
89
+ *
90
+ * @return string
91
+ */
92
+ public function handle_bulk_action( $redirect_to, $do_action, $post_ids ): string {
93
+ return $this->handle_action( $redirect_to, $do_action, $post_ids );
94
+ }
95
+
96
+ /**
97
+ * @param string $redirect_to .
98
+ * @param string $action .
99
+ * @param array $ids .
100
+ *
101
+ * @return string
102
+ */
103
+ private function handle_action( string $redirect_to, string $action, array $ids ): string {
104
+ $redirect_to = remove_query_arg( 'bulk_flexible_shipping_send', $redirect_to );
105
+ $redirect_to = remove_query_arg( 'bulk_flexible_shipping_labels', $redirect_to );
106
+ $redirect_to = remove_query_arg( 'bulk_flexible_shipping_manifests', $redirect_to );
107
+
108
+ try {
109
+ $handle_action = $this->get_handle_action();
110
+
111
+ $handle_action->set_strategy( $this->get_handle_action_strategy( $action ) );
112
+
113
+ return $handle_action->handle( $redirect_to, wp_parse_id_list( $ids ) );
114
+ } catch ( Exception $e ) { // phpcs:ignore
115
+ // Do nothing.
116
+ }
117
+
118
+ return $redirect_to;
119
+ }
120
+
121
+ /**
122
+ * @return HandleAction
123
+ */
124
+ protected function get_handle_action(): HandleAction {
125
+ return new HandleAction();
126
+ }
127
+
128
+ /**
129
+ * @param string $action
130
+ *
131
+ * @return HandleActionStrategyInterface
132
+ * @throws Exception
133
+ */
134
+ protected function get_handle_action_strategy( string $action ): HandleActionStrategyInterface {
135
+ return ( new HandleActionStrategy( $this->session_factory ) )->get( $action );
136
+ }
137
+ }
src/WPDesk/FS/Shipment/BulkAction/HandleAction.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class HandleAction
4
+ */
5
+
6
+ namespace WPDesk\FS\Shipment\BulkAction;
7
+
8
+ /**
9
+ * .
10
+ */
11
+ class HandleAction {
12
+
13
+ /**
14
+ * @var HandleActionStrategyInterface
15
+ */
16
+ private $strategy;
17
+
18
+ /**
19
+ * @param HandleActionStrategyInterface $strategy
20
+ *
21
+ * @return $this
22
+ */
23
+ public function set_strategy( HandleActionStrategyInterface $strategy ): self {
24
+ $this->strategy = $strategy;
25
+
26
+ return $this;
27
+ }
28
+
29
+ /**
30
+ * @param string $redirect_to .
31
+ * @param array $post_ids .
32
+ *
33
+ * @return string
34
+ */
35
+ public function handle( string $redirect_to, array $post_ids ): string {
36
+ return $this->strategy->handle( $redirect_to, $post_ids );
37
+ }
38
+ }
src/WPDesk/FS/Shipment/BulkAction/HandleActionLabels.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class HandleActionLabels
4
+ */
5
+
6
+ namespace WPDesk\FS\Shipment\BulkAction;
7
+
8
+ use Exception;
9
+ use FSVendor\WPDesk\FS\Shipment\Label\LabelsBulkActionHandler;
10
+ use FSVendor\WPDesk\FS\Shipment\Label\LabelsFileCreator;
11
+ use FSVendor\WPDesk\Session\SessionFactory;
12
+ use WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_File_Exception;
13
+ use WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_Zip_File_Exception;
14
+
15
+ /**
16
+ * .
17
+ */
18
+ class HandleActionLabels implements HandleActionStrategyInterface {
19
+
20
+ /**
21
+ * @var SessionFactory
22
+ */
23
+ private $session_factory;
24
+
25
+ /**
26
+ * @param SessionFactory $session_factory .
27
+ */
28
+ public function __construct( SessionFactory $session_factory ) {
29
+ $this->session_factory = $session_factory;
30
+ }
31
+
32
+ /**
33
+ * @param string $redirect_to .
34
+ * @param array $post_ids .
35
+ *
36
+ * @return string
37
+ */
38
+ public function handle( string $redirect_to, array $post_ids ): string {
39
+ $labels_bulk_actions_handler = LabelsBulkActionHandler::get_labels_bulk_actions_handler();
40
+ $labels_bulk_actions_handler->bulk_process_orders( $post_ids );
41
+
42
+ try {
43
+ $labels = $labels_bulk_actions_handler->get_labels_for_shipments();
44
+ if ( 0 === count( $labels ) ) {
45
+ $redirect_to = add_query_arg( 'bulk_flexible_shipping_labels', count( $post_ids ), $redirect_to );
46
+
47
+ return add_query_arg( 'bulk_flexible_shipping_no_labels_created', 1, $redirect_to );
48
+ }
49
+
50
+ $labels_file_creator = new LabelsFileCreator( $labels );
51
+ $labels_file_creator->create_labels_file();
52
+ $labels['tmp_file'] = $labels_file_creator->get_tmp_file_name();
53
+ $labels['client_file'] = $labels_file_creator->get_file_name();
54
+
55
+ foreach ( $labels as $key => $label ) {
56
+ if ( is_array( $labels[ $key ] ) && isset( $labels[ $key ]['content'] ) ) {
57
+ unset( $labels[ $key ]['content'] );
58
+ }
59
+ }
60
+ } catch ( WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_Zip_File_Exception $zip_file_exception ) {
61
+ $labels['error'] = __( 'Unable to create temporary zip archive for labels. Check temporary folder configuration on server.', 'flexible-shipping' );
62
+ } catch ( WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_File_Exception $tmp_file_exception ) {
63
+ $labels['error'] = __( 'Unable to create temporary file for labels. Check temporary folder configuration on server.', 'flexible-shipping' );
64
+ } catch ( Exception $e ) {
65
+ $labels['error'] = $e->getMessage();
66
+ }
67
+
68
+ $this->session_factory->get_woocommerce_session_adapter()->set( 'flexible_shipping_bulk_labels', $labels );
69
+
70
+ return add_query_arg( 'bulk_flexible_shipping_labels', count( $post_ids ), $redirect_to );
71
+ }
72
+ }
src/WPDesk/FS/Shipment/BulkAction/HandleActionManifest.php ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class HandleActionManifest
4
+ */
5
+
6
+ namespace WPDesk\FS\Shipment\BulkAction;
7
+
8
+ use Exception;
9
+ use FSVendor\WPDesk\Session\SessionFactory;
10
+ use WPDesk_Flexible_Shipping_Shipment;
11
+ use WPDesk_Flexible_Shipping_Shipment_Interface;
12
+
13
+ /**
14
+ * .
15
+ */
16
+ class HandleActionManifest implements HandleActionStrategyInterface {
17
+
18
+ /**
19
+ * @var SessionFactory
20
+ */
21
+ private $session_factory;
22
+
23
+ /**
24
+ * @param SessionFactory $session_factory .
25
+ */
26
+ public function __construct( SessionFactory $session_factory ) {
27
+ $this->session_factory = $session_factory;
28
+ }
29
+
30
+ /**
31
+ * @param string $redirect_to .
32
+ * @param array $post_ids .
33
+ *
34
+ * @return string
35
+ */
36
+ public function handle( string $redirect_to, array $post_ids ): string {
37
+ $manifests = [];
38
+ foreach ( $post_ids as $post_id ) {
39
+ $shipments = fs_get_order_shipments( $post_id );
40
+ foreach ( $shipments as $shipment ) {
41
+ /* @var $shipment WPDesk_Flexible_Shipping_Shipment|WPDesk_Flexible_Shipping_Shipment_Interface */
42
+ if ( $shipment->get_status() !== 'fs-confirmed' || $shipment->get_meta( '_manifest', '' ) !== '' ) {
43
+ continue;
44
+ }
45
+ try {
46
+ $integration = $shipment->get_integration();
47
+ $manifest_name = $integration;
48
+ if ( method_exists( $shipment, 'get_manifest_name' ) ) {
49
+ $manifest_name = $shipment->get_manifest_name();
50
+ }
51
+ $manifest = null;
52
+ if ( empty( $manifests[ $manifest_name ] ) ) {
53
+ if ( fs_manifest_integration_exists( $integration ) ) {
54
+ $manifest = fs_create_manifest( $integration );
55
+ }
56
+ } else {
57
+ $manifest = $manifests[ $manifest_name ];
58
+ }
59
+ if ( null !== $manifest ) {
60
+ $manifest->add_shipments( $shipment );
61
+ $manifest->save();
62
+ $shipment->update_status( 'fs-manifest' );
63
+ $shipment->save();
64
+ $manifests[ $manifest_name ] = $manifest;
65
+ }
66
+ } catch ( Exception $e ) { // phpcs:ignore
67
+ // Do nothing.
68
+ }
69
+ }
70
+ }
71
+ $messages = [];
72
+ $integrations = apply_filters( 'flexible_shipping_integration_options', [] );
73
+
74
+ foreach ( $manifests as $manifest ) {
75
+ try {
76
+ $manifest->generate();
77
+ $manifest->save();
78
+ $download_manifest_url = admin_url( 'edit.php?post_type=shipping_manifest&flexible_shipping_download_manifest=' . $manifest->get_id() . '&nonce=' . wp_create_nonce( 'flexible_shipping_download_manifest' ) );
79
+ $messages[] = [
80
+ 'type' => 'updated',
81
+ 'message' => sprintf(
82
+ // Translators: manifests count and integration.
83
+ __( 'Created manifest: %s (%s). If download not start automatically click %shere%s.', 'flexible-shipping' ), // phpcs:ignore
84
+ $manifest->get_number(),
85
+ $integrations[ $manifest->get_integration() ],
86
+ '<a class="shipping_manifest_download" target="_blank" href="' . $download_manifest_url . '">',
87
+ '</a>'
88
+ ),
89
+ ];
90
+ } catch ( Exception $e ) {
91
+ $messages[] = [
92
+ 'type' => 'error',
93
+ 'message' => sprintf(
94
+ __( 'Manifest creation error: %s (%s).', 'flexible-shipping' ), // phpcs:ignore
95
+ $e->getMessage(),
96
+ $integrations[ $manifest->get_integration() ]
97
+ ),
98
+ ];
99
+ fs_delete_manifest( $manifest );
100
+ }
101
+ }
102
+ if ( count( $messages ) === 0 ) {
103
+ $messages[] = [
104
+ 'type' => 'updated',
105
+ 'message' => __( 'No manifests created.', 'flexible-shipping' ),
106
+ ];
107
+ }
108
+ $this->session_factory->get_woocommerce_session_adapter()->set( 'flexible_shipping_bulk_manifests', $messages );
109
+
110
+ return add_query_arg( 'bulk_flexible_shipping_manifests', count( $post_ids ), $redirect_to );
111
+ }
112
+ }
src/WPDesk/FS/Shipment/BulkAction/HandleActionSend.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class HandleActionSend
4
+ */
5
+
6
+ namespace WPDesk\FS\Shipment\BulkAction;
7
+
8
+ use Exception;
9
+ use FSVendor\WPDesk\Session\SessionFactory;
10
+ use WPDesk_Flexible_Shipping_Shipment;
11
+ use WPDesk_Flexible_Shipping_Shipment_Interface;
12
+
13
+ /**
14
+ * .
15
+ */
16
+ class HandleActionSend implements HandleActionStrategyInterface {
17
+
18
+ /**
19
+ * @var SessionFactory
20
+ */
21
+ private $session_factory;
22
+
23
+ /**
24
+ * @param SessionFactory $session_factory .
25
+ */
26
+ public function __construct( SessionFactory $session_factory ) {
27
+ $this->session_factory = $session_factory;
28
+ }
29
+
30
+ /**
31
+ * @param string $redirect_to .
32
+ * @param array $post_ids .
33
+ *
34
+ * @return string
35
+ */
36
+ public function handle( string $redirect_to, array $post_ids ): string {
37
+ $messages = [];
38
+ foreach ( $post_ids as $post_id ) {
39
+ $shipments = fs_get_order_shipments( $post_id );
40
+ $messages[ $post_id ] = [];
41
+
42
+ foreach ( $shipments as $shipment ) {
43
+ /* @var $shipment WPDesk_Flexible_Shipping_Shipment|WPDesk_Flexible_Shipping_Shipment_Interface */
44
+ try {
45
+ $shipment->set_sent_via_bulk();
46
+ $shipment->api_create();
47
+ $messages[ $post_id ][ $shipment->get_id() ] = [
48
+ 'status' => 'created',
49
+ 'message' => __( 'Shipment created.', 'flexible-shipping' ),
50
+ ];
51
+ } catch ( Exception $e ) {
52
+ $messages[ $post_id ][ $shipment->get_id() ] = [
53
+ 'status' => 'error',
54
+ 'message' => $e->getMessage(),
55
+ ];
56
+ }
57
+ }
58
+ $messages[ $post_id ][] = apply_filters(
59
+ 'flexible_shipping_bulk_send',
60
+ [
61
+ 'status' => 'none',
62
+ 'message' => __( 'No action performed.', 'flexible-shipping' ),
63
+ ],
64
+ $post_id
65
+ );
66
+ }
67
+
68
+ $this->session_factory->get_woocommerce_session_adapter()->set( 'flexible_shipping_bulk_send', $messages );
69
+
70
+ return add_query_arg( 'bulk_flexible_shipping_send', count( $post_ids ), $redirect_to );
71
+ }
72
+ }
src/WPDesk/FS/Shipment/BulkAction/HandleActionStrategy.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class HandleActionStrategy
4
+ */
5
+
6
+ namespace WPDesk\FS\Shipment\BulkAction;
7
+
8
+ use Exception;
9
+ use FSVendor\WPDesk\Session\SessionFactory;
10
+
11
+ /**
12
+ * .
13
+ */
14
+ class HandleActionStrategy {
15
+
16
+ /**
17
+ * @var SessionFactory
18
+ */
19
+ private $session_factory;
20
+
21
+ /**
22
+ * @param SessionFactory $session_factory .
23
+ */
24
+ public function __construct( SessionFactory $session_factory ) {
25
+ $this->session_factory = $session_factory;
26
+ }
27
+
28
+ public function get( string $action ) {
29
+ switch ( $action ) {
30
+ case 'flexible_shipping_send':
31
+ return new HandleActionSend( $this->session_factory );
32
+ case 'flexible_shipping_labels':
33
+ return new HandleActionLabels( $this->session_factory );
34
+ case 'flexible_shipping_manifest':
35
+ return new HandleActionManifest( $this->session_factory );
36
+ default:
37
+ throw new Exception( __( 'Bulk Handle action not found', 'flexible-shipping' ) );
38
+ }
39
+ }
40
+ }
src/WPDesk/FS/Shipment/BulkAction/HandleActionStrategyInterface.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Interface HandleActionStrategyInterface
4
+ */
5
+
6
+ namespace WPDesk\FS\Shipment\BulkAction;
7
+
8
+ /**
9
+ * .
10
+ */
11
+ interface HandleActionStrategyInterface {
12
+ /**
13
+ * @param string $redirect_to .
14
+ * @param array $post_ids .
15
+ *
16
+ * @return string
17
+ */
18
+ public function handle( string $redirect_to, array $post_ids ): string;
19
+ }
src/WPDesk/FS/Shipment/DispatchLabelFile.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class DispatchLabelFile
4
+ */
5
+
6
+ namespace WPDesk\FS\Shipment;
7
+
8
+ use FSVendor\WPDesk\FS\Shipment\Label\LabelsFileDispatcher;
9
+ use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
10
+
11
+ /**
12
+ * .
13
+ */
14
+ class DispatchLabelFile implements Hookable {
15
+
16
+ /**
17
+ * @return void
18
+ */
19
+ public function hooks() {
20
+ add_action( 'admin_init', [ $this, 'dispatch_labels_file_if_expected' ], 1 );
21
+ }
22
+
23
+ /**
24
+ * Dispatch labels file if requested.
25
+ */
26
+ public function dispatch_labels_file_if_expected() {
27
+ if ( ! isset( $_GET['flexible_shipping_labels'], $_GET['tmp_file'], $_GET['nonce'] ) ) {
28
+ return;
29
+ }
30
+
31
+ if ( ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['nonce'] ) ), 'flexible_shipping_labels' ) ) {
32
+ return;
33
+ }
34
+
35
+ $file = trailingslashit( sys_get_temp_dir() ) . sanitize_text_field( wp_unslash( $_GET['flexible_shipping_labels'] ) );
36
+ $tmp_file = trailingslashit( sys_get_temp_dir() ) . sanitize_text_field( wp_unslash( $_GET['tmp_file'] ) );
37
+
38
+ if ( ! file_exists( $tmp_file ) ) {
39
+ wp_die( esc_html__( 'This file was already downloaded! Please retry bulk action!', 'flexible-shipping' ) );
40
+ }
41
+
42
+ $labels_file_dispatcher = new LabelsFileDispatcher();
43
+ $labels_file_dispatcher->dispatch_and_delete_labels_file( $file, $tmp_file );
44
+ die();
45
+ }
46
+ }
src/WPDesk/FS/Shipment/FilterOrders.php ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class FilterOrders
4
+ */
5
+
6
+ namespace WPDesk\FS\Shipment;
7
+
8
+ use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
9
+
10
+ /**
11
+ * .
12
+ */
13
+ class FilterOrders implements Hookable {
14
+
15
+ /**
16
+ * @return void
17
+ */
18
+ public function hooks() {
19
+ add_filter( 'posts_where', [ $this, 'posts_where' ], 999 );
20
+
21
+ add_action( 'restrict_manage_posts', [ $this, 'restrict_manage_posts' ], 9999 );
22
+ }
23
+
24
+ /**
25
+ * @param string $where .
26
+ *
27
+ * @return string
28
+ */
29
+ public function posts_where( $where = '' ) {
30
+ global $pagenow, $wp_query, $wpdb;
31
+
32
+ $should_modify_query = 'edit.php' === $pagenow && is_admin() && isset( $wp_query->query_vars['post_type'] ) && 'shop_order' === $wp_query->query_vars['post_type'];
33
+
34
+ if ( ! $should_modify_query ) {
35
+ return $where;
36
+ }
37
+
38
+ $integration = sanitize_key( $_GET['flexible_shipping_integration_filter'] ?? '' );
39
+ $status = sanitize_key( $_GET['flexible_shipping_status_filter'] ?? '' );
40
+
41
+ if ( empty( $integration ) && empty( $status ) ) {
42
+ return $where;
43
+ }
44
+
45
+ $add_where_meta_integration = '';
46
+ $add_where_meta_status = '';
47
+ $add_where_shipment_integration = '';
48
+ $add_where_shipment_status = '';
49
+ $add_where = '';
50
+
51
+ if ( '' !== $integration ) {
52
+ $add_where_meta_integration = " EXISTS ( SELECT 1 FROM {$wpdb->postmeta} fs_postmeta WHERE {$wpdb->posts}.ID = fs_postmeta.post_id AND fs_postmeta.meta_key = '_flexible_shipping_integration' AND fs_postmeta.meta_value = '$integration' ) ";
53
+ $add_where_shipment_integration = " EXISTS ( SELECT 1 FROM {$wpdb->posts} fs_posts, {$wpdb->postmeta} fs_postmeta WHERE {$wpdb->posts}.ID = fs_posts.post_parent AND fs_posts.ID = fs_postmeta.post_id AND fs_postmeta.meta_key = '_integration' AND fs_postmeta.meta_value = '$integration' ) ";
54
+ }
55
+
56
+ if ( '' !== $status ) {
57
+ $add_where_meta_status = " EXISTS ( SELECT 1 FROM {$wpdb->postmeta} fs_postmeta WHERE {$wpdb->posts}.ID = fs_postmeta.post_id AND fs_postmeta.meta_key = '_flexible_shipping_status' AND fs_postmeta.meta_value = '$status' ) ";
58
+ $add_where_shipment_status = " EXISTS ( SELECT 1 FROM {$wpdb->posts} fs_posts WHERE {$wpdb->posts}.ID = fs_posts.post_parent AND fs_posts.post_status = 'fs-{$status}' ) ";
59
+ }
60
+
61
+ $add_where_meta = '';
62
+
63
+ if ( '' !== $add_where_meta_integration ) {
64
+ $add_where_meta .= $add_where_meta_integration;
65
+ }
66
+
67
+ if ( '' !== $add_where_meta_status ) {
68
+ if ( '' !== $add_where_meta ) {
69
+ $add_where_meta .= ' AND ';
70
+ }
71
+ $add_where_meta .= $add_where_meta_status;
72
+ }
73
+
74
+ $add_where_shipment = '';
75
+ if ( '' !== $add_where_shipment_integration ) {
76
+ $add_where_shipment .= $add_where_shipment_integration;
77
+ }
78
+
79
+ if ( '' !== $add_where_shipment_status ) {
80
+ if ( '' !== $add_where_shipment ) {
81
+ $add_where_shipment .= ' AND ';
82
+ }
83
+ $add_where_shipment .= $add_where_shipment_status;
84
+ }
85
+
86
+ $add_where_meta = ' ( ' . $add_where_meta . ' ) ';
87
+ $add_where_shipment = ' ( ' . $add_where_shipment . ' ) ';
88
+ $add_where = ' AND ( ' . $add_where_meta . ' OR ' . $add_where_shipment . ' ) ';
89
+ $where .= $add_where;
90
+
91
+ return $where;
92
+ }
93
+
94
+ /**
95
+ * .
96
+ */
97
+ public function restrict_manage_posts() {
98
+ $screen = get_current_screen();
99
+
100
+ if ( ! $screen ) {
101
+ return;
102
+ }
103
+
104
+ if ( apply_filters( 'flexible_shipping_disable_order_filters', false ) ) {
105
+ return;
106
+ }
107
+
108
+ $integrations = apply_filters( 'flexible_shipping_integration_options', [] );
109
+
110
+ if ( ! count( $integrations ) ) {
111
+ return;
112
+ }
113
+
114
+ if ( ! in_array( $screen->id, [ 'woocommerce_page_wc-orders', 'edit-shop_order' ], true ) ) {
115
+ return;
116
+ }
117
+
118
+ $integrations = apply_filters( 'flexible_shipping_integration_options', [] );
119
+ $statuses = apply_filters( 'flexible_shipping_status', [] );
120
+ $integration = '';
121
+
122
+ if ( isset( $_GET['flexible_shipping_integration_filter'] ) ) {
123
+ $integration = sanitize_key( $_GET['flexible_shipping_integration_filter'] );
124
+ }
125
+
126
+ $status = '';
127
+ if ( isset( $_GET['flexible_shipping_status_filter'] ) ) {
128
+ $status = sanitize_key( $_GET['flexible_shipping_status_filter'] );
129
+ }
130
+
131
+ include __DIR__ . '/views/html-orders-filter-form.php';
132
+ }
133
+ }
src/WPDesk/FS/Shipment/ModifyOrderTable.php ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class ModifyOrderTable
4
+ */
5
+
6
+ namespace WPDesk\FS\Shipment;
7
+
8
+ use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
9
+ use FSVendor\WPDesk\Session\SessionFactory;
10
+ use WC_Order;
11
+ use WPDesk_Flexible_Shipping_Shipment;
12
+ use WPDesk_Flexible_Shipping_Shipment_Interface;
13
+
14
+ /**
15
+ * .
16
+ */
17
+ class ModifyOrderTable implements Hookable {
18
+
19
+ /**
20
+ * @var SessionFactory
21
+ */
22
+ private $session_factory;
23
+
24
+ /**
25
+ * @param SessionFactory $session_factory .
26
+ */
27
+ public function __construct( SessionFactory $session_factory ) {
28
+ $this->session_factory = $session_factory;
29
+ }
30
+
31
+ /**
32
+ * @return void
33
+ */
34
+ public function hooks() {
35
+ // Old Screen.
36
+ add_filter( 'manage_edit-shop_order_columns', [ $this, 'manage_edit_shop_order_columns' ], 11 );
37
+ add_action( 'manage_shop_order_posts_custom_column', [ $this, 'manage_shop_order_posts_custom_column' ], 11, 2 );
38
+
39
+ // New Screen.
40
+ add_filter( 'manage_woocommerce_page_wc-orders_columns', [ $this, 'manage_edit_shop_order_columns' ], 11 );
41
+ add_action( 'manage_woocommerce_page_wc-orders_custom_column', [ $this, 'manage_shop_order_posts_custom_column' ], 11, 2 );
42
+ }
43
+
44
+ /**
45
+ * @param array $columns .
46
+ *
47
+ * @return array
48
+ */
49
+ public function manage_edit_shop_order_columns( $columns ) {
50
+ if ( isset( $columns['flexible_shipping'] ) ) {
51
+ return $columns;
52
+ }
53
+
54
+ $integrations = apply_filters( 'flexible_shipping_integration_options', [] );
55
+
56
+ if ( ! count( $integrations ) ) {
57
+ return $columns;
58
+ }
59
+
60
+ $ret = [];
61
+
62
+ $col_added = false;
63
+
64
+ foreach ( $columns as $key => $column ) {
65
+ if ( ! $col_added && in_array( $key, [ 'order_actions', 'wc_actions' ], true ) ) {
66
+ $ret['flexible_shipping'] = __( 'Shipping', 'flexible-shipping' );
67
+ $col_added = true;
68
+ }
69
+ $ret[ $key ] = $column;
70
+ }
71
+
72
+ if ( ! $col_added ) {
73
+ $ret['flexible_shipping'] = __( 'Shipping', 'flexible-shipping' );
74
+ }
75
+
76
+ return $ret;
77
+ }
78
+
79
+ /**
80
+ * @param string $column .
81
+ * @param int|\WP_Post|WC_Order $post .
82
+ *
83
+ * @return void
84
+ */
85
+ public function manage_shop_order_posts_custom_column( string $column, $post_id ) {
86
+ if ( 'flexible_shipping' !== $column ) {
87
+ return;
88
+ }
89
+
90
+ $order = wc_get_order( $post_id );
91
+
92
+ $classes = $this->get_classess();
93
+ $statuses = $this->get_statuses();
94
+ $shippings = $this->get_shippings( $order );
95
+
96
+ foreach ( $shippings as $shipping ) {
97
+ if ( 'error' === $shipping['status'] ) {
98
+ $statuses['error'] = $shipping['error'];
99
+ } else {
100
+ $statuses['error'] = __( 'Error', 'flexible-shipping' );
101
+ }
102
+
103
+ include __DIR__ . '/views/html-column-shipping-shipping.php';
104
+ }
105
+
106
+ $messages = $this->session_factory->get_woocommerce_session_adapter()->get( 'flexible_shipping_bulk_send', [] );
107
+
108
+ if ( isset( $messages[ $order->get_id() ] ) ) {
109
+ unset( $messages[ $order->get_id() ] );
110
+ }
111
+
112
+ $this->session_factory->get_woocommerce_session_adapter()->set( 'flexible_shipping_bulk_send', $messages );
113
+ }
114
+
115
+ /**
116
+ * @param WC_Order $order .
117
+ *
118
+ * @return array
119
+ */
120
+ private function get_shippings( WC_Order $order ): array {
121
+ $shippings = [];
122
+ /** @var WPDesk_Flexible_Shipping_Shipment[]|WPDesk_Flexible_Shipping_Shipment_Interface[] $shipments */
123
+ $shipments = fs_get_order_shipments( $order->get_id() );
124
+
125
+ foreach ( $shipments as $shipment ) {
126
+ $shipping = [];
127
+ $shipping['order_id'] = $order->get_id();
128
+ $shipping['integration'] = $shipment->get_integration();
129
+ $shipping['url'] = $shipment->get_order_metabox_url();
130
+ $shipping['error'] = $shipment->get_error_message();
131
+ $shipping['status'] = $shipment->get_status_for_shipping_column();
132
+ $shipping['tracking_number'] = $shipment->get_tracking_number();
133
+ $shipping['label_url'] = $shipment->get_label_url();
134
+ $shipping['tracking_url'] = $shipment->get_tracking_url();
135
+ $shipping['shipment'] = $shipment;
136
+ $shippings[] = $shipping;
137
+ }
138
+
139
+ $shippings = apply_filters( 'flexible_shipping_shipping_data', $shippings, $order );
140
+
141
+ return is_array( $shippings ) ? $shippings : [];
142
+ }
143
+
144
+ /**
145
+ * @return string[]
146
+ */
147
+ private function get_classess(): array {
148
+ return [
149
+ 'error' => 'failed',
150
+ 'new' => 'on-hold',
151
+ 'created' => 'processing created',
152
+ 'confirmed' => 'processing confirmed',
153
+ 'manifest' => 'processing manifest',
154
+ ];
155
+ }
156
+
157
+ /**
158
+ * @return string[]
159
+ */
160
+ private function get_statuses(): array {
161
+ return [
162
+ 'error' => __( 'Error', 'flexible-shipping' ),
163
+ 'new' => __( 'New shipment', 'flexible-shipping' ),
164
+ 'created' => __( 'Created', 'flexible-shipping' ),
165
+ 'confirmed' => __( 'Confirmed', 'flexible-shipping' ),
166
+ 'manifest' => __( 'Manifest created', 'flexible-shipping' ),
167
+ ];
168
+ }
169
+ }
src/WPDesk/FS/Shipment/ModifyStatuses.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class ModifyStatuses
4
+ */
5
+
6
+ namespace WPDesk\FS\Shipment;
7
+
8
+ use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
9
+
10
+ /**
11
+ * .
12
+ */
13
+ class ModifyStatuses implements Hookable {
14
+
15
+ /**
16
+ * @return void
17
+ */
18
+ public function hooks() {
19
+ add_filter( 'flexible_shipping_status', [ $this, 'flexible_shipping_status' ] );
20
+ }
21
+
22
+ /**
23
+ * @param mixed $statuses .
24
+ *
25
+ * @return array
26
+ */
27
+ public function flexible_shipping_status( $statuses ): array {
28
+ $statuses = is_array( $statuses ) ? $statuses : [];
29
+
30
+ $statuses['new'] = __( 'New', 'flexible-shipping' );
31
+ $statuses['created'] = __( 'Created', 'flexible-shipping' );
32
+ $statuses['confirmed'] = __( 'Confirmed', 'flexible-shipping' );
33
+ $statuses['manifest'] = __( 'Manifest', 'flexible-shipping' );
34
+ $statuses['failed'] = __( 'Failed', 'flexible-shipping' );
35
+
36
+ return $statuses;
37
+ }
38
+ }
src/WPDesk/FS/Shipment/views/html-column-shipping-shipping.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var array $shipping .
4
+ * @var string[] $statuses .
5
+ */
6
+
7
+ defined( 'ABSPATH' ) || exit;
8
+ ?>
9
+ <div class="shipping">
10
+ <div class="shipping-status">
11
+ <a class="icon-status icon-status-<?php echo esc_attr( $shipping['status'] ); ?> tips" href="<?php echo esc_url( $shipping['url'] ); ?>" data-tip="<?php echo esc_attr( $statuses[ $shipping['status'] ] ); ?>">
12
+ <?php echo esc_html( $statuses[ $shipping['status'] ] ); ?>
13
+ </a>
14
+
15
+ <?php do_action( 'flexible_shipping_shipping_status_html', $shipping ); ?>
16
+ </div>
17
+ <div class="shipping-actions order_actions">
18
+ <?php if ( ! empty( $shipping['label_url'] ) ) : ?>
19
+ <a class="button tips get-label" target="_blank" href="<?php echo esc_url( $shipping['label_url'] ); ?>" data-tip="<?php esc_attr_e( 'Get label for: ', 'flexible-shipping' ); ?><?php echo esc_attr( $shipping['tracking_number'] ); ?>">
20
+ <?php esc_html_e( 'Get label for: ', 'flexible-shipping' ); ?><?php echo wp_kses_post( $shipping['tracking_number'] ); ?>
21
+ </a>
22
+ <?php endif; ?>
23
+
24
+ <?php if ( ! empty( $shipping['tracking_url'] ) ) : ?>
25
+ <a class="button tips track" target="_blank" href="<?php echo esc_url( $shipping['tracking_url'] ); ?>" data-tip="<?php esc_attr_e( 'Track shipment for: ', 'flexible-shipping' ); ?><?php echo esc_attr( $shipping['tracking_number'] ); ?>">
26
+ <?php esc_html_e( 'Track shipment for: ', 'flexible-shipping' ); ?><?php echo wp_kses_post( $shipping['tracking_number'] ); ?>
27
+ </a>
28
+ <?php endif; ?>
29
+
30
+ <?php do_action( 'flexible_shipping_shipping_actions_html', $shipping ); ?>
31
+ </div>
32
+ <div style="clear: both;"></div>
33
+ <?php do_action( 'flexible_shipping_shipping_html', $shipping ); ?>
34
+ </div>
src/WPDesk/FS/Shipment/views/html-orders-filter-form.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var string[] $integrations .
4
+ * @var string[] $statuses .
5
+ * @var string $integration .
6
+ */
7
+
8
+ defined( 'ABSPATH' ) || exit;
9
+ ?>
10
+ <div class="alignleft actions">
11
+ <select name="flexible_shipping_integration_filter">
12
+ <option value=""><?php esc_html_e( 'All shippings', 'flexible-shipping' ); ?></option>
13
+ <optgroup label="<?php esc_attr_e( 'Integration', 'flexible-shipping' ); ?>">
14
+
15
+ <?php foreach ( $integrations as $key => $val ) : ?>
16
+ <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $key, $integration ); ?>><?php echo wp_kses_post( $val ); ?></option>
17
+ <?php endforeach; ?>
18
+ </optgroup>
19
+ </select>
20
+
21
+ <select name="flexible_shipping_status_filter">
22
+ <option value=""><?php esc_html_e( 'All shippings', 'flexible-shipping' ); ?></option>
23
+ <optgroup label="<?php esc_attr_e( 'Shipment status', 'flexible-shipping' ); ?>">
24
+ <?php foreach ( $statuses as $key => $val ) : ?>
25
+ <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $key, $integration ); ?>><?php echo wp_kses_post( $val ); ?></option>
26
+ <?php endforeach; ?>
27
+ </optgroup>
28
+ </select>
29
+ </div>
vendor/composer/autoload_classmap.php CHANGED
@@ -426,6 +426,18 @@ return array(
426
  'WPDesk\\FS\\Rate\\RateNoticeImplementation' => $baseDir . '/classes/notices/rate-notice-implementation.php',
427
  'WPDesk\\FS\\Rate\\RateNoticeInterface' => $baseDir . '/classes/notices/interface-rate.php',
428
  'WPDesk\\FS\\Rate\\WPDesk_Flexible_Shipping_Rate_Notice' => $baseDir . '/classes/notices/rate-notice.php',
 
 
 
 
 
 
 
 
 
 
 
 
429
  'WPDesk\\FS\\Shipment\\SubscriptionsIntegration' => $baseDir . '/src/WPDesk/FS/Shipment/SubscriptionsIntegration.php',
430
  'WPDesk\\FS\\TableRate\\Beacon' => $baseDir . '/src/WPDesk/FS/TableRate/Beacon.php',
431
  'WPDesk\\FS\\TableRate\\Beacon\\Beacon' => $baseDir . '/src/WPDesk/FS/TableRate/Beacon/Beacon.php',
@@ -538,7 +550,6 @@ return array(
538
  'WPDesk\\Helper\\HelperAsLibrary' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Helper/HelperAsLibrary.php',
539
  'WPDesk_Flexible_Shipping' => $baseDir . '/classes/table-rate/shipping-method.php',
540
  'WPDesk_Flexible_Shipping_Admin_Notices' => $baseDir . '/classes/notices/admin-notices.php',
541
- 'WPDesk_Flexible_Shipping_Bulk_Actions' => $baseDir . '/classes/table-rate/bulk-actions.php',
542
  'WPDesk_Flexible_Shipping_Logger_Downloader' => $baseDir . '/classes/table-rate/logger/class-logger-downloader.php',
543
  'WPDesk_Flexible_Shipping_Logger_Factory' => $baseDir . '/classes/table-rate/logger/class-logger-factory.php',
544
  'WPDesk_Flexible_Shipping_Logger_Settings' => $baseDir . '/classes/table-rate/logger/class-logger-settings.php',
426
  'WPDesk\\FS\\Rate\\RateNoticeImplementation' => $baseDir . '/classes/notices/rate-notice-implementation.php',
427
  'WPDesk\\FS\\Rate\\RateNoticeInterface' => $baseDir . '/classes/notices/interface-rate.php',
428
  'WPDesk\\FS\\Rate\\WPDesk_Flexible_Shipping_Rate_Notice' => $baseDir . '/classes/notices/rate-notice.php',
429
+ 'WPDesk\\FS\\Shipment\\AdminNotices' => $baseDir . '/src/WPDesk/FS/Shipment/AdminNotices.php',
430
+ 'WPDesk\\FS\\Shipment\\BulkAction' => $baseDir . '/src/WPDesk/FS/Shipment/BulkAction.php',
431
+ 'WPDesk\\FS\\Shipment\\BulkAction\\HandleAction' => $baseDir . '/src/WPDesk/FS/Shipment/BulkAction/HandleAction.php',
432
+ 'WPDesk\\FS\\Shipment\\BulkAction\\HandleActionLabels' => $baseDir . '/src/WPDesk/FS/Shipment/BulkAction/HandleActionLabels.php',
433
+ 'WPDesk\\FS\\Shipment\\BulkAction\\HandleActionManifest' => $baseDir . '/src/WPDesk/FS/Shipment/BulkAction/HandleActionManifest.php',
434
+ 'WPDesk\\FS\\Shipment\\BulkAction\\HandleActionSend' => $baseDir . '/src/WPDesk/FS/Shipment/BulkAction/HandleActionSend.php',
435
+ 'WPDesk\\FS\\Shipment\\BulkAction\\HandleActionStrategy' => $baseDir . '/src/WPDesk/FS/Shipment/BulkAction/HandleActionStrategy.php',
436
+ 'WPDesk\\FS\\Shipment\\BulkAction\\HandleActionStrategyInterface' => $baseDir . '/src/WPDesk/FS/Shipment/BulkAction/HandleActionStrategyInterface.php',
437
+ 'WPDesk\\FS\\Shipment\\DispatchLabelFile' => $baseDir . '/src/WPDesk/FS/Shipment/DispatchLabelFile.php',
438
+ 'WPDesk\\FS\\Shipment\\FilterOrders' => $baseDir . '/src/WPDesk/FS/Shipment/FilterOrders.php',
439
+ 'WPDesk\\FS\\Shipment\\ModifyOrderTable' => $baseDir . '/src/WPDesk/FS/Shipment/ModifyOrderTable.php',
440
+ 'WPDesk\\FS\\Shipment\\ModifyStatuses' => $baseDir . '/src/WPDesk/FS/Shipment/ModifyStatuses.php',
441
  'WPDesk\\FS\\Shipment\\SubscriptionsIntegration' => $baseDir . '/src/WPDesk/FS/Shipment/SubscriptionsIntegration.php',
442
  'WPDesk\\FS\\TableRate\\Beacon' => $baseDir . '/src/WPDesk/FS/TableRate/Beacon.php',
443
  'WPDesk\\FS\\TableRate\\Beacon\\Beacon' => $baseDir . '/src/WPDesk/FS/TableRate/Beacon/Beacon.php',
550
  'WPDesk\\Helper\\HelperAsLibrary' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Helper/HelperAsLibrary.php',
551
  'WPDesk_Flexible_Shipping' => $baseDir . '/classes/table-rate/shipping-method.php',
552
  'WPDesk_Flexible_Shipping_Admin_Notices' => $baseDir . '/classes/notices/admin-notices.php',
 
553
  'WPDesk_Flexible_Shipping_Logger_Downloader' => $baseDir . '/classes/table-rate/logger/class-logger-downloader.php',
554
  'WPDesk_Flexible_Shipping_Logger_Factory' => $baseDir . '/classes/table-rate/logger/class-logger-factory.php',
555
  'WPDesk_Flexible_Shipping_Logger_Settings' => $baseDir . '/classes/table-rate/logger/class-logger-settings.php',
vendor/composer/autoload_static.php CHANGED
@@ -449,6 +449,18 @@ class ComposerStaticInitFlexibleShipping
449
  'WPDesk\\FS\\Rate\\RateNoticeImplementation' => __DIR__ . '/../..' . '/classes/notices/rate-notice-implementation.php',
450
  'WPDesk\\FS\\Rate\\RateNoticeInterface' => __DIR__ . '/../..' . '/classes/notices/interface-rate.php',
451
  'WPDesk\\FS\\Rate\\WPDesk_Flexible_Shipping_Rate_Notice' => __DIR__ . '/../..' . '/classes/notices/rate-notice.php',
 
 
 
 
 
 
 
 
 
 
 
 
452
  'WPDesk\\FS\\Shipment\\SubscriptionsIntegration' => __DIR__ . '/../..' . '/src/WPDesk/FS/Shipment/SubscriptionsIntegration.php',
453
  'WPDesk\\FS\\TableRate\\Beacon' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/Beacon.php',
454
  'WPDesk\\FS\\TableRate\\Beacon\\Beacon' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/Beacon/Beacon.php',
@@ -561,7 +573,6 @@ class ComposerStaticInitFlexibleShipping
561
  'WPDesk\\Helper\\HelperAsLibrary' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Helper/HelperAsLibrary.php',
562
  'WPDesk_Flexible_Shipping' => __DIR__ . '/../..' . '/classes/table-rate/shipping-method.php',
563
  'WPDesk_Flexible_Shipping_Admin_Notices' => __DIR__ . '/../..' . '/classes/notices/admin-notices.php',
564
- 'WPDesk_Flexible_Shipping_Bulk_Actions' => __DIR__ . '/../..' . '/classes/table-rate/bulk-actions.php',
565
  'WPDesk_Flexible_Shipping_Logger_Downloader' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-logger-downloader.php',
566
  'WPDesk_Flexible_Shipping_Logger_Factory' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-logger-factory.php',
567
  'WPDesk_Flexible_Shipping_Logger_Settings' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-logger-settings.php',
449
  'WPDesk\\FS\\Rate\\RateNoticeImplementation' => __DIR__ . '/../..' . '/classes/notices/rate-notice-implementation.php',
450
  'WPDesk\\FS\\Rate\\RateNoticeInterface' => __DIR__ . '/../..' . '/classes/notices/interface-rate.php',
451
  'WPDesk\\FS\\Rate\\WPDesk_Flexible_Shipping_Rate_Notice' => __DIR__ . '/../..' . '/classes/notices/rate-notice.php',
452
+ 'WPDesk\\FS\\Shipment\\AdminNotices' => __DIR__ . '/../..' . '/src/WPDesk/FS/Shipment/AdminNotices.php',
453
+ 'WPDesk\\FS\\Shipment\\BulkAction' => __DIR__ . '/../..' . '/src/WPDesk/FS/Shipment/BulkAction.php',
454
+ 'WPDesk\\FS\\Shipment\\BulkAction\\HandleAction' => __DIR__ . '/../..' . '/src/WPDesk/FS/Shipment/BulkAction/HandleAction.php',
455
+ 'WPDesk\\FS\\Shipment\\BulkAction\\HandleActionLabels' => __DIR__ . '/../..' . '/src/WPDesk/FS/Shipment/BulkAction/HandleActionLabels.php',
456
+ 'WPDesk\\FS\\Shipment\\BulkAction\\HandleActionManifest' => __DIR__ . '/../..' . '/src/WPDesk/FS/Shipment/BulkAction/HandleActionManifest.php',
457
+ 'WPDesk\\FS\\Shipment\\BulkAction\\HandleActionSend' => __DIR__ . '/../..' . '/src/WPDesk/FS/Shipment/BulkAction/HandleActionSend.php',
458
+ 'WPDesk\\FS\\Shipment\\BulkAction\\HandleActionStrategy' => __DIR__ . '/../..' . '/src/WPDesk/FS/Shipment/BulkAction/HandleActionStrategy.php',
459
+ 'WPDesk\\FS\\Shipment\\BulkAction\\HandleActionStrategyInterface' => __DIR__ . '/../..' . '/src/WPDesk/FS/Shipment/BulkAction/HandleActionStrategyInterface.php',
460
+ 'WPDesk\\FS\\Shipment\\DispatchLabelFile' => __DIR__ . '/../..' . '/src/WPDesk/FS/Shipment/DispatchLabelFile.php',
461
+ 'WPDesk\\FS\\Shipment\\FilterOrders' => __DIR__ . '/../..' . '/src/WPDesk/FS/Shipment/FilterOrders.php',
462
+ 'WPDesk\\FS\\Shipment\\ModifyOrderTable' => __DIR__ . '/../..' . '/src/WPDesk/FS/Shipment/ModifyOrderTable.php',
463
+ 'WPDesk\\FS\\Shipment\\ModifyStatuses' => __DIR__ . '/../..' . '/src/WPDesk/FS/Shipment/ModifyStatuses.php',
464
  'WPDesk\\FS\\Shipment\\SubscriptionsIntegration' => __DIR__ . '/../..' . '/src/WPDesk/FS/Shipment/SubscriptionsIntegration.php',
465
  'WPDesk\\FS\\TableRate\\Beacon' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/Beacon.php',
466
  'WPDesk\\FS\\TableRate\\Beacon\\Beacon' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/Beacon/Beacon.php',
573
  'WPDesk\\Helper\\HelperAsLibrary' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Helper/HelperAsLibrary.php',
574
  'WPDesk_Flexible_Shipping' => __DIR__ . '/../..' . '/classes/table-rate/shipping-method.php',
575
  'WPDesk_Flexible_Shipping_Admin_Notices' => __DIR__ . '/../..' . '/classes/notices/admin-notices.php',
 
576
  'WPDesk_Flexible_Shipping_Logger_Downloader' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-logger-downloader.php',
577
  'WPDesk_Flexible_Shipping_Logger_Factory' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-logger-factory.php',
578
  'WPDesk_Flexible_Shipping_Logger_Settings' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-logger-settings.php',
vendor/composer/installed.json CHANGED
@@ -53,17 +53,17 @@
53
  },
54
  {
55
  "name": "wpdesk/wp-wpdesk-fs-shipment-interfaces",
56
- "version": "1.0.3",
57
- "version_normalized": "1.0.3.0",
58
  "source": {
59
  "type": "git",
60
- "url": "https://gitlab.com/wpdesk/predators/library/wp-wpdesk-fs-shipment-interfaces.git",
61
- "reference": "17a821b0cf72caf6ac6dc48e6239256e6ade34df"
62
  },
63
  "dist": {
64
  "type": "zip",
65
- "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fpredators%2Flibrary%2Fwp-wpdesk-fs-shipment-interfaces/repository/archive.zip?sha=17a821b0cf72caf6ac6dc48e6239256e6ade34df",
66
- "reference": "17a821b0cf72caf6ac6dc48e6239256e6ade34df",
67
  "shasum": ""
68
  },
69
  "require": {
@@ -75,7 +75,7 @@
75
  "squizlabs/php_codesniffer": "^3.4.2",
76
  "wp-coding-standards/wpcs": "^0.14.1"
77
  },
78
- "time": "2021-07-01T08:42:48+00:00",
79
  "type": "library",
80
  "installation-source": "dist",
81
  "notification-url": "https://packagist.org/downloads/",
@@ -84,10 +84,7 @@
84
  "name": "Krzysiek",
85
  "email": "krzysiek@wpdesk.pl"
86
  }
87
- ],
88
- "support": {
89
- "issues": "https://gitlab.com/api/v4/projects/27813970/issues"
90
- }
91
  },
92
  {
93
  "name": "wpdesk/wp-wpdesk-helper-override",
53
  },
54
  {
55
  "name": "wpdesk/wp-wpdesk-fs-shipment-interfaces",
56
+ "version": "1.1.0",
57
+ "version_normalized": "1.1.0.0",
58
  "source": {
59
  "type": "git",
60
+ "url": "git@gitlab.com:wpdesk/predators/library/wp-wpdesk-fs-shipment-interfaces.git",
61
+ "reference": "bdbe9239aa428cf7f8fd5b8c7dfa19b9d13ff7dd"
62
  },
63
  "dist": {
64
  "type": "zip",
65
+ "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fpredators%2Flibrary%2Fwp-wpdesk-fs-shipment-interfaces/repository/archive.zip?sha=bdbe9239aa428cf7f8fd5b8c7dfa19b9d13ff7dd",
66
+ "reference": "bdbe9239aa428cf7f8fd5b8c7dfa19b9d13ff7dd",
67
  "shasum": ""
68
  },
69
  "require": {
75
  "squizlabs/php_codesniffer": "^3.4.2",
76
  "wp-coding-standards/wpcs": "^0.14.1"
77
  },
78
+ "time": "2022-08-30T15:04:17+00:00",
79
  "type": "library",
80
  "installation-source": "dist",
81
  "notification-url": "https://packagist.org/downloads/",
84
  "name": "Krzysiek",
85
  "email": "krzysiek@wpdesk.pl"
86
  }
87
+ ]
 
 
 
88
  },
89
  {
90
  "name": "wpdesk/wp-wpdesk-helper-override",
vendor/wpdesk/wp-wpdesk-fs-shipment-interfaces/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  ## [1.0.3] - 2021-06-30
2
  ### Removed
3
  - libraries
1
+ ## [1.1.0] - 2022-08-30
2
+ ### Removed
3
+ - strong typing for PSR\LoggerInterface
4
+
5
  ## [1.0.3] - 2021-06-30
6
  ### Removed
7
  - libraries
vendor/wpdesk/wp-wpdesk-fs-shipment-interfaces/classes/shipment/class-shipment.php CHANGED
@@ -127,7 +127,7 @@ abstract class WPDesk_Flexible_Shipping_Shipment {
127
  *
128
  * @param LoggerInterface $fs_logger .
129
  */
130
- public static function set_fs_logger( LoggerInterface $fs_logger ) {
131
  static::$fs_logger = $fs_logger;
132
  }
133
 
127
  *
128
  * @param LoggerInterface $fs_logger .
129
  */
130
+ public static function set_fs_logger( $fs_logger ) {
131
  static::$fs_logger = $fs_logger;
132
  }
133
 
vendor_prefixed/wpdesk/wp-helpscout-beacon/composer.json CHANGED
@@ -40,10 +40,11 @@
40
  "text-domain": "wp-helpscout-beacon",
41
  "translations-folder": "lang",
42
  "po-files": {
43
- "pl_PL": "wp-helpscout-beacon-pl_PL.po",
44
- "en_AU": "wp-helpscout-beacon-en_AU.po",
45
- "en_CA": "wp-helpscout-beacon-en_CA.po",
46
- "en_GB": "wp-helpscout-beacon-en_GB.po"
 
47
  }
48
  }
49
  }
40
  "text-domain": "wp-helpscout-beacon",
41
  "translations-folder": "lang",
42
  "po-files": {
43
+ "pl_PL": "pl_PL.po",
44
+ "en_AU": "en_AU.po",
45
+ "en_CA": "en_CA.po",
46
+ "en_GB": "en_GB.po",
47
+ "de_DE": "de_DE.po"
48
  }
49
  }
50
  }
vendor_prefixed/wpdesk/wp-helpscout-beacon/src/Beacon/Beacon.php CHANGED
@@ -73,7 +73,7 @@ class Beacon
73
  */
74
  protected function should_display_beacon()
75
  {
76
- return $this->activation_strategy->shouldDisplay();
77
  }
78
  public function add_beacon_js()
79
  {
73
  */
74
  protected function should_display_beacon()
75
  {
76
+ return \apply_filters('helpscout-beacon/should-display-beacon', $this->activation_strategy->shouldDisplay());
77
  }
78
  public function add_beacon_js()
79
  {
vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/composer.json CHANGED
@@ -8,18 +8,18 @@
8
  ],
9
  "config": {
10
  "platform": {
11
- "php": "5.6"
12
  },
13
  "sort-packages": true
14
  },
15
  "require": {
16
- "php": ">=5.6",
17
  "wpdesk\/wp-builder": "^2.0",
18
  "wpdesk\/wp-mutex": "^1.1",
19
  "wpdesk\/wp-wpdesk-fs-shipment-interfaces": "^1.0"
20
  },
21
  "require-dev": {
22
- "10up\/wp_mock": "^0.2.0",
23
  "phpunit\/phpunit": "<7",
24
  "squizlabs\/php_codesniffer": "^3.4.2",
25
  "wp-coding-standards\/wpcs": "^0.14.1"
8
  ],
9
  "config": {
10
  "platform": {
11
+ "php": "7.0.8"
12
  },
13
  "sort-packages": true
14
  },
15
  "require": {
16
+ "php": ">=7.0.8",
17
  "wpdesk\/wp-builder": "^2.0",
18
  "wpdesk\/wp-mutex": "^1.1",
19
  "wpdesk\/wp-wpdesk-fs-shipment-interfaces": "^1.0"
20
  },
21
  "require-dev": {
22
+ "10up\/wp_mock": "*",
23
  "phpunit\/phpunit": "<7",
24
  "squizlabs\/php_codesniffer": "^3.4.2",
25
  "wp-coding-standards\/wpcs": "^0.14.1"
vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Assets.php CHANGED
@@ -20,6 +20,7 @@ use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
20
  */
21
  class Assets implements \FSVendor\WPDesk\PluginBuilder\Plugin\Hookable
22
  {
 
23
  /**
24
  * @var string
25
  */
@@ -52,10 +53,10 @@ class Assets implements \FSVendor\WPDesk\PluginBuilder\Plugin\Hookable
52
  public function admin_enqueue_scripts()
53
  {
54
  if ($this->should_enqueue_admin_scripts()) {
55
- \wp_register_script('fs_shipment_admin', \trailingslashit($this->assets_url) . 'js/admin.js', array('jquery'), $this->scripts_version);
56
- \wp_localize_script('fs_shipment_admin', 'fs_shipment_admin', array('ajax_url' => \admin_url('admin-ajax.php')));
57
- \wp_enqueue_script('fs_shipment_admin');
58
- \wp_enqueue_style('fs_shipment_admin', \trailingslashit($this->assets_url) . 'css/admin.css', array(), $this->scripts_version);
59
  }
60
  }
61
  /**
@@ -65,7 +66,10 @@ class Assets implements \FSVendor\WPDesk\PluginBuilder\Plugin\Hookable
65
  {
66
  $current_screen = \get_current_screen();
67
  $wc_screen_id = \sanitize_title(\__('WooCommerce', 'woocommerce'));
68
- if (\in_array($current_screen->post_type, array('shop_order', 'shop_subscription'), \true) || $wc_screen_id . '_page_wc-settings' === $current_screen->id) {
 
 
 
69
  return \true;
70
  }
71
  return \false;
20
  */
21
  class Assets implements \FSVendor\WPDesk\PluginBuilder\Plugin\Hookable
22
  {
23
+ const HANDLE = 'fs_shipment_admin';
24
  /**
25
  * @var string
26
  */
53
  public function admin_enqueue_scripts()
54
  {
55
  if ($this->should_enqueue_admin_scripts()) {
56
+ \wp_register_script(self::HANDLE, \trailingslashit($this->assets_url) . 'js/admin.js', array('jquery'), $this->scripts_version);
57
+ \wp_localize_script(self::HANDLE, self::HANDLE, array('ajax_url' => \admin_url('admin-ajax.php')));
58
+ \wp_enqueue_script(self::HANDLE);
59
+ \wp_enqueue_style(self::HANDLE, \trailingslashit($this->assets_url) . 'css/admin.css', array(), $this->scripts_version);
60
  }
61
  }
62
  /**
66
  {
67
  $current_screen = \get_current_screen();
68
  $wc_screen_id = \sanitize_title(\__('WooCommerce', 'woocommerce'));
69
+ if (!$current_screen) {
70
+ return \false;
71
+ }
72
+ if ('woocommerce_page_wc-orders' === $current_screen->id || \in_array($current_screen->post_type, array('shop_order', 'shop_subscription'), \true) || $wc_screen_id . '_page_wc-settings' === $current_screen->id) {
73
  return \true;
74
  }
75
  return \false;
vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/CustomPostType.php CHANGED
@@ -67,8 +67,9 @@ class CustomPostType implements \FSVendor\WPDesk\PluginBuilder\Plugin\Hookable
67
  if (self::POST_TYPE_SHIPMENT === $post_type) {
68
  \add_meta_box('shipment_meta_box', \__('Shipment data', 'flexible-shipping'), array($this, 'metabox'), 'shipment', 'normal', 'high');
69
  }
70
- if (\in_array($post_type, array('shop_order', 'shop_subscription'), \true)) {
71
- $shipments = fs_get_order_shipments($post->ID);
 
72
  foreach ($shipments as $shipment) {
73
  if ($this->should_add_metabox($shipment)) {
74
  $args = array('shipment' => $shipment);
@@ -88,18 +89,18 @@ class CustomPostType implements \FSVendor\WPDesk\PluginBuilder\Plugin\Hookable
88
  return isset($avaliable_integrations[$shipment->get_integration()]);
89
  }
90
  /**
91
- * @param WP_Post $post .
92
  * @param array $args .
93
  */
94
  public function order_metabox($post, $args)
95
  {
96
- /** @var WPDesk_Flexible_Shipping_Shipment $shipment */
97
  $shipment = $args['args']['shipment'];
98
  $shipment_id = $shipment->get_id();
99
  $message = $shipment->get_error_message();
100
  $message_heading = $shipment->get_order_metabox_title();
101
  $message_css_style = '';
102
- include 'views/order-metabox.php';
103
  }
104
  /**
105
  * .
@@ -122,15 +123,15 @@ class CustomPostType implements \FSVendor\WPDesk\PluginBuilder\Plugin\Hookable
122
  /**
123
  * Get Flexible Shipping method from order shipping method meta data.
124
  *
125
- * @param WC_Order_Item_Shipping $shipping_method .
126
  *
127
  * @return array
128
  */
129
  private function get_fs_method_from_order_shipping_method($shipping_method)
130
  {
131
- $fs_method = array();
132
- if (isset($shipping_method['item_meta']) && isset($shipping_method['item_meta']['_fs_method'])) {
133
- $fs_method = $shipping_method['item_meta']['_fs_method'];
134
  }
135
  return $fs_method;
136
  }
@@ -166,7 +167,7 @@ class CustomPostType implements \FSVendor\WPDesk\PluginBuilder\Plugin\Hookable
166
  {
167
  $order = \wc_get_order($order_id);
168
  if ($order && !$this->is_order_processed_on_checkout) {
169
- $mutex = \FSVendor\WPDesk\Mutex\WordpressPostMutex::fromOrder($order);
170
  $mutex->acquireLock();
171
  $shipments = fs_get_order_shipments($order_id);
172
  if (0 === \count($shipments)) {
@@ -197,7 +198,7 @@ class CustomPostType implements \FSVendor\WPDesk\PluginBuilder\Plugin\Hookable
197
  /**
198
  * Do actions when shipment is created via checkout.
199
  *
200
- * @param WPDesk_Flexible_Shipping_Shipment $shipment Created shipment.
201
  */
202
  \do_action('flexible_shipping_checkout_shipment_created', $shipment);
203
  }
@@ -241,4 +242,14 @@ class CustomPostType implements \FSVendor\WPDesk\PluginBuilder\Plugin\Hookable
241
  echo \wp_kses_post($shipment->get_email_after_order_table());
242
  }
243
  }
 
 
 
 
 
 
 
 
 
 
244
  }
67
  if (self::POST_TYPE_SHIPMENT === $post_type) {
68
  \add_meta_box('shipment_meta_box', \__('Shipment data', 'flexible-shipping'), array($this, 'metabox'), 'shipment', 'normal', 'high');
69
  }
70
+ if (\in_array($post_type, array('shop_order', 'shop_subscription', 'woocommerce_page_wc-orders'), \true)) {
71
+ $order = \wc_get_order($post);
72
+ $shipments = fs_get_order_shipments($order->get_id());
73
  foreach ($shipments as $shipment) {
74
  if ($this->should_add_metabox($shipment)) {
75
  $args = array('shipment' => $shipment);
89
  return isset($avaliable_integrations[$shipment->get_integration()]);
90
  }
91
  /**
92
+ * @param \WP_Post $post .
93
  * @param array $args .
94
  */
95
  public function order_metabox($post, $args)
96
  {
97
+ /** @var \WPDesk_Flexible_Shipping_Shipment $shipment */
98
  $shipment = $args['args']['shipment'];
99
  $shipment_id = $shipment->get_id();
100
  $message = $shipment->get_error_message();
101
  $message_heading = $shipment->get_order_metabox_title();
102
  $message_css_style = '';
103
+ include __DIR__ . '/views/order-metabox.php';
104
  }
105
  /**
106
  * .
123
  /**
124
  * Get Flexible Shipping method from order shipping method meta data.
125
  *
126
+ * @param \WC_Order_Item_Shipping $shipping_method .
127
  *
128
  * @return array
129
  */
130
  private function get_fs_method_from_order_shipping_method($shipping_method)
131
  {
132
+ $fs_method = $shipping_method->get_meta('_fs_method');
133
+ if (!\is_array($fs_method) || empty($fs_method)) {
134
+ return [];
135
  }
136
  return $fs_method;
137
  }
167
  {
168
  $order = \wc_get_order($order_id);
169
  if ($order && !$this->is_order_processed_on_checkout) {
170
+ $mutex = $this->get_mutex($order);
171
  $mutex->acquireLock();
172
  $shipments = fs_get_order_shipments($order_id);
173
  if (0 === \count($shipments)) {
198
  /**
199
  * Do actions when shipment is created via checkout.
200
  *
201
+ * @param \WPDesk_Flexible_Shipping_Shipment $shipment Created shipment.
202
  */
203
  \do_action('flexible_shipping_checkout_shipment_created', $shipment);
204
  }
242
  echo \wp_kses_post($shipment->get_email_after_order_table());
243
  }
244
  }
245
+ /**
246
+ * @param \WC_Order $order .
247
+ *
248
+ * @return WordpressPostMutex
249
+ * @codeCoverageIgnore
250
+ */
251
+ protected function get_mutex(\WC_Order $order)
252
+ {
253
+ return \FSVendor\WPDesk\Mutex\WordpressPostMutex::fromOrder($order);
254
+ }
255
  }
vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Metabox/Ajax.php CHANGED
@@ -57,7 +57,6 @@ class Ajax implements \FSVendor\WPDesk\PluginBuilder\Plugin\Hookable
57
  }
58
  }
59
  }
60
- echo \json_encode($json);
61
- die;
62
  }
63
  }
57
  }
58
  }
59
  }
60
+ \wp_send_json($json);
 
61
  }
62
  }
vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Order/AddShippingMetabox.php CHANGED
@@ -76,12 +76,13 @@ class AddShippingMetabox implements \FSVendor\WPDesk\PluginBuilder\Plugin\Hookab
76
  */
77
  public function add_meta_box($post_type, $post)
78
  {
79
- if ('shop_order' === $post_type) {
80
  $select_options = \apply_filters('flexible_shipping_add_shipping_options', array());
81
  if (\count($select_options)) {
 
82
  $select_options = \array_merge(array('' => \__('Select integration', 'flexible-shipping')), $select_options);
83
- $args = array('select_options' => $select_options, 'order_id' => $post->ID);
84
- \add_meta_box('add_shipping_meta_box', \__('Add shipping', 'flexible-shipping'), array($this, 'display_order_metabox'), 'shop_order', 'side', 'default', $args);
85
  }
86
  }
87
  }
@@ -98,6 +99,6 @@ class AddShippingMetabox implements \FSVendor\WPDesk\PluginBuilder\Plugin\Hookab
98
  $add_shipping_url = \admin_url('post.php?post=' . $order_id . '&action=edit');
99
  $add_shipping_url = \wp_nonce_url($add_shipping_url, 'fs_add_shipping');
100
  $add_shipping_url = \str_replace('&amp;', '&', $add_shipping_url);
101
- include 'views/html-order-add_shipping-metabox.php';
102
  }
103
  }
76
  */
77
  public function add_meta_box($post_type, $post)
78
  {
79
+ if (\in_array($post_type, ['woocommerce_page_wc-orders', 'shop_order'], \true)) {
80
  $select_options = \apply_filters('flexible_shipping_add_shipping_options', array());
81
  if (\count($select_options)) {
82
+ $order = \wc_get_order($post);
83
  $select_options = \array_merge(array('' => \__('Select integration', 'flexible-shipping')), $select_options);
84
+ $args = array('select_options' => $select_options, 'order_id' => $order->get_id());
85
+ \add_meta_box('add_shipping_meta_box', \__('Add shipping', 'flexible-shipping'), array($this, 'display_order_metabox'), null, 'side', 'default', $args);
86
  }
87
  }
88
  }
99
  $add_shipping_url = \admin_url('post.php?post=' . $order_id . '&action=edit');
100
  $add_shipping_url = \wp_nonce_url($add_shipping_url, 'fs_add_shipping');
101
  $add_shipping_url = \str_replace('&amp;', '&', $add_shipping_url);
102
+ include __DIR__ . '/views/html-order-add_shipping-metabox.php';
103
  }
104
  }
vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/RestApi/OrderDataProvidersFactory.php CHANGED
@@ -4,6 +4,7 @@ namespace FSVendor\WPDesk\FS\Shipment\RestApi;
4
 
5
  /**
6
  * Data providers factory.
 
7
  */
8
  class OrderDataProvidersFactory
9
  {
@@ -12,7 +13,7 @@ class OrderDataProvidersFactory
12
  *
13
  * @var OrderDataProvidersCollection
14
  */
15
- private static $data_providers = null;
16
  /**
17
  * Get data providers.
18
  *
4
 
5
  /**
6
  * Data providers factory.
7
+ * @codeCoverageIgnore
8
  */
9
  class OrderDataProvidersFactory
10
  {
13
  *
14
  * @var OrderDataProvidersCollection
15
  */
16
+ private static $data_providers;
17
  /**
18
  * Get data providers.
19
  *
vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/RestApi/OrderResponseDataAppender.php CHANGED
@@ -52,7 +52,7 @@ class OrderResponseDataAppender implements \FSVendor\WPDesk\PluginBuilder\Plugin
52
  if (empty($response_data[self::REST_API_DATA_KEY])) {
53
  $response_data[self::REST_API_DATA_KEY] = array();
54
  }
55
- $providers = \FSVendor\WPDesk\FS\Shipment\RestApi\OrderDataProvidersFactory::get_providers();
56
  foreach ($shipments as $shipment) {
57
  $integration = $shipment->get_integration();
58
  $data_provider = $providers->get_provider_for_integration($integration);
@@ -61,4 +61,12 @@ class OrderResponseDataAppender implements \FSVendor\WPDesk\PluginBuilder\Plugin
61
  $response->set_data($response_data);
62
  return $response;
63
  }
 
 
 
 
 
 
 
 
64
  }
52
  if (empty($response_data[self::REST_API_DATA_KEY])) {
53
  $response_data[self::REST_API_DATA_KEY] = array();
54
  }
55
+ $providers = $this->get_providers();
56
  foreach ($shipments as $shipment) {
57
  $integration = $shipment->get_integration();
58
  $data_provider = $providers->get_provider_for_integration($integration);
61
  $response->set_data($response_data);
62
  return $response;
63
  }
64
+ /**
65
+ * @return OrderDataProvidersCollection
66
+ * @codeCoverageIgnore
67
+ */
68
+ protected function get_providers()
69
+ {
70
+ return \FSVendor\WPDesk\FS\Shipment\RestApi\OrderDataProvidersFactory::get_providers();
71
+ }
72
  }
vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/ShipmentFunctionality.php CHANGED
@@ -85,8 +85,9 @@ class ShipmentFunctionality implements \FSVendor\WPDesk\PluginBuilder\Plugin\Hoo
85
  }
86
  /**
87
  * Load functionalituy.
 
88
  */
89
- private function load_functionality()
90
  {
91
  $this->load_dependencies();
92
  $class = 'WPDesk_Flexible_Shipping_Shipment';
@@ -110,8 +111,9 @@ class ShipmentFunctionality implements \FSVendor\WPDesk\PluginBuilder\Plugin\Hoo
110
  }
111
  /**
112
  * Load dependencies.
 
113
  */
114
- private function load_dependencies()
115
  {
116
  $interfaces_dir = __DIR__ . '/../../../../../../../vendor/wpdesk/wp-wpdesk-fs-shipment-interfaces';
117
  require_once $interfaces_dir . '/classes/shipment/interface-shipment.php';
85
  }
86
  /**
87
  * Load functionalituy.
88
+ * @codeCoverageIgnore
89
  */
90
+ protected function load_functionality()
91
  {
92
  $this->load_dependencies();
93
  $class = 'WPDesk_Flexible_Shipping_Shipment';
111
  }
112
  /**
113
  * Load dependencies.
114
+ * @codeCoverageIgnore
115
  */
116
+ protected function load_dependencies()
117
  {
118
  $interfaces_dir = __DIR__ . '/../../../../../../../vendor/wpdesk/wp-wpdesk-fs-shipment-interfaces';
119
  require_once $interfaces_dir . '/classes/shipment/interface-shipment.php';