Flexible Shipping for WooCommerce - Version 1.8

Version Description

  • 2017-01-24 =
  • Added CSV import for shipping methods including rules
  • Added WooCommerce Currency Switcher support
  • Added shipping classes support in WPML
  • Changed cart weight calculting to WC()->cart->cart_contents_weight
  • Dropped support for WooCommerce 2.4 and lower
  • Removed Enable checkbox in general settings
Download this release

Release Info

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

Code changes from version 1.7 to 1.8

assets/css/admin.css CHANGED
@@ -1,5 +1,4 @@
1
- @CHARSET "UTF-8";
2
-
3
  table.flexible_shipping_methods th.select,
4
  table.flexible_shipping_methods td.select {
5
  text-align: center;
@@ -8,8 +7,8 @@ table.flexible_shipping_methods td.select {
8
  margin-left: -6px;
9
  }
10
 
11
- input.checkbox-select-all {
12
- margin: 0 12px 0 8px !important;
13
  }
14
 
15
  table.flexible_shipping_methods th.integration,
@@ -18,7 +17,16 @@ table.flexible_shipping_methods td.integration {
18
  width: 130px;
19
  }
20
 
 
 
 
 
 
 
 
 
21
 
 
22
  table.flexible_shipping_method_rules td p,
23
  table.flexible_shipping_method_rules td p input,
24
  table.flexible_shipping_method_rules td p select {
@@ -52,3 +60,26 @@ table.flexible_shipping_method_rules td {
52
  .woocommerce table.form-table .fs-locations-table th .woocommerce-help-tip {
53
  float: none;
54
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Shipping Methods Table */
 
2
  table.flexible_shipping_methods th.select,
3
  table.flexible_shipping_methods td.select {
4
  text-align: center;
7
  margin-left: -6px;
8
  }
9
 
10
+ table.flexible_shipping_methods .checkbox-select-all {
11
+ margin: 0 12px 0 8px;
12
  }
13
 
14
  table.flexible_shipping_methods th.integration,
17
  width: 130px;
18
  }
19
 
20
+ table.flexible_shipping_methods tr.highlight td {
21
+ background-color: #e4f2fd;
22
+ }
23
+
24
+ table.flexible_shipping_methods.wc_shipping th {
25
+ font-weight: 400;
26
+ width: auto;
27
+ }
28
 
29
+ /* Rules Table */
30
  table.flexible_shipping_method_rules td p,
31
  table.flexible_shipping_method_rules td p input,
32
  table.flexible_shipping_method_rules td p select {
60
  .woocommerce table.form-table .fs-locations-table th .woocommerce-help-tip {
61
  float: none;
62
  }
63
+
64
+ div.flexilble_shipping_export_import {
65
+ float:right;
66
+ }
67
+
68
+ /* Ads */
69
+ .woocommerce_page_wc-settings #mainform {
70
+ position: relative;
71
+ }
72
+
73
+ .flexible-shipping-pro-box {
74
+ max-width: 280px;
75
+ min-width: 180px;
76
+ right: 0;
77
+ position: absolute;
78
+ top: 50px;
79
+ }
80
+
81
+ @media screen and (max-width: 1023px) {
82
+ .flexible-shipping-pro-box {
83
+ display: none;
84
+ }
85
+ }
classes/settings-flexible-shipping.php CHANGED
@@ -50,8 +50,8 @@ $settings = array(
50
  ),
51
  );
52
 
53
- if ( version_compare( WC()->version, '2.6' ) >= 0 ) {
54
- //unset( $settings['enabled'] );
55
  }
56
 
57
  return $settings;
50
  ),
51
  );
52
 
53
+ if ( version_compare( WC()->version, '2.6' ) >= 0 && $this->get_option( 'enabled', 'yes' ) == 'yes' ) {
54
+ unset( $settings['enabled'] );
55
  }
56
 
57
  return $settings;
classes/settings-shipping-method-form.php CHANGED
@@ -53,7 +53,7 @@ $settings = array(
53
  'method_free_shipping' => array(
54
  'title' => __( 'Free Shipping', 'flexible-shipping' ),
55
  'type' => 'price',
56
- 'default' => $shipping_method['method_free_shipping'],
57
  'description' => __( 'Enter a minimum order amount for free shipping. This will override the costs configured below.', 'flexible-shipping' ),
58
  'desc_tip' => true
59
  ),
53
  'method_free_shipping' => array(
54
  'title' => __( 'Free Shipping', 'flexible-shipping' ),
55
  'type' => 'price',
56
+ 'default' => floatval( $shipping_method['method_free_shipping'] ),
57
  'description' => __( 'Enter a minimum order amount for free shipping. This will override the costs configured below.', 'flexible-shipping' ),
58
  'desc_tip' => true
59
  ),
classes/shipping_method.php CHANGED
@@ -45,14 +45,18 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping' ) ) {
45
  )
46
  );
47
 
48
- $this->enabled = $this->get_option( 'enabled' );
 
 
49
 
50
  $this->title = $this->get_option( 'title' );
51
 
52
  $this->init();
 
53
 
54
  //$this->method_title = $this->get_option( 'title' );
55
 
 
56
  add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
57
 
58
  }
@@ -193,6 +197,26 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping' ) ) {
193
  update_option( 'flexible_shipping_rates', $rates );
194
  }
195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  public function process_admin_options() {
197
  $action = false;
198
  if ( isset( $_POST['method_action'] ) ) {
@@ -223,7 +247,9 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping' ) ) {
223
  $shipping_method['id_for_shipping'] = $method_id_for_shipping;
224
  $shipping_method['method_title'] = $_POST['woocommerce_' . $this->id . '_method_title'];
225
  $shipping_method['method_description'] = $_POST['woocommerce_' . $this->id . '_method_description'];
226
- $shipping_method['method_free_shipping'] = $_POST['woocommerce_' . $this->id . '_method_free_shipping'];
 
 
227
  if ( version_compare( WC()->version, '2.6' ) >= 0 ) {
228
  $shipping_method['method_free_shipping_label'] = $_POST['woocommerce_' . $this->id . '_method_free_shipping_label'];
229
  }
@@ -282,8 +308,190 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping' ) ) {
282
  }
283
  }
284
  else {
285
- parent::process_admin_options();
286
- update_option($this->shipping_method_order_option,$_POST['method_order']);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
287
  }
288
  }
289
 
@@ -406,6 +614,44 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping' ) ) {
406
  }
407
  ?>
408
  </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
409
  <?php do_action( 'flexible_shipping_method_script' ); ?>
410
  <?php
411
  }
@@ -426,12 +672,7 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping' ) ) {
426
  }
427
 
428
  public function cart_weight() {
429
- $weight = 0;
430
- $cart = WC()->cart;
431
- foreach( $cart->cart_contents as $item ) {
432
- $weight += $item['data']->weight * $item['quantity'];
433
- }
434
- return $weight;
435
  }
436
 
437
  public function package_item_count( $items ) {
@@ -466,7 +707,6 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping' ) ) {
466
  }
467
 
468
  public function calculate_shipping( $package = array() ) {
469
-
470
  $processed = apply_filters( 'flexible_shipping_calculate_shipping', false, $this, $package, 0 );
471
 
472
  $default_method_is_set = false;
@@ -626,6 +866,7 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping' ) ) {
626
  foreach ( $shipping_methods as $shipping_method ) {
627
  $id = $this->id . '_' . $woo_shipping_method->instance_id . '_' . sanitize_title($shipping_method['method_title'] );
628
  $id = apply_filters( 'flexible_shipping_method_rate_id', $id, $shipping_method );
 
629
  $rates[$id] = $shipping_method;
630
  }
631
  }
45
  )
46
  );
47
 
48
+ if ( version_compare( WC()->version, '2.6' ) < 0 && $this->get_option( 'enabled', 'yes' ) == 'no' ) {
49
+ $this->enabled = $this->get_option( 'enabled' );
50
+ }
51
 
52
  $this->title = $this->get_option( 'title' );
53
 
54
  $this->init();
55
+
56
 
57
  //$this->method_title = $this->get_option( 'title' );
58
 
59
+ //add_action( 'woocommerce_sections_' . $this->id, array( $this, 'process_admin_options' ) );
60
  add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
61
 
62
  }
197
  update_option( 'flexible_shipping_rates', $rates );
198
  }
199
 
200
+ private function shipping_method_title_used( $title, $shipping_methods ) {
201
+ foreach ( $shipping_methods as $shipping_method ) {
202
+ if ( $title == $shipping_method['method_title'] ) {
203
+ return true;
204
+ }
205
+ }
206
+ return false;
207
+ }
208
+
209
+ private function shipping_method_next_id( $shipping_methods ) {
210
+ $next_id = 0;
211
+ foreach ( $shipping_methods as $shipping_method ) {
212
+ if ( intval($shipping_method['id'] ) > $next_id ) {
213
+ $next_id = intval($shipping_method['id'] );
214
+ }
215
+ }
216
+ $next_id++;
217
+ return $next_id;
218
+ }
219
+
220
  public function process_admin_options() {
221
  $action = false;
222
  if ( isset( $_POST['method_action'] ) ) {
247
  $shipping_method['id_for_shipping'] = $method_id_for_shipping;
248
  $shipping_method['method_title'] = $_POST['woocommerce_' . $this->id . '_method_title'];
249
  $shipping_method['method_description'] = $_POST['woocommerce_' . $this->id . '_method_description'];
250
+ if ( isset( $_POST['woocommerce_' . $this->id . '_method_free_shipping'] ) ) {
251
+ $shipping_method['method_free_shipping'] = floatval( $_POST['woocommerce_' . $this->id . '_method_free_shipping'] );
252
+ }
253
  if ( version_compare( WC()->version, '2.6' ) >= 0 ) {
254
  $shipping_method['method_free_shipping_label'] = $_POST['woocommerce_' . $this->id . '_method_free_shipping_label'];
255
  }
308
  }
309
  }
310
  else {
311
+ if ( isset( $_POST['import_action'] ) && $_POST['import_action'] == '1' ) {
312
+ //self::$messages = array();
313
+ $tmp_name = $_FILES['import_file']['tmp_name'];
314
+ $csv_array = array_map( function($v) { return str_getcsv( $v, ";" ); }, file( $tmp_name ) );
315
+ $first = true;
316
+ $columns = array();
317
+ $methods = array();
318
+ foreach ( $csv_array as $row_key => $csv_row ) {
319
+ if ( $first ) {
320
+ $columns = $csv_row;
321
+ }
322
+ else {
323
+ foreach ( $columns as $col_key => $col ) {
324
+ $csv_array[$row_key][$col] = $csv_row[$col_key];
325
+ }
326
+ }
327
+ $first = false;
328
+ }
329
+ $shipping_methods = get_option( $this->shipping_methods_option, array() );
330
+ $first = true;
331
+ $current_method_title = '';
332
+ $imported_shipping_method = array();
333
+ $import_error = false;
334
+ $import_row_count = 0;
335
+ foreach ( $csv_array as $row_key => $csv_row ) {
336
+ $import_row_count++;
337
+ $new_method = false;
338
+ if ( $first ) {
339
+ $columns = $csv_row;
340
+ }
341
+ else {
342
+ if ( !isset( $csv_row['Method Title'] ) || $current_method_title != $csv_row['Method Title'] || !isset( $csv_row['Based on'] ) || $csv_row['Based on'] == '' ) {
343
+ $new_method = true;
344
+ $imported_shipping_method = array( 'method_enabled' => 'no' );
345
+ if ( !isset( $csv_row['Method Title'] ) || trim( $csv_row['Method Title'] ) == '' ) {
346
+ WC_Admin_Settings::add_error( __('Sorry, there has been an error. The CSV is invalid or incorrect file type.' ) );
347
+ //WC_Admin_Settings::add_error( sprintf(__('Shipping method title is not set in row number %d.', 'flexible-shipping' ), $import_row_count ) );
348
+ WC_Admin_Settings::show_messages();
349
+ return;
350
+ }
351
+ $current_method_title = $csv_row['Method Title'];
352
+ $method_title = $csv_row['Method Title'];
353
+ $count = 0;
354
+ while ( $this->shipping_method_title_used( $method_title, $shipping_methods ) ) {
355
+ if ( $count == 0 ) {
356
+ $method_title = $csv_row['Method Title'] . ' (' . __( 'import', 'flexible-shipping' ) . ')';
357
+ }
358
+ else {
359
+ $method_title = $csv_row['Method Title'] . ' (' . __( 'import', 'flexible-shipping' ) . ' ' . $count . ')';
360
+ }
361
+ $count++;
362
+ }
363
+ $imported_shipping_method['id'] = $this->shipping_method_next_id( $shipping_methods );
364
+ $imported_shipping_method['id_for_shipping'] = $this->id . '_' . $this->instance_id . '_' . $imported_shipping_method['id'];
365
+ $imported_shipping_method['method_title'] = $method_title;
366
+ $imported_shipping_method['method_description'] = $csv_row['Method Description'];
367
+ if ( trim( $csv_row['Free Shipping'] ) != '' && !is_numeric( str_replace( ',', '.', $csv_row['Free Shipping'] ) ) ) {
368
+ WC_Admin_Settings::add_error( sprintf(__('Free Shipping value %s is not valid number. Row number %d.', 'flexible-shipping' ), $csv_row['Free Shipping'], $import_row_count ) );
369
+ WC_Admin_Settings::show_messages();
370
+ return;
371
+ }
372
+ $imported_shipping_method['method_free_shipping'] = str_replace( ',', '.', $csv_row['Free Shipping'] );
373
+ if ( trim( $csv_row['Maximum Cost'] ) != '' && !is_numeric( str_replace( ',', '.', $csv_row['Maximum Cost'] ) ) ) {
374
+ WC_Admin_Settings::add_error( sprintf(__('Maximum Cost value %s is not valid number. Row number %d.', 'flexible-shipping' ), $csv_row['Maximum Cost'], $import_row_count ) );
375
+ WC_Admin_Settings::show_messages();
376
+ return;
377
+ }
378
+ $imported_shipping_method['method_max_cost'] = str_replace( ',', '.', $csv_row['Maximum Cost'] );
379
+ $imported_shipping_method['method_calculation_method'] = $csv_row['Calculation Method'];
380
+ if ( !in_array( $imported_shipping_method['method_calculation_method'], array(
381
+ 'sum',
382
+ 'lowest',
383
+ 'highest'
384
+ ) ) ) {
385
+ WC_Admin_Settings::add_error( sprintf(__('Invalid value for Calculation Method in row number %d.', 'flexible-shipping' ), $import_row_count ) );
386
+ WC_Admin_Settings::show_messages();
387
+ return;
388
+ }
389
+ $imported_shipping_method['method_visibility'] = $csv_row['Visibility'];
390
+ if ( $imported_shipping_method['method_visibility'] !== 'yes' ) {
391
+ $imported_shipping_method['method_visibility'] = 'no';
392
+ }
393
+ $imported_shipping_method['method_default'] = $csv_row['Default'];
394
+ if ( $imported_shipping_method['method_default'] !== 'yes' ) {
395
+ $imported_shipping_method['method_default'] = 'no';
396
+ }
397
+ $imported_shipping_method['method_rules'] = array();
398
+ }
399
+ else {
400
+ $rule = array();
401
+ $rule['based_on'] = $csv_row['Based on'];
402
+ if ( !in_array( $rule['based_on'], array(
403
+ 'none',
404
+ 'value',
405
+ 'weight',
406
+ 'item',
407
+ 'cart_line_item',
408
+ ) ) ) {
409
+ WC_Admin_Settings::add_error( sprintf(__('Invalid value for Based On in row number %d.', 'flexible-shipping' ), $import_row_count ) );
410
+ WC_Admin_Settings::show_messages();
411
+ return;
412
+ }
413
+ if ( trim( $csv_row['Min'] ) != '' && !is_numeric( str_replace( ',', '.', $csv_row['Min'] ) ) ) {
414
+ WC_Admin_Settings::add_error( sprintf(__('Min value %s is not valid number. Row number %d.', 'flexible-shipping' ), $csv_row['Min'], $import_row_count ) );
415
+ WC_Admin_Settings::show_messages();
416
+ return;
417
+ }
418
+ $rule['min'] = str_replace( ',', '.', $csv_row['Min'] );
419
+ if ( trim( $csv_row['Max'] ) != '' && !is_numeric( str_replace( ',', '.', $csv_row['Max'] ) ) ) {
420
+ WC_Admin_Settings::add_error( sprintf(__('Max value %s is not valid number. Row number %d.', 'flexible-shipping' ), $csv_row['Max'], $import_row_count ) );
421
+ WC_Admin_Settings::show_messages();
422
+ return;
423
+ }
424
+ $rule['max'] = str_replace( ',', '.', $csv_row['Max'] );
425
+ if ( trim( $csv_row['Cost per order'] ) != '' && !is_numeric( str_replace( ',', '.', $csv_row['Cost per order'] ) ) ) {
426
+ WC_Admin_Settings::add_error( sprintf(__('Cost per order value %s is not valid number. Row number %d.', 'flexible-shipping' ), $csv_row['Cost per order'], $import_row_count ) );
427
+ WC_Admin_Settings::show_messages();
428
+ return;
429
+ }
430
+ $rule['cost_per_order'] = str_replace( ',', '.', $csv_row['Cost per order'] );
431
+ if ( trim( $csv_row['Additional cost'] ) != '' && !is_numeric( str_replace( ',', '.', $csv_row['Additional cost'] ) ) ) {
432
+ WC_Admin_Settings::add_error( sprintf(__('Additional cost value %s is not valid number. Row number %d.', 'flexible-shipping' ), $csv_row['Additional cost'], $import_row_count ) );
433
+ WC_Admin_Settings::show_messages();
434
+ return;
435
+ }
436
+ $rule['cost_additional'] = str_replace( ',', '.', $csv_row['Additional cost'] );
437
+ if ( trim( $csv_row['Value'] ) != '' && !is_numeric( str_replace( ',', '.', $csv_row['Value'] ) ) ) {
438
+ WC_Admin_Settings::add_error( sprintf(__('Value value %s is not valid number. Row number %d.', 'flexible-shipping' ), $csv_row['Value'], $import_row_count ) );
439
+ WC_Admin_Settings::show_messages();
440
+ return;
441
+ }
442
+ $rule['per_value'] = str_replace( ',', '.', $csv_row['Value'] );
443
+
444
+ $rule['shipping_class'] = trim( $csv_row['Shipping Class'] );
445
+
446
+ if ( trim( $rule['shipping_class'] ) != '' ) {
447
+ if ( !in_array( $rule['shipping_class'], array( 'all', 'any', 'none' ) ) ) {
448
+ $shipping_class_found = false;
449
+ $wc_shipping_classes = WC()->shipping->get_shipping_classes();
450
+ foreach ( $wc_shipping_classes as $shipping_class ) {
451
+ if ( $shipping_class->name == $rule['shipping_class'] ) {
452
+ $rule['shipping_class'] = $shipping_class->term_id;
453
+ $shipping_class_found = true;
454
+ }
455
+ }
456
+ if ( !$shipping_class_found ) {
457
+ $term_id = wp_insert_term( $rule['shipping_class'], 'product_shipping_class', array( 'description' => $rule['shipping_class'] ) );
458
+ $rule['shipping_class'] = $term_id['term_id'];
459
+ }
460
+ }
461
+ }
462
+
463
+ $rule['stop'] = $csv_row['Stop'];
464
+ if ( $rule['stop'] == 'yes' ) {
465
+ $rule['stop'] = 1;
466
+ }
467
+ else {
468
+ $rule['stop'] = 0;
469
+ }
470
+ $rule['cancel'] = $csv_row['Cancel'];
471
+ if ( $rule['cancel'] == 'yes' ) {
472
+ $rule['cancel'] = 1;
473
+ }
474
+ else {
475
+ $rule['cancel'] = 0;
476
+ }
477
+ $imported_shipping_method['method_rules'][] = $rule;
478
+ }
479
+ }
480
+ if ( !$first ) {
481
+ $shipping_methods[$imported_shipping_method['id']] = $imported_shipping_method;
482
+ if ( $new_method ) {
483
+ WC_Admin_Settings::add_message( sprintf(__('Shipping method %s imported as %s.', 'flexible-shipping' ), $current_method_title, $method_title ) );
484
+ }
485
+ update_option( $this->shipping_methods_option, $shipping_methods );
486
+ }
487
+ $first = false;
488
+ }
489
+ WC_Admin_Settings::show_messages();
490
+ }
491
+ else {
492
+ parent::process_admin_options();
493
+ update_option($this->shipping_method_order_option,$_POST['method_order']);
494
+ }
495
  }
496
  }
497
 
614
  }
615
  ?>
616
  </table>
617
+ <script type="text/javascript">
618
+ function fs_removeParam(key, sourceURL) {
619
+ var rtn = sourceURL.split("?")[0],
620
+ param,
621
+ params_arr = [],
622
+ queryString = (sourceURL.indexOf("?") !== -1) ? sourceURL.split("?")[1] : "";
623
+ if (queryString !== "") {
624
+ params_arr = queryString.split("&");
625
+ for (var i = params_arr.length - 1; i >= 0; i -= 1) {
626
+ param = params_arr[i].split("=")[0];
627
+ if (param === key) {
628
+ params_arr.splice(i, 1);
629
+ }
630
+ }
631
+ rtn = rtn + "?" + params_arr.join("&");
632
+ }
633
+ return rtn;
634
+ }
635
+ function fs_trimChar(string, charToRemove) {
636
+ while(string.charAt(0)==charToRemove) {
637
+ string = string.substring(1);
638
+ }
639
+
640
+ while(string.charAt(string.length-1)==charToRemove) {
641
+ string = string.substring(0,string.length-1);
642
+ }
643
+
644
+ return string;
645
+ }
646
+ if ( typeof window.history.pushState == 'function' ) {
647
+ var url = document.location.href;
648
+ url = fs_removeParam('action', url);
649
+ url = fs_removeParam('methods_id', url);
650
+ url = fs_removeParam('added', url);
651
+ url = fs_trimChar(url,'?');
652
+ window.history.pushState({}, "", url);
653
+ }
654
+ </script>
655
  <?php do_action( 'flexible_shipping_method_script' ); ?>
656
  <?php
657
  }
672
  }
673
 
674
  public function cart_weight() {
675
+ return WC()->cart->cart_contents_weight;
 
 
 
 
 
676
  }
677
 
678
  public function package_item_count( $items ) {
707
  }
708
 
709
  public function calculate_shipping( $package = array() ) {
 
710
  $processed = apply_filters( 'flexible_shipping_calculate_shipping', false, $this, $package, 0 );
711
 
712
  $default_method_is_set = false;
866
  foreach ( $shipping_methods as $shipping_method ) {
867
  $id = $this->id . '_' . $woo_shipping_method->instance_id . '_' . sanitize_title($shipping_method['method_title'] );
868
  $id = apply_filters( 'flexible_shipping_method_rate_id', $id, $shipping_method );
869
+ $shipping_method['instance_id'] = $woo_shipping_method->instance_id;
870
  $rates[$id] = $shipping_method;
871
  }
872
  }
classes/views/html-ads.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="flexible-shipping-pro-box">
2
+ <div class="metabox-holder">
3
+ <div class="stuffbox">
4
+ <h3 class="hndle"><?php _e( 'Get Flexible Shipping PRO!', 'flexible-shipping' ); ?></h3>
5
+
6
+ <?php
7
+ $fs_link = get_locale() === 'pl_PL' ? 'https://www.wpdesk.pl/sklep/flexible-shipping-pro-woocommerce/' : 'https://www.wpdesk.net/products/flexible-shipping-pro-woocommerce/';
8
+ ?>
9
+
10
+ <div class="inside">
11
+ <div class="main">
12
+ <ul>
13
+ <li><span class="dashicons dashicons-yes"></span> <?php _e( 'Shipping Classes support', 'flexible-shipping' ); ?></li>
14
+ <li><span class="dashicons dashicons-yes"></span> <?php _e( 'Product count based costs', 'flexible-shipping' ); ?></li>
15
+ <li><span class="dashicons dashicons-yes"></span> <?php _e( 'Stopping a rule', 'flexible-shipping' ); ?></li>
16
+ <li><span class="dashicons dashicons-yes"></span> <?php _e( 'Cancelling a rule', 'flexible-shipping' ); ?></li>
17
+ <li><span class="dashicons dashicons-yes"></span> <?php _e( 'Additional calculation methods (sum, lowest cost, highest cost)', 'flexible-shipping' ); ?></li>
18
+ </ul>
19
+
20
+ <a class="button button-primary" href="<?php echo $fs_link; ?>?utm_source=flexible-shipping-settings&utm_medium=button&utm_campaign=flexible-shipping-pro-plugin" target="_blank"><?php _e( 'Upgrade Now &rarr;', 'flexible-shipping' ); ?></a>
21
+ </div>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </div>
classes/views/html-shipping-method-settings.php CHANGED
@@ -3,15 +3,7 @@
3
  <td class="forminp" style="padding-left:0;padding-right:0;">
4
  <fieldset>
5
  <legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend>
6
- <style>
7
- tr.highlight td {
8
- background-color: #e4f2fd !important;
9
- }
10
 
11
- .form-table .wc_shipping th {
12
- width: auto;
13
- }
14
- </style>
15
  <table class="flexible_shipping_methods wc_shipping widefat wp-list-table" cellspacing="0">
16
  <thead>
17
  <tr>
@@ -79,7 +71,16 @@
79
  <tr>
80
  <th>&nbsp;</th>
81
  <th colspan="8">
82
- <button id="flexible_shipping_remove_selected" class="button"><?php _e( 'Remove selected', 'flexible-shipping' ); ?></button>
 
 
 
 
 
 
 
 
 
83
  </th>
84
  </tr>
85
  </tfoot>
@@ -89,6 +90,12 @@
89
  </fieldset>
90
  </td>
91
  </tr>
 
 
 
 
 
 
92
  <?php
93
  if( version_compare( WC()->version, '2.6.0', ">=" ) ) {
94
  ?>
@@ -98,7 +105,7 @@
98
  $shipping_method_woo = WC_Shipping_Zones::get_shipping_method( $_GET['instance_id'] );
99
  $content = '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping' ) . '">' . __( 'Shipping Zones', 'woocommerce' ) . '</a> &gt ';
100
  $content .= '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping&zone_id=' . absint( $zone->get_zone_id() ) ) . '">' . esc_html( $zone->get_zone_name() ) . '</a> &gt';
101
- $content .= esc_html( $shipping_method_woo->get_title() );
102
  ?>
103
  jQuery('#mainform h2').first().replaceWith( '<h2>' + '<?php echo $content; ?>' + '</h2>' );
104
 
@@ -111,6 +118,14 @@
111
  }
112
  })
113
 
 
 
 
 
 
 
 
 
114
  jQuery('#flexible_shipping_remove_selected').click(function(){
115
  var url = '<?php echo add_query_arg( 'methods_id' , '', add_query_arg( 'action', 'delete' ) ); ?>';
116
  var first = true;
@@ -126,7 +141,10 @@
126
  first = false;
127
  }
128
  })
129
- console.log(url);
 
 
 
130
  if ( url != '<?php echo add_query_arg( 'method_id' , '', add_query_arg( 'action', 'delete' ) ); ?>' ) {
131
  jQuery('#flexible_shipping_remove_selected').prop('disabled',true);
132
  jQuery('.woocommerce-save-button').prop('disabled',true);
@@ -135,6 +153,51 @@
135
  return false;
136
  })
137
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  </script>
139
  <?php
140
  }
3
  <td class="forminp" style="padding-left:0;padding-right:0;">
4
  <fieldset>
5
  <legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend>
 
 
 
 
6
 
 
 
 
 
7
  <table class="flexible_shipping_methods wc_shipping widefat wp-list-table" cellspacing="0">
8
  <thead>
9
  <tr>
71
  <tr>
72
  <th>&nbsp;</th>
73
  <th colspan="8">
74
+ <button id="flexible_shipping_remove_selected" class="button" disabled><?php _e( 'Remove selected', 'flexible-shipping' ); ?></button>
75
+ <div class="flexilble_shipping_export_import">
76
+ <input id="flexible_shipping_import_file" type="file" name="import_file" style="display:none;" accept=".csv" />
77
+ <input id="flexible_shipping_import_action" type="hidden" name="import_action" value="0" />
78
+ <button id="flexible_shipping_import_cancel" class="button" style="display:none;"><?php _e( 'Cancel import', 'flexible-shipping' ); ?></button>
79
+ <input id="flexible_shipping_do_import" style="display:none;" class="button button-primary" data-instance-id="<?php echo $_GET['instance_id']; ?>" data-nonce="<?php echo wp_create_nonce( "flexible_shipping" ); ?>" type="submit" value="<?php _e( 'Import', 'flexible-shipping' ); ?>" />
80
+ <button id="flexible_shipping_import" class="button" data-instance-id="<?php echo $_GET['instance_id']; ?>" data-nonce="<?php echo wp_create_nonce( "flexible_shipping" ); ?>" ><?php _e( 'Import', 'flexible-shipping' ); ?></button>
81
+ <?php do_action( 'flexible_shipping_actions_row' ); ?>
82
+ </div>
83
+ <div style="clear:both;"></div>
84
  </th>
85
  </tr>
86
  </tfoot>
90
  </fieldset>
91
  </td>
92
  </tr>
93
+
94
+ <?php
95
+ if ( ! wpdesk_is_plugin_active( 'flexible-shipping-pro/flexible-shipping-pro.php' ) )
96
+ include ( 'html-ads.php' );
97
+ ?>
98
+
99
  <?php
100
  if( version_compare( WC()->version, '2.6.0', ">=" ) ) {
101
  ?>
105
  $shipping_method_woo = WC_Shipping_Zones::get_shipping_method( $_GET['instance_id'] );
106
  $content = '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping' ) . '">' . __( 'Shipping Zones', 'woocommerce' ) . '</a> &gt ';
107
  $content .= '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping&zone_id=' . absint( $zone->get_zone_id() ) ) . '">' . esc_html( $zone->get_zone_name() ) . '</a> &gt';
108
+ $content .= esc_html( $shipping_method_woo->get_title() );
109
  ?>
110
  jQuery('#mainform h2').first().replaceWith( '<h2>' + '<?php echo $content; ?>' + '</h2>' );
111
 
118
  }
119
  })
120
 
121
+ /**
122
+ * Enable Bulk Action Buttons when at least one Shipping Method is selected
123
+ *
124
+ */
125
+ jQuery( '.flexible_shipping_methods input[type="checkbox"]' ).click( function() {
126
+ jQuery( '#flexible_shipping_export_selected, #flexible_shipping_remove_selected' ).attr( 'disabled', ! jQuery( '.flexible_shipping_methods td input[type="checkbox"]' ).is( ':checked' ) );
127
+ } );
128
+
129
  jQuery('#flexible_shipping_remove_selected').click(function(){
130
  var url = '<?php echo add_query_arg( 'methods_id' , '', add_query_arg( 'action', 'delete' ) ); ?>';
131
  var first = true;
141
  first = false;
142
  }
143
  })
144
+ if ( first ) {
145
+ alert( '<?php _e( 'Please select shipping methods to remove', 'flexible-shipping' ); ?>' );
146
+ return false;
147
+ }
148
  if ( url != '<?php echo add_query_arg( 'method_id' , '', add_query_arg( 'action', 'delete' ) ); ?>' ) {
149
  jQuery('#flexible_shipping_remove_selected').prop('disabled',true);
150
  jQuery('.woocommerce-save-button').prop('disabled',true);
153
  return false;
154
  })
155
 
156
+ jQuery('#flexible_shipping_import').click(function(){
157
+ jQuery(this).hide();
158
+ jQuery('#flexible_shipping_do_import').show();
159
+ jQuery('#flexible_shipping_import_file').show();
160
+ jQuery('#flexible_shipping_import_cancel').show();
161
+ jQuery('input[name=save]').prop('disabled',true);
162
+ return false;
163
+ })
164
+
165
+ jQuery('#flexible_shipping_import_cancel').click(function(){
166
+ jQuery(this).hide();
167
+ jQuery('#flexible_shipping_do_import').hide();
168
+ jQuery('#flexible_shipping_import_file').hide();
169
+ jQuery('#flexible_shipping_import_cancel').hide();
170
+ jQuery('#flexible_shipping_import').show();
171
+ jQuery('input[name=save]').prop('disabled',false);
172
+ return false;
173
+ })
174
+
175
+ jQuery('#flexible_shipping_do_import').click(function(){
176
+ if ( jQuery('#flexible_shipping_import_file').val() == '' ) {
177
+ alert('<?php _e( 'Select file to import', 'flexible-shipping' ); ?>');
178
+ return false;
179
+ }
180
+ jQuery('#flexible_shipping_import_action').val('1');
181
+ jQuery('input[name=save]').prop('disabled',false);
182
+ jQuery('.woocommerce-save-button').click();
183
+ return false;
184
+ })
185
+
186
+ <?php
187
+ global $wp;
188
+ $current_url = 'admin.php?page=wc-settings&tab=shipping&instance_id=' . $_GET['instance_id'];
189
+ ?>
190
+
191
+ jQuery('#mainform').attr('action', '<?php echo $current_url; ?>' );
192
+
193
+ <?php
194
+ if ( isset( $_POST['import_action'] ) && $_POST['import_action'] == '1' ) {
195
+ ?>
196
+ jQuery('.updated.inline:lt(1)').hide();
197
+ jQuery('.updated.inline:lt(2)').hide();
198
+ <?php
199
+ }
200
+ ?>
201
  </script>
202
  <?php
203
  }
flexible-shipping.php CHANGED
@@ -3,12 +3,12 @@
3
  Plugin Name: Flexible Shipping
4
  Plugin URI: https://wordpress.org/plugins/flexible-shipping/
5
  Description: Create additional shipping methods in WooCommerce and enable pricing based on cart weight or total.
6
- Version: 1.7
7
  Author: WP Desk
8
  Author URI: https://www.wpdesk.net/
9
  Text Domain: flexible-shipping
10
  Domain Path: /languages/
11
- Tested up to: 4.7
12
 
13
  Copyright 2016 WP Desk Ltd.
14
 
@@ -69,6 +69,8 @@ if ( wpdesk_is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
69
 
70
  add_action( 'flexible_shipping_method_rate_id', array( $this, 'flexible_shipping_method_rate_id' ), 9999999, 2 );
71
 
 
 
72
  add_filter( 'woocommerce_shipping_chosen_method', array( $this, 'woocommerce_shipping_chosen_method' ), 10, 2);
73
 
74
  add_action( 'init', array( $this, 'init_polylang') );
@@ -88,6 +90,10 @@ if ( wpdesk_is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
88
  add_filter( 'flexible_shipping_value_in_currency', array( $this, 'flexible_shipping_value_in_currency_wmcs' ), 1 );
89
  }
90
 
 
 
 
 
91
  }
92
 
93
  function woocommerce_shipping_chosen_method( $method, $available_methods ) {
@@ -104,6 +110,186 @@ if ( wpdesk_is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
104
  return $method;
105
  }
106
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  function init_polylang() {
108
  if ( function_exists( 'pll_register_string' ) ) {
109
  $all_shipping_methods = WC()->shipping()->get_shipping_methods();
@@ -203,7 +389,14 @@ if ( wpdesk_is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
203
  }
204
 
205
  function enqueue_admin_scripts() {
206
- wp_enqueue_style( 'flexible-shipping-admin', $this->getPluginUrl() . 'assets/css/admin.css', array(), '1.4' );
 
 
 
 
 
 
 
207
  }
208
 
209
  function enqueue_scripts() {
@@ -274,6 +467,10 @@ if ( wpdesk_is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
274
  return apply_filters( 'wcml_raw_price_amount', $value );
275
  }
276
 
 
 
 
 
277
  }
278
 
279
  function flexible_shipping_method_selected_in_cart( $shipping_method_integration ) {
3
  Plugin Name: Flexible Shipping
4
  Plugin URI: https://wordpress.org/plugins/flexible-shipping/
5
  Description: Create additional shipping methods in WooCommerce and enable pricing based on cart weight or total.
6
+ Version: 1.8
7
  Author: WP Desk
8
  Author URI: https://www.wpdesk.net/
9
  Text Domain: flexible-shipping
10
  Domain Path: /languages/
11
+ Tested up to: 4.7.1
12
 
13
  Copyright 2016 WP Desk Ltd.
14
 
69
 
70
  add_action( 'flexible_shipping_method_rate_id', array( $this, 'flexible_shipping_method_rate_id' ), 9999999, 2 );
71
 
72
+ add_action( 'wp_ajax_flexible_shipping', array( $this, 'wp_ajax_flexible_shipping' ) );
73
+
74
  add_filter( 'woocommerce_shipping_chosen_method', array( $this, 'woocommerce_shipping_chosen_method' ), 10, 2);
75
 
76
  add_action( 'init', array( $this, 'init_polylang') );
90
  add_filter( 'flexible_shipping_value_in_currency', array( $this, 'flexible_shipping_value_in_currency_wmcs' ), 1 );
91
  }
92
 
93
+ if ( isset( $GLOBALS['WOOCS'] ) ) {
94
+ add_filter( 'flexible_shipping_value_in_currency', array( $this, 'flexible_shipping_value_in_currency_woocs' ), 1 );
95
+ }
96
+
97
  }
98
 
99
  function woocommerce_shipping_chosen_method( $method, $available_methods ) {
110
  return $method;
111
  }
112
 
113
+ function wp_ajax_flexible_shipping() {
114
+ check_ajax_referer( 'flexible_shipping', 'flexible_shipping_nonce' );
115
+ $ret = array( 'status' => 'ok' );
116
+ $flexible_shipping_action = '';
117
+ if ( isset( $_REQUEST['flexible_shipping_action'] ) ) {
118
+ $flexible_shipping_action = $_REQUEST['flexible_shipping_action'];
119
+ }
120
+ if ( $flexible_shipping_action == 'export' ) {
121
+ $instance_id = '';
122
+ if ( isset( $_REQUEST['instance_id'] ) ) {
123
+ $instance_id = $_REQUEST['instance_id'];
124
+ }
125
+ $ret['instance_id'] = $instance_id;
126
+ $methods = '';
127
+ if ( isset( $_REQUEST['methods'] ) ) {
128
+ $methods = $_REQUEST['methods'];
129
+ }
130
+ $methods_array = explode( ',', $methods );
131
+ $shipping_method = WC_Shipping_Zones::get_shipping_method( $instance_id );
132
+ $wc_shipping_classes = WC()->shipping->get_shipping_classes();
133
+ $ret['shipping_method'] = $shipping_method;
134
+ $all_shipping_methods = WC()->shipping()->get_shipping_methods();
135
+ if ( empty( $all_shipping_methods ) ) {
136
+ $all_shipping_methods = WC()->shipping()->load_shipping_methods();
137
+ }
138
+ $flexible_shipping = $all_shipping_methods['flexible_shipping'];
139
+ $flexible_shipping_rates = $flexible_shipping->get_all_rates();
140
+
141
+ $filename = 'fs_' . str_replace( 'http://', '', str_replace( 'https://', '', site_url() ) ) . '-' . $instance_id;
142
+
143
+ $ret['all_rates'] = $flexible_shipping_rates;
144
+ $ret['methods'] = $methods;
145
+ $csv_array = array();
146
+ $csv_header = array(
147
+ 'Method Title',
148
+ 'Method Description',
149
+ 'Free Shipping',
150
+ 'Maximum Cost',
151
+ 'Calculation Method',
152
+ 'Visibility',
153
+ 'Default',
154
+ 'Based on',
155
+ 'Min',
156
+ 'Max',
157
+ 'Cost per order',
158
+ 'Additional cost',
159
+ 'Value',
160
+ 'Shipping Class',
161
+ 'Stop',
162
+ 'Cancel',
163
+ );
164
+ $csv_array[] = $csv_header;
165
+ foreach ( $flexible_shipping_rates as $flexible_shipping_rate ) {
166
+ if ( !in_array( $flexible_shipping_rate['id'], $methods_array ) ) {
167
+ continue;
168
+ }
169
+ $filename .= '_' . $flexible_shipping_rate['id'];
170
+ if ( !isset( $flexible_shipping_rate['method_description'] ) ) {
171
+ $flexible_shipping_rate['method_description'] = '';
172
+ }
173
+ if ( !isset( $flexible_shipping_rate['method_free_shipping'] ) ) {
174
+ $flexible_shipping_rate['method_free_shipping'] = '';
175
+ }
176
+ if ( !isset( $flexible_shipping_rate['method_max_cost'] ) ) {
177
+ $flexible_shipping_rate['method_max_cost'] = '';
178
+ }
179
+ if ( !isset( $flexible_shipping_rate['method_calculation_method'] ) ) {
180
+ $flexible_shipping_rate['method_calculation_method'] = '';
181
+ }
182
+ if ( !isset( $flexible_shipping_rate['method_visibility'] ) ) {
183
+ $flexible_shipping_rate['method_visibility'] = '';
184
+ }
185
+ if ( $flexible_shipping_rate['method_visibility'] != 'yes' ) {
186
+ $flexible_shipping_rate['method_visibility'] = '';
187
+ }
188
+ if ( !isset( $flexible_shipping_rate['method_default'] ) ) {
189
+ $flexible_shipping_rate['method_default'] = '';
190
+ }
191
+ if ( $flexible_shipping_rate['method_default'] != 'yes' ) {
192
+ $flexible_shipping_rate['method_default'] = '';
193
+ }
194
+ $csv_array[] = array(
195
+ $flexible_shipping_rate['method_title'],
196
+ $flexible_shipping_rate['method_description'],
197
+ $flexible_shipping_rate['method_free_shipping'],
198
+ $flexible_shipping_rate['method_max_cost'],
199
+ $flexible_shipping_rate['method_calculation_method'],
200
+ $flexible_shipping_rate['method_visibility'],
201
+ $flexible_shipping_rate['method_default'],
202
+ '',
203
+ '',
204
+ '',
205
+ '',
206
+ '',
207
+ '',
208
+ '',
209
+ '',
210
+ '',
211
+ );
212
+ foreach ( $flexible_shipping_rate['method_rules'] as $method_rule ) {
213
+ if ( !isset( $method_rule['based_on'] ) ) {
214
+ $method_rule['based_on'] = '';
215
+ }
216
+ if ( !isset( $method_rule['min'] ) ) {
217
+ $method_rule['min'] = '';
218
+ }
219
+ if ( !isset( $method_rule['max'] ) ) {
220
+ $method_rule['max'] = '';
221
+ }
222
+ if ( !isset( $method_rule['cost_per_order'] ) ) {
223
+ $method_rule['cost_per_order'] = '';
224
+ }
225
+ if ( !isset( $method_rule['cost_additional'] ) ) {
226
+ $method_rule['cost_additional'] = '';
227
+ }
228
+ if ( !isset( $method_rule['per_value'] ) ) {
229
+ $method_rule['per_value'] = '';
230
+ }
231
+ if ( !isset( $method_rule['shipping_class'] ) ) {
232
+ $method_rule['shipping_class'] = '';
233
+ }
234
+ else {
235
+ foreach ( $wc_shipping_classes as $shipping_class ) {
236
+ if ( $shipping_class->term_id == $method_rule['shipping_class'] ) {
237
+ $method_rule['shipping_class'] = $shipping_class->name;
238
+ }
239
+ }
240
+ }
241
+ if ( !isset( $method_rule['stop'] ) ) {
242
+ $method_rule['stop'] = '';
243
+ }
244
+ if ( $method_rule['stop'] == '1' ) {
245
+ $method_rule['stop'] = 'yes';
246
+ }
247
+ else {
248
+ $method_rule['stop'] = '';
249
+ }
250
+ if ( !isset( $method_rule['cancel'] ) ) {
251
+ $method_rule['cancel'] = '';
252
+ }
253
+ if ( $method_rule['cancel'] == '1' ) {
254
+ $method_rule['cancel'] = 'yes';
255
+ }
256
+ else {
257
+ $method_rule['cancel'] = '';
258
+ }
259
+ $csv_array[] = array(
260
+ $flexible_shipping_rate['method_title'],
261
+ '',
262
+ '',
263
+ '',
264
+ '',
265
+ '',
266
+ '',
267
+ $method_rule['based_on'],
268
+ $method_rule['min'],
269
+ $method_rule['max'],
270
+ $method_rule['cost_per_order'],
271
+ $method_rule['cost_additional'],
272
+ $method_rule['per_value'],
273
+ $method_rule['shipping_class'],
274
+ $method_rule['stop'],
275
+ $method_rule['cancel'],
276
+ );
277
+ }
278
+ }
279
+ $ret['csv_array'] = $csv_array;
280
+ header('Content-Type: text/csv; charset=utf-8');
281
+ header('Content-Disposition: attachment; filename=' . $filename . '.csv');
282
+ $out = fopen('php://output', 'w');
283
+ foreach ( $csv_array as $fields ) {
284
+ fputcsv( $out, $fields, ';' );
285
+ }
286
+ fclose($out);
287
+ wp_die();
288
+ }
289
+ echo json_encode($ret,JSON_PRETTY_PRINT);
290
+ wp_die();
291
+ }
292
+
293
  function init_polylang() {
294
  if ( function_exists( 'pll_register_string' ) ) {
295
  $all_shipping_methods = WC()->shipping()->get_shipping_methods();
389
  }
390
 
391
  function enqueue_admin_scripts() {
392
+ $current_screen = get_current_screen();
393
+
394
+ //echo '<pre>';
395
+ //var_dump($current_screen);
396
+ //echo '</pre>';
397
+
398
+ if ( $current_screen->id === 'woocommerce_page_wc-settings' )
399
+ wp_enqueue_style( 'flexible-shipping-admin', $this->getPluginUrl() . 'assets/css/admin.css' );
400
  }
401
 
402
  function enqueue_scripts() {
467
  return apply_filters( 'wcml_raw_price_amount', $value );
468
  }
469
 
470
+ public function flexible_shipping_value_in_currency_woocs( $value ) {
471
+ return $GLOBALS['WOOCS']->woocs_exchange_value( $value );
472
+ }
473
+
474
  }
475
 
476
  function flexible_shipping_method_selected_in_cart( $shipping_method_integration ) {
languages/flexible-shipping-pl_PL.mo CHANGED
Binary file
languages/flexible-shipping-pl_PL.po CHANGED
@@ -1,15 +1,15 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Flexible Shipping\n"
4
- "POT-Creation-Date: 2016-12-13 14:52+0100\n"
5
- "PO-Revision-Date: 2016-12-13 14:52+0100\n"
6
- "Last-Translator: Piotr Jabłonowski <piotr.jablonowski@inspirelabs.pl>\n"
7
  "Language-Team: Maciej Swoboda <maciej.swoboda@gmail.com>\n"
8
  "Language: pl_PL\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.8.11\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "X-Poedit-WPHeader: flexible-shipping.php\n"
15
  "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
@@ -33,15 +33,15 @@ msgstr ""
33
  msgid "An unknown error occurred"
34
  msgstr "Wystąpił nieznany błąd"
35
 
36
- #: classes/inspire/plugin4.php:387 flexible-shipping.php:211
37
  msgid "Settings"
38
  msgstr "Ustawienia"
39
 
40
- #: classes/inspire/plugin4.php:388 flexible-shipping.php:212
41
  msgid "Docs"
42
  msgstr "Docs"
43
 
44
- #: classes/inspire/plugin4.php:389 flexible-shipping.php:213
45
  msgid "Support"
46
  msgstr "Wsparcie"
47
 
@@ -50,8 +50,8 @@ msgstr "Wsparcie"
50
  #: classes/settings-flexible-shipping.php:28
51
  #: classes/settings-shipping-method-form.php:35 classes/shipping_method.php:24
52
  #: classes/shipping_method.php:25 classes/shipping_method.php:43
53
- #: flexible-shipping.php:101 flexible-shipping.php:104
54
- #: flexible-shipping.php:107
55
  msgid "Flexible Shipping"
56
  msgstr "Flexible Shipping"
57
 
@@ -108,7 +108,7 @@ msgstr ""
108
  "%sDodaj integrację%s z DHL, Paczkomaty InPost, eNadawca Poczta Polska, "
109
  "Paczka w Ruchu."
110
 
111
- #: classes/settings-shipping-method-form.php:19 classes/shipping_method.php:571
112
  msgid "Free"
113
  msgstr "Bezpłatnie"
114
 
@@ -169,17 +169,17 @@ msgid "Sum"
169
  msgstr "Suma"
170
 
171
  #: classes/settings-shipping-method-form.php:81
172
- #: classes/views/html-shipping-method-settings.php:21
173
  msgid "Visibility"
174
  msgstr "Wyświetlanie"
175
 
176
  #: classes/settings-shipping-method-form.php:84
177
- #: classes/views/html-shipping-method-settings.php:54
178
  msgid "Show only for logged in users"
179
  msgstr "Pokaż tylko dla zalogowanych użytkowników"
180
 
181
  #: classes/settings-shipping-method-form.php:87
182
- #: classes/views/html-shipping-method-settings.php:22
183
  msgid "Default"
184
  msgstr "Domyślnie"
185
 
@@ -192,7 +192,7 @@ msgstr ""
192
  "zamówienia."
193
 
194
  #: classes/settings-shipping-method-form.php:93
195
- #: classes/views/html-shipping-method-settings.php:23
196
  msgid "Integration"
197
  msgstr "Integracja"
198
 
@@ -222,38 +222,129 @@ msgstr "Zobacz jak %sskonfigurować metody wysyłki %s."
222
  msgid "Shipping Title"
223
  msgstr "Tytuł"
224
 
225
- #: classes/shipping_method.php:108
226
  #: classes/views/html-shipping-method-rules.php:241
227
  msgid "Add New"
228
  msgstr "Dodaj nową"
229
 
230
- #: classes/shipping_method.php:333
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
231
  msgid "New Shipping Method"
232
  msgstr "Nowa metoda wysyłki"
233
 
234
- #: classes/shipping_method.php:336
235
  msgid "Edit Shipping Method"
236
  msgstr "Edytuj metodę wysyłki"
237
 
238
- #: classes/shipping_method.php:346 classes/shipping_method.php:387
239
  #, php-format
240
  msgid "Shipping method %s added."
241
  msgstr "Metoda wysyłki dodana: %s."
242
 
243
- #: classes/shipping_method.php:370
244
  #, php-format
245
  msgid "Shipping method %s deleted."
246
  msgstr "Metoda wysyłki usunięta: %s."
247
 
248
- #: classes/shipping_method.php:373
249
  msgid "Shipping method not found."
250
  msgstr "Metoda wysyłki nie znaleziona."
251
 
252
- #: classes/shipping_method.php:399
253
  #, php-format
254
  msgid "Shipping method %s updated."
255
  msgstr "Metoda wysyłki zaktualizowana: %s."
256
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  #: classes/views/html-shipping-method-rules.php:8
258
  msgid "Price"
259
  msgstr "Cena"
@@ -321,33 +412,33 @@ msgid "Are you sure?"
321
  msgstr "Na pewno?"
322
 
323
  #: classes/views/html-shipping-method-rules.php:232
324
- #: classes/views/html-shipping-method-settings.php:99
325
  msgid "Shipping Zones"
326
  msgstr "Strefy wysyłki"
327
 
328
- #: classes/views/html-shipping-method-settings.php:19
329
  msgid "Title"
330
  msgstr "Tytuł"
331
 
332
- #: classes/views/html-shipping-method-settings.php:20
333
  msgid "Enabled"
334
  msgstr "Włączona"
335
 
336
- #: classes/views/html-shipping-method-settings.php:24
337
  msgid "Select all"
338
  msgstr "Zaznacz wszystkie"
339
 
340
- #: classes/views/html-shipping-method-settings.php:47
341
- #: classes/views/html-shipping-method-settings.php:54
342
- #: classes/views/html-shipping-method-settings.php:61
343
  msgid "yes"
344
  msgstr "tak"
345
 
346
- #: classes/views/html-shipping-method-settings.php:56
347
  msgid "Show for all users"
348
  msgstr "Pokaż dla wszystkich użytkowników"
349
 
350
- #: classes/views/html-shipping-method-settings.php:77
351
  msgid ""
352
  "Drag and drop the above shipping methods to control their display order. "
353
  "Confirm by clicking Save changes button below."
@@ -355,27 +446,44 @@ msgstr ""
355
  "Przeciągnij i upuść metody wysyłki aby ustawić ich kolejność wyświetlania. "
356
  "Potwierdź przez kliknięcie przycisku Zapisz zmiany poniżej."
357
 
358
- #: classes/views/html-shipping-method-settings.php:82
359
  msgid "Remove selected"
360
  msgstr "Usuń zaznaczone"
361
 
362
- #: flexible-shipping.php:144
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363
  msgid ""
364
  "Flexible Shipping requires at least version 2.7 of Active Payments plugin."
365
  msgstr ""
366
  "Flexible Shipping wymaga wtyczki Aktywne płatności w wersji co najmniej 2.7."
367
 
368
- #: flexible-shipping.php:155
369
  msgid "Flexible Shipping requires at least version 1.2 of eNadawca plugin."
370
  msgstr "Flexible Shipping wymaga wtyczki eNadawca w wersji co najmniej 1.2."
371
 
372
- #: flexible-shipping.php:166
373
  msgid ""
374
  "Flexible Shipping requires at least version 1.1 of Paczka w Ruchu plugin."
375
  msgstr ""
376
  "Flexible Shipping wymaga wtyczki Paczka w Ruchu w wersji co najmniej 1.1."
377
 
378
- #: flexible-shipping.php:174
379
  #, php-format
380
  msgid ""
381
  "You are using WooCommerce Flexible Shipping below 1.4. Please deactivate it "
@@ -386,7 +494,7 @@ msgstr ""
386
  "Wyłącz go na %sstronie wtyczek%s. Przeczytaj o dużej zmianie we Flexible "
387
  "Shipping na %snaszym blogu →%s"
388
 
389
- #: flexible-shipping.php:304
390
  #, php-format
391
  msgid "Redirecting. If page not redirects click %s here %s."
392
  msgstr ""
@@ -413,6 +521,9 @@ msgstr "WP Desk"
413
  msgid "https://www.wpdesk.net/"
414
  msgstr "https://www.wpdesk.pl/"
415
 
 
 
 
416
  #~ msgid "Minimum Order Amount"
417
  #~ msgstr "Minimalna wartość zamówienia"
418
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Flexible Shipping\n"
4
+ "POT-Creation-Date: 2017-01-24 14:52+0100\n"
5
+ "PO-Revision-Date: 2017-01-24 14:54+0100\n"
6
+ "Last-Translator: Maciej Swoboda <maciej.swoboda@gmail.com>\n"
7
  "Language-Team: Maciej Swoboda <maciej.swoboda@gmail.com>\n"
8
  "Language: pl_PL\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.8.7\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "X-Poedit-WPHeader: flexible-shipping.php\n"
15
  "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
33
  msgid "An unknown error occurred"
34
  msgstr "Wystąpił nieznany błąd"
35
 
36
+ #: classes/inspire/plugin4.php:387 flexible-shipping.php:420
37
  msgid "Settings"
38
  msgstr "Ustawienia"
39
 
40
+ #: classes/inspire/plugin4.php:388 flexible-shipping.php:421
41
  msgid "Docs"
42
  msgstr "Docs"
43
 
44
+ #: classes/inspire/plugin4.php:389 flexible-shipping.php:422
45
  msgid "Support"
46
  msgstr "Wsparcie"
47
 
50
  #: classes/settings-flexible-shipping.php:28
51
  #: classes/settings-shipping-method-form.php:35 classes/shipping_method.php:24
52
  #: classes/shipping_method.php:25 classes/shipping_method.php:43
53
+ #: flexible-shipping.php:303 flexible-shipping.php:306
54
+ #: flexible-shipping.php:309
55
  msgid "Flexible Shipping"
56
  msgstr "Flexible Shipping"
57
 
108
  "%sDodaj integrację%s z DHL, Paczkomaty InPost, eNadawca Poczta Polska, "
109
  "Paczka w Ruchu."
110
 
111
+ #: classes/settings-shipping-method-form.php:19 classes/shipping_method.php:811
112
  msgid "Free"
113
  msgstr "Bezpłatnie"
114
 
169
  msgstr "Suma"
170
 
171
  #: classes/settings-shipping-method-form.php:81
172
+ #: classes/views/html-shipping-method-settings.php:22
173
  msgid "Visibility"
174
  msgstr "Wyświetlanie"
175
 
176
  #: classes/settings-shipping-method-form.php:84
177
+ #: classes/views/html-shipping-method-settings.php:55
178
  msgid "Show only for logged in users"
179
  msgstr "Pokaż tylko dla zalogowanych użytkowników"
180
 
181
  #: classes/settings-shipping-method-form.php:87
182
+ #: classes/views/html-shipping-method-settings.php:23
183
  msgid "Default"
184
  msgstr "Domyślnie"
185
 
192
  "zamówienia."
193
 
194
  #: classes/settings-shipping-method-form.php:93
195
+ #: classes/views/html-shipping-method-settings.php:24
196
  msgid "Integration"
197
  msgstr "Integracja"
198
 
222
  msgid "Shipping Title"
223
  msgstr "Tytuł"
224
 
225
+ #: classes/shipping_method.php:112
226
  #: classes/views/html-shipping-method-rules.php:241
227
  msgid "Add New"
228
  msgstr "Dodaj nową"
229
 
230
+ #: classes/shipping_method.php:346
231
+ msgid ""
232
+ "Sorry, there has been an error. The CSV is invalid or incorrect file type."
233
+ msgstr ""
234
+ "Przepraszamy, wystąpił błąd. Plik CSV jest niepoprawny lub typ pliku jest "
235
+ "nieprawidłowy."
236
+
237
+ #: classes/shipping_method.php:356 classes/shipping_method.php:359
238
+ msgid "import"
239
+ msgstr "import"
240
+
241
+ #: classes/shipping_method.php:368
242
+ #, php-format
243
+ msgid "Free Shipping value %s is not valid number. Row number %d."
244
+ msgstr "Wartość darmowej wysyłki %s jest niepoprawna. Numer wiersza %d."
245
+
246
+ #: classes/shipping_method.php:374
247
+ #, php-format
248
+ msgid "Maximum Cost value %s is not valid number. Row number %d."
249
+ msgstr "Maksymalny koszt %s jest niepoprawny. Numer wiersza %d."
250
+
251
+ #: classes/shipping_method.php:385
252
+ #, php-format
253
+ msgid "Invalid value for Calculation Method in row number %d."
254
+ msgstr "Nieprawidłowa wartość dla Metody obliczania w wierszu %d."
255
+
256
+ #: classes/shipping_method.php:409
257
+ #, php-format
258
+ msgid "Invalid value for Based On in row number %d."
259
+ msgstr "Nieprawidłowa wartość dla Oparte na w wierszu %d."
260
+
261
+ #: classes/shipping_method.php:414
262
+ #, php-format
263
+ msgid "Min value %s is not valid number. Row number %d."
264
+ msgstr "Wartość Min %s jest niepoprawna. Numer wiersza %d."
265
+
266
+ #: classes/shipping_method.php:420
267
+ #, php-format
268
+ msgid "Max value %s is not valid number. Row number %d."
269
+ msgstr "Wartość Maks %s jest niepoprawna. Numer wiersza %d."
270
+
271
+ #: classes/shipping_method.php:426
272
+ #, php-format
273
+ msgid "Cost per order value %s is not valid number. Row number %d."
274
+ msgstr "Wartość Koszt na zamówienie %s jest niepoprawna. Numer wiersza %d."
275
+
276
+ #: classes/shipping_method.php:432
277
+ #, php-format
278
+ msgid "Additional cost value %s is not valid number. Row number %d."
279
+ msgstr "Wartość Dodatkowy koszt %s jest niepoprawna. Numer wiersza %d."
280
+
281
+ #: classes/shipping_method.php:438
282
+ #, php-format
283
+ msgid "Value value %s is not valid number. Row number %d."
284
+ msgstr "Wartość w polu Wartość %s jest niepoprawna. Numer wiersza %d."
285
+
286
+ #: classes/shipping_method.php:483
287
+ #, php-format
288
+ msgid "Shipping method %s imported as %s."
289
+ msgstr "Metoda wysyłki %s została zaimportowana jako %s."
290
+
291
+ #: classes/shipping_method.php:541
292
  msgid "New Shipping Method"
293
  msgstr "Nowa metoda wysyłki"
294
 
295
+ #: classes/shipping_method.php:544
296
  msgid "Edit Shipping Method"
297
  msgstr "Edytuj metodę wysyłki"
298
 
299
+ #: classes/shipping_method.php:554 classes/shipping_method.php:595
300
  #, php-format
301
  msgid "Shipping method %s added."
302
  msgstr "Metoda wysyłki dodana: %s."
303
 
304
+ #: classes/shipping_method.php:578
305
  #, php-format
306
  msgid "Shipping method %s deleted."
307
  msgstr "Metoda wysyłki usunięta: %s."
308
 
309
+ #: classes/shipping_method.php:581
310
  msgid "Shipping method not found."
311
  msgstr "Metoda wysyłki nie znaleziona."
312
 
313
+ #: classes/shipping_method.php:607
314
  #, php-format
315
  msgid "Shipping method %s updated."
316
  msgstr "Metoda wysyłki zaktualizowana: %s."
317
 
318
+ #: classes/views/html-ads.php:4
319
+ msgid "Get Flexible Shipping PRO!"
320
+ msgstr "Kup Flexible Shipping PRO!"
321
+
322
+ #: classes/views/html-ads.php:13
323
+ msgid "Shipping Classes support"
324
+ msgstr "Wsparcie klas wysyłkowych"
325
+
326
+ #: classes/views/html-ads.php:14
327
+ msgid "Product count based costs"
328
+ msgstr "Koszty oparte o liczbę produktów w koszyku"
329
+
330
+ #: classes/views/html-ads.php:15
331
+ msgid "Stopping a rule"
332
+ msgstr "Zatrzymywanie reguł"
333
+
334
+ #: classes/views/html-ads.php:16
335
+ msgid "Cancelling a rule"
336
+ msgstr "Anulowanie reguł"
337
+
338
+ #: classes/views/html-ads.php:17
339
+ msgid "Additional calculation methods (sum, lowest cost, highest cost)"
340
+ msgstr ""
341
+ "Dodatkowe rodzaje obliczania kosztów (suma, najniższy, najwyższy koszt reguł "
342
+ "spełniających warunki)"
343
+
344
+ #: classes/views/html-ads.php:20
345
+ msgid "Upgrade Now &rarr;"
346
+ msgstr "Zaktualizuj do wersji PRO &rarr;"
347
+
348
  #: classes/views/html-shipping-method-rules.php:8
349
  msgid "Price"
350
  msgstr "Cena"
412
  msgstr "Na pewno?"
413
 
414
  #: classes/views/html-shipping-method-rules.php:232
415
+ #: classes/views/html-shipping-method-settings.php:115
416
  msgid "Shipping Zones"
417
  msgstr "Strefy wysyłki"
418
 
419
+ #: classes/views/html-shipping-method-settings.php:20
420
  msgid "Title"
421
  msgstr "Tytuł"
422
 
423
+ #: classes/views/html-shipping-method-settings.php:21
424
  msgid "Enabled"
425
  msgstr "Włączona"
426
 
427
+ #: classes/views/html-shipping-method-settings.php:25
428
  msgid "Select all"
429
  msgstr "Zaznacz wszystkie"
430
 
431
+ #: classes/views/html-shipping-method-settings.php:48
432
+ #: classes/views/html-shipping-method-settings.php:55
433
+ #: classes/views/html-shipping-method-settings.php:62
434
  msgid "yes"
435
  msgstr "tak"
436
 
437
+ #: classes/views/html-shipping-method-settings.php:57
438
  msgid "Show for all users"
439
  msgstr "Pokaż dla wszystkich użytkowników"
440
 
441
+ #: classes/views/html-shipping-method-settings.php:78
442
  msgid ""
443
  "Drag and drop the above shipping methods to control their display order. "
444
  "Confirm by clicking Save changes button below."
446
  "Przeciągnij i upuść metody wysyłki aby ustawić ich kolejność wyświetlania. "
447
  "Potwierdź przez kliknięcie przycisku Zapisz zmiany poniżej."
448
 
449
+ #: classes/views/html-shipping-method-settings.php:83
450
  msgid "Remove selected"
451
  msgstr "Usuń zaznaczone"
452
 
453
+ #: classes/views/html-shipping-method-settings.php:87
454
+ msgid "Cancel import"
455
+ msgstr "Anuluj import"
456
+
457
+ #: classes/views/html-shipping-method-settings.php:88
458
+ #: classes/views/html-shipping-method-settings.php:89
459
+ msgid "Import"
460
+ msgstr "Importuj"
461
+
462
+ #: classes/views/html-shipping-method-settings.php:154
463
+ msgid "Please select shipping methods to remove"
464
+ msgstr "Prosze wybrać metody wysyłki do usunięcia."
465
+
466
+ #: classes/views/html-shipping-method-settings.php:186
467
+ msgid "Select file to import"
468
+ msgstr "Wybierz plik do importu"
469
+
470
+ #: flexible-shipping.php:346
471
  msgid ""
472
  "Flexible Shipping requires at least version 2.7 of Active Payments plugin."
473
  msgstr ""
474
  "Flexible Shipping wymaga wtyczki Aktywne płatności w wersji co najmniej 2.7."
475
 
476
+ #: flexible-shipping.php:357
477
  msgid "Flexible Shipping requires at least version 1.2 of eNadawca plugin."
478
  msgstr "Flexible Shipping wymaga wtyczki eNadawca w wersji co najmniej 1.2."
479
 
480
+ #: flexible-shipping.php:368
481
  msgid ""
482
  "Flexible Shipping requires at least version 1.1 of Paczka w Ruchu plugin."
483
  msgstr ""
484
  "Flexible Shipping wymaga wtyczki Paczka w Ruchu w wersji co najmniej 1.1."
485
 
486
+ #: flexible-shipping.php:376
487
  #, php-format
488
  msgid ""
489
  "You are using WooCommerce Flexible Shipping below 1.4. Please deactivate it "
494
  "Wyłącz go na %sstronie wtyczek%s. Przeczytaj o dużej zmianie we Flexible "
495
  "Shipping na %snaszym blogu →%s"
496
 
497
+ #: flexible-shipping.php:517
498
  #, php-format
499
  msgid "Redirecting. If page not redirects click %s here %s."
500
  msgstr ""
521
  msgid "https://www.wpdesk.net/"
522
  msgstr "https://www.wpdesk.pl/"
523
 
524
+ #~ msgid "Shipping method title is not set in row number %d."
525
+ #~ msgstr "Tytuł metody wysyłki nie został ustawiony w wierszu %d."
526
+
527
  #~ msgid "Minimum Order Amount"
528
  #~ msgstr "Minimalna wartość zamówienia"
529
 
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Flexible Shipping for WooCommerce ===
2
- Contributors: wpdesk, swoboda, jablonowski
3
  Donate link: https://www.wpdesk.net/products/flexible-shipping-pro-woocommerce/
4
- Tags: table rate, table rate shipping, woocommerce shipping, flexible shipping, woocommerce table rate shipping, cart total, weight shipping, weight based shipping, totals based shipping, order based shipping, shipping zones, shipping classes
5
  Requires at least: 4.0
6
- Tested up to: 4.7
7
- Stable tag: 1.7
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -43,6 +43,7 @@ These are just a few examples. The possibilities are probably endless ;) We desc
43
  * Integrations (see below for details)
44
  * Compatible with WooCommerce 2.6 Shipping Zones (see below for details)
45
  * WPML and Polylang support
 
46
 
47
  = PRO Features =
48
 
@@ -55,6 +56,7 @@ These are just a few examples. The possibilities are probably endless ;) We desc
55
  * Additional calculation methods (sum, lowest cost, highest cost)
56
  * Maximum shipping cost per shipping method
57
  * Coupons support for free shipping
 
58
 
59
  [Upgrade to PRO Now &rarr;](https://www.wpdesk.net/products/flexible-shipping-pro-woocommerce/)
60
 
@@ -68,7 +70,9 @@ The Location Based Shipping Add-On extends Flexible Shipping for WooCommerce wit
68
 
69
  **WooCommerce 2.6 ready!** Flexible Shipping is compatible with WooCommerce Shipping Zones introduced in version 2.6. Read more about [WooCommerce Shipping Zones](https://www.wpdesk.net/blog/woocommerce-shipping-zones-explained/).
70
 
71
- Flexible Shipping also plays well with older versions of WooCommerce. We tested the plugin with WooCommerce 2.3.x and up.
 
 
72
 
73
  = Docs =
74
 
@@ -92,6 +96,13 @@ There are several integrations that we provide for Flexible Shipping in Poland:
92
  > **Get more WooCommerce plugins from WP Desk**<br />
93
  > We provide premium plugins for customizing checkout, shipping, invoicing and more. Check out our [premium WooCommerce plugins here →](https://www.wpdesk.net/products/)
94
 
 
 
 
 
 
 
 
95
  == Installation ==
96
 
97
  You can install this plugin like any other WordPress plugin.
@@ -114,7 +125,7 @@ We provide a limited support for the free version in the [plugin Support Forum](
114
 
115
  == Screenshots ==
116
 
117
- 1. Main Settings in WooCommerce 2.5 and below.
118
  2. Main Settings in WooCommerce 2.6.
119
  3. Shipping Methods list.
120
  4. Add/Edit Shipping Method.
@@ -126,6 +137,14 @@ If you are upgrading from the old Flexible Shipping version (1.3.2, woo-flexible
126
 
127
  == Changelog ==
128
 
 
 
 
 
 
 
 
 
129
  = 1.7 - 2016-12-14 =
130
  * Added WPML and Polylang support
131
  * Added custom "free shipping" label
1
  === Flexible Shipping for WooCommerce ===
2
+ Contributors: wpdesk, swoboda, jablonowski, byisk
3
  Donate link: https://www.wpdesk.net/products/flexible-shipping-pro-woocommerce/
4
+ Tags: table rate, table rate shipping, woocommerce shipping, flexible shipping, woocommerce table rate shipping, cart based shipping, weight shipping, weight based shipping, totals based shipping, order based shipping, shipping zones, shipping classes
5
  Requires at least: 4.0
6
+ Tested up to: 4.7.1
7
+ Stable tag: 1.8
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
43
  * Integrations (see below for details)
44
  * Compatible with WooCommerce 2.6 Shipping Zones (see below for details)
45
  * WPML and Polylang support
46
+ * CSV Import
47
 
48
  = PRO Features =
49
 
56
  * Additional calculation methods (sum, lowest cost, highest cost)
57
  * Maximum shipping cost per shipping method
58
  * Coupons support for free shipping
59
+ * CSV Export
60
 
61
  [Upgrade to PRO Now &rarr;](https://www.wpdesk.net/products/flexible-shipping-pro-woocommerce/)
62
 
70
 
71
  **WooCommerce 2.6 ready!** Flexible Shipping is compatible with WooCommerce Shipping Zones introduced in version 2.6. Read more about [WooCommerce Shipping Zones](https://www.wpdesk.net/blog/woocommerce-shipping-zones-explained/).
72
 
73
+ Flexible Shipping also plays well with older versions of WooCommerce. We tested the plugin with WooCommerce 2.5.x.
74
+
75
+ We dropped support for WooCommerce 2.3 and 2.4 in Flexible Shipping 1.8. Older versions of Flexible Shipping work with 2.3 and 2.4.
76
 
77
  = Docs =
78
 
96
  > **Get more WooCommerce plugins from WP Desk**<br />
97
  > We provide premium plugins for customizing checkout, shipping, invoicing and more. Check out our [premium WooCommerce plugins here →](https://www.wpdesk.net/products/)
98
 
99
+ = Supported Currency Switchers =
100
+
101
+ * Aelia Currency Switcher
102
+ * Multi Currency Store
103
+ * WooCommerce Currency Switcher
104
+ * WPML
105
+
106
  == Installation ==
107
 
108
  You can install this plugin like any other WordPress plugin.
125
 
126
  == Screenshots ==
127
 
128
+ 1. Main Settings in WooCommerce 2.5.
129
  2. Main Settings in WooCommerce 2.6.
130
  3. Shipping Methods list.
131
  4. Add/Edit Shipping Method.
137
 
138
  == Changelog ==
139
 
140
+ = 1.8 - 2017-01-24 =
141
+ * Added CSV import for shipping methods including rules
142
+ * Added WooCommerce Currency Switcher support
143
+ * Added shipping classes support in WPML
144
+ * Changed cart weight calculting to WC()->cart->cart_contents_weight
145
+ * Dropped support for WooCommerce 2.4 and lower
146
+ * Removed Enable checkbox in general settings
147
+
148
  = 1.7 - 2016-12-14 =
149
  * Added WPML and Polylang support
150
  * Added custom "free shipping" label