Flexible Shipping for WooCommerce - Version 4.11.9

Version Description

  • 2022-06-02 =
  • Fixed notice on bulk labels, when no labels available
  • Fixed escaping in group Shipping Methods
Download this release

Release Info

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

Code changes from version 4.11.8 to 4.11.9

classes/table-rate/bulk-actions.php CHANGED
@@ -458,7 +458,7 @@ class WPDesk_Flexible_Shipping_Bulk_Actions implements Hookable {
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' ) ) // phpcs:ignore
462
  );
463
  } else {
464
  $labels = $this->get_session()->get( 'flexible_shipping_bulk_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' );
classes/table-rate/shipping-method.php CHANGED
@@ -192,7 +192,7 @@ class WPDesk_Flexible_Shipping extends WC_Shipping_Method {
192
  ?>
193
  <h3 class="wc-settings-sub-title <?php echo esc_attr( $data['class'] ); ?>" id="<?php echo esc_attr( $field ); ?>"><?php echo wp_kses_post( $data['title'] ); ?>
194
  <?php if ( $this->is_allowed_editing() ): ?>
195
- <a href="<?php echo remove_query_arg( 'added', add_query_arg( 'action', 'new' ) ); ?>"
196
  class="add-new-h2"><?php echo __( 'Add New', 'flexible-shipping' ); ?></a></h3>
197
  <?php endif; ?>
198
 
192
  ?>
193
  <h3 class="wc-settings-sub-title <?php echo esc_attr( $data['class'] ); ?>" id="<?php echo esc_attr( $field ); ?>"><?php echo wp_kses_post( $data['title'] ); ?>
194
  <?php if ( $this->is_allowed_editing() ): ?>
195
+ <a href="<?php echo esc_url( remove_query_arg( 'added', add_query_arg( 'action', 'new' ) ) ); ?>"
196
  class="add-new-h2"><?php echo __( 'Add New', 'flexible-shipping' ); ?></a></h3>
197
  <?php endif; ?>
198
 
classes/table-rate/views/html-shipping-method-settings.php CHANGED
@@ -1,199 +1,230 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
2
- <tr valign="top">
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>
10
  <th class="sort">&nbsp;</th>
11
- <th class="title"><?php _e( 'Title', 'flexible-shipping' ); ?></th>
12
- <th class="status"><?php _e( 'Enabled', 'flexible-shipping' ); ?></th>
13
- <th class="visibility"><?php _e( 'Visibility', 'flexible-shipping' ); ?></th>
14
- <th class="default"><?php _e( 'Default', 'flexible-shipping' ); ?></th>
15
- <th class="integration"><?php _e( 'Integration', 'flexible-shipping' ); ?></th>
16
- <th class="select"><input type="checkbox" class="tips checkbox-select-all" value="1" data-tip="<?php _e( 'Select all', 'flexible-shipping' ); ?>" /></th>
 
 
 
17
  </tr>
18
- </thead>
19
- <tbody>
20
- <?php if ( isset( $shipping_method_order ) && is_array( $shipping_method_order ) ) : ?>
21
- <?php foreach ( $shipping_method_order as $shipping_method_id ) : $shipping_method = $shipping_methods[$shipping_method_id]; ?>
22
- <?php $tr_class = ''; ?>
23
- <?php if ( isset( $_GET['added'] ) && sanitize_key( $_GET['added'] ) == $shipping_method_id ) $tr_class = 'highlight'; ?>
24
- <?php if ( isset( $_GET['updated'] ) && sanitize_key( $_GET['updated'] ) == $shipping_method_id ) $tr_class = 'highlight'; ?>
25
- <tr id="method_<?php echo $shipping_method_id; ?>" class="<?php echo $tr_class; ?>">
26
- <td width="1%" class="sort">
27
- <input type="hidden" name="method_order[<?php echo esc_attr( $shipping_method['id'] ); ?>]" value="<?php echo esc_attr( $shipping_method['id'] ); ?>" />
28
- </td>
29
- <td class="title">
30
- <a data-qa-id="shipping-method-<?php echo esc_attr( $shipping_method['method_title'] ); ?>" href="<?php echo add_query_arg( 'method_id' , $shipping_method_id, add_query_arg( 'action', 'edit' ) ); ?>">
31
- <strong><?php echo esc_html( $shipping_method['method_title'] ); ?></strong>
32
- </a>
33
- <?php if ( isset( $shipping_method['method_description'] ) && $shipping_method['method_description'] != '' ) : ?>
34
- (<?php echo esc_html( $shipping_method['method_description'] ); ?>)
35
- <?php endif; ?>
36
- </td>
37
- <td width="1%" class="status">
38
- <?php if ( isset($shipping_method['method_enabled']) && 'yes' === $shipping_method['method_enabled'] ) : ?>
39
- <span class="status-enabled tips" data-tip="<?php _e( 'yes', 'flexible-shipping' ); ?>"><?php _e( 'yes', 'flexible-shipping' ); ?></span>
40
- <?php else : ?>
41
- <span class="na">-</span>
42
- <?php endif; ?>
43
- </td>
44
- <td width="1%" class="default visibility">
45
- <?php if ( isset( $shipping_method['method_visibility'] ) && 'yes' === $shipping_method['method_visibility'] ) : ?>
46
- <span class="status-enabled tips" data-tip="<?php _e( 'Show only for logged in users', 'flexible-shipping' ); ?>"><?php _e( 'yes', 'flexible-shipping' ); ?></span>
47
- <?php else : ?>
48
- <span class="na tips" data-tip="<?php _e( 'Show for all users', 'flexible-shipping' ); ?>">-</span>
49
- <?php endif; ?>
50
- </td>
51
- <td width="1%" class="default">
52
- <?php if ( 'yes' === $shipping_method['method_default'] ) : ?>
53
- <span class="status-enabled tips" data-tip="<?php _e( 'yes', 'flexible-shipping' ); ?>"><?php _e( 'yes', 'flexible-shipping' ); ?></span>
54
- <?php else : ?>
55
- <span class="na">-</span>
56
- <?php endif; ?>
57
- </td>
58
- <?php echo apply_filters( 'flexible_shipping_method_integration_col', '<td width="1%" class="integration default">-</td>', $shipping_method );?>
59
- <td width="1%" class="select" nowrap>
60
- <input type="checkbox" class="tips checkbox-select" value="<?php echo esc_attr( $shipping_method['id'] ); ?>" data-tip="<?php echo esc_html( $shipping_method['method_title'] ); ?>" />
61
- </td>
62
- </tr>
63
- <?php endforeach; ?>
64
- <?php endif; ?>
65
- </tbody>
66
- <tfoot>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  <tr>
68
  <th>&nbsp;</th>
69
- <th colspan="8"><span class="description"><?php _e( 'Drag and drop the above shipment methods to control their display order. Confirm by clicking Save changes button below.', 'flexible-shipping' ); ?></span></th>
 
 
70
  </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,.json" />
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 isset( $_GET['instance_id'] ) ? sanitize_key( $_GET['instance_id'] ) : '1'; ?>" 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 isset( $_GET['instance_id'] ) ? sanitize_key( $_GET['instance_id'] ) : '1'; ?>" 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>
87
- </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
 
89
- <?php echo $this->get_description_html( $data ); ?>
90
- </fieldset>
91
- </td>
92
- </tr>
93
- <script type="text/javascript">
94
- <?php
95
- if( version_compare( WC()->version, '2.6.0', ">=" ) ) :
96
- ?>
97
- <?php
98
- $zone = WC_Shipping_Zones::get_zone_by( 'instance_id', sanitize_key( $_GET['instance_id'] ) );
99
- $shipping_method_woo = WC_Shipping_Zones::get_shipping_method( sanitize_key( $_GET['instance_id'] ) );
100
- $content = '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping' ) . '">' . __( 'Shipping Zones', 'woocommerce' ) . '</a> &gt ';
101
- $content .= '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping&zone_id=' . absint( $zone->get_id() ) ) . '">' . esc_html( $zone->get_zone_name() ) . '</a> &gt';
102
- $content .= esc_html( $shipping_method_woo->get_title() );
103
- ?>
104
- jQuery('#mainform h2').first().replaceWith( '<h2>' + '<?php echo $content; ?>' + '</h2>' );
105
 
106
- <?php
107
- global $wp;
108
- $current_url = 'admin.php?page=wc-settings&tab=shipping&instance_id=' . sanitize_key( $_GET['instance_id'] );
109
- ?>
110
 
111
- jQuery('#mainform').attr('action', '<?php echo $current_url; ?>' );
112
- <?php
113
- endif;
114
- ?>
 
 
 
115
 
116
- jQuery("input.checkbox-select-all").click(function(){
117
- if ( jQuery(this).is(':checked') ) {
118
- jQuery('input.checkbox-select').prop('checked', true);
119
- }
120
- else {
121
- jQuery('input.checkbox-select').prop('checked', false);
122
- }
123
- })
124
 
125
- /**
126
- * Enable Bulk Action Buttons when at least one Shipping Method is selected
127
- *
128
- */
129
- jQuery( '.flexible_shipping_methods input[type="checkbox"]' ).click( function() {
130
- jQuery( '#flexible_shipping_export_selected, #flexible_shipping_remove_selected' ).attr( 'disabled', ! jQuery( '.flexible_shipping_methods td input[type="checkbox"]' ).is( ':checked' ) );
131
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
 
133
- jQuery('#flexible_shipping_remove_selected').click(function(){
134
- var url = '<?php echo add_query_arg( 'methods_id' , '', add_query_arg( 'action', 'delete' ) ); ?>';
135
- var first = true;
136
- jQuery('input.checkbox-select').each(function(){
137
- if ( jQuery(this).is(':checked')) {
138
- if ( !first ) {
139
- url = url + ',';
140
- }
141
- else {
142
- url = url + '=';
143
- }
144
- url = url + jQuery(this).val();
145
- first = false;
146
- }
147
- })
148
- if ( first ) {
149
- alert( '<?php _e( 'Please select shipment methods to remove', 'flexible-shipping' ); ?>' );
150
- return false;
151
- }
152
- if ( url != '<?php echo add_query_arg( 'method_id' , '', add_query_arg( 'action', 'delete' ) ); ?>' ) {
153
- jQuery('#flexible_shipping_remove_selected').prop('disabled',true);
154
- jQuery('.woocommerce-save-button').prop('disabled',true);
155
- window.location.href = url;
156
- }
157
- return false;
158
- })
159
 
160
- jQuery('#flexible_shipping_import').click(function(){
161
- jQuery(this).hide();
162
- jQuery('#flexible_shipping_do_import').show();
163
- jQuery('#flexible_shipping_import_file').show();
164
- jQuery('#flexible_shipping_import_cancel').show();
165
- jQuery('input[name=save]').prop('disabled',true);
166
- return false;
167
- })
168
 
169
- jQuery('#flexible_shipping_import_cancel').click(function(){
170
- jQuery(this).hide();
171
- jQuery('#flexible_shipping_do_import').hide();
172
- jQuery('#flexible_shipping_import_file').hide();
173
- jQuery('#flexible_shipping_import_cancel').hide();
174
- jQuery('#flexible_shipping_import').show();
175
- jQuery('input[name=save]').prop('disabled',false);
176
- return false;
177
- })
178
 
179
- jQuery('#flexible_shipping_do_import').click(function(){
180
- if ( jQuery('#flexible_shipping_import_file').val() == '' ) {
181
- alert('<?php _e( 'Select file to import', 'flexible-shipping' ); ?>');
182
- return false;
183
- }
184
- jQuery('#flexible_shipping_import_action').val('1');
185
- jQuery('input[name=save]').prop('disabled',false);
186
- jQuery('.woocommerce-save-button').click();
187
- return false;
188
- })
189
 
190
- <?php
191
- if ( isset( $_POST['import_action'] ) && sanitize_key( $_POST['import_action'] ) == '1' ) {
192
- ?>
193
- jQuery('.updated.inline:lt(1)').hide();
194
- jQuery('.updated.inline:lt(2)').hide();
195
- <?php
196
- }
197
- ?>
198
- </script>
199
  <?php
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ exit;
3
+ } ?>
4
+ <tr valign="top">
5
+ <td class="forminp" style="padding-left:0;padding-right:0;">
6
+ <fieldset>
7
+ <legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend>
8
 
9
+ <table class="flexible_shipping_methods wc_shipping widefat wp-list-table" cellspacing="0">
10
+ <thead>
11
  <tr>
12
  <th class="sort">&nbsp;</th>
13
+ <th class="title"><?php esc_html_e( 'Title', 'flexible-shipping' ); ?></th>
14
+ <th class="status"><?php esc_html_e( 'Enabled', 'flexible-shipping' ); ?></th>
15
+ <th class="visibility"><?php esc_html_e( 'Visibility', 'flexible-shipping' ); ?></th>
16
+ <th class="default"><?php esc_html_e( 'Default', 'flexible-shipping' ); ?></th>
17
+ <th class="integration"><?php esc_html_e( 'Integration', 'flexible-shipping' ); ?></th>
18
+ <th class="select check-column"><input type="checkbox" class="tips checkbox-select-all"
19
+ value="1"
20
+ data-tip="<?php esc_attr_e( 'Select all', 'flexible-shipping' ); ?>"/>
21
+ </th>
22
  </tr>
23
+ </thead>
24
+ <tbody>
25
+ <?php if ( isset( $shipping_method_order ) && is_array( $shipping_method_order ) ) : ?>
26
+ <?php foreach ( $shipping_method_order as $shipping_method_id ) : ?>
27
+ <?php $shipping_method = $shipping_methods[ $shipping_method_id ]; ?>
28
+ <?php $tr_class = ''; ?>
29
+ <?php
30
+ if ( isset( $_GET['added'] ) && sanitize_key( $_GET['added'] ) == $shipping_method_id ) {
31
+ $tr_class = 'highlight';
32
+ }
33
+ if ( isset( $_GET['updated'] ) && sanitize_key( $_GET['updated'] ) == $shipping_method_id ) {
34
+ $tr_class = 'highlight';
35
+ }
36
+ ?>
37
+ <tr id="method_<?php echo esc_attr( $shipping_method_id ); ?>" class="<?php echo esc_attr( $tr_class ); ?>">
38
+ <td width="1%" class="sort">
39
+ <input type="hidden"
40
+ name="method_order[<?php echo esc_attr( $shipping_method['id'] ); ?>]"
41
+ value="<?php echo esc_attr( $shipping_method['id'] ); ?>"/>
42
+ </td>
43
+ <td class="title">
44
+ <a data-qa-id="shipping-method-<?php echo esc_attr( $shipping_method['method_title'] ); ?>"
45
+ href="<?php echo esc_url( add_query_arg( 'method_id', $shipping_method_id, add_query_arg( 'action', 'edit' ) ) ); ?>">
46
+ <strong><?php echo esc_html( $shipping_method['method_title'] ); ?></strong>
47
+ </a>
48
+ <?php if ( isset( $shipping_method['method_description'] ) && $shipping_method['method_description'] != '' ) : ?>
49
+ (<?php echo esc_html( $shipping_method['method_description'] ); ?>)
50
+ <?php endif; ?>
51
+ </td>
52
+ <td width="1%" class="status">
53
+ <?php if ( isset( $shipping_method['method_enabled'] ) && 'yes' === $shipping_method['method_enabled'] ) : ?>
54
+ <span class="status-enabled tips"
55
+ data-tip="<?php esc_attr_e( 'yes', 'flexible-shipping' ); ?>"><?php esc_html_e( 'yes', 'flexible-shipping' ); ?></span>
56
+ <?php else : ?>
57
+ <span class="na">-</span>
58
+ <?php endif; ?>
59
+ </td>
60
+ <td width="1%" class="default visibility">
61
+ <?php if ( isset( $shipping_method['method_visibility'] ) && 'yes' === $shipping_method['method_visibility'] ) : ?>
62
+ <span class="status-enabled tips"
63
+ data-tip="<?php esc_attr_e( 'Show only for logged in users', 'flexible-shipping' ); ?>"><?php esc_html_e( 'yes', 'flexible-shipping' ); ?></span>
64
+ <?php else : ?>
65
+ <span class="na tips"
66
+ data-tip="<?php esc_attr_e( 'Show for all users', 'flexible-shipping' ); ?>">-</span>
67
+ <?php endif; ?>
68
+ </td>
69
+ <td width="1%" class="default">
70
+ <?php if ( 'yes' === $shipping_method['method_default'] ) : ?>
71
+ <span class="status-enabled tips"
72
+ data-tip="<?php esc_attr_e( 'yes', 'flexible-shipping' ); ?>"><?php esc_html_e( 'yes', 'flexible-shipping' ); ?></span>
73
+ <?php else : ?>
74
+ <span class="na">-</span>
75
+ <?php endif; ?>
76
+ </td>
77
+ <?php echo wp_kses_post( apply_filters( 'flexible_shipping_method_integration_col', '<td width="1%" class="integration default">-</td>', $shipping_method ) ); ?>
78
+ <td width="1%" class="select check-column" nowrap>
79
+ <input type="checkbox" class="tips checkbox-select"
80
+ value="<?php echo esc_attr( $shipping_method['id'] ); ?>"
81
+ data-tip="<?php echo esc_html( $shipping_method['method_title'] ); ?>"/>
82
+ </td>
83
+ </tr>
84
+ <?php endforeach; ?>
85
+ <?php endif; ?>
86
+ </tbody>
87
+ <tfoot>
88
  <tr>
89
  <th>&nbsp;</th>
90
+ <th colspan="8"><span
91
+ class="description"><?php esc_html_e( 'Drag and drop the above shipment methods to control their display order. Confirm by clicking Save changes button below.', 'flexible-shipping' ); ?></span>
92
+ </th>
93
  </tr>
94
+ <tr>
95
+ <th>&nbsp;</th>
96
+ <th colspan="8">
97
+ <button id="flexible_shipping_remove_selected" class="button"
98
+ disabled><?php esc_html_e( 'Remove selected', 'flexible-shipping' ); ?></button>
99
+ <div class="flexilble_shipping_export_import">
100
+ <input id="flexible_shipping_import_file" type="file" name="import_file"
101
+ style="display:none;" accept=".csv,.json"/>
102
+ <input id="flexible_shipping_import_action" type="hidden" name="import_action"
103
+ value="0"/>
104
+ <button id="flexible_shipping_import_cancel" class="button"
105
+ style="display:none;"><?php esc_html_e( 'Cancel import', 'flexible-shipping' ); ?></button>
106
+ <input id="flexible_shipping_do_import" style="display:none;"
107
+ class="button button-primary"
108
+ data-instance-id="<?php echo esc_attr( isset( $_GET['instance_id'] ) ? sanitize_key( $_GET['instance_id'] ) : '1' ); ?>"
109
+ data-nonce="<?php echo esc_attr( wp_create_nonce( 'flexible_shipping' ) ); ?>" type="submit"
110
+ value="<?php esc_attr_e( 'Import', 'flexible-shipping' ); ?>"/>
111
+ <button id="flexible_shipping_import" class="button"
112
+ data-instance-id="<?php isset( $_GET['instance_id'] ) ? sanitize_key( $_GET['instance_id'] ) : '1'; ?>"
113
+ data-nonce="<?php echo esc_attr( wp_create_nonce( 'flexible_shipping' ) ); ?>"><?php esc_html_e( 'Import', 'flexible-shipping' ); ?></button>
114
+ <?php do_action( 'flexible_shipping_actions_row' ); ?>
115
+ </div>
116
+ <div style="clear:both;"></div>
117
+ </th>
118
+ </tr>
119
+ </tfoot>
120
+ </table>
121
+
122
+ <?php echo wp_kses_post( $this->get_description_html( $data ) ); ?>
123
+ </fieldset>
124
+ </td>
125
+ </tr>
126
+ <script type="text/javascript">
127
+ <?php
128
+ if ( version_compare( WC()->version, '2.6.0', '>=' ) ) :
129
+ $zone = WC_Shipping_Zones::get_zone_by( 'instance_id', sanitize_key( $_GET['instance_id'] ) );
130
+ $shipping_method_woo = WC_Shipping_Zones::get_shipping_method( sanitize_key( $_GET['instance_id'] ) );
131
+ $content = '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping' ) . '">' . __( 'Shipping Zones', 'flexible-shipping' ) . '</a> > ';
132
+ $content .= '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping&zone_id=' . absint( $zone->get_id() ) ) . '">' . esc_html( $zone->get_zone_name() ) . '</a> >';
133
+ $content .= esc_html( $shipping_method_woo->get_title() );
134
+ ?>
135
+ jQuery('#mainform h2').first().replaceWith('<h2>' + '<?php echo wp_kses_post( $content ); ?>' + '</h2>');
136
 
137
+ <?php
138
+ global $wp;
139
+ $current_url = 'admin.php?page=wc-settings&tab=shipping&instance_id=' . sanitize_key( $_GET['instance_id'] );
140
+ ?>
 
 
 
 
 
 
 
 
 
 
 
 
141
 
142
+ jQuery('#mainform').attr('action', '<?php echo esc_url( $current_url ); ?>');
143
+ <?php
144
+ endif;
145
+ ?>
146
 
147
+ jQuery("input.checkbox-select-all").click(function () {
148
+ if (jQuery(this).is(':checked')) {
149
+ jQuery('input.checkbox-select').prop('checked', true);
150
+ } else {
151
+ jQuery('input.checkbox-select').prop('checked', false);
152
+ }
153
+ })
154
 
155
+ /**
156
+ * Enable Bulk Action Buttons when at least one Shipping Method is selected
157
+ *
158
+ */
159
+ jQuery('.flexible_shipping_methods input[type="checkbox"]').click(function () {
160
+ jQuery('#flexible_shipping_export_selected, #flexible_shipping_remove_selected').attr('disabled', !jQuery('.flexible_shipping_methods td input[type="checkbox"]').is(':checked'));
161
+ });
 
162
 
163
+ jQuery('#flexible_shipping_remove_selected').click(function () {
164
+ var empty_url = '<?php echo add_query_arg( 'methods_id', '', add_query_arg( 'action', 'delete', admin_url( 'admin.php?page=wc-settings&tab=shipping&instance_id=' . sanitize_key( $_GET['instance_id'] ) ) ) ); // phpcs:ignore ?>';
165
+ var url = empty_url;
166
+ var first = true;
167
+ jQuery('input.checkbox-select').each(function () {
168
+ if (jQuery(this).is(':checked')) {
169
+ if (!first) {
170
+ url = url + ',';
171
+ } else {
172
+ url = url + '=';
173
+ }
174
+ url = url + jQuery(this).val();
175
+ first = false;
176
+ }
177
+ })
178
+ if (first) {
179
+ alert('<?php esc_attr_e( 'Please select shipment methods to remove', 'flexible-shipping' ); ?>');
180
+ return false;
181
+ }
182
+ if (url !== empty_url) {
183
+ jQuery('#flexible_shipping_remove_selected').prop('disabled', true);
184
+ jQuery('.woocommerce-save-button').prop('disabled', true);
185
 
186
+ window.location.href = url;
187
+ }
188
+ return false;
189
+ })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
 
191
+ jQuery('#flexible_shipping_import').click(function () {
192
+ jQuery(this).hide();
193
+ jQuery('#flexible_shipping_do_import').show();
194
+ jQuery('#flexible_shipping_import_file').show();
195
+ jQuery('#flexible_shipping_import_cancel').show();
196
+ jQuery('input[name=save]').prop('disabled', true);
197
+ return false;
198
+ })
199
 
200
+ jQuery('#flexible_shipping_import_cancel').click(function () {
201
+ jQuery(this).hide();
202
+ jQuery('#flexible_shipping_do_import').hide();
203
+ jQuery('#flexible_shipping_import_file').hide();
204
+ jQuery('#flexible_shipping_import_cancel').hide();
205
+ jQuery('#flexible_shipping_import').show();
206
+ jQuery('input[name=save]').prop('disabled', false);
207
+ return false;
208
+ })
209
 
210
+ jQuery('#flexible_shipping_do_import').click(function () {
211
+ if (jQuery('#flexible_shipping_import_file').val() == '') {
212
+ alert('<?php esc_attr_e( 'Select file to import', 'flexible-shipping' ); ?>');
213
+ return false;
214
+ }
215
+ jQuery('#flexible_shipping_import_action').val('1');
216
+ jQuery('input[name=save]').prop('disabled', false);
217
+ jQuery('.woocommerce-save-button').click();
218
+ return false;
219
+ })
220
 
221
+ <?php
222
+ if ( isset( $_POST['import_action'] ) && sanitize_key( $_POST['import_action'] ) == '1' ) { // phpcs:ignore
223
+ ?>
224
+ jQuery('.updated.inline:lt(1)').hide();
225
+ jQuery('.updated.inline:lt(2)').hide();
226
+ <?php
227
+ }
228
+ ?>
229
+ </script>
230
  <?php
flexible-shipping.php CHANGED
@@ -3,8 +3,8 @@
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.11.8
7
- * Author: WP Desk
8
  * Author URI: https://octol.io/fs-author
9
  * Text Domain: flexible-shipping
10
  * Domain Path: /lang/
@@ -38,7 +38,7 @@ if ( ! defined( 'ABSPATH' ) ) {
38
  } // Exit if accessed directly
39
 
40
  /* THIS VARIABLE CAN BE CHANGED AUTOMATICALLY */
41
- $plugin_version = '4.11.8';
42
 
43
  $plugin_name = 'Flexible Shipping';
44
  $product_id = 'Flexible Shipping';
3
  * Plugin Name: Flexible Shipping
4
  * Plugin URI: https://wordpress.org/plugins/flexible-shipping/
5
  * Description: Create additional shipment methods in WooCommerce and enable pricing based on cart weight or total.
6
+ * Version: 4.11.9
7
+ * Author: Octolize
8
  * Author URI: https://octol.io/fs-author
9
  * Text Domain: flexible-shipping
10
  * Domain Path: /lang/
38
  } // Exit if accessed directly
39
 
40
  /* THIS VARIABLE CAN BE CHANGED AUTOMATICALLY */
41
+ $plugin_version = '4.11.9';
42
 
43
  $plugin_name = 'Flexible Shipping';
44
  $product_id = 'Flexible Shipping';
inc/functions.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  function flexible_shipping_get_all_shipping_methods() {
4
  $all_shipping_methods = WC()->shipping()->load_shipping_methods();
 
5
  return $all_shipping_methods;
6
  }
7
 
@@ -27,6 +28,7 @@ function flexible_shipping_method_selected_in_cart( $shipping_method_integration
27
  }
28
  }
29
  }
 
30
  return false;
31
  }
32
 
@@ -34,7 +36,7 @@ function flexible_shipping_method_selected( $order, $shipping_method_integration
34
  if ( is_numeric( $order ) ) {
35
  $order = wc_get_order( $order );
36
  }
37
- $shippings = $order->get_shipping_methods();
38
  $all_shipping_methods = flexible_shipping_get_all_shipping_methods();
39
  if ( isset( $all_shipping_methods['flexible_shipping'] ) ) {
40
  $flexible_shipping_rates = $all_shipping_methods['flexible_shipping']->get_all_rates();
@@ -47,6 +49,7 @@ function flexible_shipping_method_selected( $order, $shipping_method_integration
47
  }
48
  }
49
  }
 
50
  return false;
51
  }
52
 
@@ -54,53 +57,64 @@ function flexible_shipping_get_integration_for_method( $method_id ) {
54
  $all_shipping_methods = flexible_shipping_get_all_shipping_methods();
55
  if ( isset( $all_shipping_methods['flexible_shipping'] ) ) {
56
  $flexible_shipping_rates = $all_shipping_methods['flexible_shipping']->get_all_rates();
57
- if ( isset( $flexible_shipping_rates[$method_id] ) ) {
58
- return $flexible_shipping_rates[$method_id]['method_integration'];
59
  }
60
  }
 
61
  return false;
62
  }
63
 
64
- if ( !function_exists('wpdesk_redirect') ) {
65
  function wpdesk_redirect( $redirect ) {
66
- if ( 1==1 && headers_sent() ) {
67
  ?>
68
- <span><?php printf( __( 'Redirecting. If page not redirects click %s here %s.', 'flexible-shipping'), '<a href="' . $redirect . '" >', '</a>' ); ?></span>
69
-
 
 
 
 
 
 
 
 
 
 
70
  <script>
71
- parent.location.replace('<?php echo $redirect; ?>');
72
  </script>
73
  <?php
74
- }
75
- else {
76
- wp_safe_redirect($redirect);
77
  }
78
  exit;
79
  }
80
  }
81
 
82
- if ( !function_exists( 'wpdesk__' ) ) {
83
  function wpdesk__( $text, $domain ) {
84
  if ( function_exists( 'pll__' ) ) {
85
  return pll__( $text );
86
  }
87
- return __( $text, $domain );
 
88
  }
89
  }
90
 
91
- if ( !function_exists( 'wpdesk__e' ) ) {
92
  function wpdesk__e( $text, $domain ) {
93
- echo wpdesk__( $text, $domain );
94
  }
95
  }
96
 
97
 
98
- if ( !function_exists( 'wpdesk_is_plugin_active' ) ) {
99
  function wpdesk_is_plugin_active( $plugin_file ) {
100
- $active_plugins = (array) get_option( 'active_plugins', array() );
101
 
102
  if ( is_multisite() ) {
103
- $active_plugins = array_merge( $active_plugins, get_site_option( 'active_sitewide_plugins', array() ) );
104
  }
105
 
106
  return in_array( $plugin_file, $active_plugins ) || array_key_exists( $plugin_file, $active_plugins );
2
 
3
  function flexible_shipping_get_all_shipping_methods() {
4
  $all_shipping_methods = WC()->shipping()->load_shipping_methods();
5
+
6
  return $all_shipping_methods;
7
  }
8
 
28
  }
29
  }
30
  }
31
+
32
  return false;
33
  }
34
 
36
  if ( is_numeric( $order ) ) {
37
  $order = wc_get_order( $order );
38
  }
39
+ $shippings = $order->get_shipping_methods();
40
  $all_shipping_methods = flexible_shipping_get_all_shipping_methods();
41
  if ( isset( $all_shipping_methods['flexible_shipping'] ) ) {
42
  $flexible_shipping_rates = $all_shipping_methods['flexible_shipping']->get_all_rates();
49
  }
50
  }
51
  }
52
+
53
  return false;
54
  }
55
 
57
  $all_shipping_methods = flexible_shipping_get_all_shipping_methods();
58
  if ( isset( $all_shipping_methods['flexible_shipping'] ) ) {
59
  $flexible_shipping_rates = $all_shipping_methods['flexible_shipping']->get_all_rates();
60
+ if ( isset( $flexible_shipping_rates[ $method_id ] ) ) {
61
+ return $flexible_shipping_rates[ $method_id ]['method_integration'];
62
  }
63
  }
64
+
65
  return false;
66
  }
67
 
68
+ if ( ! function_exists( 'wpdesk_redirect' ) ) {
69
  function wpdesk_redirect( $redirect ) {
70
+ if ( headers_sent() ) {
71
  ?>
72
+ <span>
73
+ <?php
74
+ echo wp_kses_post(
75
+ sprintf(
76
+ // Translators: redirect URL.
77
+ __( 'Redirecting. If page not redirects click %1$s here %2$s.', 'flexible-shipping' ),
78
+ '<a href="' . esc_url( $redirect ) . '" >',
79
+ '</a>'
80
+ )
81
+ );
82
+ ?>
83
+ </span>
84
  <script>
85
+ parent.location.replace('<?php echo esc_url( $redirect ); ?>');
86
  </script>
87
  <?php
88
+ } else {
89
+ wp_safe_redirect( $redirect );
 
90
  }
91
  exit;
92
  }
93
  }
94
 
95
+ if ( ! function_exists( 'wpdesk__' ) ) {
96
  function wpdesk__( $text, $domain ) {
97
  if ( function_exists( 'pll__' ) ) {
98
  return pll__( $text );
99
  }
100
+
101
+ return __( $text, $domain ); // phpcs:ignore.
102
  }
103
  }
104
 
105
+ if ( ! function_exists( 'wpdesk__e' ) ) {
106
  function wpdesk__e( $text, $domain ) {
107
+ echo wpdesk__( $text, $domain ); // phpcs:ignore.
108
  }
109
  }
110
 
111
 
112
+ if ( ! function_exists( 'wpdesk_is_plugin_active' ) ) {
113
  function wpdesk_is_plugin_active( $plugin_file ) {
114
+ $active_plugins = (array) get_option( 'active_plugins', [] );
115
 
116
  if ( is_multisite() ) {
117
+ $active_plugins = array_merge( $active_plugins, get_site_option( 'active_sitewide_plugins', [] ) );
118
  }
119
 
120
  return in_array( $plugin_file, $active_plugins ) || array_key_exists( $plugin_file, $active_plugins );
lang/flexible-shipping.pot CHANGED
@@ -1,15 +1,15 @@
1
- # Copyright (C) 2022 WP Desk
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.11.8\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-05-25T09:58:33+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"
@@ -37,7 +37,7 @@ msgid "Create additional shipment methods in WooCommerce and enable pricing base
37
  msgstr ""
38
 
39
  #. Author of the plugin
40
- msgid "WP Desk"
41
  msgstr ""
42
 
43
  #. Author URI of the plugin
@@ -458,7 +458,7 @@ msgid "Name"
458
  msgstr ""
459
 
460
  #: classes/table-rate/views/html-custom-services.php:17
461
- #: classes/table-rate/views/html-shipping-method-settings.php:12
462
  msgid "Enabled"
463
  msgstr ""
464
 
@@ -472,7 +472,7 @@ msgid "All shippings"
472
  msgstr ""
473
 
474
  #: classes/table-rate/views/html-orders-filter-form.php:5
475
- #: classes/table-rate/views/html-shipping-method-settings.php:15
476
  #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:175
477
  msgid "Integration"
478
  msgstr ""
@@ -482,35 +482,36 @@ msgid "Shipment status"
482
  msgstr ""
483
 
484
  #: classes/table-rate/views/html-shipping-method-scripts.php:25
 
485
  #: src/WPDesk/FS/Info/WooCommerceABC.php:33
486
  #: src/WPDesk/FS/Info/WooCommerceABCPL.php:37
487
  msgid "Shipping Zones"
488
  msgstr ""
489
 
490
- #: classes/table-rate/views/html-shipping-method-settings.php:11
491
  msgid "Title"
492
  msgstr ""
493
 
494
- #: classes/table-rate/views/html-shipping-method-settings.php:13
495
  #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:117
496
  msgid "Visibility"
497
  msgstr ""
498
 
499
- #: classes/table-rate/views/html-shipping-method-settings.php:14
500
  #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:123
501
  msgid "Default"
502
  msgstr ""
503
 
504
- #: classes/table-rate/views/html-shipping-method-settings.php:16
505
  msgid "Select all"
506
  msgstr ""
507
 
508
  #. Translators: matched condition.
509
  #. Translators: add method.
510
  #. Translators: free shipping.
511
- #: classes/table-rate/views/html-shipping-method-settings.php:39
512
- #: classes/table-rate/views/html-shipping-method-settings.php:46
513
- #: classes/table-rate/views/html-shipping-method-settings.php:53
514
  #: src/WPDesk/FS/TableRate/Rule/Condition/AbstractCondition.php:151
515
  #: src/WPDesk/FS/TableRate/Rule/Condition/None.php:64
516
  #: src/WPDesk/FS/TableRate/ShippingMethod/RateCalculator.php:252
@@ -519,37 +520,37 @@ msgstr ""
519
  msgid "yes"
520
  msgstr ""
521
 
522
- #: classes/table-rate/views/html-shipping-method-settings.php:46
523
  #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:120
524
  msgid "Show only for logged in users"
525
  msgstr ""
526
 
527
- #: classes/table-rate/views/html-shipping-method-settings.php:48
528
  msgid "Show for all users"
529
  msgstr ""
530
 
531
- #: classes/table-rate/views/html-shipping-method-settings.php:69
532
  msgid "Drag and drop the above shipment methods to control their display order. Confirm by clicking Save changes button below."
533
  msgstr ""
534
 
535
- #: classes/table-rate/views/html-shipping-method-settings.php:74
536
  msgid "Remove selected"
537
  msgstr ""
538
 
539
- #: classes/table-rate/views/html-shipping-method-settings.php:78
540
  msgid "Cancel import"
541
  msgstr ""
542
 
543
- #: classes/table-rate/views/html-shipping-method-settings.php:79
544
- #: classes/table-rate/views/html-shipping-method-settings.php:80
545
  msgid "Import"
546
  msgstr ""
547
 
548
- #: classes/table-rate/views/html-shipping-method-settings.php:149
549
  msgid "Please select shipment methods to remove"
550
  msgstr ""
551
 
552
- #: classes/table-rate/views/html-shipping-method-settings.php:181
553
  msgid "Select file to import"
554
  msgstr ""
555
 
@@ -696,8 +697,9 @@ msgstr ""
696
  msgid "Saved"
697
  msgstr ""
698
 
699
- #: inc/functions.php:68
700
- msgid "Redirecting. If page not redirects click %s here %s."
 
701
  msgstr ""
702
 
703
  #: src/WPDesk/FS/Info/FSWalkthrough.php:20
1
+ # Copyright (C) 2022 Octolize
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.11.9\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-06-23T11:04:26+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"
37
  msgstr ""
38
 
39
  #. Author of the plugin
40
+ msgid "Octolize"
41
  msgstr ""
42
 
43
  #. Author URI of the plugin
458
  msgstr ""
459
 
460
  #: classes/table-rate/views/html-custom-services.php:17
461
+ #: classes/table-rate/views/html-shipping-method-settings.php:14
462
  msgid "Enabled"
463
  msgstr ""
464
 
472
  msgstr ""
473
 
474
  #: classes/table-rate/views/html-orders-filter-form.php:5
475
+ #: classes/table-rate/views/html-shipping-method-settings.php:17
476
  #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:175
477
  msgid "Integration"
478
  msgstr ""
482
  msgstr ""
483
 
484
  #: classes/table-rate/views/html-shipping-method-scripts.php:25
485
+ #: classes/table-rate/views/html-shipping-method-settings.php:131
486
  #: src/WPDesk/FS/Info/WooCommerceABC.php:33
487
  #: src/WPDesk/FS/Info/WooCommerceABCPL.php:37
488
  msgid "Shipping Zones"
489
  msgstr ""
490
 
491
+ #: classes/table-rate/views/html-shipping-method-settings.php:13
492
  msgid "Title"
493
  msgstr ""
494
 
495
+ #: classes/table-rate/views/html-shipping-method-settings.php:15
496
  #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:117
497
  msgid "Visibility"
498
  msgstr ""
499
 
500
+ #: classes/table-rate/views/html-shipping-method-settings.php:16
501
  #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:123
502
  msgid "Default"
503
  msgstr ""
504
 
505
+ #: classes/table-rate/views/html-shipping-method-settings.php:20
506
  msgid "Select all"
507
  msgstr ""
508
 
509
  #. Translators: matched condition.
510
  #. Translators: add method.
511
  #. Translators: free shipping.
512
+ #: classes/table-rate/views/html-shipping-method-settings.php:55
513
+ #: classes/table-rate/views/html-shipping-method-settings.php:63
514
+ #: classes/table-rate/views/html-shipping-method-settings.php:72
515
  #: src/WPDesk/FS/TableRate/Rule/Condition/AbstractCondition.php:151
516
  #: src/WPDesk/FS/TableRate/Rule/Condition/None.php:64
517
  #: src/WPDesk/FS/TableRate/ShippingMethod/RateCalculator.php:252
520
  msgid "yes"
521
  msgstr ""
522
 
523
+ #: classes/table-rate/views/html-shipping-method-settings.php:63
524
  #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:120
525
  msgid "Show only for logged in users"
526
  msgstr ""
527
 
528
+ #: classes/table-rate/views/html-shipping-method-settings.php:66
529
  msgid "Show for all users"
530
  msgstr ""
531
 
532
+ #: classes/table-rate/views/html-shipping-method-settings.php:91
533
  msgid "Drag and drop the above shipment methods to control their display order. Confirm by clicking Save changes button below."
534
  msgstr ""
535
 
536
+ #: classes/table-rate/views/html-shipping-method-settings.php:98
537
  msgid "Remove selected"
538
  msgstr ""
539
 
540
+ #: classes/table-rate/views/html-shipping-method-settings.php:105
541
  msgid "Cancel import"
542
  msgstr ""
543
 
544
+ #: classes/table-rate/views/html-shipping-method-settings.php:110
545
+ #: classes/table-rate/views/html-shipping-method-settings.php:113
546
  msgid "Import"
547
  msgstr ""
548
 
549
+ #: classes/table-rate/views/html-shipping-method-settings.php:179
550
  msgid "Please select shipment methods to remove"
551
  msgstr ""
552
 
553
+ #: classes/table-rate/views/html-shipping-method-settings.php:212
554
  msgid "Select file to import"
555
  msgstr ""
556
 
697
  msgid "Saved"
698
  msgstr ""
699
 
700
+ #. Translators: redirect URL.
701
+ #: inc/functions.php:77
702
+ msgid "Redirecting. If page not redirects click %1$s here %2$s."
703
  msgstr ""
704
 
705
  #: src/WPDesk/FS/Info/FSWalkthrough.php:20
readme.txt CHANGED
@@ -1,21 +1,21 @@
1
  === Table Rate Shipping Method for WooCommerce by Flexible Shipping ===
2
- Contributors: wpdesk,dyszczo,grola,piotrpo,marcinkolanko,mateuszgbiorczyk,sebastianpisula,bartj
3
  Donate link: https://octol.io/fs-repo-up
4
- Tags: table rate, table rate shipping, conditional shipping, free 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, shipping, free shipping, advanced shipping
5
  Requires at least: 4.5
6
  Tested up to: 6.0
7
- Stable tag: 4.11.8
8
  Requires PHP: 7.0
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
12
- The most flexible Table Rate Shipping WooCommerce plugin. Create almost every shipping scenario you need based on totals, weight, quantity and more.
13
 
14
  == Description ==
15
 
16
  = Table Rate Shipping Killer =
17
 
18
- Flexible Shipping is the most advanced shipping plugin for WooCommerce stores allowing you to calculate the shipping costs based on weight and/or cart total. Combine it with the PRO version and it will become the only WooCommerce shipping plugin you'll ever need.
19
 
20
  [youtube https://www.youtube.com/watch?v=C7dQ2jQ-iVc]
21
 
@@ -32,8 +32,9 @@ Flexible Shipping is the most advanced shipping plugin for WooCommerce stores al
32
  * Disable/hide shipping method if a defined rule has been matched in the cart (PRO)
33
  * Add a cost per whole order and per each one product in the cart (PRO)
34
  * Enable/disable shipping method based on the Time of the Day and Day of the week (PRO)
 
35
 
36
- These are only a few examples of the Flexible Shipping usage, however, its possibilities are almost endless and sky is the limit ;) We have described some of them in our docs and [Ready to use scenarios](https://octol.io/fs-repo-docs).
37
 
38
  = Features =
39
 
@@ -42,14 +43,14 @@ These are only a few examples of the Flexible Shipping usage, however, its possi
42
  * Shipping cost based on cart total and/or weight
43
  * Minimum and maximum values for cart total and/or weight
44
  * Summing up the costs of e.g. two different rules at the same time e.g. one based on cart total and the second based on weight
45
- * Free shipping override
46
  * Option to display the selected shipping methods only for logged-in users
47
  * Further shipping companies integrations (see the info below for details)
48
- * Compatible with WooCommerce 2.6 Shipping Zones (see the info below for details)
49
  * WPML and Polylang compatibility
50
  * Built-in ready to use scenarios
51
  * Automatic notification about shipping zone configuration conflict
52
  * Cart calculation settings (cart or package value)
 
53
 
54
  = PRO Features =
55
 
@@ -76,13 +77,13 @@ These are only a few examples of the Flexible Shipping usage, however, its possi
76
 
77
  = Flexible Shipping Locations Add-On =
78
 
79
- Flexible Shipping Locations Add-On extends the default Flexible Shipping for WooCommerce functionalities and adds the possiblity to create the additional rules based on locations. It works with both, free and PRO versions so you can buy it separately if you do not need the PRO features.
80
 
81
  [Buy Flexible Shipping Locations Add-On now &rarr;](https://octol.io/fs-repo-cross-locations)
82
 
83
  = Flexible Shipping Import Export Add-On =
84
 
85
- Flexible Shipping Import Export Add-On allows you to allows you to easily import and export Flexible Shipping methods. This allows you to easily move and update shipping methods. Plugin supports CSV format. It works with both, free and PRO versions so you can buy it separately if you do not need the PRO features.
86
 
87
  [Buy Flexible Shipping Import Export Add-On now &rarr;](https://octol.io/fs-repo-cross-fsie)
88
 
@@ -92,15 +93,19 @@ Multi Vendor Shipping for WooCommerce Add-on extends the Flexible Shipping plugi
92
 
93
  [Buy Multi Vendor Shipping for WooCommerce Add-On now &rarr;](https://octol.io/fs-repo-cross-mvs)
94
 
95
- = Conditional Shipping Methods =
96
 
97
- Conditionally display and hide the shipping methods in your WooCommerce store. Define the rules when the specific shipping methods should be available to pick and when not to. Extend the Flexible Shipping plugin's capabilities with conditional logic for displaying shipping methods.
98
 
99
- [Buy Conditional Shipping Methods now &rarr;](https://octol.io/fs-repo-cross-csm)
 
 
 
 
100
 
101
  = Docs =
102
 
103
- [View Flexible Shipping Docs](https://octol.io/fs-repo-docs)
104
 
105
  = Support Policy =
106
 
@@ -110,26 +115,22 @@ We provide a limited support for the free version of our Flexible Shipping plugi
110
 
111
  **United Kingdom**
112
 
113
- We have released a DPD UK WooCommerce integration for Flexible Shipping covering the whole UK teritory. Check our plugin and [offer your customers the DPD UK services at your shop &rarr;](https://octol.io/fs-repo-cross-dpd-uk)
114
 
115
  **Poland**
116
 
117
- There are also some more further integrations that we provide for Flexible Shipping in Poland:
118
 
119
  * DPD - WooCommerce
120
  * DHL - WooCommerce
121
  * Paczkomaty InPost - WooCommerce
 
122
  * eNadawca Poczta Polska - WooCommerce
123
  * Orlen Paczka - WooCommerce
124
 
125
- [View all the Polish integrations here &rarr;](https://www.wpdesk.pl/kategoria-produktu/wysylka/)
126
-
127
- > **Get more WooCommerce plugins from WP Desk**<br />
128
- > We provide premium plugins for the checkout/products' customization, shipping, invoicing and more. Check our [premium WooCommerce plugins here →](https://www.wpdesk.net/products/)
129
-
130
  = Compatible WooCommerce Plugins =
131
 
132
- We’ve added compatibility and tests for popular WooCommerce plugins:
133
 
134
  * [WPML](https://wpml.org/)
135
  * [Germanized](https://wordpress.org/plugins/woocommerce-germanized/)
@@ -144,9 +145,11 @@ We’ve added compatibility and tests for popular WooCommerce plugins:
144
 
145
  = Translations =
146
 
147
- * English - default, always included
148
  * Polish
149
  * German by [jensratzel](https://profiles.wordpress.org/jensratzel/)
 
 
150
 
151
  = Flexible Shipping in a nutshell =
152
 
@@ -168,19 +171,19 @@ Give it a try and find out that our Flexible Shipping is the only one Table Rate
168
 
169
  == Installation ==
170
 
171
- This plugin can be easilly installed like any other WordPress integration by following the steps below:
172
 
173
  1. Download and unzip the latest zip file release.
174
- 2. Upload the entire plugin directory to your /wp-content/plugins/ path.
175
- 3. Activate the plugin using the Plugins menu in WordPress sidebar menu.
176
 
177
- Optionally you can also try to upload the plugin zip file using Plugins -> Add New -> Upload Plugin option from the WordPress sidebar menu. Then go directly to point 3.
178
 
179
  == Frequently Asked Questions ==
180
 
181
  = How to configure the plugin? =
182
 
183
- To make it clear and as easy as possible we have prepared the detailed step-by-step guides in our [Flexible Shipping Docs here](https://octol.io/fs-repo-docs).
184
 
185
  = Do you offer support? =
186
 
@@ -188,11 +191,12 @@ We provide a limited support for the free version of our Flexible Shipping plugi
188
 
189
  == Screenshots ==
190
 
191
- 1. Main Settings in WooCommerce 2.5.
192
- 2. Main Settings in WooCommerce 2.6 and up.
193
- 3. Shipping Methods list.
194
- 4. Add/Edit Shipping Method.
195
- 5. Shipping Rules Settings.
 
196
 
197
  == Upgrade Notice ==
198
 
@@ -200,6 +204,10 @@ If you are upgrading from the old Flexible Shipping version (1.3.2, woo-flexible
200
 
201
  == Changelog ==
202
 
 
 
 
 
203
  = 4.11.8 - 2022-05-25 =
204
  * Added support for WooCommerce 6.6
205
  * Fixed PRO Upgrade Box
1
  === Table Rate Shipping Method for WooCommerce by Flexible Shipping ===
2
+ 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: 4.5
6
  Tested up to: 6.0
7
+ Stable tag: 4.11.9
8
  Requires PHP: 7.0
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
12
+ The best and the most powerful Table Rate shipping plugin for WooCommerce. Define the shipping rules based on numerous conditions and configure even the most complex shipping scenarios based on totals, weight, quantity and more.
13
 
14
  == Description ==
15
 
16
  = Table Rate Shipping Killer =
17
 
18
+ Flexible Shipping is the most advanced shipping plugin for WooCommerce stores, allowing you to calculate the shipping costs based on weight and/or cart total. Combine it with the PRO version and it will become the only WooCommerce shipping plugin you'll ever need.
19
 
20
  [youtube https://www.youtube.com/watch?v=C7dQ2jQ-iVc]
21
 
32
  * Disable/hide shipping method if a defined rule has been matched in the cart (PRO)
33
  * Add a cost per whole order and per each one product in the cart (PRO)
34
  * Enable/disable shipping method based on the Time of the Day and Day of the week (PRO)
35
+ * Hide shipping method for certain products
36
 
37
+ These are only a few examples of the Flexible Shipping usage; however, its possibilities are almost endless. We have described some of them in our docs and [Ready to use scenarios &rarr;](https://octol.io/fs-repo-docs).
38
 
39
  = Features =
40
 
43
  * Shipping cost based on cart total and/or weight
44
  * Minimum and maximum values for cart total and/or weight
45
  * Summing up the costs of e.g. two different rules at the same time e.g. one based on cart total and the second based on weight
46
+ * Free shipping over amount override
47
  * Option to display the selected shipping methods only for logged-in users
48
  * Further shipping companies integrations (see the info below for details)
 
49
  * WPML and Polylang compatibility
50
  * Built-in ready to use scenarios
51
  * Automatic notification about shipping zone configuration conflict
52
  * Cart calculation settings (cart or package value)
53
+ * Built-in tutorial with step-by-step guide
54
 
55
  = PRO Features =
56
 
77
 
78
  = Flexible Shipping Locations Add-On =
79
 
80
+ Flexible Shipping Locations Add-On extends the default Flexible Shipping for WooCommerce functionalities and adds the possiblity to create the additional rules based on locations (WooCommerce and custom ones). It works with both, free and PRO versions, so you can buy it separately if you do not need the PRO features.
81
 
82
  [Buy Flexible Shipping Locations Add-On now &rarr;](https://octol.io/fs-repo-cross-locations)
83
 
84
  = Flexible Shipping Import Export Add-On =
85
 
86
+ Flexible Shipping Import Export Add-On allows you to easily import and export Flexible Shipping methods. This way you can easily move and update shipping methods. Plugin supports CSV format. It works with both, free and PRO versions, so you can buy it separately if you do not need the PRO features.
87
 
88
  [Buy Flexible Shipping Import Export Add-On now &rarr;](https://octol.io/fs-repo-cross-fsie)
89
 
93
 
94
  [Buy Multi Vendor Shipping for WooCommerce Add-On now &rarr;](https://octol.io/fs-repo-cross-mvs)
95
 
96
+ You might also be interested in other...
97
 
98
+ = Useful free WooCommerce shipping plugins from Octolize =
99
 
100
+ * [Flexible Shipping for UPS and WooCommerce](https://octol.io/ups-repo) - the most powerful UPS WooCommerce integration
101
+ * [Flexible Shipping for FedEx and WooCommerce](https://octol.io/fedex-repo) - first free plugin to display FedEx Live Rates
102
+ * [Live rates for USPS and WooCommerce](https://octol.io/usps-repo) - the best free plugin to display the USPS Live Rates
103
+ * [Live rates for DHL Express and WooCommerce](https://octol.io/dhlexpress-repo) - automatic international shipping costs calculation and displaying DHL Express live rates
104
+ * [Shipping Live Rates for Australia Post for WooCommerce](https://octol.io/ap-repo) – Australia Post WooCommerce shipping methods with real-time calculated shipping rates
105
 
106
  = Docs =
107
 
108
+ View the dedicated [Flexible Shipping Documentation &rarr;](https://octol.io/fs-repo-docs)
109
 
110
  = Support Policy =
111
 
115
 
116
  **United Kingdom**
117
 
118
+ We have released a DPD UK & Local WooCommerce integration for Flexible Shipping covering the whole UK teritory. Check our plugin and [offer your customers the DPD UK services at your shop &rarr;](https://octol.io/fs-repo-cross-dpd-uk)
119
 
120
  **Poland**
121
 
122
+ There have also develop more further Flexible Shipping integrations for Polish carriers and shipping companies:
123
 
124
  * DPD - WooCommerce
125
  * DHL - WooCommerce
126
  * Paczkomaty InPost - WooCommerce
127
+ * UPS - WooCommerce
128
  * eNadawca Poczta Polska - WooCommerce
129
  * Orlen Paczka - WooCommerce
130
 
 
 
 
 
 
131
  = Compatible WooCommerce Plugins =
132
 
133
+ We have verified and tested the Flexible Shipping compatibility with the following popular WooCommerce plugins:
134
 
135
  * [WPML](https://wpml.org/)
136
  * [Germanized](https://wordpress.org/plugins/woocommerce-germanized/)
145
 
146
  = Translations =
147
 
148
+ * English - default
149
  * Polish
150
  * German by [jensratzel](https://profiles.wordpress.org/jensratzel/)
151
+ * Spanish by [Jose Luis](https://profiles.wordpress.org/jose64/), [Javier Esteban](https://profiles.wordpress.org/nobnob/), [lacasitadecadera](https://profiles.wordpress.org/lacasitadecera/)
152
+ * Dutch by [Vernum](https://profiles.wordpress.org/vernum/), [Peter Smits](https://profiles.wordpress.org/psmits1567/), [Pjeterjan Deneys](https://profiles.wordpress.org/nekojonez/)
153
 
154
  = Flexible Shipping in a nutshell =
155
 
171
 
172
  == Installation ==
173
 
174
+ This integration can be easily installed like any other WordPress plugin by following the steps below:
175
 
176
  1. Download and unzip the latest zip file release.
177
+ 2. Upload the entire plugin directory to your **/wp-content/plugins/** path.
178
+ 3. Activate the plugin using the **Plugins** menu in WordPress sidebar menu.
179
 
180
+ Optionally you can also try to upload the plugin zip file using **Plugins &rarr; Add New &rarr; Upload Plugin** option from the WordPress sidebar menu. Then go directly to point 3.
181
 
182
  == Frequently Asked Questions ==
183
 
184
  = How to configure the plugin? =
185
 
186
+ To make it clear and as easy as possible we have prepared the detailed step-by-step guides in our [Flexible Shipping Docs here](https://octol.io/fs-repo-docs). You can also use the built-in tutorial that will guide you throught the whole process.
187
 
188
  = Do you offer support? =
189
 
191
 
192
  == Screenshots ==
193
 
194
+ 1. Flexible Shipping shipping method configuration screen
195
+ 2. Adding a new Flexible Shipping shipping method
196
+ 3. Flexible Shipping shipping methods added within a shipping zone
197
+ 4. Flexible Shipping cost calculation rules table
198
+ 5. Flexible Shipping shipping methods in the cart
199
+
200
 
201
  == Upgrade Notice ==
202
 
204
 
205
  == Changelog ==
206
 
207
+ = 4.11.9 - 2022-06-02 =
208
+ * Fixed notice on bulk labels, when no labels available
209
+ * Fixed escaping in group Shipping Methods
210
+
211
  = 4.11.8 - 2022-05-25 =
212
  * Added support for WooCommerce 6.6
213
  * Fixed PRO Upgrade Box
vendor_prefixed/wpdesk/wp-plugin-flow-common/composer.json CHANGED
@@ -21,7 +21,8 @@
21
  "require": {
22
  "php": ">=7.0",
23
  "wpdesk\/wp-basic-requirements": "^3.2.3",
24
- "wpdesk\/wp-builder": "^2.0.0"
 
25
  },
26
  "require-dev": {
27
  "phpunit\/phpunit": "<7",
21
  "require": {
22
  "php": ">=7.0",
23
  "wpdesk\/wp-basic-requirements": "^3.2.3",
24
+ "wpdesk\/wp-builder": "^2.0.0",
25
+ "wpdesk\/wp-wpdesk-tracker": "^3"
26
  },
27
  "require-dev": {
28
  "phpunit\/phpunit": "<7",
vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/Notice.php CHANGED
@@ -43,7 +43,7 @@ class Notice
43
  }
44
  \add_filter('plugin_compatibility_checker/notice_added', '__return_true');
45
  $checker = $this->plugin_compatibility_checker;
46
- $additional_info = ' ' . \sprintf(\__('If the WordPress updater hasn\'t informed you about the newer versions available, please %sfollow these instructions &rarr;%s', 'flexible-shipping'), \sprintf('<a href="%s" target="_blank">', \__('https://wpde.sk/fs-2-docs', 'flexible-shipping')), '</a>');
47
  if (!$checker->is_fs_compatible()) {
48
  if ($checker->is_active_fs_pro() && $checker->is_fs_pro_compatible() && $checker->is_active_fs_loc() && $checker->is_fs_loc_compatible()) {
49
  new \FSVendor\WPDesk\Notice\Notice(\sprintf(\__('%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.', 'flexible-shipping'), '<strong>', '</strong>', '<strong>', '</strong>', $checker->fs->get_required_version()) . $additional_info, 'error');
43
  }
44
  \add_filter('plugin_compatibility_checker/notice_added', '__return_true');
45
  $checker = $this->plugin_compatibility_checker;
46
+ $additional_info = ' ' . \sprintf(\__('If the WordPress updater hasn\'t informed you about the newer versions available, please %sfollow these instructions &rarr;%s', 'flexible-shipping'), \sprintf('<a href="%s" target="_blank">', \__('https://octol.io/fs-2-docs', 'flexible-shipping')), '</a>');
47
  if (!$checker->is_fs_compatible()) {
48
  if ($checker->is_active_fs_pro() && $checker->is_fs_pro_compatible() && $checker->is_active_fs_loc() && $checker->is_fs_loc_compatible()) {
49
  new \FSVendor\WPDesk\Notice\Notice(\sprintf(\__('%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.', 'flexible-shipping'), '<strong>', '</strong>', '<strong>', '</strong>', $checker->fs->get_required_version()) . $additional_info, 'error');