Booster for WooCommerce - Version 4.5.0

Version Description

  • 05/09/2019 =
  • Fix - Core - WCJ_Modules - Change the order some submodules are loaded to make it compatible with "Load Modules on Init Hook" option.
  • Fix - EMAILS & MISC. - My Account - Fix custom page title on my account page changing the my account title on wp nav menu.
  • Fix - EMAILS & MISC. - My Account - Fix compatibility problem with PublishPress plugin regarding the_title filter.
  • Fix - PDF INVOICING & PACKING SLIPS - Email Options - Fix attachments not getting sent via email due to unsuccessful WP_Order class checking.
  • Fix - PDF INVOICING & PACKING SLIPS - Make module compatible with "Load Modules on Init Hook" option.
  • Fix - PDF INVOICING & PACKING SLIPS - Fix empty return on bulk_actions_handle().
  • Fix - Plugin update checker - Fix PHP warning 'strpos(): Non-string needles will be interpreted as strings in the future'.
  • Fix - PAYMENT GATEWAYS - Gateways by Country, State or Postcode - Fix "Invalid payment method" error when using the postcodes option.
  • Fix - PRODUCTS - Product Visibility by User Role - Fix search on ajax.
  • Fix - PRODUCTS - Product Addons - Replace old method for setting price by correct one on woocommerce_add_cart_item and woocommerce_get_cart_item_from_session.
  • Fix - PRODUCTS - Product Addons - Format order metadata properly.
  • Fix - PRODUCTS - Product Addons - Fix "A non well formed numeric value" php warning on price_change_ajax().
  • Fix - PRICES & CURRENCIES - Multicurrency (Currency Switcher) - Fix Price Filter Widget step on Compatibility option.
  • Fix - PRICES & CURRENCIES - Multicurrency (Currency Switcher) - Fix "A non well formed numeric value" php warning on change_price().
  • Fix - SHIPPING & ORDERS - Custom Shipping - Improve performance of Custom Shipping Zones.
  • Fix - Shortcodes - Orders - [wcj_order_refunds_table] - columns - refund_title param fixed.
  • Dev - Core - WCJ_Module - Create get_option() method to get an option from database or from the class itself for performance reasons.
  • Dev - CART & CHECKOUT - Checkout Custom Fields - Allow fields to be updated from order admin edit page.
  • Dev - CART & CHECKOUT - Checkout Fees - Add Overlap field.
  • Dev - CART & CHECKOUT - Checkout Fees - Add Cart Min field.
  • Dev - CART & CHECKOUT - Checkout Fees - Add Cart Max field.
  • Dev - CART & CHECKOUT - Checkout Fees - Add Priority field.
  • Dev - EMAILS & MISC. - Booster WPML - General Options - Add new option 'Auto Switch Booster Currency' to automatically switch Booster currency according to WPML.
  • Dev - PRICES & CURRENCIES - Multicurrency (Currency Switcher) - Price Filter Widget Compatibility now works with wcj_multicurrency_per_product_enabled option enabled.
  • Dev - PRICES & CURRENCIES - Multicurrency (Currency Switcher) - Change wcj_multicurrency_compatibility_wc_price_filter option default value from 'yes' to 'no'
  • Dev - PRICES & CURRENCIES - Multicurrency (Currency Switcher) - Create new option to make the "Sort By Price" work with wcj_multicurrency_per_product_enabled option enabled.
  • Dev - PRICES & CURRENCIES - Multicurrency (Currency Switcher) - Create new option to save min and max prices on currency rate update via background processing.
  • Dev - PRICES & CURRENCIES - Multicurrency (Currency Switcher) - Add new compatibility option with native WooCommerce coupons.
  • Dev - PRODUCTS - Cost of Goods - Price Fields - Add 'Profit Percentage Type' option to choose between 'Margin' and 'Markup' values.
  • Dev - PRODUCTS - Product Addons - Add option to ignore strike-through price on AJAX update. If a product has both regular and sale prices, only the sale price will be updated on AJAX. The regular price will be ignored.
  • Dev - PRODUCTS - Product Input Fields - Add option to preserve line breaks on admin and frontend.
  • Dev - Shortcodes - Orders - [wcj_order_refunds_table] - columns - refund_date param added.
  • Dev - Orders Shortcodes - Add param plus_fees for [wcj_order_subtotal_plus_shipping] shortcode.
  • Dev - Functions - Orders - Add wcj_get_order_fees_total() and wcj_get_order_fees_total_tax().
  • Dev - Functions - General - Add option to overwrite WooCommerce IP detection method by Booster.
  • Tweak - Functions - General - Change default options from wcj_general_advanced_ip_detection on wcj_get_the_ip() function to 'REMOTE_ADDR', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR'.
Download this release

Release Info

Developer algoritmika
Plugin Icon 128x128 Booster for WooCommerce
Version 4.5.0
Comparing to
See all releases

Code changes from version 4.4.1 to 4.5.0

Files changed (34) hide show
  1. includes/background-process/class-wcj-multicurrency-price-updater.php +34 -0
  2. includes/class-wcj-checkout-custom-fields.php +15 -10
  3. includes/class-wcj-checkout-fees.php +182 -45
  4. includes/class-wcj-general.php +9 -2
  5. includes/class-wcj-multicurrency-product-base-price.php +1 -1
  6. includes/class-wcj-multicurrency.php +394 -22
  7. includes/class-wcj-my-account.php +18 -11
  8. includes/class-wcj-payment-gateways-by-country.php +5 -5
  9. includes/class-wcj-payment-gateways-fees.php +14 -14
  10. includes/class-wcj-pdf-invoicing.php +11 -7
  11. includes/class-wcj-product-addons.php +56 -13
  12. includes/class-wcj-product-input-fields.php +41 -1
  13. includes/class-wcj-purchase-data.php +31 -3
  14. includes/class-wcj-shipping.php +57 -74
  15. includes/class-wcj-wpml.php +21 -1
  16. includes/classes/class-wcj-module-product-by-condition.php +3 -3
  17. includes/classes/class-wcj-module.php +20 -1
  18. includes/core/wcj-modules.php +2 -2
  19. includes/functions/wcj-functions-general.php +3 -3
  20. includes/functions/wcj-functions-orders.php +41 -1
  21. includes/js/wcj-product-addons.js +15 -6
  22. includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-emails.php +3 -3
  23. includes/settings/wcj-settings-checkout-fees.php +45 -6
  24. includes/settings/wcj-settings-general.php +26 -9
  25. includes/settings/wcj-settings-multicurrency.php +28 -3
  26. includes/settings/wcj-settings-product-addons.php +9 -1
  27. includes/settings/wcj-settings-product-input-fields.php +17 -1
  28. includes/settings/wcj-settings-purchase-data.php +12 -1
  29. includes/settings/wcj-settings-wpml.php +9 -1
  30. includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php +301 -271
  31. includes/shortcodes/class-wcj-shortcodes-orders.php +19 -4
  32. langs/woocommerce-jetpack.pot +455 -291
  33. readme.txt +39 -1
  34. woocommerce-jetpack.php +3 -3
includes/background-process/class-wcj-multicurrency-price-updater.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Booster for WooCommerce - Background Process - Multicurrency Price Updater
4
+ *
5
+ * Updates min and max prices
6
+ *
7
+ * @version 4.5.0
8
+ * @since 4.5.0
9
+ * @author Algoritmika Ltd.
10
+ */
11
+
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ exit;
14
+ }
15
+
16
+ if ( ! class_exists( 'WCJ_Multicurrency_Price_Updater' ) ) :
17
+
18
+ class WCJ_Multicurrency_Price_Updater extends WP_Background_Process {
19
+
20
+ /**
21
+ * @var string
22
+ */
23
+ protected $action = 'wcj_bkg_process_price_updater';
24
+
25
+ protected function task( $item ) {
26
+ $module = 'multicurrency';
27
+ if ( wcj_is_module_enabled( $module ) ) {
28
+ WCJ()->modules[ $module ]->save_min_max_prices_per_product( $item['id'], $item['currency'] );
29
+ }
30
+ return false;
31
+ }
32
+
33
+ }
34
+ endif;
includes/class-wcj-checkout-custom-fields.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Checkout Custom Fields
4
  *
5
- * @version 4.4.0
6
  * @author Algoritmika Ltd.
7
  */
8
 
@@ -15,7 +15,7 @@ class WCJ_Checkout_Custom_Fields extends WCJ_Module {
15
  /**
16
  * Constructor.
17
  *
18
- * @version 3.2.2
19
  * @todo (maybe) check if `'wcj_checkout_custom_field_customer_meta_fields_' . $i` option should affect `add_default_checkout_custom_fields`
20
  */
21
  function __construct() {
@@ -50,6 +50,9 @@ class WCJ_Checkout_Custom_Fields extends WCJ_Module {
50
  }
51
  // select2 script
52
  add_action( 'wp_enqueue_scripts', array( $this, 'maybe_enqueue_scripts' ) );
 
 
 
53
  }
54
  }
55
 
@@ -187,7 +190,7 @@ class WCJ_Checkout_Custom_Fields extends WCJ_Module {
187
  /**
188
  * update_custom_checkout_fields_order_meta.
189
  *
190
- * @version 4.3.0
191
  */
192
  function update_custom_checkout_fields_order_meta( $order_id ) {
193
  for ( $i = 1; $i <= apply_filters( 'booster_option', 1, get_option( 'wcj_checkout_custom_fields_total_number', 1 ) ); $i++ ) {
@@ -195,16 +198,18 @@ class WCJ_Checkout_Custom_Fields extends WCJ_Module {
195
  if ( ! $this->is_visible( $i ) ) {
196
  continue;
197
  }
198
- $the_section = get_option( 'wcj_checkout_custom_field_section_' . $i );
199
- $the_type = get_option( 'wcj_checkout_custom_field_type_' . $i );
200
  $option_name = $the_section . '_' . 'wcj_checkout_field_' . $i;
201
  $option_name_label = $the_section . '_' . 'wcj_checkout_field_label_' . $i;
202
  $option_name_type = $the_section . '_' . 'wcj_checkout_field_type_' . $i;
203
- if ( ! empty( $_POST[ $option_name ] ) || 'checkbox' === $the_type ) {
 
 
204
  update_post_meta( $order_id, '_' . $option_name_type, $the_type );
205
  update_post_meta( $order_id, '_' . $option_name_label, get_option( 'wcj_checkout_custom_field_label_' . $i ) );
206
  if ( 'checkbox' === $the_type ) {
207
- $the_value = ( isset( $_POST[ $option_name ] ) ) ? 1 : 0;
208
  update_post_meta( $order_id, '_' . $option_name, $the_value );
209
  $option_name_checkbox_value = $the_section . '_' . 'wcj_checkout_field_checkbox_value_' . $i;
210
  $checkbox_value = ( 1 == $the_value ) ?
@@ -212,14 +217,14 @@ class WCJ_Checkout_Custom_Fields extends WCJ_Module {
212
  get_option( 'wcj_checkout_custom_field_checkbox_no_' . $i );
213
  update_post_meta( $order_id, '_' . $option_name_checkbox_value, $checkbox_value );
214
  } elseif ( 'radio' === $the_type || 'select' === $the_type ) {
215
- update_post_meta( $order_id, '_' . $option_name, wc_clean( urldecode( $_POST[ $option_name ] ) ) );
216
  $option_name_values = $the_section . '_' . 'wcj_checkout_field_select_options_' . $i;
217
  $the_values = get_option( 'wcj_checkout_custom_field_select_options_' . $i );
218
  update_post_meta( $order_id, '_' . $option_name_values, $the_values );
219
  } elseif ( 'textarea' === $the_type && 'no' === get_option( 'wcj_checkout_custom_fields_textarea_clean', 'yes' ) ) {
220
- update_post_meta( $order_id, '_' . $option_name, urldecode( $_POST[ $option_name ] ) );
221
  } else {
222
- update_post_meta( $order_id, '_' . $option_name, wc_clean( urldecode( $_POST[ $option_name ] ) ) );
223
  }
224
  }
225
  }
2
  /**
3
  * Booster for WooCommerce - Module - Checkout Custom Fields
4
  *
5
+ * @version 4.5.0
6
  * @author Algoritmika Ltd.
7
  */
8
 
15
  /**
16
  * Constructor.
17
  *
18
+ * @version 4.5.0
19
  * @todo (maybe) check if `'wcj_checkout_custom_field_customer_meta_fields_' . $i` option should affect `add_default_checkout_custom_fields`
20
  */
21
  function __construct() {
50
  }
51
  // select2 script
52
  add_action( 'wp_enqueue_scripts', array( $this, 'maybe_enqueue_scripts' ) );
53
+
54
+ // Update checkout fields from admin edit order
55
+ add_action( 'save_post_shop_order', array( $this, 'update_custom_checkout_fields_order_meta' ) );
56
  }
57
  }
58
 
190
  /**
191
  * update_custom_checkout_fields_order_meta.
192
  *
193
+ * @version 4.5.0
194
  */
195
  function update_custom_checkout_fields_order_meta( $order_id ) {
196
  for ( $i = 1; $i <= apply_filters( 'booster_option', 1, get_option( 'wcj_checkout_custom_fields_total_number', 1 ) ); $i++ ) {
198
  if ( ! $this->is_visible( $i ) ) {
199
  continue;
200
  }
201
+ $the_section = get_option( 'wcj_checkout_custom_field_section_' . $i );
202
+ $the_type = get_option( 'wcj_checkout_custom_field_type_' . $i );
203
  $option_name = $the_section . '_' . 'wcj_checkout_field_' . $i;
204
  $option_name_label = $the_section . '_' . 'wcj_checkout_field_label_' . $i;
205
  $option_name_type = $the_section . '_' . 'wcj_checkout_field_type_' . $i;
206
+ $post_value = isset( $_POST[ $option_name ] ) ? $_POST[ $option_name ] : '';
207
+ $post_value = empty( $post_value ) && isset( $_POST[ '_'. $option_name ] ) ? $_POST[ '_'. $option_name ] : $post_value;
208
+ if ( ! empty( $post_value ) || 'checkbox' === $the_type ) {
209
  update_post_meta( $order_id, '_' . $option_name_type, $the_type );
210
  update_post_meta( $order_id, '_' . $option_name_label, get_option( 'wcj_checkout_custom_field_label_' . $i ) );
211
  if ( 'checkbox' === $the_type ) {
212
+ $the_value = ! empty( $post_value ) ? 1 : 0;
213
  update_post_meta( $order_id, '_' . $option_name, $the_value );
214
  $option_name_checkbox_value = $the_section . '_' . 'wcj_checkout_field_checkbox_value_' . $i;
215
  $checkbox_value = ( 1 == $the_value ) ?
217
  get_option( 'wcj_checkout_custom_field_checkbox_no_' . $i );
218
  update_post_meta( $order_id, '_' . $option_name_checkbox_value, $checkbox_value );
219
  } elseif ( 'radio' === $the_type || 'select' === $the_type ) {
220
+ update_post_meta( $order_id, '_' . $option_name, wc_clean( urldecode( $post_value ) ) );
221
  $option_name_values = $the_section . '_' . 'wcj_checkout_field_select_options_' . $i;
222
  $the_values = get_option( 'wcj_checkout_custom_field_select_options_' . $i );
223
  update_post_meta( $order_id, '_' . $option_name_values, $the_values );
224
  } elseif ( 'textarea' === $the_type && 'no' === get_option( 'wcj_checkout_custom_fields_textarea_clean', 'yes' ) ) {
225
+ update_post_meta( $order_id, '_' . $option_name, urldecode( $post_value ) );
226
  } else {
227
+ update_post_meta( $order_id, '_' . $option_name, wc_clean( urldecode( $post_value ) ) );
228
  }
229
  }
230
  }
includes/class-wcj-checkout-fees.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Checkout Fees
4
  *
5
- * @version 3.9.0
6
  * @since 3.7.0
7
  * @author Algoritmika Ltd.
8
  */
@@ -16,7 +16,7 @@ class WCJ_Checkout_Fees extends WCJ_Module {
16
  /**
17
  * Constructor.
18
  *
19
- * @version 3.8.0
20
  * @since 3.7.0
21
  * @todo (maybe) rename module to "Cart & Checkout Fees"
22
  */
@@ -32,7 +32,7 @@ class WCJ_Checkout_Fees extends WCJ_Module {
32
  // Core function
33
  add_action( 'woocommerce_cart_calculate_fees', array( $this, 'add_fees' ), PHP_INT_MAX );
34
  // Checkout fields
35
- $this->checkout_fields = get_option( 'wcj_checkout_fees_data_checkout_fields', array() );
36
  $this->checkout_fields = array_filter( $this->checkout_fields );
37
  if ( ! empty( $this->checkout_fields ) ) {
38
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
@@ -55,10 +55,187 @@ class WCJ_Checkout_Fees extends WCJ_Module {
55
  }
56
  }
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  /**
59
  * add_fees.
60
  *
61
- * @version 3.9.0
62
  * @since 3.7.0
63
  * @todo fees with same title
64
  * @todo options: `tax_class`
@@ -75,47 +252,7 @@ class WCJ_Checkout_Fees extends WCJ_Module {
75
  return;
76
  }
77
 
78
- $enabled = get_option( 'wcj_checkout_fees_data_enabled', array() );
79
- $titles = get_option( 'wcj_checkout_fees_data_titles', array() );
80
- $types = get_option( 'wcj_checkout_fees_data_types', array() );
81
- $values = get_option( 'wcj_checkout_fees_data_values', array() );
82
- $taxable = get_option( 'wcj_checkout_fees_data_taxable', array() );
83
-
84
- $total_number = apply_filters( 'booster_option', 1, get_option( 'wcj_checkout_fees_total_number', 1 ) );
85
- $fees_to_add = array();
86
- for ( $i = 1; $i <= $total_number; $i++ ) {
87
- // Validating the fee
88
- if (
89
- ( isset( $enabled[ $i ] ) && 'no' === $enabled[ $i ] ) ||
90
- ( 0 == ( $value = ( isset( $values[ $i ] ) ? $values[ $i ] : 0 ) ) )
91
- ) {
92
- continue;
93
- }
94
- if ( ! empty( $this->checkout_fields[ $i ] ) ) {
95
- if ( isset( $post_data ) || isset( $_REQUEST['post_data'] ) ) {
96
- if ( ! isset( $post_data ) ) {
97
- $post_data = array();
98
- parse_str( $_REQUEST['post_data'], $post_data );
99
- }
100
- if ( empty( $post_data[ $this->checkout_fields[ $i ] ] ) ) {
101
- continue;
102
- }
103
- } elseif ( empty( $_REQUEST[ $this->checkout_fields[ $i ] ] ) ) {
104
- continue;
105
- }
106
- }
107
- // Adding the fee
108
- $title = ( isset( $titles[ $i ] ) ? $titles[ $i ] : __( 'Fee', 'woocommerce-jetpack' ) . ' #' . $i );
109
- if ( isset( $types[ $i ] ) && 'percent' === $types[ $i ] ) {
110
- $value = $cart->get_cart_contents_total() * $value / 100;
111
- }
112
- $fees_to_add[ $title ] = array(
113
- 'name' => $title,
114
- 'amount' => $value,
115
- 'taxable' => ( isset( $taxable[ $i ] ) ? ( 'yes' === $taxable[ $i ] ) : true ),
116
- 'tax_class' => 'standard',
117
- );
118
- }
119
 
120
  if ( ! empty( $fees_to_add ) ) {
121
  foreach ( $fees_to_add as $fee_to_add ) {
2
  /**
3
  * Booster for WooCommerce - Module - Checkout Fees
4
  *
5
+ * @version 4.5.0
6
  * @since 3.7.0
7
  * @author Algoritmika Ltd.
8
  */
16
  /**
17
  * Constructor.
18
  *
19
+ * @version 4.5.0
20
  * @since 3.7.0
21
  * @todo (maybe) rename module to "Cart & Checkout Fees"
22
  */
32
  // Core function
33
  add_action( 'woocommerce_cart_calculate_fees', array( $this, 'add_fees' ), PHP_INT_MAX );
34
  // Checkout fields
35
+ $this->checkout_fields = $this->get_option( 'wcj_checkout_fees_data_checkout_fields', array() );
36
  $this->checkout_fields = array_filter( $this->checkout_fields );
37
  if ( ! empty( $this->checkout_fields ) ) {
38
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
55
  }
56
  }
57
 
58
+ /**
59
+ * Validate fee without considering overlapping.
60
+ *
61
+ * @version 4.5.0
62
+ * @since 4.5.0
63
+ *
64
+ * @param $fee_id
65
+ * @param WC_Cart $cart
66
+ *
67
+ * @return bool
68
+ */
69
+ function is_fee_valid( $fee_id, \WC_Cart $cart ) {
70
+ $fees = $this->get_fees();
71
+ $enabled = $this->get_option( 'wcj_checkout_fees_data_enabled', array() );
72
+ $values = $this->get_option( 'wcj_checkout_fees_data_values', array() );
73
+
74
+ // Check if is active and empty value
75
+ if (
76
+ ( isset( $enabled[ $fee_id ] ) && 'no' === $enabled[ $fee_id ] ) ||
77
+ ( 0 == ( $value = ( isset( $values[ $fee_id ] ) ? $values[ $fee_id ] : 0 ) ) )
78
+ ) {
79
+ return false;
80
+ }
81
+
82
+ // Check cart amount
83
+ if (
84
+ $cart->get_cart_contents_count() < $fees[ $fee_id ]['cart_min'] ||
85
+ ( $fees[ $fee_id ]['cart_max'] > 0 && $cart->get_cart_contents_count() > $fees[ $fee_id ]['cart_max'] )
86
+ ) {
87
+ return false;
88
+ }
89
+
90
+ // Check checkout fields
91
+ if ( ! empty( $this->checkout_fields[ $fee_id ] ) ) {
92
+ if ( isset( $post_data ) || isset( $_REQUEST['post_data'] ) ) {
93
+ if ( ! isset( $post_data ) ) {
94
+ $post_data = array();
95
+ parse_str( $_REQUEST['post_data'], $post_data );
96
+ }
97
+ if ( empty( $post_data[ $this->checkout_fields[ $fee_id ] ] ) ) {
98
+ return false;
99
+ }
100
+ } elseif ( empty( $_REQUEST[ $this->checkout_fields[ $fee_id ] ] ) ) {
101
+ return false;
102
+ }
103
+ }
104
+ return true;
105
+ }
106
+
107
+ /**
108
+ * @version 4.5.0
109
+ * @since 4.5.0
110
+ *
111
+ * @param $valid_fees
112
+ *
113
+ * @return array
114
+ */
115
+ function get_overlapped_fees( $valid_fees ) {
116
+ $fees = $this->get_fees();
117
+ $overlapped = array();
118
+ foreach ( $valid_fees as $fee_id ) {
119
+ if ( ! in_array( $fee_id, $overlapped ) ) {
120
+ $overlapped = array_unique( array_merge( $overlapped, $fees[ $fee_id ]['overlap'] ) );
121
+ }
122
+ }
123
+ return $overlapped;
124
+ }
125
+
126
+ /**
127
+ * Get Fees.
128
+ *
129
+ * @version 4.5.0
130
+ * @since 4.5.0
131
+ *
132
+ * @param bool $only_enabled
133
+ * @param bool $adjust_priority
134
+ *
135
+ * @return array
136
+ */
137
+ function get_fees( $only_enabled = true, $adjust_priority = true ) {
138
+ $total_number = apply_filters( 'booster_option', 1, $this->get_option( 'wcj_checkout_fees_total_number', 1 ) );
139
+ $titles = $this->get_option( 'wcj_checkout_fees_data_titles', array() );
140
+ $types = $this->get_option( 'wcj_checkout_fees_data_types', array() );
141
+ $values = $this->get_option( 'wcj_checkout_fees_data_values', array() );
142
+ $cart_min = $this->get_option( 'wcj_checkout_fees_cart_min_amount', array() );
143
+ $cart_max = $this->get_option( 'wcj_checkout_fees_cart_max_amount', array() );
144
+ $taxable = $this->get_option( 'wcj_checkout_fees_data_taxable', array() );
145
+ $checkout_fields = $this->get_option( 'wcj_checkout_fees_data_values', array() );
146
+ $enabled = $this->get_option( 'wcj_checkout_fees_data_enabled', array() );
147
+ $overlap_opt = $this->get_option( 'wcj_checkout_fees_overlap', array() );
148
+ $priorities = $this->get_option( 'wcj_checkout_fees_priority', array() );
149
+
150
+ $fees = array();
151
+ for ( $i = 1; $i <= $total_number; $i ++ ) {
152
+ if ( ! isset( $priorities[ $i ] ) || empty( $priorities[ $i ] ) ) {
153
+ $priorities[ $i ] = 0;
154
+ }
155
+ $enabled = isset( $enabled[ $i ] ) ? $enabled[ $i ] : 'yes';
156
+ if ( $only_enabled && "no" === $enabled ) {
157
+ continue;
158
+ }
159
+ $fees[ $i ] = array(
160
+ 'enabled' => $enabled,
161
+ 'cart_min' => isset( $cart_min[ $i ] ) ? $cart_min[ $i ] : 1,
162
+ 'cart_max' => isset( $cart_max[ $i ] ) ? $cart_max[ $i ] : 0,
163
+ 'title' => isset( $titles[ $i ] ) ? $titles[ $i ] : '',
164
+ 'type' => isset( $types[ $i ] ) ? $types[ $i ] : 'fixed',
165
+ 'value' => isset( $values[ $i ] ) ? $values[ $i ] : 0,
166
+ 'priority' => isset( $priorities[ $i ] ) ? ( $priorities[ $i ] ) : 0,
167
+ 'taxable' => isset( $taxable[ $i ] ) ? $taxable[ $i ] : 'yes',
168
+ 'checkout_field' => isset( $checkout_fields[ $i ] ) ? $checkout_fields[ $i ] : '',
169
+ 'overlap' => isset( $overlap_opt[ $i ] ) ? $overlap_opt[ $i ] : array(),
170
+ );
171
+ }
172
+ if ( $adjust_priority ) {
173
+ uksort( $fees, function ( $a, $b ) use ( $fees, $priorities ) {
174
+ return $priorities[ $a ] < $priorities[ $b ];
175
+ } );
176
+ }
177
+ return $fees;
178
+ }
179
+
180
+ /**
181
+ * Get valid fees.
182
+ *
183
+ * @version 4.5.0
184
+ * @since 4.5.0
185
+ *
186
+ * @param $cart
187
+ * @param bool $ignore_overlapped
188
+ *
189
+ * @return array
190
+ */
191
+ function get_valid_fees( $cart, $ignore_overlapped = true ) {
192
+ $titles = $this->get_option( 'wcj_checkout_fees_data_titles', array() );
193
+ $types = $this->get_option( 'wcj_checkout_fees_data_types', array() );
194
+ $values = $this->get_option( 'wcj_checkout_fees_data_values', array() );
195
+ $taxable = $this->get_option( 'wcj_checkout_fees_data_taxable', array() );
196
+
197
+ //$total_number = apply_filters( 'booster_option', 1, $this->get_option( 'wcj_checkout_fees_total_number', 1 ) );
198
+ $fees = $this->get_fees();
199
+
200
+ $fees_to_add = array();
201
+ $valid_fees = array();
202
+
203
+ // Get Valid fees
204
+ foreach ( $fees as $fee_id => $fee_title ) {
205
+ if ( ! $this->is_fee_valid( $fee_id, $cart ) ) {
206
+ continue;
207
+ }
208
+ $valid_fees[] = $fee_id;
209
+ }
210
+
211
+ // Ignore overlapped
212
+ if ( $ignore_overlapped ) {
213
+ $overlapped_fees = $this->get_overlapped_fees( $valid_fees );
214
+ $valid_fees = array_diff( $valid_fees, $overlapped_fees );
215
+ }
216
+
217
+ foreach ( $valid_fees as $fee_id ) {
218
+ // Adding the fee
219
+ $title = ( isset( $titles[ $fee_id ] ) ? $titles[ $fee_id ] : __( 'Fee', 'woocommerce-jetpack' ) . ' #' . $fee_id );
220
+ $value = isset( $values[ $fee_id ] ) ? $values[ $fee_id ] : 0;
221
+ if ( isset( $types[ $fee_id ] ) && 'percent' === $types[ $fee_id ] ) {
222
+ $value = $cart->get_cart_contents_total() * $value / 100;
223
+ }
224
+ $fees_to_add[ $fee_id ] = array(
225
+ 'name' => $title,
226
+ 'amount' => $value,
227
+ 'taxable' => ( isset( $taxable[ $fee_id ] ) ? ( 'yes' === $taxable[ $fee_id ] ) : true ),
228
+ 'tax_class' => 'standard',
229
+ );
230
+ }
231
+
232
+ return $fees_to_add;
233
+ }
234
+
235
  /**
236
  * add_fees.
237
  *
238
+ * @version 4.5.0
239
  * @since 3.7.0
240
  * @todo fees with same title
241
  * @todo options: `tax_class`
252
  return;
253
  }
254
 
255
+ $fees_to_add = $this->get_valid_fees( $cart );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
256
 
257
  if ( ! empty( $fees_to_add ) ) {
258
  foreach ( $fees_to_add as $fee_to_add ) {
includes/class-wcj-general.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - General
4
  *
5
- * @version 4.1.0
6
  * @author Algoritmika Ltd.
7
  */
8
 
@@ -15,7 +15,7 @@ class WCJ_General extends WCJ_Module {
15
  /**
16
  * Constructor.
17
  *
18
- * @version 4.1.0
19
  * @todo [dev] maybe expand `$this->desc` (e.g.: Custom roles tool, shortcodes in WordPress text widgets etc.)
20
  */
21
  function __construct() {
@@ -80,6 +80,13 @@ class WCJ_General extends WCJ_Module {
80
  add_action( 'init', array( $this, 'change_user_role_meta' ) );
81
  }
82
 
 
 
 
 
 
 
 
83
  }
84
  }
85
 
2
  /**
3
  * Booster for WooCommerce - Module - General
4
  *
5
+ * @version 4.5.0
6
  * @author Algoritmika Ltd.
7
  */
8
 
15
  /**
16
  * Constructor.
17
  *
18
+ * @version 4.5.0
19
  * @todo [dev] maybe expand `$this->desc` (e.g.: Custom roles tool, shortcodes in WordPress text widgets etc.)
20
  */
21
  function __construct() {
80
  add_action( 'init', array( $this, 'change_user_role_meta' ) );
81
  }
82
 
83
+ // Try to overwrite WooCommerce IP detection
84
+ if ( 'yes' === get_option( 'wcj_general_overwrite_wc_ip', 'no' ) ) {
85
+ if ( isset( $_SERVER['REMOTE_ADDR'] ) ) {
86
+ $_SERVER['HTTP_X_REAL_IP'] = wcj_get_the_ip();
87
+ }
88
+ }
89
+
90
  }
91
  }
92
 
includes/class-wcj-multicurrency-product-base-price.php CHANGED
@@ -248,7 +248,7 @@ if ( ! class_exists( 'WCJ_Multicurrency_Base_Price' ) ) :
248
  * @param $old_value
249
  * @param $option_value
250
  */
251
- function update_products_base_price_on_exchange_rate_change( $option_name, $old_value, $option_value){
252
  if (
253
  'no' === get_option( 'wcj_multicurrency_base_price_advanced_price_filter_comp', 'no' ) ||
254
  false === strpos( $option_name, 'wcj_multicurrency_base_price_exchange_rate_' )
248
  * @param $old_value
249
  * @param $option_value
250
  */
251
+ function update_products_base_price_on_exchange_rate_change( $option_name, $old_value, $option_value ){
252
  if (
253
  'no' === get_option( 'wcj_multicurrency_base_price_advanced_price_filter_comp', 'no' ) ||
254
  false === strpos( $option_name, 'wcj_multicurrency_base_price_exchange_rate_' )
includes/class-wcj-multicurrency.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Multicurrency (Currency Switcher)
4
  *
5
- * @version 4.4.0
6
  * @since 2.4.3
7
  * @author Algoritmika Ltd.
8
  */
@@ -13,10 +13,15 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
13
 
14
  class WCJ_Multicurrency extends WCJ_Module {
15
 
 
 
 
 
 
16
  /**
17
  * Constructor.
18
  *
19
- * @version 4.3.0
20
  * @todo check if we can just always execute `init()` on `init` hook
21
  */
22
  function __construct() {
@@ -61,13 +66,32 @@ class WCJ_Multicurrency extends WCJ_Module {
61
  if ( is_admin() ) {
62
  include_once( 'reports/class-wcj-currency-reports.php' );
63
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  }
65
  }
66
 
67
  /**
68
  * Handles third party compatibility
69
  *
70
- * @version 4.4.0
71
  * @since 4.3.0
72
  */
73
  function handle_third_party_compatibility(){
@@ -76,10 +100,24 @@ class WCJ_Multicurrency extends WCJ_Module {
76
  add_filter( 'woocommerce_coupon_get_amount', array( $this, 'smart_coupons_get_amount' ), 10, 2 );
77
  }
78
 
 
 
 
79
  // WooCommerce Price Filter Widget
80
- if ( 'yes' === get_option( 'wcj_multicurrency_compatibility_wc_price_filter' , 'yes' ) ) {
81
  add_action( 'wp_footer', array( $this, 'add_compatibility_with_price_filter_widget' ) );
82
  add_action( 'wp_footer', array( $this, 'fix_price_filter_widget_currency_format' ) );
 
 
 
 
 
 
 
 
 
 
 
83
  }
84
 
85
  // Fix WooCommerce Import
@@ -88,6 +126,199 @@ class WCJ_Multicurrency extends WCJ_Module {
88
  }
89
  }
90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  /**
92
  * Fixes WooCommerce import.
93
  *
@@ -126,8 +357,11 @@ class WCJ_Multicurrency extends WCJ_Module {
126
  }
127
 
128
  /**
129
- * Adds compatibility with WooCommerce Price Filter widget
130
- * @version 4.3.0
 
 
 
131
  * @since 4.3.0
132
  */
133
  function add_compatibility_with_price_filter_widget() {
@@ -137,9 +371,12 @@ class WCJ_Multicurrency extends WCJ_Module {
137
  ?>
138
  <?php
139
  $exchange_rate = $this->get_currency_exchange_rate( $this->get_current_currency_code() );
 
 
 
140
  ?>
141
  <input type="hidden" id="wcj_mc_exchange_rate" value="<?php echo esc_html( $exchange_rate ) ?>"/>
142
- <script>
143
  var wcj_mc_pf_slider = {
144
  slider: null,
145
  convert_rate: 1,
@@ -149,24 +386,28 @@ class WCJ_Multicurrency extends WCJ_Module {
149
  current_min: 1,
150
  current_max: 1,
151
  current_values: [],
 
152
 
153
- init(slider, convert_rate) {
 
154
  this.slider = slider;
155
  this.convert_rate = convert_rate;
156
  this.original_min = jQuery(this.slider).slider("option", "min");
157
  this.original_max = jQuery(this.slider).slider("option", "max");
 
 
 
 
 
 
158
  this.original_values = jQuery(this.slider).slider("option", "values");
159
  this.current_min = this.original_min * this.convert_rate;
160
  this.current_max = this.original_max * this.convert_rate;
161
- this.current_values = this.original_values.map(function (elem) {
162
- return elem * wcj_mc_pf_slider.convert_rate;
163
- });
164
  this.update_slider();
165
  },
166
 
167
- /**
168
- * @see price-slider.js, init_price_filter()
169
- */
170
  update_slider() {
171
  jQuery(this.slider).slider("destroy");
172
  var current_min_price = Math.floor(this.current_min);
@@ -177,19 +418,22 @@ class WCJ_Multicurrency extends WCJ_Module {
177
  animate: true,
178
  min: current_min_price,
179
  max: current_max_price,
 
180
  values: wcj_mc_pf_slider.current_values,
181
  create: function () {
182
- jQuery(wcj_mc_pf_slider.slider).parent().find('.price_slider_amount #min_price').val(wcj_mc_pf_slider.current_values[0] / wcj_mc_pf_slider.convert_rate);
183
- jQuery(wcj_mc_pf_slider.slider).parent().find('.price_slider_amount #max_price').val(wcj_mc_pf_slider.current_values[1] / wcj_mc_pf_slider.convert_rate);
184
  jQuery(document.body).trigger('price_slider_create', [Math.floor(wcj_mc_pf_slider.current_values[0]), Math.ceil(wcj_mc_pf_slider.current_values[1])]);
185
  },
186
  slide: function (event, ui) {
187
  jQuery(wcj_mc_pf_slider.slider).parent().find('.price_slider_amount #min_price').val(Math.floor(ui.values[0] / wcj_mc_pf_slider.convert_rate));
188
  jQuery(wcj_mc_pf_slider.slider).parent().find('.price_slider_amount #max_price').val(Math.ceil(ui.values[1] / wcj_mc_pf_slider.convert_rate));
189
- jQuery(document.body).trigger('price_slider_slide', [Math.floor(ui.values[0]), Math.ceil(ui.values[1])]);
 
 
190
  },
191
  change: function (event, ui) {
192
- jQuery(document.body).trigger('price_slider_change', [Math.floor(ui.values[0]), Math.ceil(ui.values[1])]);
193
  }
194
  });
195
  }
@@ -197,6 +441,7 @@ class WCJ_Multicurrency extends WCJ_Module {
197
  var wcj_mc_pf = {
198
  price_filters: null,
199
  rate: 1,
 
200
  init: function (price_filters) {
201
  this.price_filters = price_filters;
202
  this.rate = document.getElementById('wcj_mc_exchange_rate').value;
@@ -204,7 +449,7 @@ class WCJ_Multicurrency extends WCJ_Module {
204
  },
205
  update_slider: function () {
206
  [].forEach.call(wcj_mc_pf.price_filters, function (el) {
207
- wcj_mc_pf_slider.init(el, wcj_mc_pf.rate);
208
  });
209
  }
210
  }
@@ -214,7 +459,7 @@ class WCJ_Multicurrency extends WCJ_Module {
214
  wcj_mc_pf.init(price_filters);
215
  }
216
  });
217
- </script>
218
  <?php
219
  }
220
 
@@ -281,6 +526,133 @@ class WCJ_Multicurrency extends WCJ_Module {
281
  $this->additional_price_filters = array();
282
  }
283
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284
  }
285
  }
286
 
@@ -492,7 +864,7 @@ class WCJ_Multicurrency extends WCJ_Module {
492
  /**
493
  * change_price.
494
  *
495
- * @version 3.8.0
496
  */
497
  function change_price( $price, $_product ) {
498
  if ( '' === $price ) {
@@ -532,7 +904,7 @@ class WCJ_Multicurrency extends WCJ_Module {
532
 
533
  // Global
534
  if ( 1 != ( $currency_exchange_rate = $this->get_currency_exchange_rate( $this->get_current_currency_code() ) ) ) {
535
- $price = $price * $currency_exchange_rate;
536
  switch ( get_option( 'wcj_multicurrency_rounding', 'no_round' ) ) {
537
  case 'round':
538
  $price = round( $price, get_option( 'wcj_multicurrency_rounding_precision', absint( get_option( 'woocommerce_price_num_decimals', 2 ) ) ) );
2
  /**
3
  * Booster for WooCommerce - Module - Multicurrency (Currency Switcher)
4
  *
5
+ * @version 4.5.0
6
  * @since 2.4.3
7
  * @author Algoritmika Ltd.
8
  */
13
 
14
  class WCJ_Multicurrency extends WCJ_Module {
15
 
16
+ /**
17
+ * @var WCJ_Multicurrency_Price_Updater
18
+ */
19
+ protected $bkg_process_price_updater;
20
+
21
  /**
22
  * Constructor.
23
  *
24
+ * @version 4.5.0
25
  * @todo check if we can just always execute `init()` on `init` hook
26
  */
27
  function __construct() {
66
  if ( is_admin() ) {
67
  include_once( 'reports/class-wcj-currency-reports.php' );
68
  }
69
+
70
+ if ( 'init' === current_filter() ) {
71
+ $this->init_bkg_process_class();
72
+ } else {
73
+ add_action( 'plugins_loaded', array( $this, 'init_bkg_process_class' ) );
74
+ }
75
+ }
76
+ }
77
+
78
+ /**
79
+ * init_bkg_process_class.
80
+ *
81
+ * @version 4.5.0
82
+ * @since 4.5.0
83
+ */
84
+ function init_bkg_process_class() {
85
+ if ( 'yes' === get_option( 'wcj_multicurrency_update_prices_on_exch_update', 'no' ) ) {
86
+ require_once( wcj_plugin_path() . '/includes/background-process/class-wcj-multicurrency-price-updater.php' );
87
+ $this->bkg_process_price_updater = new WCJ_Multicurrency_Price_Updater();
88
  }
89
  }
90
 
91
  /**
92
  * Handles third party compatibility
93
  *
94
+ * @version 4.5.0
95
  * @since 4.3.0
96
  */
97
  function handle_third_party_compatibility(){
100
  add_filter( 'woocommerce_coupon_get_amount', array( $this, 'smart_coupons_get_amount' ), 10, 2 );
101
  }
102
 
103
+ // WooCommerce Coupons
104
+ add_action( 'woocommerce_coupon_get_discount_amount', array( $this, 'fix_wc_coupon_currency' ), 10, 5 );
105
+
106
  // WooCommerce Price Filter Widget
107
+ if ( 'yes' === get_option( 'wcj_multicurrency_compatibility_wc_price_filter' , 'no' ) ) {
108
  add_action( 'wp_footer', array( $this, 'add_compatibility_with_price_filter_widget' ) );
109
  add_action( 'wp_footer', array( $this, 'fix_price_filter_widget_currency_format' ) );
110
+ add_filter( 'woocommerce_price_filter_sql', array( $this, 'get_price_filter_sql_compatible' ), 10, 3 );
111
+ add_filter( 'posts_clauses', array( $this, 'posts_clauses_price_filter_compatible' ), 11, 2 );
112
+ add_filter( 'woocommerce_price_filter_widget_step', function ( $step ) {
113
+ $step = 1;
114
+ return $step;
115
+ } );
116
+ }
117
+
118
+ // Sort by Price
119
+ if ( 'yes' === get_option( 'wcj_multicurrency_compatibility_price_sorting_per_product', 'no' ) ) {
120
+ add_filter( 'woocommerce_get_catalog_ordering_args', array( $this, 'handle_per_product_opt_with_sort_by_price' ), 29, 3 );
121
  }
122
 
123
  // Fix WooCommerce Import
126
  }
127
  }
128
 
129
+ /**
130
+ * fix_wc_coupon_currency.
131
+ *
132
+ * @version 4.5.0
133
+ * @since 4.5.0
134
+ *
135
+ * @param $amount
136
+ * @param $discount
137
+ * @param $cart_item
138
+ * @param $single
139
+ * @param $wc_coupon
140
+ *
141
+ * @return float|int
142
+ */
143
+ function fix_wc_coupon_currency( $amount, $discount, $cart_item, $single, $wc_coupon ) {
144
+ if (
145
+ 'yes' !== get_option( 'wcj_multicurrency_compatibility_wc_coupons', 'no' ) ||
146
+ 'fixed_cart' !== $wc_coupon->get_discount_type()
147
+ ) {
148
+ return $amount;
149
+ }
150
+ $amount = $this->change_price( $amount, null );
151
+
152
+ return $amount;
153
+ }
154
+
155
+ /**
156
+ * Fixes sort by price when `wcj_multicurrency_per_product_enabled` is enabled.
157
+ *
158
+ * @version 4.5.0
159
+ * @since 4.5.0
160
+ *
161
+ * @param $args
162
+ * @param $orderby
163
+ * @param $order
164
+ *
165
+ * @return mixed
166
+ */
167
+ function handle_per_product_opt_with_sort_by_price( $args, $orderby, $order ) {
168
+ if (
169
+ $orderby != 'price' ||
170
+ is_admin() ||
171
+ ! is_main_query() ||
172
+ 'no' === get_option( 'wcj_multicurrency_per_product_enabled', 'no' ) ||
173
+ get_option( 'woocommerce_currency' ) === $this->get_current_currency_code() ||
174
+ 1 === $this->get_currency_exchange_rate( $this->get_current_currency_code()
175
+ )
176
+ ) {
177
+ return $args;
178
+ }
179
+ $order = 'DESC' === $order ? $order : 'ASC';
180
+ add_filter( 'posts_clauses', function ( $clauses ) use ( $order ) {
181
+ global $wpdb;
182
+ if (
183
+ false === strpos( $clauses['orderby'], 'wc_product_meta_lookup.max_price DESC' ) &&
184
+ false === strpos( $clauses['orderby'], 'wc_product_meta_lookup.min_price ASC' )
185
+ ) {
186
+ return $clauses;
187
+ }
188
+ $current_currency_code = $this->get_current_currency_code();
189
+ $exchange_rate = $this->get_currency_exchange_rate( $current_currency_code );
190
+
191
+ $min_max_join = "LEFT JOIN {$wpdb->postmeta} AS pm on pm.post_id = {$wpdb->posts}.ID AND (pm.meta_key IN ('_wcj_multicurrency_per_product_min_price_{$current_currency_code}','_wcj_multicurrency_per_product_max_price_{$current_currency_code}') and pm.meta_value!='')";
192
+ if ( false === strpos( $clauses['join'], $min_max_join ) ) {
193
+ $clauses['join'] .= " {$min_max_join} ";
194
+ }
195
+ if ( 'DESC' === $order ) {
196
+ $clauses['fields'] .= ", CAST(IFNULL(MAX(cast(pm.meta_value as signed))/{$exchange_rate},max_price) AS signed) AS wcj_price ";
197
+ } else {
198
+ $clauses['fields'] .= ", CAST(IFNULL(MIN(cast(pm.meta_value as signed))/{$exchange_rate},min_price) AS signed) AS wcj_price ";
199
+ }
200
+ $clauses['orderby'] = " wcj_price {$order}, wc_product_meta_lookup.product_id {$order} ";
201
+
202
+ return $clauses;
203
+ }, 99 );
204
+ return $args;
205
+ }
206
+
207
+ /**
208
+ * Makes Price Filter Widget filter correct products if Per product option `wcj_multicurrency_per_product_enabled` is enabled.
209
+ *
210
+ * First it removes products witch `_wcj_multicurrency_per_product_regular_price_{$current_currency_code}` meta don't match min and max.
211
+ * Then it adds products witch `_wcj_multicurrency_per_product_regular_price_{$current_currency_code}` meta match min and max.
212
+ *
213
+ * @version 4.5.0
214
+ * @since 4.5.0
215
+ *
216
+ * @see WC_Query::price_filter_post_clauses()
217
+ *
218
+ * @param $args
219
+ * @param $query
220
+ *
221
+ * @return mixed
222
+ */
223
+ function posts_clauses_price_filter_compatible( $args, $query ) {
224
+ if (
225
+ is_admin() ||
226
+ 'no' === get_option( 'wcj_multicurrency_per_product_enabled', 'no' ) ||
227
+ get_option( 'woocommerce_currency' ) === $this->get_current_currency_code() ||
228
+ 1 === $this->get_currency_exchange_rate( $this->get_current_currency_code() ) ||
229
+ ! isset( $args['where'] ) ||
230
+ (
231
+ false === strpos( $args['where'], 'wc_product_meta_lookup.min_price >=' ) &&
232
+ false === strpos( $args['where'], 'wc_product_meta_lookup.max_price <=' )
233
+ )
234
+ ) {
235
+ return $args;
236
+ }
237
+
238
+ global $wpdb;
239
+ $current_currency_code = $this->get_current_currency_code();
240
+ $exchange_rate = $this->get_currency_exchange_rate( $current_currency_code );
241
+
242
+ $min_price = isset( $_GET['min_price'] ) ? floatval( wp_unslash( $_GET['min_price'] ) ) : 0;
243
+ $max_price = isset( $_GET['max_price'] ) ? floatval( wp_unslash( $_GET['max_price'] ) ) : PHP_INT_MAX;
244
+ $min_max_join = "LEFT JOIN {$wpdb->postmeta} AS pm on pm.post_id = {$wpdb->posts}.ID AND (pm.meta_key IN ('_wcj_multicurrency_per_product_min_price_{$current_currency_code}','_wcj_multicurrency_per_product_max_price_{$current_currency_code}') and pm.meta_value!='')";
245
+ if ( false === strpos( $args['join'], $min_max_join ) ) {
246
+ $args['join'] .= " {$min_max_join} ";
247
+ }
248
+ $args['fields'] .= ", CAST(IFNULL(MIN(cast(pm.meta_value as signed))/{$exchange_rate},min_price) AS signed) AS wcj_min_price ";
249
+ $args['fields'] .= ", CAST(IFNULL(MAX(cast(pm.meta_value as signed))/{$exchange_rate},max_price) AS signed) AS wcj_max_price ";
250
+ $args['where'] = preg_replace( '/and wc_product_meta_lookup.min_price >= \d.* and wc_product_meta_lookup.max_price <= \d.*\s/i', '', $args['where'] );
251
+ $args['groupby'] .= " having wcj_min_price >= $min_price AND wcj_min_price <= $max_price ";
252
+ return $args;
253
+ }
254
+
255
+ /**
256
+ * Makes Price Filter Widget show correct min and max values if Per product option `wcj_multicurrency_per_product_enabled` is enabled.
257
+ *
258
+ * It works comparing min and max values from "_wcj_multicurrency_per_product_regular_price_{currency_code}" meta as well as min and max price from wc_product_meta_lookup
259
+ *
260
+ * @version 4.5.0
261
+ * @since 4.5.0
262
+ *
263
+ * @see WC_Widget_Price_Filter::get_filtered_price()
264
+ *
265
+ * @param $sql
266
+ *
267
+ * @return mixed
268
+ */
269
+ function get_price_filter_sql_compatible( $sql, $meta_query_sql, $tax_query_sql ) {
270
+ if (
271
+ is_admin() ||
272
+ 'no' === get_option( 'wcj_multicurrency_per_product_enabled', 'no' ) ||
273
+ get_option( 'woocommerce_currency' ) === $this->get_current_currency_code() ||
274
+ 1 === $this->get_currency_exchange_rate( $this->get_current_currency_code() )
275
+ ) {
276
+ return $sql;
277
+ }
278
+
279
+ global $wpdb;
280
+ $current_currency_code = $this->get_current_currency_code();
281
+ $exchange_rate = $this->get_currency_exchange_rate( $current_currency_code );
282
+ $args = WC()->query->get_main_query()->query_vars;
283
+ $tax_query = isset( $args['tax_query'] ) ? $args['tax_query'] : array();
284
+ $meta_query = isset( $args['meta_query'] ) ? $args['meta_query'] : array();
285
+
286
+ if ( ! is_post_type_archive( 'product' ) && ! empty( $args['taxonomy'] ) && ! empty( $args['term'] ) ) {
287
+ $tax_query[] = array(
288
+ 'taxonomy' => $args['taxonomy'],
289
+ 'terms' => array( $args['term'] ),
290
+ 'field' => 'slug',
291
+ );
292
+ }
293
+
294
+ foreach ( $meta_query + $tax_query as $key => $query ) {
295
+ if ( ! empty( $query['price_filter'] ) || ! empty( $query['rating_filter'] ) ) {
296
+ unset( $meta_query[ $key ] );
297
+ }
298
+ }
299
+
300
+ $search = WC_Query::get_main_search_query_sql();
301
+ $search_query_sql = $search ? ' AND ' . $search : '';
302
+
303
+ $sql = "
304
+ SELECT min(wcj_min_price) as min_price, max(wcj_max_price) as max_price
305
+ FROM(
306
+ SELECT cast(IFNULL(MIN(cast(pm.meta_value as signed))/{$exchange_rate},min_price) as signed) AS wcj_min_price, cast(IFNULL(MAX(cast(pm.meta_value as signed))/{$exchange_rate},max_price) as signed) AS wcj_max_price
307
+ FROM {$wpdb->wc_product_meta_lookup}
308
+ LEFT JOIN {$wpdb->postmeta} AS pm on pm.post_id = product_id AND (pm.meta_key IN ('_wcj_multicurrency_per_product_min_price_{$current_currency_code}','_wcj_multicurrency_per_product_max_price_{$current_currency_code}') and pm.meta_value!='')
309
+ WHERE product_id IN (
310
+ SELECT ID FROM {$wpdb->posts}
311
+ " . $tax_query_sql['join'] . $meta_query_sql['join'] . "
312
+ WHERE {$wpdb->posts}.post_type IN ('" . implode( "','", array_map( 'esc_sql', apply_filters( 'woocommerce_price_filter_post_type', array( 'product' ) ) ) ) . "')
313
+ AND {$wpdb->posts}.post_status = 'publish'
314
+ " . $tax_query_sql['where'] . $meta_query_sql['where'] . $search_query_sql . '
315
+ )
316
+ group by product_id
317
+ ) as wcj_min_max_price
318
+ ';
319
+ return $sql;
320
+ }
321
+
322
  /**
323
  * Fixes WooCommerce import.
324
  *
357
  }
358
 
359
  /**
360
+ * Adds compatibility with WooCommerce Price Filter widget.
361
+ *
362
+ * @see price-slider.js, init_price_filter()
363
+ *
364
+ * @version 4.5.0
365
  * @since 4.3.0
366
  */
367
  function add_compatibility_with_price_filter_widget() {
371
  ?>
372
  <?php
373
  $exchange_rate = $this->get_currency_exchange_rate( $this->get_current_currency_code() );
374
+ if ( $exchange_rate == 1 ) {
375
+ return;
376
+ }
377
  ?>
378
  <input type="hidden" id="wcj_mc_exchange_rate" value="<?php echo esc_html( $exchange_rate ) ?>"/>
379
+ <script>
380
  var wcj_mc_pf_slider = {
381
  slider: null,
382
  convert_rate: 1,
386
  current_min: 1,
387
  current_max: 1,
388
  current_values: [],
389
+ step: 1,
390
 
391
+ init(slider, convert_rate, step) {
392
+ this.step = step;
393
  this.slider = slider;
394
  this.convert_rate = convert_rate;
395
  this.original_min = jQuery(this.slider).slider("option", "min");
396
  this.original_max = jQuery(this.slider).slider("option", "max");
397
+ if (this.original_min > jQuery(this.slider).parent().find('#min_price').val()) {
398
+ jQuery(this.slider).parent().find('#min_price').attr('value', this.original_min);
399
+ }
400
+ if (this.original_max < jQuery(this.slider).parent().find('#max_price').val()) {
401
+ jQuery(this.slider).parent().find('#max_price').attr('value', this.original_max);
402
+ }
403
  this.original_values = jQuery(this.slider).slider("option", "values");
404
  this.current_min = this.original_min * this.convert_rate;
405
  this.current_max = this.original_max * this.convert_rate;
406
+ this.current_values[0] = jQuery(this.slider).parent().find('#min_price').val() * wcj_mc_pf_slider.convert_rate;
407
+ this.current_values[1] = jQuery(this.slider).parent().find('#max_price').val() * wcj_mc_pf_slider.convert_rate;
 
408
  this.update_slider();
409
  },
410
 
 
 
 
411
  update_slider() {
412
  jQuery(this.slider).slider("destroy");
413
  var current_min_price = Math.floor(this.current_min);
418
  animate: true,
419
  min: current_min_price,
420
  max: current_max_price,
421
+ step: parseFloat(this.step),
422
  values: wcj_mc_pf_slider.current_values,
423
  create: function () {
424
+ jQuery(wcj_mc_pf_slider.slider).parent().find('.price_slider_amount #min_price').val(Math.floor(wcj_mc_pf_slider.current_values[0] / wcj_mc_pf_slider.convert_rate));
425
+ jQuery(wcj_mc_pf_slider.slider).parent().find('.price_slider_amount #max_price').val(Math.ceil(wcj_mc_pf_slider.current_values[1] / wcj_mc_pf_slider.convert_rate));
426
  jQuery(document.body).trigger('price_slider_create', [Math.floor(wcj_mc_pf_slider.current_values[0]), Math.ceil(wcj_mc_pf_slider.current_values[1])]);
427
  },
428
  slide: function (event, ui) {
429
  jQuery(wcj_mc_pf_slider.slider).parent().find('.price_slider_amount #min_price').val(Math.floor(ui.values[0] / wcj_mc_pf_slider.convert_rate));
430
  jQuery(wcj_mc_pf_slider.slider).parent().find('.price_slider_amount #max_price').val(Math.ceil(ui.values[1] / wcj_mc_pf_slider.convert_rate));
431
+ var the_min = ui.values[0] == Math.round(wcj_mc_pf_slider.current_values[0]) ? Math.floor(wcj_mc_pf_slider.current_values[0]) : ui.values[0];
432
+ var the_max = ui.values[1] == Math.round(wcj_mc_pf_slider.current_values[1]) ? Math.ceil(wcj_mc_pf_slider.current_values[1]) : ui.values[1];
433
+ jQuery(document.body).trigger('price_slider_slide', [the_min, the_max]);
434
  },
435
  change: function (event, ui) {
436
+ jQuery(document.body).trigger('price_slider_change', [ui.values[0], ui.values[1]]);
437
  }
438
  });
439
  }
441
  var wcj_mc_pf = {
442
  price_filters: null,
443
  rate: 1,
444
+ step: 1,
445
  init: function (price_filters) {
446
  this.price_filters = price_filters;
447
  this.rate = document.getElementById('wcj_mc_exchange_rate').value;
449
  },
450
  update_slider: function () {
451
  [].forEach.call(wcj_mc_pf.price_filters, function (el) {
452
+ wcj_mc_pf_slider.init(el, wcj_mc_pf.rate, wcj_mc_pf.step);
453
  });
454
  }
455
  }
459
  wcj_mc_pf.init(price_filters);
460
  }
461
  });
462
+ </script>
463
  <?php
464
  }
465
 
526
  $this->additional_price_filters = array();
527
  }
528
 
529
+ } else {
530
+ // Saves min and max price when product is updated
531
+ add_action( 'woocommerce_update_product', function ( $post_id ) {
532
+ if ( 'no' === get_option( 'wcj_multicurrency_per_product_enabled', 'yes' ) ) {
533
+ return;
534
+ }
535
+ $this->save_min_max_prices_per_product( $post_id );
536
+ }, 99 );
537
+
538
+ // Saves min and max price when exchange rate changes
539
+ add_action( 'updated_option', array( $this, 'update_min_max_prices_on_exchange_rate_change' ), 10, 3 );
540
+ }
541
+ }
542
+
543
+ /**
544
+ * Updates min and max prices on exchange rate change.
545
+ *
546
+ * The update is done with background process.
547
+ *
548
+ * @version 4.5.0
549
+ * @since 4.5.0
550
+ *
551
+ * @param $option_name
552
+ * @param $old_value
553
+ * @param $option_value
554
+ */
555
+ function update_min_max_prices_on_exchange_rate_change( $option_name, $old_value, $option_value ) {
556
+ if (
557
+ 'no' === get_option( 'wcj_multicurrency_update_prices_on_exch_update', 'no' ) ||
558
+ 'no' === get_option( 'wcj_multicurrency_per_product_enabled', 'yes' ) ||
559
+ false === strpos( $option_name, 'wcj_multicurrency_exchange_rate_' )
560
+ ) {
561
+ return;
562
+ }
563
+ $currency_number = substr( $option_name, strrpos( $option_name, '_' ) + 1 );
564
+ $currency = get_option( 'wcj_multicurrency_currency_' . $currency_number );
565
+ $product_ids = $this->get_products_by_per_product_currency( $currency );
566
+ if ( is_array( $product_ids ) && count( $product_ids ) > 0 ) {
567
+ $this->bkg_process_price_updater->cancel_process();
568
+ foreach ( $product_ids as $post_id ) {
569
+ $this->bkg_process_price_updater->push_to_queue( array( 'id' => $post_id, 'currency' => $currency ) );
570
+ }
571
+ $this->bkg_process_price_updater->save()->dispatch();
572
+ }
573
+ }
574
+
575
+ /**
576
+ * Gets all products, or products with variations containing meta '_wcj_multicurrency_per_product_regular_price_{currency}' or '_wcj_multicurrency_per_product_sale_price_{currency}'.
577
+ *
578
+ * @version 4.5.0
579
+ * @since 4.5.0
580
+ *
581
+ * @param $currency
582
+ *
583
+ * @return array
584
+ */
585
+ function get_products_by_per_product_currency( $currency ) {
586
+ if ( empty( $currency ) ) {
587
+ $currency = get_option( 'woocommerce_currency' );
588
+ }
589
+
590
+ global $wpdb;
591
+ $product_ids = $wpdb->get_col( "
592
+ SELECT p.ID
593
+ FROM {$wpdb->posts} AS p
594
+ LEFT JOIN {$wpdb->posts} AS p2 ON p.ID = p2.ID OR (p2.post_parent = p.ID AND p2.post_type='product_variation')
595
+ LEFT JOIN {$wpdb->postmeta} AS pm ON (p2.ID = pm.post_id) AND (pm.meta_key IN ('_wcj_multicurrency_per_product_regular_price_{$currency}','_wcj_multicurrency_per_product_sale_price_{$currency}') AND pm.meta_value!='')
596
+ WHERE p.post_status = 'publish' AND p.post_type IN ('product')
597
+ AND pm.meta_value != 'null'
598
+ GROUP BY p.ID
599
+ ");
600
+
601
+ return $product_ids;
602
+ }
603
+
604
+ /**
605
+ * Updates min and max prices.
606
+ *
607
+ * @version 4.5.0
608
+ * @since 4.5.0
609
+ *
610
+ * @param $post_id
611
+ * @param string $currency_code_param
612
+ */
613
+ function save_min_max_prices_per_product( $post_id, $currency_code_param = '' ) {
614
+ $product = wc_get_product( $post_id );
615
+ $products = array();
616
+ if ( $product->is_type( 'variable' ) ) {
617
+ $available_variations = $product->get_variation_prices()['price'];
618
+ foreach ( $available_variations as $variation_id => $price ) {
619
+ $products[ $variation_id ] = $price;
620
+ }
621
+ } else {
622
+ $products[ $post_id ] = $product->get_price();
623
+ }
624
+ if ( empty( $currency_code_param ) ) {
625
+ $total_number = apply_filters( 'booster_option', 2, get_option( 'wcj_multicurrency_total_number', 2 ) );
626
+ } else {
627
+ $total_number = 1;
628
+ }
629
+
630
+ $per_product_prices = array();
631
+ for ( $i = 1; $i <= $total_number; $i ++ ) {
632
+ $currency_code = empty( $currency_code_param ) ? get_option( 'wcj_multicurrency_currency_' . $i ) : $currency_code_param;
633
+ $exchange_rate = $this->get_currency_exchange_rate( $currency_code );
634
+ foreach ( $products as $product_id => $original_price ) {
635
+ // Regular Price
636
+ if ( isset( $_POST["wcj_multicurrency_per_product_regular_price_{$currency_code}_{$product_id}"] ) ) {
637
+ $regular_price = $_POST["wcj_multicurrency_per_product_regular_price_{$currency_code}_{$product_id}"];
638
+ } else {
639
+ $regular_price = get_post_meta( $product_id, '_wcj_multicurrency_per_product_regular_price_' . $currency_code, true );
640
+ }
641
+
642
+ // Sale Price
643
+ if ( isset( $_POST["wcj_multicurrency_per_product_sale_price_{$currency_code}_{$product_id}"] ) ) {
644
+ $sale_price = $_POST["wcj_multicurrency_per_product_sale_price_{$currency_code}_{$product_id}"];
645
+ } else {
646
+ $sale_price = get_post_meta( $product_id, '_wcj_multicurrency_per_product_sale_price_' . $currency_code, true );
647
+ }
648
+ $prices = array_filter( array( $regular_price, $sale_price ) );
649
+ $price = count( $prices ) > 0 ? min( $prices ) : $original_price * $exchange_rate;
650
+ $per_product_prices[ $currency_code ][ $product_id ] = $price;
651
+ }
652
+ }
653
+ foreach ( $per_product_prices as $currency => $values ) {
654
+ update_post_meta( $post_id, '_wcj_multicurrency_per_product_min_price_' . $currency, min( $values ) );
655
+ update_post_meta( $post_id, '_wcj_multicurrency_per_product_max_price_' . $currency, max( $values ) );
656
  }
657
  }
658
 
864
  /**
865
  * change_price.
866
  *
867
+ * @version 4.5.0
868
  */
869
  function change_price( $price, $_product ) {
870
  if ( '' === $price ) {
904
 
905
  // Global
906
  if ( 1 != ( $currency_exchange_rate = $this->get_currency_exchange_rate( $this->get_current_currency_code() ) ) ) {
907
+ $price = (float) $price * (float) $currency_exchange_rate;
908
  switch ( get_option( 'wcj_multicurrency_rounding', 'no_round' ) ) {
909
  case 'round':
910
  $price = round( $price, get_option( 'wcj_multicurrency_rounding_precision', absint( get_option( 'woocommerce_price_num_decimals', 2 ) ) ) );
includes/class-wcj-my-account.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - My Account
4
  *
5
- * @version 4.3.0
6
  * @since 2.9.0
7
  * @author Algoritmika Ltd.
8
  */
@@ -16,7 +16,7 @@ class WCJ_My_Account extends WCJ_Module {
16
  /**
17
  * Constructor.
18
  *
19
- * @version 4.3.0
20
  * @since 2.9.0
21
  * @todo [dev] Custom Menu Pages: add "Type" option with values: "param" (i.e. as it is now) or "endpoint"
22
  * @todo [dev] Custom Menu Pages: deprecate "Add Custom Menu Items" (and add "link" value in "Type" options)
@@ -57,7 +57,7 @@ class WCJ_My_Account extends WCJ_Module {
57
  // Custom pages
58
  if ( 'yes' === get_option( 'wcj_my_account_custom_pages_enabled', 'no' ) ) {
59
  add_action( 'woocommerce_account_' . 'page' . '_endpoint', array( $this, 'customize_dashboard' ), PHP_INT_MAX );
60
- add_filter( 'the_title', array( $this, 'set_custom_page_title' ), PHP_INT_MAX, 2 );
61
  add_filter( 'woocommerce_account_menu_items', array( $this, 'add_custom_page_menu_item' ), PHP_INT_MAX );
62
  add_filter( 'woocommerce_get_endpoint_url', array( $this, 'set_custom_page_url' ), PHP_INT_MAX, 4 );
63
  }
@@ -119,17 +119,24 @@ class WCJ_My_Account extends WCJ_Module {
119
  /**
120
  * set_custom_page_title.
121
  *
122
- * @version 4.3.0
123
  * @since 4.3.0
124
  */
125
- function set_custom_page_title( $title, $id ) {
126
- if ( isset( $_GET['section'] ) && $id == get_option( 'woocommerce_myaccount_page_id' ) ) {
127
- if ( ! isset( $this->custom_pages ) ) {
128
- $this->get_custom_pages();
129
- }
130
- $endpoint = $_GET['section'];
131
- return ( isset( $this->custom_pages[ $endpoint ] ) ? $this->custom_pages[ $endpoint ]['title'] : $title );
 
132
  }
 
 
 
 
 
 
133
  return $title;
134
  }
135
 
2
  /**
3
  * Booster for WooCommerce - Module - My Account
4
  *
5
+ * @version 4.5.0
6
  * @since 2.9.0
7
  * @author Algoritmika Ltd.
8
  */
16
  /**
17
  * Constructor.
18
  *
19
+ * @version 4.5.0
20
  * @since 2.9.0
21
  * @todo [dev] Custom Menu Pages: add "Type" option with values: "param" (i.e. as it is now) or "endpoint"
22
  * @todo [dev] Custom Menu Pages: deprecate "Add Custom Menu Items" (and add "link" value in "Type" options)
57
  // Custom pages
58
  if ( 'yes' === get_option( 'wcj_my_account_custom_pages_enabled', 'no' ) ) {
59
  add_action( 'woocommerce_account_' . 'page' . '_endpoint', array( $this, 'customize_dashboard' ), PHP_INT_MAX );
60
+ add_filter( 'the_title', array( $this, 'set_custom_page_title' ), PHP_INT_MAX );
61
  add_filter( 'woocommerce_account_menu_items', array( $this, 'add_custom_page_menu_item' ), PHP_INT_MAX );
62
  add_filter( 'woocommerce_get_endpoint_url', array( $this, 'set_custom_page_url' ), PHP_INT_MAX, 4 );
63
  }
119
  /**
120
  * set_custom_page_title.
121
  *
122
+ * @version 4.5.0
123
  * @since 4.3.0
124
  */
125
+ function set_custom_page_title( $title ) {
126
+ if (
127
+ ! isset( $_GET['section'] ) ||
128
+ is_admin() ||
129
+ ! in_the_loop() ||
130
+ ! is_account_page()
131
+ ) {
132
+ return $title;
133
  }
134
+ if ( ! isset( $this->custom_pages ) ) {
135
+ $this->get_custom_pages();
136
+ }
137
+ $endpoint = $_GET['section'];
138
+ return ( isset( $this->custom_pages[ $endpoint ] ) ? $this->custom_pages[ $endpoint ]['title'] : $title );
139
+
140
  return $title;
141
  }
142
 
includes/class-wcj-payment-gateways-by-country.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Payment Gateways by Country
4
  *
5
- * @version 4.0.0
6
  * @since 2.4.1
7
  * @author Algoritmika Ltd.
8
  */
@@ -34,7 +34,7 @@ class WCJ_Payment_Gateways_By_Country extends WCJ_Module {
34
  /**
35
  * get_location.
36
  *
37
- * @version 3.9.0
38
  * @since 3.4.0
39
  * @todo on `WCJ_IS_WC_VERSION_BELOW_3` recheck if `get_shipping_country()` and `get_shipping_state()` work correctly
40
  */
@@ -60,11 +60,11 @@ class WCJ_Payment_Gateways_By_Country extends WCJ_Module {
60
  }
61
  case 'postcode':
62
  $postcodes_type = get_option( 'wcj_gateways_by_location_postcodes_type', 'billing' );
63
- switch( $postcodes_type ) {
64
  case 'shipping':
65
- return ( ! empty( $_REQUEST['s_postcode'] ) ? strtoupper( $_REQUEST['s_postcode'] ) : strtoupper( WC()->countries->get_base_postcode() ) );
66
  default: // 'billing'
67
- return ( ! empty( $_REQUEST['postcode'] ) ? strtoupper( $_REQUEST['postcode'] ) : strtoupper( WC()->countries->get_base_postcode() ) );
68
  }
69
  }
70
  }
2
  /**
3
  * Booster for WooCommerce - Module - Payment Gateways by Country
4
  *
5
+ * @version 4.5.0
6
  * @since 2.4.1
7
  * @author Algoritmika Ltd.
8
  */
34
  /**
35
  * get_location.
36
  *
37
+ * @version 4.5.0
38
  * @since 3.4.0
39
  * @todo on `WCJ_IS_WC_VERSION_BELOW_3` recheck if `get_shipping_country()` and `get_shipping_state()` work correctly
40
  */
60
  }
61
  case 'postcode':
62
  $postcodes_type = get_option( 'wcj_gateways_by_location_postcodes_type', 'billing' );
63
+ switch ( $postcodes_type ) {
64
  case 'shipping':
65
+ return ( ! empty( $_REQUEST['s_postcode'] ) ? strtoupper( $_REQUEST['s_postcode'] ) : ( ! empty( $_REQUEST['shipping_postcode'] ) ? strtoupper( $_REQUEST['shipping_postcode'] ) : strtoupper( WC()->countries->get_base_postcode() ) ) );
66
  default: // 'billing'
67
+ return ( ! empty( $_REQUEST['postcode'] ) ? strtoupper( $_REQUEST['postcode'] ) : ( ! empty( $_REQUEST['billing_postcode'] ) ? strtoupper( $_REQUEST['billing_postcode'] ) : strtoupper( WC()->countries->get_base_postcode() ) ) );
68
  }
69
  }
70
  }
includes/class-wcj-payment-gateways-fees.php CHANGED
@@ -80,7 +80,7 @@ class WCJ_Payment_Gateways_Fees extends WCJ_Module {
80
  * @since 3.8.0
81
  * @todo (dev) maybe move this to `WCJ_Module`
82
  */
83
- function get_option( $option, $key, $default = false ) {
84
  return ( isset( $this->options[ $option ][ $key ] ) ? $this->options[ $option ][ $key ] : ( isset( $this->defaults[ $option ] ) ? $this->defaults[ $option ] : $default ) );
85
  }
86
 
@@ -155,7 +155,7 @@ class WCJ_Payment_Gateways_Fees extends WCJ_Module {
155
  * @todo add product cats and tags
156
  */
157
  function check_cart_products( $gateway ) {
158
- $include_products = $this->get_option( 'include_products', $gateway );
159
  if ( ! empty( $include_products ) ) {
160
  $passed = false;
161
  foreach ( WC()->cart->get_cart() as $item ) {
@@ -168,7 +168,7 @@ class WCJ_Payment_Gateways_Fees extends WCJ_Module {
168
  return false;
169
  }
170
  }
171
- $exclude_products = $this->get_option( 'exclude_products', $gateway );
172
  if ( ! empty( $exclude_products ) ) {
173
  foreach ( WC()->cart->get_cart() as $item ) {
174
  if ( in_array( $item['product_id'], $exclude_products ) ) {
@@ -188,22 +188,22 @@ class WCJ_Payment_Gateways_Fees extends WCJ_Module {
188
  global $woocommerce;
189
  $current_gateway = $this->get_current_gateway();
190
  if ( '' != $current_gateway ) {
191
- $fee_text = do_shortcode( $this->get_option( 'text', $current_gateway ) );
192
- $min_cart_amount = $this->get_option( 'min_cart_amount', $current_gateway );
193
- $max_cart_amount = $this->get_option( 'max_cart_amount', $current_gateway );
194
  // Multicurrency (Currency Switcher) module
195
  if ( WCJ()->modules['multicurrency']->is_enabled() ) {
196
  $min_cart_amount = WCJ()->modules['multicurrency']->change_price( $min_cart_amount, null );
197
  $max_cart_amount = WCJ()->modules['multicurrency']->change_price( $max_cart_amount, null );
198
  }
199
- $total_in_cart = ( 'no' === $this->get_option( 'exclude_shipping', $current_gateway ) ?
200
  $woocommerce->cart->cart_contents_total + $woocommerce->cart->shipping_total :
201
  $woocommerce->cart->cart_contents_total
202
  );
203
- $total_in_cart += 'no' === $this->get_option( 'include_taxes', $current_gateway ) ? 0 : $woocommerce->cart->get_subtotal_tax() + $woocommerce->cart->get_shipping_tax();
204
  if ( '' != $fee_text && $total_in_cart >= $min_cart_amount && ( 0 == $max_cart_amount || $total_in_cart <= $max_cart_amount ) && $this->check_cart_products( $current_gateway ) ) {
205
- $fee_value = $this->get_option( 'value', $current_gateway );
206
- $fee_type = $this->get_option( 'type', $current_gateway );
207
  $final_fee_to_add = 0;
208
  switch ( $fee_type ) {
209
  case 'fixed':
@@ -215,16 +215,16 @@ class WCJ_Payment_Gateways_Fees extends WCJ_Module {
215
  break;
216
  case 'percent':
217
  $final_fee_to_add = ( $fee_value / 100 ) * $total_in_cart;
218
- if ( 'yes' === $this->get_option( 'round', $current_gateway ) ) {
219
- $final_fee_to_add = round( $final_fee_to_add, $this->get_option( 'round_precision', $current_gateway ) );
220
  }
221
  break;
222
  }
223
  if ( 0 != $final_fee_to_add ) {
224
- $taxable = ( 'yes' === $this->get_option( 'is_taxable', $current_gateway ) );
225
  $tax_class_name = '';
226
  if ( $taxable ) {
227
- $tax_class_id = $this->get_option( 'tax_class_id', $current_gateway );
228
  $tax_class_names = array_merge( array( '', ), WC_Tax::get_tax_classes() );
229
  $tax_class_name = $tax_class_names[ $tax_class_id ];
230
  }
80
  * @since 3.8.0
81
  * @todo (dev) maybe move this to `WCJ_Module`
82
  */
83
+ function wcj_get_option( $option, $key, $default = false ) {
84
  return ( isset( $this->options[ $option ][ $key ] ) ? $this->options[ $option ][ $key ] : ( isset( $this->defaults[ $option ] ) ? $this->defaults[ $option ] : $default ) );
85
  }
86
 
155
  * @todo add product cats and tags
156
  */
157
  function check_cart_products( $gateway ) {
158
+ $include_products = $this->wcj_get_option( 'include_products', $gateway );
159
  if ( ! empty( $include_products ) ) {
160
  $passed = false;
161
  foreach ( WC()->cart->get_cart() as $item ) {
168
  return false;
169
  }
170
  }
171
+ $exclude_products = $this->wcj_get_option( 'exclude_products', $gateway );
172
  if ( ! empty( $exclude_products ) ) {
173
  foreach ( WC()->cart->get_cart() as $item ) {
174
  if ( in_array( $item['product_id'], $exclude_products ) ) {
188
  global $woocommerce;
189
  $current_gateway = $this->get_current_gateway();
190
  if ( '' != $current_gateway ) {
191
+ $fee_text = do_shortcode( $this->wcj_get_option( 'text', $current_gateway ) );
192
+ $min_cart_amount = $this->wcj_get_option( 'min_cart_amount', $current_gateway );
193
+ $max_cart_amount = $this->wcj_get_option( 'max_cart_amount', $current_gateway );
194
  // Multicurrency (Currency Switcher) module
195
  if ( WCJ()->modules['multicurrency']->is_enabled() ) {
196
  $min_cart_amount = WCJ()->modules['multicurrency']->change_price( $min_cart_amount, null );
197
  $max_cart_amount = WCJ()->modules['multicurrency']->change_price( $max_cart_amount, null );
198
  }
199
+ $total_in_cart = ( 'no' === $this->wcj_get_option( 'exclude_shipping', $current_gateway ) ?
200
  $woocommerce->cart->cart_contents_total + $woocommerce->cart->shipping_total :
201
  $woocommerce->cart->cart_contents_total
202
  );
203
+ $total_in_cart += 'no' === $this->wcj_get_option( 'include_taxes', $current_gateway ) ? 0 : $woocommerce->cart->get_subtotal_tax() + $woocommerce->cart->get_shipping_tax();
204
  if ( '' != $fee_text && $total_in_cart >= $min_cart_amount && ( 0 == $max_cart_amount || $total_in_cart <= $max_cart_amount ) && $this->check_cart_products( $current_gateway ) ) {
205
+ $fee_value = $this->wcj_get_option( 'value', $current_gateway );
206
+ $fee_type = $this->wcj_get_option( 'type', $current_gateway );
207
  $final_fee_to_add = 0;
208
  switch ( $fee_type ) {
209
  case 'fixed':
215
  break;
216
  case 'percent':
217
  $final_fee_to_add = ( $fee_value / 100 ) * $total_in_cart;
218
+ if ( 'yes' === $this->wcj_get_option( 'round', $current_gateway ) ) {
219
+ $final_fee_to_add = round( $final_fee_to_add, $this->wcj_get_option( 'round_precision', $current_gateway ) );
220
  }
221
  break;
222
  }
223
  if ( 0 != $final_fee_to_add ) {
224
+ $taxable = ( 'yes' === $this->wcj_get_option( 'is_taxable', $current_gateway ) );
225
  $tax_class_name = '';
226
  if ( $taxable ) {
227
+ $tax_class_id = $this->wcj_get_option( 'tax_class_id', $current_gateway );
228
  $tax_class_names = array_merge( array( '', ), WC_Tax::get_tax_classes() );
229
  $tax_class_name = $tax_class_names[ $tax_class_id ];
230
  }
includes/class-wcj-pdf-invoicing.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - PDF Invoicing
4
  *
5
- * @version 4.3.1
6
  * @author Algoritmika Ltd.
7
  */
8
 
@@ -15,7 +15,7 @@ class WCJ_PDF_Invoicing extends WCJ_Module {
15
  /**
16
  * Constructor.
17
  *
18
- * @version 4.3.0
19
  */
20
  function __construct() {
21
 
@@ -38,9 +38,13 @@ class WCJ_PDF_Invoicing extends WCJ_Module {
38
  ) );
39
 
40
  if ( $this->is_enabled() ) {
41
-
42
- add_action( 'init', array( $this, 'catch_args' ) );
43
- add_action( 'init', array( $this, 'generate_pdf_on_init' ) );
 
 
 
 
44
 
45
  // Bulk actions
46
  add_filter( 'bulk_actions-edit-' . 'shop_order', array( $this, 'bulk_actions_register' ) );
@@ -149,7 +153,7 @@ class WCJ_PDF_Invoicing extends WCJ_Module {
149
  /**
150
  * Processes the PDF bulk actions.
151
  *
152
- * @version 4.3.0
153
  * @since 2.5.7
154
  * @todo on `generate` (and maybe other actions) validate user permissions/capabilities - `if ( ! current_user_can( $post_type_object->cap->export_post, $post_id ) ) { wp_die( __( 'You are not allowed to export this post.' ) ); }`
155
  *
@@ -228,7 +232,7 @@ class WCJ_PDF_Invoicing extends WCJ_Module {
228
  }
229
  break;
230
  default:
231
- return;
232
  }
233
  return $redirect_to;
234
  }
2
  /**
3
  * Booster for WooCommerce - Module - PDF Invoicing
4
  *
5
+ * @version 4.5.0
6
  * @author Algoritmika Ltd.
7
  */
8
 
15
  /**
16
  * Constructor.
17
  *
18
+ * @version 4.5.0
19
  */
20
  function __construct() {
21
 
38
  ) );
39
 
40
  if ( $this->is_enabled() ) {
41
+ if ( 'init' === current_filter() ) {
42
+ $this->catch_args();
43
+ $this->generate_pdf_on_init();
44
+ } else {
45
+ add_action( 'init', array( $this, 'catch_args' ) );
46
+ add_action( 'init', array( $this, 'generate_pdf_on_init' ) );
47
+ }
48
 
49
  // Bulk actions
50
  add_filter( 'bulk_actions-edit-' . 'shop_order', array( $this, 'bulk_actions_register' ) );
153
  /**
154
  * Processes the PDF bulk actions.
155
  *
156
+ * @version 4.5.0
157
  * @since 2.5.7
158
  * @todo on `generate` (and maybe other actions) validate user permissions/capabilities - `if ( ! current_user_can( $post_type_object->cap->export_post, $post_id ) ) { wp_die( __( 'You are not allowed to export this post.' ) ); }`
159
  *
232
  }
233
  break;
234
  default:
235
+ return $redirect_to;
236
  }
237
  return $redirect_to;
238
  }
includes/class-wcj-product-addons.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Product Addons
4
  *
5
- * @version 4.4.0
6
  * @since 2.5.3
7
  * @author Algoritmika Ltd.
8
  * @todo admin order view (names)
@@ -71,6 +71,8 @@ class WCJ_Product_Addons extends WCJ_Module {
71
  if ( 'yes' === get_option( 'wcj_product_addons_hide_on_admin_order_page', 'no' ) ) {
72
  add_filter( 'woocommerce_hidden_order_itemmeta', array( $this, 'hide_addons_in_admin_order' ), PHP_INT_MAX );
73
  }
 
 
74
  }
75
  // Addons quantity
76
  $qty_triggers = get_option( 'wcj_product_addons_qty_decrease_triggers', '' );
@@ -90,6 +92,42 @@ class WCJ_Product_Addons extends WCJ_Module {
90
  }
91
  }
92
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  /**
94
  * maybe_reduce_addons_qty.
95
  *
@@ -226,7 +264,7 @@ class WCJ_Product_Addons extends WCJ_Module {
226
  /**
227
  * price_change_ajax.
228
  *
229
- * @version 4.2.0
230
  * @since 2.5.3
231
  */
232
  function price_change_ajax( $param ) {
@@ -240,14 +278,14 @@ class WCJ_Product_Addons extends WCJ_Module {
240
  foreach ( $addons as $addon ) {
241
  if ( isset( $_POST[ $addon['checkbox_key'] ] ) ) {
242
  if ( ( 'checkbox' === $addon['type'] || '' == $addon['type'] ) || ( 'text' == $addon['type'] && '' != $_POST[ $addon['checkbox_key'] ] ) ) {
243
- $the_addons_price += $addon['price_value'];
244
  } elseif ( 'radio' === $addon['type'] || 'select' === $addon['type'] ) {
245
  $labels = $this->clean_and_explode( PHP_EOL, $addon['label_value'] );
246
  $prices = $this->clean_and_explode( PHP_EOL, $addon['price_value'] );
247
  if ( count( $labels ) === count( $prices ) ) {
248
  foreach ( $labels as $i => $label ) {
249
  if ( $_POST[ $addon['checkbox_key'] ] == sanitize_title( $label ) ) {
250
- $the_addons_price += $prices[ $i ];
251
  break;
252
  }
253
  }
@@ -268,7 +306,7 @@ class WCJ_Product_Addons extends WCJ_Module {
268
  /**
269
  * enqueue_scripts.
270
  *
271
- * @version 2.8.0
272
  * @since 2.5.3
273
  */
274
  function enqueue_scripts() {
@@ -281,6 +319,7 @@ class WCJ_Product_Addons extends WCJ_Module {
281
  wp_localize_script( 'wcj-product-addons', 'ajax_object', array(
282
  'ajax_url' => admin_url( 'admin-ajax.php' ),
283
  'product_id' => get_the_ID(),
 
284
  'is_variable_with_single_price' => $is_variable_with_single_price,
285
  ) );
286
  }
@@ -470,31 +509,35 @@ class WCJ_Product_Addons extends WCJ_Module {
470
  /**
471
  * add_addons_price_to_cart_item.
472
  *
473
- * @version 2.8.0
474
  * @since 2.5.3
475
  */
476
  function add_addons_price_to_cart_item( $cart_item_data, $cart_item_key ) {
477
  $addons = $this->get_product_addons( ( WCJ_IS_WC_VERSION_BELOW_3 ? $cart_item_data['data']->product_id : wcj_get_product_id_or_variation_parent_id( $cart_item_data['data'] ) ) );
478
  foreach ( $addons as $addon ) {
479
  if ( isset( $cart_item_data[ $addon['price_key'] ] ) ) {
480
- $cart_item_data['data']->{$addon['price_key']} = $cart_item_data[ $addon['price_key'] ];
 
 
 
481
  }
482
  }
 
 
 
 
483
  return $cart_item_data;
484
  }
485
 
486
  /**
487
  * get_cart_item_addons_price_from_session.
488
  *
489
- * @version 2.5.6
490
  * @since 2.5.3
491
  */
492
  function get_cart_item_addons_price_from_session( $item, $values, $addon ) {
493
- $addons = $this->get_product_addons( $item['product_id'] );
494
- foreach ( $addons as $addon ) {
495
- if ( array_key_exists( $addon['price_key'], $values ) ) {
496
- $item['data']->{$addon['price_key']} = $values[ $addon['price_key'] ];
497
- }
498
  }
499
  return $item;
500
  }
2
  /**
3
  * Booster for WooCommerce - Module - Product Addons
4
  *
5
+ * @version 4.5.0
6
  * @since 2.5.3
7
  * @author Algoritmika Ltd.
8
  * @todo admin order view (names)
71
  if ( 'yes' === get_option( 'wcj_product_addons_hide_on_admin_order_page', 'no' ) ) {
72
  add_filter( 'woocommerce_hidden_order_itemmeta', array( $this, 'hide_addons_in_admin_order' ), PHP_INT_MAX );
73
  }
74
+ // Format meta on admin order
75
+ add_filter( 'woocommerce_order_item_get_formatted_meta_data', array( $this, 'format_meta_data' ), 20, 2 );
76
  }
77
  // Addons quantity
78
  $qty_triggers = get_option( 'wcj_product_addons_qty_decrease_triggers', '' );
92
  }
93
  }
94
 
95
+ /**
96
+ * format_meta_data.
97
+ *
98
+ * @version 4.5.0
99
+ * @since 4.5.0
100
+ *
101
+ * @param $meta_data
102
+ * @param $item
103
+ *
104
+ * @return mixed
105
+ */
106
+ function format_meta_data( $meta_data, $item ) {
107
+ if ( ! is_a( $item, 'WC_Order_Item_Product' ) ) {
108
+ return $meta_data;
109
+ }
110
+ $addons = $this->get_product_addons( $item->get_product_id() );
111
+ $product = $item->get_product_id();
112
+ foreach ( $addons as $addon ) {
113
+ $label_key_search = wp_list_filter( $meta_data, array( 'key' => '_' . $addon['label_key'] ) );
114
+ $price_key_search = wp_list_filter( $meta_data, array( 'key' => '_' . $addon['price_key'] ) );
115
+ if ( count( $label_key_search ) > 0 ) {
116
+ reset( $label_key_search );
117
+ reset( $price_key_search );
118
+ $label_key = key( $label_key_search );
119
+ $price_key = key( $price_key_search );
120
+ $addon_price = $this->maybe_convert_currency( $meta_data[ $price_key ]->value, $product );
121
+ $final_price = wc_price( $addon_price );
122
+ // Change metadata values
123
+ $meta_data[ $label_key ]->display_key = $meta_data[ $label_key ]->value;
124
+ $meta_data[ $label_key ]->display_value = $final_price;
125
+ unset( $meta_data[ $price_key ] );
126
+ }
127
+ }
128
+ return $meta_data;
129
+ }
130
+
131
  /**
132
  * maybe_reduce_addons_qty.
133
  *
264
  /**
265
  * price_change_ajax.
266
  *
267
+ * @version 4.5.0
268
  * @since 2.5.3
269
  */
270
  function price_change_ajax( $param ) {
278
  foreach ( $addons as $addon ) {
279
  if ( isset( $_POST[ $addon['checkbox_key'] ] ) ) {
280
  if ( ( 'checkbox' === $addon['type'] || '' == $addon['type'] ) || ( 'text' == $addon['type'] && '' != $_POST[ $addon['checkbox_key'] ] ) ) {
281
+ $the_addons_price += (float) $addon['price_value'];
282
  } elseif ( 'radio' === $addon['type'] || 'select' === $addon['type'] ) {
283
  $labels = $this->clean_and_explode( PHP_EOL, $addon['label_value'] );
284
  $prices = $this->clean_and_explode( PHP_EOL, $addon['price_value'] );
285
  if ( count( $labels ) === count( $prices ) ) {
286
  foreach ( $labels as $i => $label ) {
287
  if ( $_POST[ $addon['checkbox_key'] ] == sanitize_title( $label ) ) {
288
+ $the_addons_price += (float) $prices[ $i ];
289
  break;
290
  }
291
  }
306
  /**
307
  * enqueue_scripts.
308
  *
309
+ * @version 4.5.0
310
  * @since 2.5.3
311
  */
312
  function enqueue_scripts() {
319
  wp_localize_script( 'wcj-product-addons', 'ajax_object', array(
320
  'ajax_url' => admin_url( 'admin-ajax.php' ),
321
  'product_id' => get_the_ID(),
322
+ 'ignore_strikethrough_price' => get_option( 'wcj_product_addons_ajax_ignore_st_price', 'no' ),
323
  'is_variable_with_single_price' => $is_variable_with_single_price,
324
  ) );
325
  }
509
  /**
510
  * add_addons_price_to_cart_item.
511
  *
512
+ * @version 4.5.0
513
  * @since 2.5.3
514
  */
515
  function add_addons_price_to_cart_item( $cart_item_data, $cart_item_key ) {
516
  $addons = $this->get_product_addons( ( WCJ_IS_WC_VERSION_BELOW_3 ? $cart_item_data['data']->product_id : wcj_get_product_id_or_variation_parent_id( $cart_item_data['data'] ) ) );
517
  foreach ( $addons as $addon ) {
518
  if ( isset( $cart_item_data[ $addon['price_key'] ] ) ) {
519
+ if ( ! isset( $cart_item_data['wcj_pa_extra_price'] ) ) {
520
+ $cart_item_data['wcj_pa_extra_price'] = 0;
521
+ }
522
+ $cart_item_data['wcj_pa_extra_price'] += (float) $cart_item_data[ $addon['price_key'] ];
523
  }
524
  }
525
+ if ( isset( $cart_item_data['wcj_pa_extra_price'] ) ) {
526
+ $cart_item_data['wcj_pa_total_extra_price'] = $cart_item_data['data']->get_data()['price'] + $cart_item_data['wcj_pa_extra_price'];
527
+ $cart_item_data['data']->set_price( $cart_item_data['wcj_pa_total_extra_price'] );
528
+ }
529
  return $cart_item_data;
530
  }
531
 
532
  /**
533
  * get_cart_item_addons_price_from_session.
534
  *
535
+ * @version 4.5.0
536
  * @since 2.5.3
537
  */
538
  function get_cart_item_addons_price_from_session( $item, $values, $addon ) {
539
+ if ( array_key_exists( 'wcj_pa_total_extra_price', $item ) ) {
540
+ $item['data']->set_price( $item['wcj_pa_total_extra_price'] );
 
 
 
541
  }
542
  return $item;
543
  }
includes/class-wcj-product-input-fields.php CHANGED
@@ -15,7 +15,7 @@ class WCJ_Product_Input_Fields extends WCJ_Module {
15
  /**
16
  * Constructor.
17
  *
18
- * @version 3.1.0
19
  * @todo (maybe) option to change local and global fields order (i.e. output local fields before the global)
20
  */
21
  function __construct() {
@@ -41,7 +41,47 @@ class WCJ_Product_Input_Fields extends WCJ_Module {
41
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
42
  add_action( 'init', array( $this, 'register_scripts' ) );
43
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  }
 
 
 
 
 
 
 
45
  }
46
 
47
  /**
15
  /**
16
  * Constructor.
17
  *
18
+ * @version 4.5.0
19
  * @todo (maybe) option to change local and global fields order (i.e. output local fields before the global)
20
  */
21
  function __construct() {
41
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
42
  add_action( 'init', array( $this, 'register_scripts' ) );
43
  }
44
+
45
+ add_action( 'wp_head', array( $this, 'preserve_linebreaks_frontend' ) );
46
+ add_action( 'admin_head', array( $this, 'preserve_linebreaks_admin' ) );
47
+ }
48
+ }
49
+
50
+ /**
51
+ * preserve_linebreaks_admin.
52
+ *
53
+ * @version 4.5.0
54
+ * @since 4.5.0
55
+ */
56
+ function preserve_linebreaks_admin() {
57
+ if ( 'yes' !== get_option( 'wcj_product_input_fields_admin_linebreaks', 'no' ) ) {
58
+ return;
59
+ }
60
+ ?>
61
+ <style>
62
+ #woocommerce-order-items .woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td, #woocommerce-order-items .woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td
63
+ {white-space: pre-wrap;}
64
+ </style>
65
+ <?php
66
+ }
67
+
68
+ /**
69
+ * preserve_linebreaks_frontend.
70
+ *
71
+ * @version 4.5.0
72
+ * @since 4.5.0
73
+ */
74
+ function preserve_linebreaks_frontend() {
75
+ if ( 'yes' !== get_option( 'wcj_product_input_fields_frontend_linebreaks', 'no' ) ) {
76
+ return;
77
  }
78
+ ?>
79
+ <style>
80
+ .woocommerce-cart-form__cart-item.cart_item .product-name dl dd,
81
+ .woocommerce-checkout-review-order-table .product-name dl dd
82
+ {white-space: pre-wrap;}
83
+ </style>
84
+ <?php
85
  }
86
 
87
  /**
includes/class-wcj-purchase-data.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Cost of Goods (formerly Product Cost Price)
4
  *
5
- * @version 3.9.0
6
  * @since 2.2.0
7
  * @author Algoritmika Ltd.
8
  */
@@ -234,7 +234,7 @@ class WCJ_Purchase_Data extends WCJ_Module {
234
  /**
235
  * create_meta_box.
236
  *
237
- * @version 2.7.0
238
  * @since 2.4.5
239
  * @todo (maybe) min_profit
240
  */
@@ -266,7 +266,11 @@ class WCJ_Purchase_Data extends WCJ_Module {
266
  $table_data[] = array( __( 'Selling', 'woocommerce-jetpack' ), wc_price( $the_price ) );
267
  $table_data[] = array( __( 'Buying', 'woocommerce-jetpack' ), wc_price( $purchase_price ) );
268
  $table_data[] = array( __( 'Profit', 'woocommerce-jetpack' ), wc_price( $the_profit )
269
- . sprintf( ' (%0.2f %%)', ( $the_profit / $purchase_price * 100 ) ) );
 
 
 
 
270
  $html = '';
271
  $html .= '<h5>' . __( 'Report', 'woocommerce-jetpack' ) . $desc . '</h5>';
272
  $html .= wcj_get_table_html( $table_data, array(
@@ -281,6 +285,30 @@ class WCJ_Purchase_Data extends WCJ_Module {
281
  }
282
  }
283
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284
  }
285
 
286
  endif;
2
  /**
3
  * Booster for WooCommerce - Module - Cost of Goods (formerly Product Cost Price)
4
  *
5
+ * @version 4.5.0
6
  * @since 2.2.0
7
  * @author Algoritmika Ltd.
8
  */
234
  /**
235
  * create_meta_box.
236
  *
237
+ * @version 4.5.0
238
  * @since 2.4.5
239
  * @todo (maybe) min_profit
240
  */
266
  $table_data[] = array( __( 'Selling', 'woocommerce-jetpack' ), wc_price( $the_price ) );
267
  $table_data[] = array( __( 'Buying', 'woocommerce-jetpack' ), wc_price( $purchase_price ) );
268
  $table_data[] = array( __( 'Profit', 'woocommerce-jetpack' ), wc_price( $the_profit )
269
+ . sprintf( ' (%0.2f %%)', ( $this->get_profit_percentage(array(
270
+ 'profit' => $the_profit,
271
+ 'purchase_price' => $purchase_price,
272
+ 'selling_price' => $the_price
273
+ )) ) ) );
274
  $html = '';
275
  $html .= '<h5>' . __( 'Report', 'woocommerce-jetpack' ) . $desc . '</h5>';
276
  $html .= wcj_get_table_html( $table_data, array(
285
  }
286
  }
287
 
288
+ /**
289
+ * get_profit_percentage.
290
+ *
291
+ * @version 4.5.0
292
+ * @since 4.5.0
293
+ *
294
+ * @param array $args
295
+ *
296
+ * @return float|int
297
+ */
298
+ function get_profit_percentage( $args = array() ) {
299
+ $args = wp_parse_args( $args, array(
300
+ 'percentage_type' => get_option( 'wcj_purchase_price_profit_percentage_type', 'markup' ),
301
+ 'profit' => null,
302
+ 'selling_price' => null,
303
+ 'purchase_price' => null,
304
+ ) );
305
+ $price = $args['purchase_price'];
306
+ if ( 'margin' === $args['percentage_type'] ) {
307
+ $price = $args['selling_price'];
308
+ }
309
+ return ( $args['profit'] / $price * 100 );
310
+ }
311
+
312
  }
313
 
314
  endif;
includes/class-wcj-shipping.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Custom Shipping
4
  *
5
- * @version 4.4.0
6
  * @author Algoritmika Ltd.
7
  */
8
 
@@ -10,95 +10,78 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
10
 
11
  if ( ! class_exists( 'WCJ_Shipping' ) ) :
12
 
13
- class WCJ_Shipping extends WCJ_Module {
14
 
15
- /**
16
- * Constructor.
17
- *
18
- * @version 4.4.0
19
- * @todo (maybe) deprecated "Custom Shipping (Legacy - without Shipping Zones)" - hide when disabled
20
- */
21
- function __construct() {
 
 
 
 
 
22
 
23
- $this->id = 'shipping';
24
- $this->short_desc = __( 'Custom Shipping', 'woocommerce-jetpack' );
25
- $this->desc = __( 'Add multiple custom shipping methods to WooCommerce.', 'woocommerce-jetpack' );
26
- $this->link_slug = 'woocommerce-custom-shipping';
27
- parent::__construct();
28
 
29
- if ( $this->is_enabled() ) {
 
 
30
 
31
- // Custom Shipping (Legacy - without Shipping Zones)
32
- if ( 'init' === current_filter() ) {
33
- $this->init_wc_shipping_wcj_custom_class();
34
- } else {
35
- add_action( 'init', array( $this, 'init_wc_shipping_wcj_custom_class' ) );
36
- }
37
-
38
- // Custom Shipping
39
- if ( 'yes' === get_option( 'wcj_shipping_custom_shipping_w_zones_enabled', 'no' ) ) {
40
- if ( 'init' === current_filter() ) {
41
- $this->init_wc_shipping_wcj_custom_w_zones_class();
42
- } else {
43
- add_action( 'init', array( $this, 'init_wc_shipping_wcj_custom_w_zones_class' ) );
44
  }
45
  }
46
  }
47
- }
48
 
49
- /*
50
- * init_wc_shipping_wcj_custom_class.
51
- *
52
- * @version 3.4.0
53
- * @since 2.4.8
54
- */
55
- function init_wc_shipping_wcj_custom_class() {
56
- if ( class_exists( 'WC_Shipping_Method' ) ) {
57
  require_once( 'shipping/class-wc-shipping-wcj-custom.php' );
58
- add_filter( 'woocommerce_shipping_methods', array( $this, 'add_wc_shipping_wcj_custom_class' ) );
59
  }
60
- }
61
 
62
- /*
63
- * add_wc_shipping_wcj_custom_class.
64
- *
65
- * @version 2.8.0
66
- */
67
- function add_wc_shipping_wcj_custom_class( $methods ) {
68
- $total_number = get_option( 'wcj_shipping_custom_shipping_total_number', 1 );
69
- for ( $i = 1; $i <= $total_number; $i++ ) {
70
- $the_method = new WC_Shipping_WCJ_Custom_Template();
71
- $the_method->init( $i );
72
- $methods[ $the_method->id ] = $the_method;
73
  }
74
- return $methods;
75
- }
76
 
77
- /*
78
- * init_wc_shipping_wcj_custom_w_zones_class.
79
- *
80
- * @version 3.4.0
81
- * @since 2.5.6
82
- */
83
- function init_wc_shipping_wcj_custom_w_zones_class() {
84
- if ( class_exists( 'WC_Shipping_Method' ) ) {
85
- require_once( 'shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php' );
86
- add_filter( 'woocommerce_shipping_methods', array( $this, 'add_wc_shipping_wcj_custom_w_zones_class' ) );
 
 
 
87
  }
88
- }
89
 
90
- /*
91
- * add_wc_shipping_wcj_custom_w_zones_class.
92
- *
93
- * @version 2.5.6
94
- * @since 2.5.6
95
- */
96
- function add_wc_shipping_wcj_custom_w_zones_class( $methods ) {
97
- $methods[ 'booster_custom_shipping_w_zones' ] = 'WC_Shipping_WCJ_Custom_W_Zones';
98
- return $methods;
99
- }
100
 
101
- }
102
 
103
  endif;
104
 
2
  /**
3
  * Booster for WooCommerce - Module - Custom Shipping
4
  *
5
+ * @version 4.5.0
6
  * @author Algoritmika Ltd.
7
  */
8
 
10
 
11
  if ( ! class_exists( 'WCJ_Shipping' ) ) :
12
 
13
+ class WCJ_Shipping extends WCJ_Module {
14
 
15
+ /**
16
+ * Constructor.
17
+ *
18
+ * @version 4.5.0
19
+ * @todo (maybe) deprecated "Custom Shipping (Legacy - without Shipping Zones)" - hide when disabled
20
+ */
21
+ function __construct() {
22
+ $this->id = 'shipping';
23
+ $this->short_desc = __( 'Custom Shipping', 'woocommerce-jetpack' );
24
+ $this->desc = __( 'Add multiple custom shipping methods to WooCommerce.', 'woocommerce-jetpack' );
25
+ $this->link_slug = 'woocommerce-custom-shipping';
26
+ parent::__construct();
27
 
28
+ if ( $this->is_enabled() ) {
 
 
 
 
29
 
30
+ // Custom Shipping (Legacy - without Shipping Zones)
31
+ add_action( 'woocommerce_shipping_init', array( $this, 'init_template_class' ) );
32
+ add_filter( 'woocommerce_shipping_methods', array( $this, 'add_wc_shipping_wcj_custom_class' ) );
33
 
34
+ // Custom Shipping
35
+ if ( 'yes' === get_option( 'wcj_shipping_custom_shipping_w_zones_enabled', 'no' ) ) {
36
+ add_action( 'woocommerce_shipping_init', array( $this, 'init_shipping_zones_class' ) );
37
+ add_filter( 'woocommerce_shipping_methods', array( $this, 'add_wc_shipping_wcj_custom_w_zones_class' ) );
 
 
 
 
 
 
 
 
 
38
  }
39
  }
40
  }
 
41
 
42
+ /**
43
+ * @version 4.5.0
44
+ * @since 4.5.0
45
+ */
46
+ function init_template_class(){
 
 
 
47
  require_once( 'shipping/class-wc-shipping-wcj-custom.php' );
 
48
  }
 
49
 
50
+ /**
51
+ * @version 4.5.0
52
+ * @since 4.5.0
53
+ */
54
+ function init_shipping_zones_class(){
55
+ require_once( 'shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php' );
 
 
 
 
 
56
  }
 
 
57
 
58
+ /*
59
+ * add_wc_shipping_wcj_custom_class.
60
+ *
61
+ * @version 2.8.0
62
+ */
63
+ function add_wc_shipping_wcj_custom_class( $methods ) {
64
+ $total_number = get_option( 'wcj_shipping_custom_shipping_total_number', 1 );
65
+ for ( $i = 1; $i <= $total_number; $i++ ) {
66
+ $the_method = new WC_Shipping_WCJ_Custom_Template();
67
+ $the_method->init( $i );
68
+ $methods[ $the_method->id ] = $the_method;
69
+ }
70
+ return $methods;
71
  }
 
72
 
73
+ /*
74
+ * add_wc_shipping_wcj_custom_w_zones_class.
75
+ *
76
+ * @version 2.5.6
77
+ * @since 2.5.6
78
+ */
79
+ function add_wc_shipping_wcj_custom_w_zones_class( $methods ) {
80
+ $methods[ 'booster_custom_shipping_w_zones' ] = 'WC_Shipping_WCJ_Custom_W_Zones';
81
+ return $methods;
82
+ }
83
 
84
+ }
85
 
86
  endif;
87
 
includes/class-wcj-wpml.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - WPML
4
  *
5
- * @version 3.8.0
6
  * @since 2.2.0
7
  * @author Algoritmika Ltd.
8
  */
@@ -31,11 +31,31 @@ class WCJ_WPML extends WCJ_Module {
31
  if ( 'yes' === get_option( 'wcj_wpml_config_xml_auto_regenerate', 'no' ) ) {
32
  add_action( 'wcj_version_updated', array( $this, 'create_wpml_xml_file' ) );
33
  }
 
34
  }
35
 
36
  $this->notice = '';
37
  }
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  /**
40
  * get_default_modules_to_skip.
41
  *
2
  /**
3
  * Booster for WooCommerce - Module - WPML
4
  *
5
+ * @version 4.5.0
6
  * @since 2.2.0
7
  * @author Algoritmika Ltd.
8
  */
31
  if ( 'yes' === get_option( 'wcj_wpml_config_xml_auto_regenerate', 'no' ) ) {
32
  add_action( 'wcj_version_updated', array( $this, 'create_wpml_xml_file' ) );
33
  }
34
+ add_action( 'wcml_switch_currency', array( $this, 'switch_currency' ) );
35
  }
36
 
37
  $this->notice = '';
38
  }
39
 
40
+ /**
41
+ * Set Booster currency based on WPML currency
42
+ *
43
+ * @version 4.5.0
44
+ * @since 4.5.0
45
+ *
46
+ * @param $currency
47
+ */
48
+ function switch_currency( $currency ) {
49
+ if (
50
+ 'no' === get_option( 'wcj_wpml_switch_booster_currency', 'no' ) ||
51
+ ! WCJ()->modules['multicurrency']->is_enabled()
52
+ ) {
53
+ return;
54
+ }
55
+ wcj_session_maybe_start();
56
+ wcj_session_set( 'wcj-currency', $currency );
57
+ }
58
+
59
  /**
60
  * get_default_modules_to_skip.
61
  *
includes/classes/class-wcj-module-product-by-condition.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Product by Condition
4
  *
5
- * @version 4.1.0
6
  * @since 3.6.0
7
  * @author Algoritmika Ltd.
8
  */
@@ -212,12 +212,12 @@ abstract class WCJ_Module_Product_By_Condition extends WCJ_Module {
212
  /**
213
  * pre_get_posts.
214
  *
215
- * @version 4.1.0
216
  * @since 3.6.0
217
  * @todo [dev] maybe move `if ( ! function_exists( 'is_user_logged_in' ) ) {`
218
  */
219
  function pre_get_posts( $query ) {
220
- if ( is_admin() ) {
221
  return;
222
  }
223
  if ( ! function_exists( 'is_user_logged_in' ) ) {
2
  /**
3
  * Booster for WooCommerce - Module - Product by Condition
4
  *
5
+ * @version 4.5.0
6
  * @since 3.6.0
7
  * @author Algoritmika Ltd.
8
  */
212
  /**
213
  * pre_get_posts.
214
  *
215
+ * @version 4.5.0
216
  * @since 3.6.0
217
  * @todo [dev] maybe move `if ( ! function_exists( 'is_user_logged_in' ) ) {`
218
  */
219
  function pre_get_posts( $query ) {
220
+ if ( is_admin() && ! wp_doing_ajax() ) {
221
  return;
222
  }
223
  if ( ! function_exists( 'is_user_logged_in' ) ) {
includes/classes/class-wcj-module.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce Module
4
  *
5
- * @version 4.4.0
6
  * @since 2.2.0
7
  * @author Algoritmika Ltd.
8
  * @todo [dev] maybe should be `abstract` ?
@@ -20,6 +20,25 @@ class WCJ_Module {
20
  public $parent_id; // for `submodule` only
21
  public $type; // `module` or `submodule`
22
  public $link;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
  /**
25
  * Constructor.
2
  /**
3
  * Booster for WooCommerce Module
4
  *
5
+ * @version 4.5.0
6
  * @since 2.2.0
7
  * @author Algoritmika Ltd.
8
  * @todo [dev] maybe should be `abstract` ?
20
  public $parent_id; // for `submodule` only
21
  public $type; // `module` or `submodule`
22
  public $link;
23
+ public $options = array();
24
+
25
+ /**
26
+ * Gets an option from database or from the class itself for performance reasons.
27
+ *
28
+ * @version 4.5.0
29
+ * @since 4.5.0
30
+ *
31
+ * @param $option_name
32
+ * @param null $default
33
+ *
34
+ * @return mixed
35
+ */
36
+ function get_option( $option_name, $default = null ){
37
+ if ( ! isset( $this->options[ $option_name ] ) ) {
38
+ $this->options[ $option_name ] = get_option( $option_name, $default );
39
+ }
40
+ return $this->options[ $option_name ];
41
+ }
42
 
43
  /**
44
  * Constructor.
includes/core/wcj-modules.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Modules
4
  *
5
- * @version 4.3.0
6
  * @since 3.2.4
7
  * @author Algoritmika Ltd.
8
  */
@@ -95,7 +95,6 @@ $wcj_module_files = array(
95
  'class-wcj-order-custom-statuses.php',
96
  'class-wcj-order-quantities.php',
97
  'class-wcj-max-products-per-user.php',
98
- 'class-wcj-pdf-invoicing.php',
99
  'class-wcj-emails.php',
100
  'class-wcj-email-options.php',
101
  'class-wcj-emails-verification.php',
@@ -135,6 +134,7 @@ $wcj_module_files = array(
135
  'pdf-invoices/submodules/class-wcj-pdf-invoicing-emails.php',
136
  'pdf-invoices/submodules/class-wcj-pdf-invoicing-display.php',
137
  'pdf-invoices/submodules/class-wcj-pdf-invoicing-advanced.php',
 
138
  );
139
 
140
  $this->modules = array();
2
  /**
3
  * Booster for WooCommerce - Modules
4
  *
5
+ * @version 4.5.0
6
  * @since 3.2.4
7
  * @author Algoritmika Ltd.
8
  */
95
  'class-wcj-order-custom-statuses.php',
96
  'class-wcj-order-quantities.php',
97
  'class-wcj-max-products-per-user.php',
 
98
  'class-wcj-emails.php',
99
  'class-wcj-email-options.php',
100
  'class-wcj-emails-verification.php',
134
  'pdf-invoices/submodules/class-wcj-pdf-invoicing-emails.php',
135
  'pdf-invoices/submodules/class-wcj-pdf-invoicing-display.php',
136
  'pdf-invoices/submodules/class-wcj-pdf-invoicing-advanced.php',
137
+ 'class-wcj-pdf-invoicing.php',
138
  );
139
 
140
  $this->modules = array();
includes/functions/wcj-functions-general.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Functions - General
4
  *
5
- * @version 4.4.0
6
  * @author Algoritmika Ltd.
7
  * @todo add `wcj_add_actions()` and `wcj_add_filters()`
8
  */
@@ -796,13 +796,13 @@ if ( ! function_exists( 'wcj_get_the_ip' ) ) {
796
  /**
797
  * wcj_get_the_ip.
798
  *
799
- * @version 4.3.0
800
  * @see http://stackoverflow.com/questions/3003145/how-to-get-the-client-ip-address-in-php
801
  */
802
  function wcj_get_the_ip() {
803
  $ip = null;
804
  $ip_detection_methods = array( 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'REMOTE_ADDR' );
805
- $ip_detection_methods = 'yes' === get_option( 'wcj_general_enabled', 'no' ) ? explode( PHP_EOL, get_option( 'wcj_general_advanced_ip_detection', implode( PHP_EOL, $ip_detection_methods ) ) ) : $ip_detection_methods;
806
  foreach ( $ip_detection_methods as $method ) {
807
  if ( empty( $_SERVER[ sanitize_text_field( $method ) ] ) ) {
808
  continue;
2
  /**
3
  * Booster for WooCommerce - Functions - General
4
  *
5
+ * @version 4.5.0
6
  * @author Algoritmika Ltd.
7
  * @todo add `wcj_add_actions()` and `wcj_add_filters()`
8
  */
796
  /**
797
  * wcj_get_the_ip.
798
  *
799
+ * @version 4.5.0
800
  * @see http://stackoverflow.com/questions/3003145/how-to-get-the-client-ip-address-in-php
801
  */
802
  function wcj_get_the_ip() {
803
  $ip = null;
804
  $ip_detection_methods = array( 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'REMOTE_ADDR' );
805
+ $ip_detection_methods = 'yes' === get_option( 'wcj_general_enabled', 'no' ) ? explode( PHP_EOL, get_option( 'wcj_general_advanced_ip_detection', implode( PHP_EOL, array( 'REMOTE_ADDR', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR' ) ) ) ) : $ip_detection_methods;
806
  foreach ( $ip_detection_methods as $method ) {
807
  if ( empty( $_SERVER[ sanitize_text_field( $method ) ] ) ) {
808
  continue;
includes/functions/wcj-functions-orders.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Functions - Orders
4
  *
5
- * @version 3.4.0
6
  * @since 2.9.0
7
  * @author Algoritmika Ltd.
8
  */
@@ -215,3 +215,43 @@ if ( ! function_exists( 'wcj_order_get_payment_method' ) ) {
215
  }
216
  }
217
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  /**
3
  * Booster for WooCommerce - Functions - Orders
4
  *
5
+ * @version 4.5.0
6
  * @since 2.9.0
7
  * @author Algoritmika Ltd.
8
  */
215
  }
216
  }
217
 
218
+ if ( ! function_exists( 'wcj_get_order_fees_total' ) ) {
219
+ /**
220
+ * wcj_get_order_fees_total.
221
+ *
222
+ * @version 4.5.0
223
+ * @since 4.5.0
224
+ *
225
+ * @param $_order
226
+ *
227
+ * @return int
228
+ */
229
+ function wcj_get_order_fees_total( $_order ) {
230
+ $fees_total = 0;
231
+ foreach ( $_order->get_fees() as $fee ) {
232
+ $fees_total += $fee->get_total();
233
+ }
234
+ return $fees_total;
235
+ }
236
+ }
237
+
238
+ if ( ! function_exists( 'wcj_get_order_fees_total_tax' ) ) {
239
+ /**
240
+ * wcj_get_order_fees_total_tax.
241
+ *
242
+ * @version 4.5.0
243
+ * @since 4.5.0
244
+ *
245
+ * @param $_order
246
+ *
247
+ * @return int
248
+ */
249
+ function wcj_get_order_fees_total_tax( $_order ) {
250
+ $fees_total = 0;
251
+ foreach ( $_order->get_fees() as $fee ) {
252
+ $fees_total += $fee->get_total_tax();
253
+ }
254
+ return $fees_total;
255
+ }
256
+ }
257
+
includes/js/wcj-product-addons.js CHANGED
@@ -1,7 +1,7 @@
1
  /**
2
  * wcj-product-addons.
3
  *
4
- * @version 4.2.0
5
  * @since 2.5.3
6
  * @todo `text` type - update price not only on change, but on each pressed key
7
  * @todo fix the issue with custom price labels module
@@ -45,11 +45,20 @@ function change_price() {
45
  data[jQuery(this).attr('name')] = jQuery(this).find(':selected').val();
46
  });
47
  jQuery.post(_ajax_object.ajax_url, data, function(response) {
48
- if ( '' != response ) {
49
- if ( ! is_variable || _ajax_object.is_variable_with_single_price ) {
50
- jQuery("p[class='price'] .amount").replaceWith(response);
51
- } else if ( is_variable ) {
52
- jQuery("span[class='price'] .amount").replaceWith(response);
 
 
 
 
 
 
 
 
 
53
  }
54
  }
55
  });
1
  /**
2
  * wcj-product-addons.
3
  *
4
+ * @version 4.5.0
5
  * @since 2.5.3
6
  * @todo `text` type - update price not only on change, but on each pressed key
7
  * @todo fix the issue with custom price labels module
45
  data[jQuery(this).attr('name')] = jQuery(this).find(':selected').val();
46
  });
47
  jQuery.post(_ajax_object.ajax_url, data, function(response) {
48
+ if ('' != response) {
49
+ var ignore_strikethrough_str = 'yes' === ajax_object.ignore_strikethrough_price ? '*:not(del)' : '';
50
+ if (!is_variable || _ajax_object.is_variable_with_single_price) {
51
+ var amount = jQuery("p[class='price'] " + ignore_strikethrough_str + " .amount");
52
+ if (!amount.length) {
53
+ amount = jQuery("p[class='price'] .amount");
54
+ }
55
+ amount.replaceWith(response);
56
+ } else if (is_variable) {
57
+ var amount = jQuery("span[class='price'] " + ignore_strikethrough_str + " .amount");
58
+ if (!amount.length) {
59
+ amount = jQuery("span[class='price'] .amount");
60
+ }
61
+ amount.replaceWith(response);
62
  }
63
  }
64
  });
includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-emails.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - PDF Invoicing - Email Options
4
  *
5
- * @version 3.8.0
6
  * @author Algoritmika Ltd.
7
  */
8
 
@@ -48,7 +48,7 @@ class WCJ_PDF_Invoicing_Emails extends WCJ_Module {
48
  /**
49
  * add_pdf_invoice_email_attachment.
50
  *
51
- * @version 3.8.0
52
  */
53
  function add_pdf_invoice_email_attachment( $attachments, $status, $order ) {
54
  if ( ! $order || ! is_object( $order ) ) {
@@ -57,7 +57,7 @@ class WCJ_PDF_Invoicing_Emails extends WCJ_Module {
57
  if ( 'WC_Vendor_Stores_Order' == get_class( $order ) ) {
58
  $order = $order->get_parent_order( wcj_get_order_id( $order ) );
59
  }
60
- if ( 'WC_Order' != get_class( $order ) ) {
61
  return $attachments;
62
  }
63
  $invoice_types_ids = wcj_get_enabled_invoice_types_ids();
2
  /**
3
  * Booster for WooCommerce - PDF Invoicing - Email Options
4
  *
5
+ * @version 4.5.0
6
  * @author Algoritmika Ltd.
7
  */
8
 
48
  /**
49
  * add_pdf_invoice_email_attachment.
50
  *
51
+ * @version 4.5.0
52
  */
53
  function add_pdf_invoice_email_attachment( $attachments, $status, $order ) {
54
  if ( ! $order || ! is_object( $order ) ) {
57
  if ( 'WC_Vendor_Stores_Order' == get_class( $order ) ) {
58
  $order = $order->get_parent_order( wcj_get_order_id( $order ) );
59
  }
60
+ if ( ! is_a( $order, 'WC_Order' ) ) {
61
  return $attachments;
62
  }
63
  $invoice_types_ids = wcj_get_enabled_invoice_types_ids();
includes/settings/wcj-settings-checkout-fees.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - Checkout Fees
4
  *
5
- * @version 3.8.0
6
  * @since 3.7.0
7
  * @author Algoritmika Ltd.
8
  */
@@ -29,6 +29,12 @@ $settings = array(
29
  ),
30
  );
31
  $total_number = apply_filters( 'booster_option', 1, get_option( 'wcj_checkout_fees_total_number', 1 ) );
 
 
 
 
 
 
32
  for ( $i = 1; $i <= $total_number; $i++ ) {
33
  $settings = array_merge( $settings, array(
34
  array(
@@ -43,6 +49,13 @@ for ( $i = 1; $i <= $total_number; $i++ ) {
43
  'default' => 'yes',
44
  'type' => 'checkbox',
45
  ),
 
 
 
 
 
 
 
46
  array(
47
  'title' => __( 'Title', 'woocommerce-jetpack' ),
48
  'id' => "wcj_checkout_fees_data_titles[$i]",
@@ -67,11 +80,19 @@ for ( $i = 1; $i <= $total_number; $i++ ) {
67
  'custom_attributes' => array( 'step' => 0.000001 ),
68
  ),
69
  array(
70
- 'title' => __( 'Taxable', 'woocommerce-jetpack' ),
71
- 'desc' => __( 'Enable', 'woocommerce-jetpack' ),
72
- 'id' => "wcj_checkout_fees_data_taxable[$i]",
73
- 'default' => 'yes',
74
- 'type' => 'checkbox',
 
 
 
 
 
 
 
 
75
  ),
76
  array(
77
  'title' => __( 'Checkout Field', 'woocommerce-jetpack' ),
@@ -81,6 +102,24 @@ for ( $i = 1; $i <= $total_number; $i++ ) {
81
  'default' => '',
82
  'type' => 'text',
83
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  array(
85
  'type' => 'sectionend',
86
  'id' => "wcj_checkout_fees_data_options[$i]",
2
  /**
3
  * Booster for WooCommerce - Settings - Checkout Fees
4
  *
5
+ * @version 4.5.0
6
  * @since 3.7.0
7
  * @author Algoritmika Ltd.
8
  */
29
  ),
30
  );
31
  $total_number = apply_filters( 'booster_option', 1, get_option( 'wcj_checkout_fees_total_number', 1 ) );
32
+ $fees_titles = get_option( 'wcj_checkout_fees_data_titles', array() );
33
+ $fees = array();
34
+ for ( $i = 1; $i <= $total_number; $i ++ ) {
35
+ $fees[ $i ] = $fees_titles[ $i ];
36
+ }
37
+
38
  for ( $i = 1; $i <= $total_number; $i++ ) {
39
  $settings = array_merge( $settings, array(
40
  array(
49
  'default' => 'yes',
50
  'type' => 'checkbox',
51
  ),
52
+ array(
53
+ 'title' => __( 'Taxable', 'woocommerce-jetpack' ),
54
+ 'desc' => __( 'Enable', 'woocommerce-jetpack' ),
55
+ 'id' => "wcj_checkout_fees_data_taxable[$i]",
56
+ 'default' => 'yes',
57
+ 'type' => 'checkbox',
58
+ ),
59
  array(
60
  'title' => __( 'Title', 'woocommerce-jetpack' ),
61
  'id' => "wcj_checkout_fees_data_titles[$i]",
80
  'custom_attributes' => array( 'step' => 0.000001 ),
81
  ),
82
  array(
83
+ 'title' => __( 'Cart Min', 'woocommerce-jetpack' ),
84
+ 'desc_tip' => __( 'Cart minimum amount', 'woocommerce-jetpack' ),
85
+ 'id' => "wcj_checkout_fees_cart_min_amount[$i]",
86
+ 'default' => 1,
87
+ 'type' => 'number',
88
+ 'custom_attributes' => array( 'min' => 1 )
89
+ ),
90
+ array(
91
+ 'title' => __( 'Cart Max', 'woocommerce-jetpack' ),
92
+ 'desc_tip' => __( 'Cart maximum amount.', 'woocommerce-jetpack' ) . '<br />' . __( 'Zero or empty values will not be considered', 'woocommerce-jetpack' ),
93
+ 'id' => "wcj_checkout_fees_cart_max_amount[$i]",
94
+ 'default' => '',
95
+ 'type' => 'number',
96
  ),
97
  array(
98
  'title' => __( 'Checkout Field', 'woocommerce-jetpack' ),
102
  'default' => '',
103
  'type' => 'text',
104
  ),
105
+ array(
106
+ 'title' => __( 'Overlap', 'woocommerce-jetpack' ),
107
+ 'desc_tip' => __( 'If valid, will overlap other fee', 'woocommerce-jetpack' ),
108
+ 'id' => "wcj_checkout_fees_overlap[$i]",
109
+ 'type' => 'multiselect',
110
+ 'class' => 'chosen_select',
111
+ 'default' => '',
112
+ 'options' => array_filter( $fees, function ( $fee_id ) use ( $i ) {
113
+ return $i != $fee_id;
114
+ }, ARRAY_FILTER_USE_KEY )
115
+ ),
116
+ array(
117
+ 'title' => __( 'Priority', 'woocommerce-jetpack' ),
118
+ 'desc_tip' => __( 'The higher the number the higher the priority.', 'woocommerce-jetpack' ).'<br />'.__( 'Will mostly make sense for overlapping.', 'woocommerce-jetpack' ),
119
+ 'id' => "wcj_checkout_fees_priority[$i]",
120
+ 'type' => 'number',
121
+ 'default' => 0,
122
+ ),
123
  array(
124
  'type' => 'sectionend',
125
  'id' => "wcj_checkout_fees_data_options[$i]",
includes/settings/wcj-settings-general.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - General
4
  *
5
- * @version 4.3.0
6
  * @since 2.8.0
7
  * @author Algoritmika Ltd.
8
  */
@@ -36,6 +36,31 @@ $settings = array(
36
  'type' => 'sectionend',
37
  'id' => 'wcj_general_shortcodes_options',
38
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  array(
40
  'title' => __( 'Advanced Options', 'woocommerce-jetpack' ),
41
  'type' => 'title',
@@ -68,14 +93,6 @@ $settings = array(
68
  'default' => 'no',
69
  'type' => 'checkbox',
70
  ),
71
- array(
72
- 'title' => __( 'IP Detection', 'woocommerce-jetpack' ),
73
- 'desc' => __( 'IP Detection Methods used by some Booster modules when not using IP detection from WooCommerce. Change order for different results.', 'woocommerce-jetpack' ),
74
- 'desc_tip' => __( 'Default values are:', 'woocommerce-jetpack' ).'<br />'.implode( PHP_EOL, array( 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'REMOTE_ADDR' ) ),
75
- 'id' => 'wcj_general_advanced_ip_detection',
76
- 'default' => implode( PHP_EOL, array( 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'REMOTE_ADDR' ) ),
77
- 'type' => 'textarea',
78
- ),
79
  array(
80
  'title' => __( 'Datepicker/Weekpicker CSS Loading', 'woocommerce-jetpack' ),
81
  'desc_tip' => __( 'Disables datepicker/weekpicker CSS loading.', 'woocommerce-jetpack' ),
2
  /**
3
  * Booster for WooCommerce - Settings - General
4
  *
5
+ * @version 4.5.0
6
  * @since 2.8.0
7
  * @author Algoritmika Ltd.
8
  */
36
  'type' => 'sectionend',
37
  'id' => 'wcj_general_shortcodes_options',
38
  ),
39
+ array(
40
+ 'title' => __( 'Ip Detection', 'woocommerce-jetpack' ),
41
+ 'type' => 'title',
42
+ 'id' => 'wcj_general_ip',
43
+ ),
44
+ array(
45
+ 'title' => __( 'Overwrite WooCommerce IP Detection', 'woocommerce-jetpack' ),
46
+ 'desc' => __( 'Try to overwrite WooCommerce IP detection', 'woocommerce-jetpack' ),
47
+ 'desc_tip' => __( 'The "HTTP_X_REAL_IP" param on $_SERVER variable will be replaced by IP detected from Booster', 'woocommerce-jetpack' ),
48
+ 'id' => 'wcj_general_overwrite_wc_ip',
49
+ 'default' => 'no',
50
+ 'type' => 'checkbox',
51
+ ),
52
+ array(
53
+ 'title' => __( 'Detection Methods', 'woocommerce-jetpack' ),
54
+ 'desc' => __( 'IP Detection Methods used by some Booster modules when not using IP detection from WooCommerce. Change order for different results.', 'woocommerce-jetpack' ),
55
+ 'desc_tip' => __( 'Default values are:', 'woocommerce-jetpack' ).'<br />'.implode( PHP_EOL, array( 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'REMOTE_ADDR' ) ),
56
+ 'id' => 'wcj_general_advanced_ip_detection',
57
+ 'default' => implode( PHP_EOL, array( 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'REMOTE_ADDR' ) ),
58
+ 'type' => 'textarea',
59
+ ),
60
+ array(
61
+ 'type' => 'sectionend',
62
+ 'id' => 'wcj_general_ip',
63
+ ),
64
  array(
65
  'title' => __( 'Advanced Options', 'woocommerce-jetpack' ),
66
  'type' => 'title',
93
  'default' => 'no',
94
  'type' => 'checkbox',
95
  ),
 
 
 
 
 
 
 
 
96
  array(
97
  'title' => __( 'Datepicker/Weekpicker CSS Loading', 'woocommerce-jetpack' ),
98
  'desc_tip' => __( 'Disables datepicker/weekpicker CSS loading.', 'woocommerce-jetpack' ),
includes/settings/wcj-settings-multicurrency.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - Multicurrency (Currency Switcher)
4
  *
5
- * @version 4.4.0
6
  * @since 2.8.0
7
  * @author Algoritmika Ltd.
8
  * @todo "pretty prices"
@@ -107,6 +107,14 @@ $settings = array(
107
  'type' => 'title',
108
  'id' => 'wcj_multicurrency_compatibility',
109
  ),
 
 
 
 
 
 
 
 
110
  array(
111
  'title' => __( 'WooCommerce Smart Coupons', 'woocommerce-jetpack' ),
112
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
@@ -117,14 +125,23 @@ $settings = array(
117
  array(
118
  'title' => __( 'WooCommerce Price Filter', 'woocommerce-jetpack' ),
119
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
 
120
  'id' => 'wcj_multicurrency_compatibility_wc_price_filter',
121
- 'default' => 'yes',
 
 
 
 
 
 
 
 
122
  'type' => 'checkbox',
123
  ),
124
  array(
125
  'title' => __( 'WooCommerce Import', 'woocommerce-jetpack' ),
126
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
127
- 'desc_tip' => __( 'This option fixes WooCommerce Import Tool preventing it from converting some uppercase meta to lowercase', 'woocommerce-jetpack' ),
128
  'id' => 'wcj_multicurrency_compatibility_wc_import',
129
  'default' => 'no',
130
  'type' => 'checkbox',
@@ -154,6 +171,14 @@ $settings = array(
154
  'default' => 0,
155
  'type' => 'number',
156
  ),
 
 
 
 
 
 
 
 
157
  array(
158
  'type' => 'sectionend',
159
  'id' => 'wcj_multicurrency_options_adv',
2
  /**
3
  * Booster for WooCommerce - Settings - Multicurrency (Currency Switcher)
4
  *
5
+ * @version 4.5.0
6
  * @since 2.8.0
7
  * @author Algoritmika Ltd.
8
  * @todo "pretty prices"
107
  'type' => 'title',
108
  'id' => 'wcj_multicurrency_compatibility',
109
  ),
110
+ array(
111
+ 'title' => __( 'WooCommerce Coupons', 'woocommerce-jetpack' ),
112
+ 'desc' => __( 'Enable', 'woocommerce-jetpack' ),
113
+ 'desc_tip' => __( 'When a fixed coupon is used its value changes according to the current currency', 'woocommerce-jetpack' ),
114
+ 'id' => 'wcj_multicurrency_compatibility_wc_coupons',
115
+ 'default' => 'no',
116
+ 'type' => 'checkbox',
117
+ ),
118
  array(
119
  'title' => __( 'WooCommerce Smart Coupons', 'woocommerce-jetpack' ),
120
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
125
  array(
126
  'title' => __( 'WooCommerce Price Filter', 'woocommerce-jetpack' ),
127
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
128
+ 'desc_tip' => __( 'Adds Compatibility with Price Filter widget', 'woocommerce-jetpack' ),
129
  'id' => 'wcj_multicurrency_compatibility_wc_price_filter',
130
+ 'default' => 'no',
131
+ 'type' => 'checkbox',
132
+ ),
133
+ array(
134
+ 'title' => __( 'Price Sorting with Per Product', 'woocommerce-jetpack' ),
135
+ 'desc' => __( 'Enable', 'woocommerce-jetpack' ),
136
+ 'desc_tip' => __( 'Fixes Price Sorting if Per Product option is enabled', 'woocommerce-jetpack' ),
137
+ 'id' => 'wcj_multicurrency_compatibility_price_sorting_per_product',
138
+ 'default' => 'no',
139
  'type' => 'checkbox',
140
  ),
141
  array(
142
  'title' => __( 'WooCommerce Import', 'woocommerce-jetpack' ),
143
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
144
+ 'desc_tip' => __( 'Fixes WooCommerce Import Tool preventing it from converting some uppercase meta to lowercase', 'woocommerce-jetpack' ),
145
  'id' => 'wcj_multicurrency_compatibility_wc_import',
146
  'default' => 'no',
147
  'type' => 'checkbox',
171
  'default' => 0,
172
  'type' => 'number',
173
  ),
174
+ array(
175
+ 'title' => __( 'Save Prices on Exchange Update', 'woocommerce-jetpack' ),
176
+ 'desc' => __( 'Enable', 'woocommerce-jetpack' ),
177
+ 'desc_tip' => __( 'Save min and max prices on exchange rate update, via background processing.', 'woocommerce-jetpack' ) . '<br />' . __( 'All products with "per product" options registered related to the currency will be affected.', 'woocommerce-jetpack' ),
178
+ 'id' => 'wcj_multicurrency_update_prices_on_exch_update',
179
+ 'default' => 'no',
180
+ 'type' => 'checkbox',
181
+ ),
182
  array(
183
  'type' => 'sectionend',
184
  'id' => 'wcj_multicurrency_options_adv',
includes/settings/wcj-settings-product-addons.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - Product Addons
4
  *
5
- * @version 4.0.0
6
  * @since 2.8.0
7
  * @author Algoritmika Ltd.
8
  * @todo (maybe) add `woocommerce_payment_complete` to `$qty_triggers` (also maybe add this trigger to "PDF Invoicing" module)
@@ -181,6 +181,14 @@ $settings = array_merge( $settings, array(
181
  'default' => 'no',
182
  'type' => 'checkbox',
183
  ),
 
 
 
 
 
 
 
 
184
  array(
185
  'title' => __( 'Decrease Quantity', 'woocommerce-jetpack' ),
186
  'desc_tip' => __( 'If you select multiple triggers to decrease quantity, it will be decreased only once (on whichever trigger is executed first).', 'woocommerce-jetpack' ),
2
  /**
3
  * Booster for WooCommerce - Settings - Product Addons
4
  *
5
+ * @version 4.5.0
6
  * @since 2.8.0
7
  * @author Algoritmika Ltd.
8
  * @todo (maybe) add `woocommerce_payment_complete` to `$qty_triggers` (also maybe add this trigger to "PDF Invoicing" module)
181
  'default' => 'no',
182
  'type' => 'checkbox',
183
  ),
184
+ array(
185
+ 'title' => __( 'Ignore Strikethrough Price', 'woocommerce-jetpack' ),
186
+ 'desc' => __( 'Ignore Strikethrough Price', 'woocommerce-jetpack' ),
187
+ 'desc_tip' => __( 'If a product has both regular and sale prices, only the sale price will be updated on AJAX. The regular price will be ignored', 'woocommerce-jetpack' ),
188
+ 'id' => 'wcj_product_addons_ajax_ignore_st_price',
189
+ 'default' => 'no',
190
+ 'type' => 'checkbox',
191
+ ),
192
  array(
193
  'title' => __( 'Decrease Quantity', 'woocommerce-jetpack' ),
194
  'desc_tip' => __( 'If you select multiple triggers to decrease quantity, it will be decreased only once (on whichever trigger is executed first).', 'woocommerce-jetpack' ),
includes/settings/wcj-settings-product-input-fields.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - Product Input Fields
4
  *
5
- * @version 4.3.0
6
  * @since 2.8.0
7
  * @author Algoritmika Ltd.
8
  * @todo [dev] maybe set "Strip slashes" option to `yes` by default (or even remove the option completely and always strip slashes)
@@ -277,6 +277,14 @@ $settings = array_merge( $settings, array(
277
  'type' => 'custom_textarea',
278
  'css' => 'width:50%;min-width:300px;',
279
  ),
 
 
 
 
 
 
 
 
280
  array(
281
  'type' => 'sectionend',
282
  'id' => 'wcj_product_input_fields_frontend_view_options',
@@ -322,6 +330,14 @@ $settings = array_merge( $settings, array(
322
  'default' => 'yes',
323
  'type' => 'checkbox',
324
  ),
 
 
 
 
 
 
 
 
325
  array(
326
  'type' => 'sectionend',
327
  'id' => 'wcj_product_input_fields_admin_view_options',
2
  /**
3
  * Booster for WooCommerce - Settings - Product Input Fields
4
  *
5
+ * @version 4.5.0
6
  * @since 2.8.0
7
  * @author Algoritmika Ltd.
8
  * @todo [dev] maybe set "Strip slashes" option to `yes` by default (or even remove the option completely and always strip slashes)
277
  'type' => 'custom_textarea',
278
  'css' => 'width:50%;min-width:300px;',
279
  ),
280
+ array(
281
+ 'title' => __( 'Preserve Line Breaks', 'woocommerce-jetpack' ),
282
+ 'desc' => __( 'Enable', 'woocommerce-jetpack' ),
283
+ 'desc_tip' => __( 'Preserves line breaks on frontend, making some inputs like textarea more legible', 'woocommerce-jetpack' ),
284
+ 'id' => 'wcj_product_input_fields_frontend_linebreaks',
285
+ 'default' => 'no',
286
+ 'type' => 'checkbox',
287
+ ),
288
  array(
289
  'type' => 'sectionend',
290
  'id' => 'wcj_product_input_fields_frontend_view_options',
330
  'default' => 'yes',
331
  'type' => 'checkbox',
332
  ),
333
+ array(
334
+ 'title' => __( 'Preserve Line Breaks', 'woocommerce-jetpack' ),
335
+ 'desc' => __( 'Enable', 'woocommerce-jetpack' ),
336
+ 'desc_tip' => __( 'Preserves line breaks on admin, making some inputs like textarea more legible', 'woocommerce-jetpack' ),
337
+ 'id' => 'wcj_product_input_fields_admin_linebreaks',
338
+ 'default' => 'no',
339
+ 'type' => 'checkbox',
340
+ ),
341
  array(
342
  'type' => 'sectionend',
343
  'id' => 'wcj_product_input_fields_admin_view_options',
includes/settings/wcj-settings-purchase-data.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - Product Cost Price
4
  *
5
- * @version 3.6.0
6
  * @since 2.8.0
7
  * @author Algoritmika Ltd.
8
  * @todo add options to set fields and column titles
@@ -38,6 +38,17 @@ $settings = array(
38
  'default' => 'no',
39
  'type' => 'checkbox',
40
  ),
 
 
 
 
 
 
 
 
 
 
 
41
  array(
42
  'type' => 'sectionend',
43
  'id' => 'wcj_purchase_data_price_fields_options',
2
  /**
3
  * Booster for WooCommerce - Settings - Product Cost Price
4
  *
5
+ * @version 4.5.0
6
  * @since 2.8.0
7
  * @author Algoritmika Ltd.
8
  * @todo add options to set fields and column titles
38
  'default' => 'no',
39
  'type' => 'checkbox',
40
  ),
41
+ array(
42
+ 'title' => __( 'Profit Percentage Type', 'woocommerce-jetpack' ),
43
+ 'desc_tip' => __( 'Example:', 'woocommerce-jetpack' ).'<br />'.__( 'Selling: $3.000 | Buying: $1.000', 'woocommerce-jetpack' ).'<br />'.__( 'Margin: 66% | Markup: $200%', 'woocommerce-jetpack' ),
44
+ 'id' => 'wcj_purchase_price_profit_percentage_type',
45
+ 'default' => 'markup',
46
+ 'options' => array(
47
+ 'margin' => __( 'Margin', 'woocommerce-jetpack' ),
48
+ 'markup' => __( 'Markup', 'woocommerce-jetpack' ),
49
+ ),
50
+ 'type' => 'select',
51
+ ),
52
  array(
53
  'type' => 'sectionend',
54
  'id' => 'wcj_purchase_data_price_fields_options',
includes/settings/wcj-settings-wpml.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - WPML
4
  *
5
- * @version 3.8.0
6
  * @since 2.8.0
7
  * @author Algoritmika Ltd.
8
  */
@@ -30,6 +30,14 @@ $settings = array(
30
  'id' => 'wcj_wpml_use_translation_product_id',
31
  'default' => 'yes',
32
  ),
 
 
 
 
 
 
 
 
33
  array(
34
  'type' => 'sectionend',
35
  'id' => 'wcj_wpml_general_options',
2
  /**
3
  * Booster for WooCommerce - Settings - WPML
4
  *
5
+ * @version 4.5.0
6
  * @since 2.8.0
7
  * @author Algoritmika Ltd.
8
  */
30
  'id' => 'wcj_wpml_use_translation_product_id',
31
  'default' => 'yes',
32
  ),
33
+ array(
34
+ 'title' => __( 'Auto Switch Booster Currency', 'woocommerce-jetpack' ),
35
+ 'desc' => __( 'Enable', 'woocommerce-jetpack' ),
36
+ 'desc_tip' => __( "Try to automatically switch Booster currency according to WPML. It's necessary to enable MultiCurrency module", 'woocommerce-jetpack' ),
37
+ 'type' => 'checkbox',
38
+ 'id' => 'wcj_wpml_switch_booster_currency',
39
+ 'default' => 'no',
40
+ ),
41
  array(
42
  'type' => 'sectionend',
43
  'id' => 'wcj_wpml_general_options',
includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Shipping - Custom Shipping with Shipping Zones
4
  *
5
- * @version 4.4.1
6
  * @since 2.5.6
7
  * @author Algoritmika Ltd.
8
  */
@@ -11,303 +11,333 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
11
 
12
  if ( ! class_exists( 'WC_Shipping_WCJ_Custom_W_Zones' ) ) :
13
 
14
- class WC_Shipping_WCJ_Custom_W_Zones extends WC_Shipping_Method {
15
 
16
- /**
17
- * Constructor shipping class
18
- *
19
- * @version 2.5.6
20
- * @since 2.5.6
21
- * @access public
22
- * @return void
23
- */
24
- function __construct( $instance_id = 0 ) {
25
- $this->init( $instance_id );
26
- }
 
 
 
27
 
28
- /**
29
- * Init settings
30
- *
31
- * @version 4.4.0
32
- * @since 2.5.6
33
- * @access public
34
- * @return void
35
- */
36
- function init( $instance_id ) {
 
 
 
37
 
38
- $this->id = 'booster_custom_shipping_w_zones';
39
- $this->method_title = get_option( 'wcj_shipping_custom_shipping_w_zones_admin_title', __( 'Booster: Custom Shipping', 'woocommerce-jetpack' ) );
40
- $this->method_description = __( 'Booster: Custom Shipping Method', 'woocommerce-jetpack' );
 
 
 
41
 
42
- $this->instance_id = absint( $instance_id );
43
- $this->supports = array(
44
- 'shipping-zones',
45
- 'instance-settings',
46
- 'instance-settings-modal',
47
- );
48
 
49
- // Load the settings.
50
- $this->init_instance_form_fields();
 
 
 
 
 
 
51
 
52
- // Define user set variables
53
- $this->title = $this->get_option( 'title' );
54
- $this->cost = $this->get_option( 'cost' );
55
- $this->min_weight = $this->get_option( 'min_weight' );
56
- $this->max_weight = $this->get_option( 'max_weight' );
57
- $this->type = $this->get_option( 'type' );
58
- $this->apply_formula = apply_filters( 'booster_option', 'no', $this->get_option( 'apply_formula' ) );
59
- $this->weight_table_total_rows = $this->get_option( 'weight_table_total_rows' );
60
 
61
- // Save settings in admin
62
- add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
63
 
64
- // Add weight table rows
65
- if ( apply_filters( 'wcj_custom_shipping_do_add_table_rows', true, $this ) ) {
66
- if ( ! has_filter( 'woocommerce_shipping_instance_form_fields_' . $this->id, array( $this, 'add_table_rows' ) ) ) {
67
- add_filter( 'woocommerce_shipping_instance_form_fields_' . $this->id, array( $this, 'add_table_rows' ) );
 
 
 
 
68
  }
69
  }
70
- }
71
 
72
- /**
73
- * add_table_rows.
74
- *
75
- * @version 4.4.1
76
- * @since 2.6.0
77
- */
78
- function add_table_rows( $instance_form_fields ) {
79
- if ( $this->instance_id ) {
80
- $settings = get_option( 'woocommerce_' . $this->id . '_' . $this->instance_id . '_settings' );
81
- $this->weight_table_total_rows = $settings['weight_table_total_rows'];
82
- for ( $i = 1; $i <= $this->weight_table_total_rows; $i++ ) {
83
- if ( ! isset( $instance_form_fields[ 'weight_table_weight_row_' . $i ] ) ) {
84
- $instance_form_fields = array_merge( $instance_form_fields, array(
85
- 'weight_table_weight_row_' . $i => array( // mislabeled, should be 'table_weight_row_'
86
- 'title' => __( 'Max Weight or Quantity', 'woocommerce' ) . ' #' . $i,
87
- 'type' => 'number',
88
- 'default' => 0,
89
- 'desc_tip' => true,
90
- 'css' => 'width:100%',
91
- 'custom_attributes' => array( 'step' => '0.000001', 'min' => '0' ),
92
- ),
93
- 'weight_table_cost_row_' . $i => array( // mislabeled, should be 'table_cost_row_'
94
- 'title' => __( 'Cost', 'woocommerce' ) . ' #' . $i,
95
- 'type' => 'text',
96
- 'default' => 0,
97
- 'desc_tip' => true,
98
- 'css' => 'width:100%',
99
- ),
100
- ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  }
102
  }
 
103
  }
104
- return $instance_form_fields;
105
- }
106
 
107
- /**
108
- * Is this method available?
109
- *
110
- * @version 2.5.7
111
- * @since 2.5.7
112
- * @param array $package
113
- * @return bool
114
- */
115
- function is_available( $package ) {
116
- $available = parent::is_available( $package );
117
- if ( $available ) {
118
- $total_weight = WC()->cart->get_cart_contents_weight();
119
- if ( 0 != $this->min_weight && $total_weight < $this->min_weight ) {
120
- $available = false;
121
- } elseif ( 0 != $this->max_weight && $total_weight > $this->max_weight ) {
122
- $available = false;
 
123
  }
 
124
  }
125
- return $available;
126
- }
127
-
128
- /**
129
- * Initialise Settings Form Fields
130
- *
131
- * @version 3.9.0
132
- * @since 2.5.6
133
- */
134
- function init_instance_form_fields() {
135
- $type_options = array(
136
- 'flat_rate' => __( 'Flat rate', 'woocommerce-jetpack' ),
137
- 'by_total_cart_weight' => __( 'By total cart weight', 'woocommerce-jetpack' ),
138
- 'by_total_cart_weight_table' => __( 'By total cart weight table', 'woocommerce-jetpack' ),
139
- 'by_total_cart_quantity' => __( 'By total cart quantity', 'woocommerce-jetpack' ),
140
- );
141
- $type_options = apply_filters( 'booster_option', $type_options, array_merge( $type_options, array(
142
- 'by_total_cart_quantity_table' => __( 'By total cart quantity table', 'woocommerce-jetpack' ),
143
- ) ) );
144
- $this->instance_form_fields = array(
145
- 'title' => array(
146
- 'title' => __( 'Title', 'woocommerce' ),
147
- 'type' => 'text',
148
- 'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce' ),
149
- 'default' => __( 'Custom Shipping', 'woocommerce-jetpack' ),
150
- 'desc_tip' => true,
151
- 'css' => 'width:100%',
152
- ),
153
- 'type' => array(
154
- 'title' => __( 'Type', 'woocommerce' ),
155
- 'type' => 'select',
156
- 'description' => __( 'Cost calculation type.', 'woocommerce-jetpack' ) . ' ' .
157
- apply_filters( 'booster_message', '', 'desc_advanced_no_link', array( 'option' => __( 'By Total Cart Quantity Table', 'woocommerce-jetpack' ) ) ),
158
- 'default' => 'flat_rate',
159
- 'desc_tip' => true,
160
- 'options' => $type_options,
161
- 'css' => 'width:100%',
162
- ),
163
- 'cost' => array(
164
- 'title' => __( 'Cost', 'woocommerce' ),
165
- 'type' => 'text',
166
- 'description' => __( 'Cost. If calculating by weight - then cost per one weight unit. If calculating by quantity - then cost per one piece.', 'woocommerce-jetpack' ),
167
- 'default' => 0,
168
- 'desc_tip' => true,
169
- 'css' => 'width:100%',
170
- ),
171
- 'min_weight' => array(
172
- 'title' => __( 'Min Weight', 'woocommerce' ),
173
- 'type' => 'number',
174
- 'description' => __( 'Minimum total cart weight. Set zero to disable.', 'woocommerce-jetpack' ),
175
- 'default' => 0,
176
- 'desc_tip' => true,
177
- 'css' => 'width:100%',
178
- 'custom_attributes' => array( 'step' => '0.000001', 'min' => '0' ),
179
- ),
180
- 'max_weight' => array(
181
- 'title' => __( 'Max Weight', 'woocommerce' ),
182
- 'type' => 'number',
183
- 'description' => __( 'Maximum total cart weight. Set zero to disable.', 'woocommerce-jetpack' ),
184
- 'default' => 0,
185
- 'desc_tip' => true,
186
- 'css' => 'width:100%',
187
- 'custom_attributes' => array( 'step' => '0.000001', 'min' => '0' ),
188
- ),
189
- 'apply_formula' => array(
190
- 'title' => __( 'Apply Formula and Shortcodes to Costs', 'woocommerce' ),
191
- 'description' => sprintf( __( 'You can use %s and %s params in formula, e.g.: %s. Also you can use shortcodes, e.g.: %s.', 'woocommerce-jetpack' ),
192
- '<em>weight</em>', '<em>quantity</em>', '<em>2.5+weight</em>', '<em>[wcj_shipping_costs_table prop="weight" table="25-12.25|50-14.50|9999-29.148"]</em>' ) . '<br>' .
193
- apply_filters( 'booster_message', '', 'desc_no_link' ),
194
- 'desc_tip' => true,
195
- 'type' => 'checkbox',
196
- 'default' => 'no',
197
- 'custom_attributes' => apply_filters( 'booster_message', '', 'disabled' ),
198
- ),
199
- 'weight_table_total_rows' => array( // mislabeled, should be 'table_total_rows'
200
- 'title' => __( 'Table Total Rows', 'woocommerce' ),
201
- 'type' => 'number',
202
- 'description' => __( 'Press "Save changes" and reload the page after you change this number.', 'woocommerce-jetpack' ),
203
- 'default' => 0,
204
- 'desc_tip' => true,
205
- 'css' => 'width:100%',
206
- 'custom_attributes' => array( 'min' => '0' ),
207
- ),
208
- );
209
- }
210
 
211
- /**
212
- * calculate_shipping_by_table.
213
- *
214
- * @version 2.8.0
215
- * @since 2.5.6
216
- */
217
- function calculate_shipping_by_table( $weight ) {
218
- if ( 0 == $this->weight_table_total_rows ) {
219
- return $this->cost * $weight; // fallback
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
  }
221
- $option_name_weight = $option_name_cost = '';
222
- for ( $i = 1; $i <= $this->weight_table_total_rows; $i++ ) {
223
- $option_name_weight = 'weight_table_weight_row_' . $i;
224
- $option_name_cost = 'weight_table_cost_row_' . $i;
225
- if ( $weight <= $this->get_option( $option_name_weight ) ) {
226
- return $this->get_option( $option_name_cost );
 
 
 
 
 
 
 
 
 
 
 
 
227
  }
 
228
  }
229
- return $this->get_option( $option_name_cost ); // fallback - last row
230
- }
231
 
232
- /**
233
- * maybe_apply_formula.
234
- *
235
- * @version 3.9.0
236
- * @since 3.4.0
237
- * @todo use WC math library instead of `PHPMathParser`
238
- */
239
- function maybe_apply_formula( $formula ) {
240
- if ( 'yes' !== $this->apply_formula ) {
241
- return $formula;
242
- }
243
- $formula = do_shortcode( $formula );
244
- require_once( wcj_plugin_path() . '/includes/lib/PHPMathParser/Math.php' );
245
- $math = new WCJ_Math();
246
- $variables = array(
247
- 'quantity' => $this->get_total_cart_quantity(),
248
- 'weight' => WC()->cart->get_cart_contents_weight(),
249
- );
250
- foreach ( $variables as $key => $value ) {
251
- $math->registerVariable( $key, $value );
252
- $formula = str_replace( $key, '$' . $key, $formula );
253
- }
254
- try {
255
- return $math->evaluate( $formula );
256
- } catch ( Exception $e ) {
257
- return $formula;
 
258
  }
259
- }
260
 
261
- /**
262
- * get_total_cart_quantity.
263
- *
264
- * @version 2.8.0
265
- * @since 2.8.0
266
- */
267
- function get_total_cart_quantity() {
268
- $cart_quantity = 0;
269
- foreach ( WC()->cart->get_cart() as $cart_item_key => $values ) {
270
- $cart_quantity += $values['quantity'];
 
 
271
  }
272
- return $cart_quantity;
273
- }
274
 
275
- /**
276
- * calculate_shipping function.
277
- *
278
- * @version 3.4.0
279
- * @since 2.5.6
280
- * @access public
281
- * @param mixed $package
282
- * @return void
283
- */
284
- function calculate_shipping( $package = array() ) {
285
- switch ( $this->type ) {
286
- case 'by_total_cart_quantity':
287
- $cost = $this->cost * $this->get_total_cart_quantity();
288
- break;
289
- case 'by_total_cart_weight':
290
- $cost = $this->cost * WC()->cart->get_cart_contents_weight();
291
- break;
292
- case 'by_total_cart_quantity_table':
293
- $cost = $this->calculate_shipping_by_table( $this->get_total_cart_quantity() );
294
- break;
295
- case 'by_total_cart_weight_table':
296
- $cost = $this->calculate_shipping_by_table( WC()->cart->get_cart_contents_weight() );
297
- break;
298
- default: // 'flat_rate'
299
- $cost = $this->cost;
300
- break;
 
 
 
 
 
 
 
 
 
301
  }
302
- $rate = array(
303
- 'id' => $this->get_rate_id(),
304
- 'label' => $this->title,
305
- 'cost' => $this->maybe_apply_formula( $cost ),
306
- 'calc_tax' => 'per_order',
307
- );
308
- // Register the rate
309
- $this->add_rate( $rate );
310
  }
311
- }
312
 
313
  endif;
2
  /**
3
  * Booster for WooCommerce - Shipping - Custom Shipping with Shipping Zones
4
  *
5
+ * @version 4.5.0
6
  * @since 2.5.6
7
  * @author Algoritmika Ltd.
8
  */
11
 
12
  if ( ! class_exists( 'WC_Shipping_WCJ_Custom_W_Zones' ) ) :
13
 
14
+ class WC_Shipping_WCJ_Custom_W_Zones extends WC_Shipping_Method {
15
 
16
+ public static $form_field_ids = array();
17
+ public static $wcj_settings = array();
18
+
19
+ /**
20
+ * Constructor shipping class
21
+ *
22
+ * @version 2.5.6
23
+ * @since 2.5.6
24
+ * @access public
25
+ * @return void
26
+ */
27
+ function __construct( $instance_id = 0 ) {
28
+ $this->init( $instance_id );
29
+ }
30
 
31
+ /**
32
+ * Init settings
33
+ *
34
+ * @version 4.5.0
35
+ * @since 2.5.6
36
+ * @access public
37
+ * @return void
38
+ */
39
+ function init( $instance_id ) {
40
+ $this->id = 'booster_custom_shipping_w_zones';
41
+ $this->method_title = get_option( 'wcj_shipping_custom_shipping_w_zones_admin_title', __( 'Booster: Custom Shipping', 'woocommerce-jetpack' ) );
42
+ $this->method_description = __( 'Booster: Custom Shipping Method', 'woocommerce-jetpack' );
43
 
44
+ $this->instance_id = absint( $instance_id );
45
+ $this->supports = array(
46
+ 'shipping-zones',
47
+ 'instance-settings',
48
+ 'instance-settings-modal',
49
+ );
50
 
51
+ // Load the settings.
52
+ $this->init_instance_form_fields();
 
 
 
 
53
 
54
+ // Define user set variables
55
+ $this->title = $this->get_option( 'title' );
56
+ $this->cost = $this->get_option( 'cost' );
57
+ $this->min_weight = $this->get_option( 'min_weight' );
58
+ $this->max_weight = $this->get_option( 'max_weight' );
59
+ $this->type = $this->get_option( 'type' );
60
+ $this->apply_formula = apply_filters( 'booster_option', 'no', $this->get_option( 'apply_formula' ) );
61
+ $this->weight_table_total_rows = $this->get_option( 'weight_table_total_rows' );
62
 
63
+ // Save settings in admin
64
+ add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
 
 
 
 
 
 
65
 
66
+ // Sanitize Settings
67
+ add_filter( 'woocommerce_shipping_' . $this->id . '_instance_settings_values', array( $this, 'sanitize_settings' ), 10, 2 );
68
 
69
+ // Add weight table rows
70
+ if ( apply_filters( 'wcj_custom_shipping_do_add_table_rows', true, $this ) ) {
71
+ if ( ! has_filter( 'woocommerce_shipping_instance_form_fields_' . $this->id, array( $this, 'add_table_rows' ) ) ) {
72
+ if ( ! in_array( $instance_id, self::$form_field_ids ) && $this->instance_id != 0 ) {
73
+ self::$form_field_ids[] = $instance_id;
74
+ add_filter( 'woocommerce_shipping_instance_form_fields_' . $this->id, array( $this, 'add_table_rows' ) );
75
+ }
76
+ }
77
  }
78
  }
 
79
 
80
+ /**
81
+ * sanitize_settings.
82
+ *
83
+ * @version 4.5.0
84
+ * @since 4.5.0
85
+ *
86
+ * @param $settings
87
+ * @param $shipping_method
88
+ *
89
+ * @return
90
+ */
91
+ function sanitize_settings( $settings, $shipping_method ) {
92
+ $settings = array_filter( $settings );
93
+ return $settings;
94
+ }
95
+
96
+ /**
97
+ * add_table_rows.
98
+ *
99
+ * @version 4.5.0
100
+ * @since 2.6.0
101
+ */
102
+ function add_table_rows( $instance_form_fields ) {
103
+ if ( $this->instance_id ) {
104
+ $settings_name = 'woocommerce_' . $this->id . '_' . $this->instance_id . '_settings';
105
+ if ( ! isset( self::$wcj_settings[ $settings_name ] ) ) {
106
+ $settings = get_option( $settings_name );
107
+ self::$wcj_settings[ $settings_name ] = $settings;
108
+ } else {
109
+ $settings = self::$wcj_settings[ $settings_name ];
110
+ }
111
+ $this->weight_table_total_rows = isset( $settings['weight_table_total_rows'] ) ? $settings['weight_table_total_rows'] : 1;
112
+ for ( $i = 1; $i <= $this->weight_table_total_rows; $i ++ ) {
113
+ if ( ! isset( $instance_form_fields[ 'weight_table_weight_row_' . $i ] ) ) {
114
+ $instance_form_fields = array_merge( $instance_form_fields, array(
115
+ 'weight_table_weight_row_' . $i => array( // mislabeled, should be 'table_weight_row_'
116
+ 'title' => __( 'Max Weight or Quantity', 'woocommerce' ) . ' #' . $i,
117
+ 'type' => 'number',
118
+ 'default' => 0,
119
+ 'desc_tip' => true,
120
+ 'css' => 'width:100%',
121
+ 'custom_attributes' => array( 'step' => '0.000001', 'min' => '0' ),
122
+ ),
123
+ 'weight_table_cost_row_' . $i => array( // mislabeled, should be 'table_cost_row_'
124
+ 'title' => __( 'Cost', 'woocommerce' ) . ' #' . $i,
125
+ 'type' => 'text',
126
+ 'default' => 0,
127
+ 'desc_tip' => true,
128
+ 'css' => 'width:100%',
129
+ ),
130
+ ) );
131
+ }
132
  }
133
  }
134
+ return $instance_form_fields;
135
  }
 
 
136
 
137
+ /**
138
+ * Is this method available?
139
+ *
140
+ * @version 2.5.7
141
+ * @since 2.5.7
142
+ * @param array $package
143
+ * @return bool
144
+ */
145
+ function is_available( $package ) {
146
+ $available = parent::is_available( $package );
147
+ if ( $available ) {
148
+ $total_weight = WC()->cart->get_cart_contents_weight();
149
+ if ( 0 != $this->min_weight && $total_weight < $this->min_weight ) {
150
+ $available = false;
151
+ } elseif ( 0 != $this->max_weight && $total_weight > $this->max_weight ) {
152
+ $available = false;
153
+ }
154
  }
155
+ return $available;
156
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
 
158
+ /**
159
+ * Initialise Settings Form Fields
160
+ *
161
+ * @version 3.9.0
162
+ * @since 2.5.6
163
+ */
164
+ function init_instance_form_fields() {
165
+ $type_options = array(
166
+ 'flat_rate' => __( 'Flat rate', 'woocommerce-jetpack' ),
167
+ 'by_total_cart_weight' => __( 'By total cart weight', 'woocommerce-jetpack' ),
168
+ 'by_total_cart_weight_table' => __( 'By total cart weight table', 'woocommerce-jetpack' ),
169
+ 'by_total_cart_quantity' => __( 'By total cart quantity', 'woocommerce-jetpack' ),
170
+ );
171
+ $type_options = apply_filters( 'booster_option', $type_options, array_merge( $type_options, array(
172
+ 'by_total_cart_quantity_table' => __( 'By total cart quantity table', 'woocommerce-jetpack' ),
173
+ ) ) );
174
+ $this->instance_form_fields = array(
175
+ 'title' => array(
176
+ 'title' => __( 'Title', 'woocommerce' ),
177
+ 'type' => 'text',
178
+ 'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce' ),
179
+ 'default' => __( 'Custom Shipping', 'woocommerce-jetpack' ),
180
+ 'desc_tip' => true,
181
+ 'css' => 'width:100%',
182
+ ),
183
+ 'type' => array(
184
+ 'title' => __( 'Type', 'woocommerce' ),
185
+ 'type' => 'select',
186
+ 'description' => __( 'Cost calculation type.', 'woocommerce-jetpack' ) . ' ' .
187
+ apply_filters( 'booster_message', '', 'desc_advanced_no_link', array( 'option' => __( 'By Total Cart Quantity Table', 'woocommerce-jetpack' ) ) ),
188
+ 'default' => 'flat_rate',
189
+ 'desc_tip' => true,
190
+ 'options' => $type_options,
191
+ 'css' => 'width:100%',
192
+ ),
193
+ 'cost' => array(
194
+ 'title' => __( 'Cost', 'woocommerce' ),
195
+ 'type' => 'text',
196
+ 'description' => __( 'Cost. If calculating by weight - then cost per one weight unit. If calculating by quantity - then cost per one piece.', 'woocommerce-jetpack' ),
197
+ 'default' => 0,
198
+ 'desc_tip' => true,
199
+ 'css' => 'width:100%',
200
+ ),
201
+ 'min_weight' => array(
202
+ 'title' => __( 'Min Weight', 'woocommerce' ),
203
+ 'type' => 'number',
204
+ 'description' => __( 'Minimum total cart weight. Set zero to disable.', 'woocommerce-jetpack' ),
205
+ 'default' => 0,
206
+ 'desc_tip' => true,
207
+ 'css' => 'width:100%',
208
+ 'custom_attributes' => array( 'step' => '0.000001', 'min' => '0' ),
209
+ ),
210
+ 'max_weight' => array(
211
+ 'title' => __( 'Max Weight', 'woocommerce' ),
212
+ 'type' => 'number',
213
+ 'description' => __( 'Maximum total cart weight. Set zero to disable.', 'woocommerce-jetpack' ),
214
+ 'default' => 0,
215
+ 'desc_tip' => true,
216
+ 'css' => 'width:100%',
217
+ 'custom_attributes' => array( 'step' => '0.000001', 'min' => '0' ),
218
+ ),
219
+ 'apply_formula' => array(
220
+ 'title' => __( 'Apply Formula and Shortcodes to Costs', 'woocommerce' ),
221
+ 'description' => sprintf( __( 'You can use %s and %s params in formula, e.g.: %s. Also you can use shortcodes, e.g.: %s.', 'woocommerce-jetpack' ),
222
+ '<em>weight</em>', '<em>quantity</em>', '<em>2.5+weight</em>', '<em>[wcj_shipping_costs_table prop="weight" table="25-12.25|50-14.50|9999-29.148"]</em>' ) . '<br>' .
223
+ apply_filters( 'booster_message', '', 'desc_no_link' ),
224
+ 'desc_tip' => true,
225
+ 'type' => 'checkbox',
226
+ 'default' => 'no',
227
+ 'custom_attributes' => apply_filters( 'booster_message', '', 'disabled' ),
228
+ ),
229
+ 'weight_table_total_rows' => array( // mislabeled, should be 'table_total_rows'
230
+ 'title' => __( 'Table Total Rows', 'woocommerce' ),
231
+ 'type' => 'number',
232
+ 'description' => __( 'Press "Save changes" and reload the page after you change this number.', 'woocommerce-jetpack' ),
233
+ 'default' => 0,
234
+ 'desc_tip' => true,
235
+ 'css' => 'width:100%',
236
+ 'custom_attributes' => array( 'min' => '0' ),
237
+ ),
238
+ );
239
  }
240
+
241
+ /**
242
+ * calculate_shipping_by_table.
243
+ *
244
+ * @version 2.8.0
245
+ * @since 2.5.6
246
+ */
247
+ function calculate_shipping_by_table( $weight ) {
248
+ if ( 0 == $this->weight_table_total_rows ) {
249
+ return $this->cost * $weight; // fallback
250
+ }
251
+ $option_name_weight = $option_name_cost = '';
252
+ for ( $i = 1; $i <= $this->weight_table_total_rows; $i++ ) {
253
+ $option_name_weight = 'weight_table_weight_row_' . $i;
254
+ $option_name_cost = 'weight_table_cost_row_' . $i;
255
+ if ( $weight <= $this->get_option( $option_name_weight ) ) {
256
+ return $this->get_option( $option_name_cost );
257
+ }
258
  }
259
+ return $this->get_option( $option_name_cost ); // fallback - last row
260
  }
 
 
261
 
262
+ /**
263
+ * maybe_apply_formula.
264
+ *
265
+ * @version 3.9.0
266
+ * @since 3.4.0
267
+ * @todo use WC math library instead of `PHPMathParser`
268
+ */
269
+ function maybe_apply_formula( $formula ) {
270
+ if ( 'yes' !== $this->apply_formula ) {
271
+ return $formula;
272
+ }
273
+ $formula = do_shortcode( $formula );
274
+ require_once( wcj_plugin_path() . '/includes/lib/PHPMathParser/Math.php' );
275
+ $math = new WCJ_Math();
276
+ $variables = array(
277
+ 'quantity' => $this->get_total_cart_quantity(),
278
+ 'weight' => WC()->cart->get_cart_contents_weight(),
279
+ );
280
+ foreach ( $variables as $key => $value ) {
281
+ $math->registerVariable( $key, $value );
282
+ $formula = str_replace( $key, '$' . $key, $formula );
283
+ }
284
+ try {
285
+ return $math->evaluate( $formula );
286
+ } catch ( Exception $e ) {
287
+ return $formula;
288
+ }
289
  }
 
290
 
291
+ /**
292
+ * get_total_cart_quantity.
293
+ *
294
+ * @version 2.8.0
295
+ * @since 2.8.0
296
+ */
297
+ function get_total_cart_quantity() {
298
+ $cart_quantity = 0;
299
+ foreach ( WC()->cart->get_cart() as $cart_item_key => $values ) {
300
+ $cart_quantity += $values['quantity'];
301
+ }
302
+ return $cart_quantity;
303
  }
 
 
304
 
305
+ /**
306
+ * calculate_shipping function.
307
+ *
308
+ * @version 3.4.0
309
+ * @since 2.5.6
310
+ * @access public
311
+ * @param mixed $package
312
+ * @return void
313
+ */
314
+ function calculate_shipping( $package = array() ) {
315
+ switch ( $this->type ) {
316
+ case 'by_total_cart_quantity':
317
+ $cost = $this->cost * $this->get_total_cart_quantity();
318
+ break;
319
+ case 'by_total_cart_weight':
320
+ $cost = $this->cost * WC()->cart->get_cart_contents_weight();
321
+ break;
322
+ case 'by_total_cart_quantity_table':
323
+ $cost = $this->calculate_shipping_by_table( $this->get_total_cart_quantity() );
324
+ break;
325
+ case 'by_total_cart_weight_table':
326
+ $cost = $this->calculate_shipping_by_table( WC()->cart->get_cart_contents_weight() );
327
+ break;
328
+ default: // 'flat_rate'
329
+ $cost = $this->cost;
330
+ break;
331
+ }
332
+ $rate = array(
333
+ 'id' => $this->get_rate_id(),
334
+ 'label' => $this->title,
335
+ 'cost' => $this->maybe_apply_formula( $cost ),
336
+ 'calc_tax' => 'per_order',
337
+ );
338
+ // Register the rate
339
+ $this->add_rate( $rate );
340
  }
 
 
 
 
 
 
 
 
341
  }
 
342
 
343
  endif;
includes/shortcodes/class-wcj-shortcodes-orders.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Shortcodes - Orders
4
  *
5
- * @version 4.4.0
6
  * @author Algoritmika Ltd.
7
  */
8
 
@@ -307,8 +307,9 @@ class WCJ_Orders_Shortcodes extends WCJ_Shortcodes {
307
  /**
308
  * wcj_order_refunds_table.
309
  *
310
- * @version 3.1.2
311
  * @since 3.1.0
 
312
  * @todo add `refund_items_or_reason_or_title` column
313
  * @todo add `refund_items_quantities` column (`$_item->get_quantity()`)
314
  * @todo check `$atts['columns']` etc. before starting
@@ -327,7 +328,15 @@ class WCJ_Orders_Shortcodes extends WCJ_Shortcodes {
327
  $cell = $i;
328
  break;
329
  case 'refund_title':
330
- $cell = $_refund->get_post_title();
 
 
 
 
 
 
 
 
331
  break;
332
  case 'refund_reason':
333
  $cell = $_refund->get_reason();
@@ -1191,11 +1200,17 @@ class WCJ_Orders_Shortcodes extends WCJ_Shortcodes {
1191
 
1192
  /**
1193
  * wcj_order_subtotal_plus_shipping.
 
 
1194
  */
1195
  function wcj_order_subtotal_plus_shipping( $atts ) {
1196
  $the_subtotal = $this->the_order->get_subtotal();
1197
  $the_shipping = $this->the_order->get_total_shipping();
1198
- return $this->wcj_price_shortcode( $the_subtotal + $the_shipping, $atts );
 
 
 
 
1199
  }
1200
 
1201
  /**
2
  /**
3
  * Booster for WooCommerce - Shortcodes - Orders
4
  *
5
+ * @version 4.5.0
6
  * @author Algoritmika Ltd.
7
  */
8
 
307
  /**
308
  * wcj_order_refunds_table.
309
  *
310
+ * @version 4.5.0
311
  * @since 3.1.0
312
+ * @see woocommerce/includes/admin/meta-boxes/views/html-order-refund.php for refund_title
313
  * @todo add `refund_items_or_reason_or_title` column
314
  * @todo add `refund_items_quantities` column (`$_item->get_quantity()`)
315
  * @todo check `$atts['columns']` etc. before starting
328
  $cell = $i;
329
  break;
330
  case 'refund_title':
331
+ $cell = sprintf(
332
+ /* translators: 1: refund id 2: refund date */
333
+ esc_html__( 'Refund #%1$s - %2$s', 'woocommerce' ),
334
+ esc_html( $_refund->get_id() ),
335
+ esc_html( wc_format_datetime( $_refund->get_date_created(), get_option( 'date_format' ) . ', ' . get_option( 'time_format' ) ) )
336
+ );
337
+ break;
338
+ case 'refund_date':
339
+ $cell = esc_html( wc_format_datetime( $_refund->get_date_created(), get_option( 'date_format' ) . ', ' . get_option( 'time_format' ) ) );
340
  break;
341
  case 'refund_reason':
342
  $cell = $_refund->get_reason();
1200
 
1201
  /**
1202
  * wcj_order_subtotal_plus_shipping.
1203
+ *
1204
+ * @version 4.5.0
1205
  */
1206
  function wcj_order_subtotal_plus_shipping( $atts ) {
1207
  $the_subtotal = $this->the_order->get_subtotal();
1208
  $the_shipping = $this->the_order->get_total_shipping();
1209
+ $fees_total = 0;
1210
+ if ( isset( $atts['plus_fees'] ) && true === filter_var( $atts['plus_fees'], FILTER_VALIDATE_BOOLEAN ) ) {
1211
+ $fees_total = wcj_get_order_fees_total( $this->the_order );
1212
+ }
1213
+ return $this->wcj_price_shortcode( $the_subtotal + $the_shipping + $fees_total, $atts );
1214
  }
1215
 
1216
  /**
langs/woocommerce-jetpack.pot CHANGED
@@ -77,7 +77,7 @@ msgstr ""
77
 
78
  #: includes/class-wcj-admin-bar.php:172
79
  #: includes/admin/class-wc-settings-jetpack.php:416
80
- #: includes/classes/class-wcj-module.php:702
81
  msgid "Documentation"
82
  msgstr ""
83
 
@@ -96,8 +96,8 @@ msgstr ""
96
 
97
  #: includes/class-wcj-admin-bar.php:245 includes/class-wcj-admin-bar.php:288
98
  #: includes/class-wcj-admin-bar.php:632
99
- #: includes/classes/class-wcj-module.php:535
100
- #: includes/settings/wcj-settings-wpml.php:74
101
  msgid "Tools"
102
  msgstr ""
103
 
@@ -119,8 +119,8 @@ msgstr ""
119
  #: includes/class-wcj-track-users.php:251
120
  #: includes/admin/class-wc-settings-jetpack.php:24
121
  #: includes/admin/class-wc-settings-jetpack.php:221
122
- #: includes/classes/class-wcj-module.php:362
123
- #: includes/classes/class-wcj-module.php:562
124
  #: includes/settings/wcj-settings-price-by-country.php:178
125
  msgid "Booster"
126
  msgstr ""
@@ -622,9 +622,9 @@ msgstr ""
622
  msgid "Add fees to WooCommerce cart & checkout."
623
  msgstr ""
624
 
625
- #: includes/class-wcj-checkout-fees.php:108
626
- #: includes/settings/wcj-settings-checkout-fees.php:35
627
- #: includes/settings/wcj-settings-checkout-fees.php:49
628
  msgid "Fee"
629
  msgstr ""
630
 
@@ -1051,7 +1051,7 @@ msgid ""
1051
  msgstr ""
1052
 
1053
  #: includes/class-wcj-custom-php.php:32
1054
- #: includes/settings/wcj-settings-multicurrency.php:144
1055
  #: includes/settings/wcj-settings-offer-price.php:84
1056
  #, php-format
1057
  msgid "E.g.: %s"
@@ -1461,32 +1461,32 @@ msgstr ""
1461
  msgid "Current PHP time limit: %s seconds."
1462
  msgstr ""
1463
 
1464
- #: includes/class-wcj-general.php:116
1465
  msgid "Booster User Role"
1466
  msgstr ""
1467
 
1468
- #: includes/class-wcj-general.php:177
1469
  msgid "All fields are required!"
1470
  msgstr ""
1471
 
1472
- #: includes/class-wcj-general.php:181
1473
  msgid "Role ID must not be numbers only!"
1474
  msgstr ""
1475
 
1476
- #: includes/class-wcj-general.php:190
1477
  msgid "Role successfully added!"
1478
  msgstr ""
1479
 
1480
- #: includes/class-wcj-general.php:192
1481
  msgid "Role already exists!"
1482
  msgstr ""
1483
 
1484
- #: includes/class-wcj-general.php:205
1485
  #, php-format
1486
  msgid "Role %s successfully deleted!"
1487
  msgstr ""
1488
 
1489
- #: includes/class-wcj-general.php:211 includes/class-wcj-general.php:226
1490
  #: includes/class-wcj-sku.php:536
1491
  #: includes/reports/wcj-class-reports-sales.php:196
1492
  #: includes/settings/wcj-settings-cross-sells.php:43
@@ -1498,7 +1498,7 @@ msgstr ""
1498
  msgid "ID"
1499
  msgstr ""
1500
 
1501
- #: includes/class-wcj-general.php:211 includes/class-wcj-general.php:227
1502
  #: includes/class-wcj-offer-price.php:167
1503
  #: includes/export/class-wcj-fields-helper.php:282
1504
  #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:70
@@ -1506,11 +1506,11 @@ msgstr ""
1506
  msgid "Name"
1507
  msgstr ""
1508
 
1509
- #: includes/class-wcj-general.php:211 includes/class-wcj-general.php:228
1510
  msgid "Capabilities"
1511
  msgstr ""
1512
 
1513
- #: includes/class-wcj-general.php:211
1514
  #: includes/class-wcj-product-by-user.php:197
1515
  #: includes/settings/wcj-settings-pdf-invoicing-advanced.php:107
1516
  #: includes/tools/class-wcj-order-statuses-tool.php:145
@@ -1518,7 +1518,7 @@ msgstr ""
1518
  msgid "Actions"
1519
  msgstr ""
1520
 
1521
- #: includes/class-wcj-general.php:218
1522
  #: includes/class-wcj-payment-gateways.php:117
1523
  #: includes/class-wcj-product-bulk-meta-editor.php:367
1524
  #: includes/class-wcj-product-by-user.php:206
@@ -1529,15 +1529,15 @@ msgstr ""
1529
  msgid "Delete"
1530
  msgstr ""
1531
 
1532
- #: includes/class-wcj-general.php:222
1533
  msgid "Existing Roles"
1534
  msgstr ""
1535
 
1536
- #: includes/class-wcj-general.php:229
1537
  msgid "Add New Role"
1538
  msgstr ""
1539
 
1540
- #: includes/class-wcj-general.php:232
1541
  #: includes/class-wcj-shipping-by-products.php:206
1542
  #: includes/settings/wcj-settings-admin-orders-list.php:134
1543
  #: includes/settings/wcj-settings-checkout-custom-fields.php:22
@@ -1561,10 +1561,10 @@ msgstr ""
1561
  #: includes/settings/wcj-settings-product-by-user.php:114
1562
  #: includes/settings/wcj-settings-product-open-pricing.php:123
1563
  #: includes/settings/wcj-settings-product-tabs.php:247
1564
- #: includes/settings/wcj-settings-purchase-data.php:134
1565
- #: includes/settings/wcj-settings-purchase-data.php:143
1566
- #: includes/settings/wcj-settings-purchase-data.php:162
1567
- #: includes/settings/wcj-settings-purchase-data.php:169
1568
  #: includes/settings/wcj-settings-sku.php:240
1569
  #: includes/settings/wcj-settings-sku.php:267
1570
  #: includes/shortcodes/class-wcj-shortcodes-products-add-form.php:422
@@ -1574,7 +1574,7 @@ msgstr ""
1574
 
1575
  #: includes/class-wcj-global-discount.php:27
1576
  #: includes/admin/class-wc-settings-jetpack.php:486
1577
- #: includes/settings/wcj-settings-product-addons.php:237
1578
  msgid "Global Discount"
1579
  msgstr ""
1580
 
@@ -1681,7 +1681,7 @@ msgid "Set \"Place order\" button label."
1681
  msgstr ""
1682
 
1683
  #: includes/class-wcj-multicurrency-product-base-price.php:25
1684
- #: includes/settings/wcj-settings-product-addons.php:235
1685
  msgid "Multicurrency Product Base Price"
1686
  msgstr ""
1687
 
@@ -1689,38 +1689,38 @@ msgstr ""
1689
  msgid "Enter prices for products in different currencies."
1690
  msgstr ""
1691
 
1692
- #: includes/class-wcj-multicurrency.php:25
1693
- #: includes/settings/wcj-settings-product-addons.php:236
1694
  msgid "Multicurrency (Currency Switcher)"
1695
  msgstr ""
1696
 
1697
- #: includes/class-wcj-multicurrency.php:26
1698
  msgid "Add multiple currencies (currency switcher) to WooCommerce."
1699
  msgstr ""
1700
 
1701
- #: includes/class-wcj-multicurrency.php:28
1702
  #, php-format
1703
  msgid ""
1704
  "After setting currencies in the Currencies Options section below, you can "
1705
  "add switcher to the frontend with: %s"
1706
  msgstr ""
1707
 
1708
- #: includes/class-wcj-multicurrency.php:30
1709
  #, php-format
1710
  msgid "<strong>Widget:</strong> \"%s\""
1711
  msgstr ""
1712
 
1713
- #: includes/class-wcj-multicurrency.php:31
1714
  #: includes/widgets/class-wcj-widget-multicurrency.php:27
1715
  msgid "Booster - Multicurrency Switcher"
1716
  msgstr ""
1717
 
1718
- #: includes/class-wcj-multicurrency.php:33
1719
  #, php-format
1720
  msgid "<strong>Shortcodes:</strong> %s"
1721
  msgstr ""
1722
 
1723
- #: includes/class-wcj-multicurrency.php:36
1724
  #, php-format
1725
  msgid "<strong>PHP code:</strong> by using %s function, e.g.: %s"
1726
  msgstr ""
@@ -1767,12 +1767,12 @@ msgstr ""
1767
  msgid "Lost password"
1768
  msgstr ""
1769
 
1770
- #: includes/class-wcj-my-account.php:220
1771
  #, php-format
1772
  msgid "Hello %1$s (not %1$s? <a href=\"%2$s\">Log out</a>)"
1773
  msgstr ""
1774
 
1775
- #: includes/class-wcj-my-account.php:230
1776
  #, php-format
1777
  msgid ""
1778
  "From your account dashboard you can view your <a href=\"%1$s\">recent "
@@ -1780,16 +1780,16 @@ msgid ""
1780
  "and <a href=\"%3$s\">edit your password and account details</a>."
1781
  msgstr ""
1782
 
1783
- #: includes/class-wcj-my-account.php:336
1784
  msgid "User role"
1785
  msgstr ""
1786
 
1787
- #: includes/class-wcj-my-account.php:416
1788
  #: includes/class-wcj-product-bulk-meta-editor.php:279
1789
  #: includes/class-wcj-product-by-user.php:206
1790
  #: includes/class-wcj-purchase-data.php:94
1791
  #: includes/class-wcj-track-users.php:334
1792
- #: includes/classes/class-wcj-module.php:671
1793
  #: includes/functions/wcj-functions-general.php:189
1794
  #: includes/functions/wcj-functions-html.php:117
1795
  #: includes/reports/wcj-class-reports-monthly-sales.php:351
@@ -2342,26 +2342,26 @@ msgstr ""
2342
  msgid "Invoices Monthly Reports."
2343
  msgstr ""
2344
 
2345
- #: includes/class-wcj-pdf-invoicing.php:89
2346
  msgid "Generate"
2347
  msgstr ""
2348
 
2349
- #: includes/class-wcj-pdf-invoicing.php:90
2350
  msgid "Download (Zip)"
2351
  msgstr ""
2352
 
2353
- #: includes/class-wcj-pdf-invoicing.php:91
2354
  msgid "Merge (Print)"
2355
  msgstr ""
2356
 
2357
- #: includes/class-wcj-pdf-invoicing.php:113
2358
  #, php-format
2359
  msgid "Document generated."
2360
  msgid_plural "%s documents generated."
2361
  msgstr[0] ""
2362
  msgstr[1] ""
2363
 
2364
- #: includes/class-wcj-pdf-invoicing.php:120
2365
  #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:172
2366
  #, php-format
2367
  msgid ""
@@ -2369,27 +2369,27 @@ msgid ""
2369
  "hosting provider."
2370
  msgstr ""
2371
 
2372
- #: includes/class-wcj-pdf-invoicing.php:126
2373
  msgid "Booster: ZipArchive error."
2374
  msgstr ""
2375
 
2376
- #: includes/class-wcj-pdf-invoicing.php:131
2377
  msgid "Booster: Merge PDFs: No files."
2378
  msgstr ""
2379
 
2380
- #: includes/class-wcj-pdf-invoicing.php:136
2381
  #, php-format
2382
  msgid ""
2383
  "Booster: Merge PDFs: Command requires PHP version 5.3.0 at least. You have "
2384
  "PHP version %s installed."
2385
  msgstr ""
2386
 
2387
- #: includes/class-wcj-pdf-invoicing.php:141
2388
  #, php-format
2389
  msgid "Booster: %s."
2390
  msgstr ""
2391
 
2392
- #: includes/class-wcj-pdf-invoicing.php:434
2393
  msgid "You are not allowed to view the invoice."
2394
  msgstr ""
2395
 
@@ -2502,8 +2502,8 @@ msgstr ""
2502
  #: includes/settings/wcj-settings-checkout-customization.php:174
2503
  #: includes/settings/wcj-settings-checkout-customization.php:197
2504
  #: includes/settings/wcj-settings-checkout-customization.php:222
2505
- #: includes/settings/wcj-settings-checkout-fees.php:41
2506
- #: includes/settings/wcj-settings-checkout-fees.php:71
2507
  #: includes/settings/wcj-settings-checkout-files-upload.php:227
2508
  #: includes/settings/wcj-settings-checkout-files-upload.php:329
2509
  #: includes/settings/wcj-settings-checkout-files-upload.php:438
@@ -2529,9 +2529,9 @@ msgstr ""
2529
  #: includes/settings/wcj-settings-emails-verification.php:36
2530
  #: includes/settings/wcj-settings-emails-verification.php:43
2531
  #: includes/settings/wcj-settings-general.php:21
2532
- #: includes/settings/wcj-settings-general.php:48
2533
- #: includes/settings/wcj-settings-general.php:129
2534
- #: includes/settings/wcj-settings-general.php:180
2535
  #: includes/settings/wcj-settings-global-discount.php:52
2536
  #: includes/settings/wcj-settings-global-discount.php:181
2537
  #: includes/settings/wcj-settings-left-to-free-shipping.php:28
@@ -2545,8 +2545,11 @@ msgstr ""
2545
  #: includes/settings/wcj-settings-multicurrency-base-price.php:70
2546
  #: includes/settings/wcj-settings-multicurrency.php:39
2547
  #: includes/settings/wcj-settings-multicurrency.php:112
2548
- #: includes/settings/wcj-settings-multicurrency.php:119
2549
- #: includes/settings/wcj-settings-multicurrency.php:126
 
 
 
2550
  #: includes/settings/wcj-settings-my-account.php:29
2551
  #: includes/settings/wcj-settings-my-account.php:87
2552
  #: includes/settings/wcj-settings-my-account.php:104
@@ -2603,7 +2606,7 @@ msgstr ""
2603
  #: includes/settings/wcj-settings-product-addons.php:50
2604
  #: includes/settings/wcj-settings-product-addons.php:74
2605
  #: includes/settings/wcj-settings-product-addons.php:179
2606
- #: includes/settings/wcj-settings-product-addons.php:249
2607
  #: includes/settings/wcj-settings-product-bookings.php:107
2608
  #: includes/settings/wcj-settings-product-bulk-meta-editor.php:21
2609
  #: includes/settings/wcj-settings-product-bulk-meta-editor.php:29
@@ -2622,9 +2625,11 @@ msgstr ""
2622
  #: includes/settings/wcj-settings-product-info.php:68
2623
  #: includes/settings/wcj-settings-product-input-fields.php:24
2624
  #: includes/settings/wcj-settings-product-input-fields.php:54
2625
- #: includes/settings/wcj-settings-product-input-fields.php:318
2626
- #: includes/settings/wcj-settings-product-input-fields.php:338
2627
- #: includes/settings/wcj-settings-product-input-fields.php:346
 
 
2628
  #: includes/settings/wcj-settings-product-open-pricing.php:102
2629
  #: includes/settings/wcj-settings-product-open-pricing.php:109
2630
  #: includes/settings/wcj-settings-product-open-pricing.php:140
@@ -2636,10 +2641,10 @@ msgstr ""
2636
  #: includes/settings/wcj-settings-purchase-data.php:22
2637
  #: includes/settings/wcj-settings-purchase-data.php:29
2638
  #: includes/settings/wcj-settings-purchase-data.php:36
2639
- #: includes/settings/wcj-settings-purchase-data.php:103
2640
- #: includes/settings/wcj-settings-purchase-data.php:110
2641
- #: includes/settings/wcj-settings-purchase-data.php:117
2642
- #: includes/settings/wcj-settings-purchase-data.php:185
2643
  #: includes/settings/wcj-settings-related-products.php:105
2644
  #: includes/settings/wcj-settings-related-products.php:112
2645
  #: includes/settings/wcj-settings-related-products.php:119
@@ -2674,7 +2679,8 @@ msgstr ""
2674
  #: includes/settings/wcj-settings-wholesale-price.php:42
2675
  #: includes/settings/wcj-settings-wholesale-price.php:51
2676
  #: includes/settings/wcj-settings-wpml.php:28
2677
- #: includes/settings/wcj-settings-wpml.php:45
 
2678
  #: includes/settings/meta-box/wcj-settings-meta-box-product-add-to-cart.php:68
2679
  #: includes/settings/meta-box/wcj-settings-meta-box-product-addons.php:35
2680
  #: includes/settings/meta-box/wcj-settings-meta-box-related-products.php:19
@@ -2779,11 +2785,11 @@ msgstr ""
2779
  msgid "Add (paid/free/discount) addons to products."
2780
  msgstr ""
2781
 
2782
- #: includes/class-wcj-product-addons.php:169
2783
  msgid "Some of the required addons are not selected!"
2784
  msgstr ""
2785
 
2786
- #: includes/class-wcj-product-addons.php:184
2787
  msgid ""
2788
  "Booster: Free plugin's version is limited to only three products with per "
2789
  "product addons enabled at a time. You will need to get <a href=\"https://"
@@ -2916,7 +2922,7 @@ msgstr ""
2916
  #: includes/class-wcj-product-bulk-meta-editor.php:294
2917
  #: includes/settings/wcj-settings-admin-orders-list.php:71
2918
  #: includes/settings/wcj-settings-admin-products-list.php:56
2919
- #: includes/settings/wcj-settings-checkout-fees.php:63
2920
  #: includes/settings/wcj-settings-export.php:91
2921
  #: includes/settings/wcj-settings-export.php:162
2922
  #: includes/settings/wcj-settings-export.php:241
@@ -3244,7 +3250,7 @@ msgstr ""
3244
  #: includes/gateways/class-wc-gateway-wcj-custom.php:55
3245
  #: includes/input-fields/wcj-product-input-fields-options.php:51
3246
  #: includes/settings/wcj-settings-admin-orders-list.php:172
3247
- #: includes/settings/wcj-settings-checkout-fees.php:47
3248
  #: includes/settings/wcj-settings-cross-sells.php:42
3249
  #: includes/settings/wcj-settings-export.php:75
3250
  #: includes/settings/wcj-settings-export.php:143
@@ -3258,11 +3264,11 @@ msgstr ""
3258
  #: includes/settings/wcj-settings-product-tabs.php:409
3259
  #: includes/settings/wcj-settings-product-tabs.php:430
3260
  #: includes/settings/wcj-settings-products-xml.php:223
3261
- #: includes/settings/wcj-settings-purchase-data.php:66
3262
  #: includes/settings/wcj-settings-related-products.php:24
3263
  #: includes/settings/wcj-settings-upsells.php:42
3264
  #: includes/settings/meta-box/wcj-settings-meta-box-product-addons.php:57
3265
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:147
3266
  #: includes/shipping/class-wc-shipping-wcj-custom.php:107
3267
  #: includes/shortcodes/class-wcj-shortcodes-products-add-form.php:334
3268
  #: includes/widgets/class-wcj-widget-country-switcher.php:62
@@ -3663,7 +3669,7 @@ msgstr ""
3663
  #: includes/input-fields/wcj-product-input-fields-options.php:101
3664
  #: includes/settings/wcj-settings-admin-orders-list.php:84
3665
  #: includes/settings/wcj-settings-checkout-custom-fields.php:265
3666
- #: includes/settings/wcj-settings-product-addons.php:225
3667
  #: includes/settings/wcj-settings-related-products.php:176
3668
  #: includes/settings/meta-box/wcj-settings-meta-box-custom-css.php:20
3669
  #: includes/settings/meta-box/wcj-settings-meta-box-multicurrency.php:60
@@ -3698,7 +3704,7 @@ msgstr ""
3698
  #: includes/settings/wcj-settings-eu-vat-number.php:101
3699
  #: includes/settings/wcj-settings-eu-vat-number.php:111
3700
  #: includes/settings/wcj-settings-eu-vat-number.php:130
3701
- #: includes/settings/wcj-settings-product-addons.php:224
3702
  #: includes/settings/wcj-settings-related-products.php:175
3703
  #: includes/settings/meta-box/wcj-settings-meta-box-custom-css.php:19
3704
  #: includes/settings/meta-box/wcj-settings-meta-box-multicurrency.php:61
@@ -3817,8 +3823,8 @@ msgid "Import"
3817
  msgstr ""
3818
 
3819
  #: includes/class-wcj-purchase-data.php:115
3820
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:94
3821
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:165
3822
  #: includes/shipping/class-wc-shipping-wcj-custom.php:122
3823
  #: includes/shipping/class-wc-shipping-wcj-custom.php:164
3824
  msgid "Cost"
@@ -3828,14 +3834,14 @@ msgstr ""
3828
  #: includes/class-wcj-purchase-data.php:181
3829
  #: includes/class-wcj-purchase-data.php:268
3830
  #: includes/functions/wcj-functions-reports.php:28
3831
- #: includes/settings/wcj-settings-purchase-data.php:133
3832
- #: includes/settings/wcj-settings-purchase-data.php:161
3833
  msgid "Profit"
3834
  msgstr ""
3835
 
3836
  #: includes/class-wcj-purchase-data.php:184
3837
- #: includes/settings/wcj-settings-purchase-data.php:142
3838
- #: includes/settings/wcj-settings-purchase-data.php:168
3839
  msgid "Purchase Cost"
3840
  msgstr ""
3841
 
@@ -3847,7 +3853,7 @@ msgstr ""
3847
  msgid "Buying"
3848
  msgstr ""
3849
 
3850
- #: includes/class-wcj-purchase-data.php:271
3851
  msgid "Report"
3852
  msgstr ""
3853
 
@@ -4145,7 +4151,7 @@ msgid ""
4145
  msgstr ""
4146
 
4147
  #: includes/class-wcj-shipping-by-user-role.php:33
4148
- #: includes/settings/wcj-settings-multicurrency.php:220
4149
  #: includes/settings/wcj-settings-order-min-amount.php:104
4150
  #: includes/settings/wcj-settings-price-by-user-role.php:90
4151
  #, php-format
@@ -4246,15 +4252,15 @@ msgstr ""
4246
  msgid "Add delivery time estimation to shipping methods."
4247
  msgstr ""
4248
 
4249
- #: includes/class-wcj-shipping.php:24
4250
  #: includes/settings/wcj-settings-shipping.php:16
4251
  #: includes/settings/wcj-settings-shipping.php:23
4252
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:150
4253
  #: includes/shipping/class-wc-shipping-wcj-custom.php:110
4254
  msgid "Custom Shipping"
4255
  msgstr ""
4256
 
4257
- #: includes/class-wcj-shipping.php:25
4258
  msgid "Add multiple custom shipping methods to WooCommerce."
4259
  msgstr ""
4260
 
@@ -4471,7 +4477,7 @@ msgstr ""
4471
  msgid "Booster for WooCommerce basic WPML support."
4472
  msgstr ""
4473
 
4474
- #: includes/class-wcj-wpml.php:117
4475
  msgid "File wpml-config.xml successfully regenerated!"
4476
  msgstr ""
4477
 
@@ -4645,7 +4651,7 @@ msgid "Doesn't apply rounding, offset etc."
4645
  msgstr ""
4646
 
4647
  #: includes/admin/class-wcj-settings-custom-fields.php:260
4648
- #: includes/settings/wcj-settings-wpml.php:80
4649
  msgid "To use tools, module must be enabled."
4650
  msgstr ""
4651
 
@@ -4804,7 +4810,7 @@ msgstr ""
4804
  msgid "Invisible"
4805
  msgstr ""
4806
 
4807
- #: includes/classes/class-wcj-module.php:134
4808
  #, php-format
4809
  msgid ""
4810
  "Booster: Free plugin's version is limited to only one \"%1$s\" product with "
@@ -4813,30 +4819,30 @@ msgid ""
4813
  "\"%1$s\" products."
4814
  msgstr ""
4815
 
4816
- #: includes/classes/class-wcj-module.php:454
4817
  #, php-format
4818
  msgid "Selected: %s."
4819
  msgstr ""
4820
 
4821
- #: includes/classes/class-wcj-module.php:523
4822
  msgid "Back to Module Settings"
4823
  msgstr ""
4824
 
4825
- #: includes/classes/class-wcj-module.php:541
4826
- #: includes/settings/wcj-settings-wpml.php:79
4827
  msgid "Module Tools"
4828
  msgstr ""
4829
 
4830
- #: includes/classes/class-wcj-module.php:614
4831
  #: includes/settings/wcj-settings-checkout-core-fields.php:64
4832
  msgid "enabled"
4833
  msgstr ""
4834
 
4835
- #: includes/classes/class-wcj-module.php:615
4836
  msgid "disabled"
4837
  msgstr ""
4838
 
4839
- #: includes/classes/class-wcj-module.php:623
4840
  #: includes/settings/wcj-settings-product-tabs.php:172
4841
  #: includes/settings/wcj-settings-product-tabs.php:184
4842
  #: includes/settings/wcj-settings-product-tabs.php:196
@@ -4844,27 +4850,27 @@ msgstr ""
4844
  msgid "Deprecated"
4845
  msgstr ""
4846
 
4847
- #: includes/classes/class-wcj-module.php:661
4848
  msgid "Reset Settings"
4849
  msgstr ""
4850
 
4851
- #: includes/classes/class-wcj-module.php:667
4852
  msgid "Reset Module to Default Settings"
4853
  msgstr ""
4854
 
4855
- #: includes/classes/class-wcj-module.php:668
4856
  msgid "Reset Submodule to Default Settings"
4857
  msgstr ""
4858
 
4859
- #: includes/classes/class-wcj-module.php:672
4860
  msgid "Reset settings"
4861
  msgstr ""
4862
 
4863
- #: includes/classes/class-wcj-module.php:706
4864
  msgid "Module Options"
4865
  msgstr ""
4866
 
4867
- #: includes/classes/class-wcj-module.php:713
4868
  msgid "Enable Module"
4869
  msgstr ""
4870
 
@@ -4959,7 +4965,7 @@ msgstr ""
4959
  #: includes/settings/wcj-settings-admin-products-list.php:19
4960
  #: includes/settings/wcj-settings-admin-products-list.php:75
4961
  #: includes/settings/wcj-settings-checkout-custom-fields.php:121
4962
- #: includes/settings/wcj-settings-checkout-fees.php:40
4963
  #: includes/shipping/class-wc-shipping-wcj-custom.php:101
4964
  msgid "Enable/Disable"
4965
  msgstr ""
@@ -5430,16 +5436,16 @@ msgstr ""
5430
  #: includes/export/class-wcj-fields-helper.php:289
5431
  #: includes/input-fields/wcj-product-input-fields-options.php:28
5432
  #: includes/settings/wcj-settings-checkout-custom-fields.php:130
5433
- #: includes/settings/wcj-settings-checkout-fees.php:53
5434
  #: includes/settings/wcj-settings-export.php:81
5435
  #: includes/settings/wcj-settings-export.php:149
5436
  #: includes/settings/wcj-settings-export.php:231
5437
  #: includes/settings/wcj-settings-global-discount.php:58
5438
  #: includes/settings/wcj-settings-product-addons.php:80
5439
- #: includes/settings/wcj-settings-purchase-data.php:73
5440
  #: includes/settings/wcj-settings-shipping-options.php:77
5441
  #: includes/settings/meta-box/wcj-settings-meta-box-product-addons.php:45
5442
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:155
5443
  #: includes/shipping/class-wc-shipping-wcj-custom.php:114
5444
  #: includes/widgets/class-wcj-widget-multicurrency.php:76
5445
  msgid "Type"
@@ -6936,7 +6942,7 @@ msgid "Enable Custom Payment"
6936
  msgstr ""
6937
 
6938
  #: includes/gateways/class-wc-gateway-wcj-custom.php:57
6939
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:149
6940
  #: includes/shipping/class-wc-shipping-wcj-custom.php:109
6941
  msgid "This controls the title which the user sees during checkout."
6942
  msgstr ""
@@ -7544,7 +7550,7 @@ msgstr ""
7544
  #: includes/settings/wcj-settings-add-to-cart-button-visibility.php:36
7545
  #: includes/settings/wcj-settings-add-to-cart-button-visibility.php:62
7546
  #: includes/settings/wcj-settings-multicurrency-base-price.php:63
7547
- #: includes/settings/wcj-settings-multicurrency.php:137
7548
  #: includes/settings/wcj-settings-order-min-amount.php:69
7549
  #: includes/settings/wcj-settings-price-by-country.php:160
7550
  msgid "Advanced"
@@ -8062,10 +8068,10 @@ msgstr ""
8062
  #: includes/settings/wcj-settings-add-to-cart-button-visibility.php:30
8063
  #: includes/settings/wcj-settings-add-to-cart-button-visibility.php:56
8064
  #: includes/settings/wcj-settings-general.php:30
8065
- #: includes/settings/wcj-settings-general.php:82
8066
- #: includes/settings/wcj-settings-general.php:97
8067
- #: includes/settings/wcj-settings-general.php:105
8068
- #: includes/settings/wcj-settings-general.php:113
8069
  #: includes/settings/wcj-settings-pdf-invoicing-advanced.php:84
8070
  #: includes/settings/wcj-settings-pdf-invoicing-advanced.php:116
8071
  #: includes/settings/wcj-settings-price-by-user-role.php:56
@@ -8165,7 +8171,7 @@ msgstr ""
8165
  #: includes/settings/wcj-settings-add-to-cart.php:21
8166
  #: includes/settings/wcj-settings-add-to-cart.php:92
8167
  #: includes/settings/wcj-settings-add-to-cart.php:110
8168
- #: includes/settings/wcj-settings-general.php:146
8169
  #: includes/settings/wcj-settings-shipping-calculator.php:69
8170
  #: includes/settings/wcj-settings-sorting.php:20
8171
  #: includes/settings/wcj-settings-sorting.php:99
@@ -9519,35 +9525,55 @@ msgstr ""
9519
  msgid "Total Fees"
9520
  msgstr ""
9521
 
9522
- #: includes/settings/wcj-settings-checkout-fees.php:58
 
 
 
 
 
9523
  #: includes/settings/wcj-settings-global-discount.php:65
9524
  #: includes/settings/wcj-settings-payment-gateways-fees.php:37
9525
  #: includes/settings/wcj-settings-price-by-user-role.php:32
9526
- #: includes/settings/wcj-settings-purchase-data.php:77
9527
  #: includes/settings/wcj-settings-wholesale-price.php:78
9528
  #: includes/settings/meta-box/wcj-settings-meta-box-wholesale-price.php:19
9529
  msgid "Fixed"
9530
  msgstr ""
9531
 
9532
- #: includes/settings/wcj-settings-checkout-fees.php:59
9533
  #: includes/settings/wcj-settings-global-discount.php:64
9534
  #: includes/settings/wcj-settings-payment-gateways-fees.php:38
9535
- #: includes/settings/wcj-settings-purchase-data.php:78
9536
  #: includes/settings/wcj-settings-wholesale-price.php:77
9537
  #: includes/settings/meta-box/wcj-settings-meta-box-wholesale-price.php:18
9538
  msgid "Percent"
9539
  msgstr ""
9540
 
9541
- #: includes/settings/wcj-settings-checkout-fees.php:70
9542
- #: includes/settings/wcj-settings-payment-gateways-fees.php:82
9543
- msgid "Taxable"
 
 
 
 
 
 
 
9544
  msgstr ""
9545
 
9546
- #: includes/settings/wcj-settings-checkout-fees.php:77
 
 
 
 
 
 
 
 
9547
  msgid "Checkout Field"
9548
  msgstr ""
9549
 
9550
- #: includes/settings/wcj-settings-checkout-fees.php:78
9551
  #, php-format
9552
  msgid ""
9553
  "If you want fee to be added only if some checkout field is enabled, enter "
@@ -9555,10 +9581,32 @@ msgid ""
9555
  "field with Booster's \"Checkout Custom Fields\" module, enter %s here."
9556
  msgstr ""
9557
 
9558
- #: includes/settings/wcj-settings-checkout-fees.php:79
9559
  msgid "Ignored if empty (i.e. fee will be always added)."
9560
  msgstr ""
9561
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9562
  #: includes/settings/wcj-settings-checkout-files-upload.php:23
9563
  #: includes/settings/wcj-settings-products-xml.php:25
9564
  msgid "Total Files"
@@ -9717,24 +9765,24 @@ msgid "Add notice"
9717
  msgstr ""
9718
 
9719
  #: includes/settings/wcj-settings-checkout-files-upload.php:250
9720
- #: includes/settings/wcj-settings-product-input-fields.php:287
9721
  msgid "Emails Options"
9722
  msgstr ""
9723
 
9724
  #: includes/settings/wcj-settings-checkout-files-upload.php:255
9725
- #: includes/settings/wcj-settings-product-input-fields.php:292
9726
  msgid "Attach Files to Admin's New Order Emails"
9727
  msgstr ""
9728
 
9729
  #: includes/settings/wcj-settings-checkout-files-upload.php:256
9730
  #: includes/settings/wcj-settings-checkout-files-upload.php:263
9731
- #: includes/settings/wcj-settings-product-input-fields.php:293
9732
- #: includes/settings/wcj-settings-product-input-fields.php:300
9733
  msgid "Attach"
9734
  msgstr ""
9735
 
9736
  #: includes/settings/wcj-settings-checkout-files-upload.php:262
9737
- #: includes/settings/wcj-settings-product-input-fields.php:299
9738
  msgid "Attach Files to Customer's Processing Order Emails"
9739
  msgstr ""
9740
 
@@ -9766,8 +9814,8 @@ msgstr ""
9766
  #: includes/settings/wcj-settings-checkout-files-upload.php:298
9767
  #: includes/settings/wcj-settings-checkout-files-upload.php:352
9768
  #: includes/settings/wcj-settings-checkout-files-upload.php:393
9769
- #: includes/settings/wcj-settings-product-addons.php:330
9770
- #: includes/settings/wcj-settings-product-addons.php:361
9771
  msgid "Before"
9772
  msgstr ""
9773
 
@@ -9789,8 +9837,8 @@ msgstr ""
9789
  #: includes/settings/wcj-settings-checkout-files-upload.php:321
9790
  #: includes/settings/wcj-settings-checkout-files-upload.php:367
9791
  #: includes/settings/wcj-settings-checkout-files-upload.php:408
9792
- #: includes/settings/wcj-settings-product-addons.php:345
9793
- #: includes/settings/wcj-settings-product-addons.php:376
9794
  msgid "After"
9795
  msgstr ""
9796
 
@@ -9825,12 +9873,12 @@ msgstr ""
9825
  #: includes/settings/wcj-settings-checkout-files-upload.php:421
9826
  #: includes/settings/wcj-settings-currency-per-product.php:251
9827
  #: includes/settings/wcj-settings-eu-vat-number.php:203
9828
- #: includes/settings/wcj-settings-general.php:40
9829
  #: includes/settings/wcj-settings-payment-gateways.php:49
9830
  #: includes/settings/wcj-settings-pdf-invoicing-advanced.php:43
9831
  #: includes/settings/wcj-settings-product-by-date.php:117
9832
  #: includes/settings/wcj-settings-product-custom-info.php:185
9833
- #: includes/settings/wcj-settings-product-input-fields.php:332
9834
  #: includes/settings/wcj-settings-shipping-by-condition.php:108
9835
  msgid "Advanced Options"
9836
  msgstr ""
@@ -10243,7 +10291,7 @@ msgstr ""
10243
  #: includes/settings/wcj-settings-currency-external-products.php:20
10244
  #: includes/settings/wcj-settings-currency-per-product.php:180
10245
  #: includes/settings/wcj-settings-multicurrency-base-price.php:131
10246
- #: includes/settings/wcj-settings-multicurrency.php:193
10247
  #: includes/settings/wcj-settings-price-by-country.php:277
10248
  #: includes/settings/wcj-settings-price-formats.php:59
10249
  msgid "Currency"
@@ -10349,7 +10397,7 @@ msgstr ""
10349
 
10350
  #: includes/settings/wcj-settings-currency-per-product.php:138
10351
  #: includes/settings/wcj-settings-multicurrency-base-price.php:102
10352
- #: includes/settings/wcj-settings-multicurrency.php:162
10353
  msgid "Currencies Options"
10354
  msgstr ""
10355
 
@@ -10362,7 +10410,7 @@ msgstr ""
10362
 
10363
  #: includes/settings/wcj-settings-currency-per-product.php:144
10364
  #: includes/settings/wcj-settings-multicurrency-base-price.php:107
10365
- #: includes/settings/wcj-settings-multicurrency.php:168
10366
  msgid "Total Currencies"
10367
  msgstr ""
10368
 
@@ -11007,106 +11055,124 @@ msgid ""
11007
  "memory saving)."
11008
  msgstr ""
11009
 
 
 
 
 
11010
  #: includes/settings/wcj-settings-general.php:45
11011
- msgid "Recalculate Cart Totals"
11012
  msgstr ""
11013
 
11014
  #: includes/settings/wcj-settings-general.php:46
11015
- msgid "Will recalculate cart totals on every page load."
11016
  msgstr ""
11017
 
11018
  #: includes/settings/wcj-settings-general.php:47
11019
  msgid ""
11020
- "This may solve multicurrency issues with wrong currency symbol in mini-cart."
 
 
 
 
 
11021
  msgstr ""
11022
 
11023
  #: includes/settings/wcj-settings-general.php:54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11024
  msgid "Session Type in Booster"
11025
  msgstr ""
11026
 
11027
- #: includes/settings/wcj-settings-general.php:59
11028
  msgid "Standard PHP sessions"
11029
  msgstr ""
11030
 
11031
- #: includes/settings/wcj-settings-general.php:60
11032
  msgid "WC sessions"
11033
  msgstr ""
11034
 
11035
- #: includes/settings/wcj-settings-general.php:64
11036
  msgid "Read and Close"
11037
  msgstr ""
11038
 
11039
- #: includes/settings/wcj-settings-general.php:65
11040
  msgid ""
11041
  "Enable <strong>Read and Close</strong> parameter on <strong>session_start()</"
11042
  "strong>."
11043
  msgstr ""
11044
 
11045
- #: includes/settings/wcj-settings-general.php:66
11046
  msgid ""
11047
  "Requires Session Type option set as Standard PHP Sessions and PHP version >= "
11048
  "7.0"
11049
  msgstr ""
11050
 
11051
- #: includes/settings/wcj-settings-general.php:72
11052
- msgid "IP Detection"
11053
- msgstr ""
11054
-
11055
- #: includes/settings/wcj-settings-general.php:73
11056
- msgid ""
11057
- "IP Detection Methods used by some Booster modules when not using IP "
11058
- "detection from WooCommerce. Change order for different results."
11059
- msgstr ""
11060
-
11061
- #: includes/settings/wcj-settings-general.php:74
11062
- msgid "Default values are:"
11063
- msgstr ""
11064
-
11065
- #: includes/settings/wcj-settings-general.php:80
11066
  msgid "Datepicker/Weekpicker CSS Loading"
11067
  msgstr ""
11068
 
11069
- #: includes/settings/wcj-settings-general.php:81
11070
  msgid "Disables datepicker/weekpicker CSS loading."
11071
  msgstr ""
11072
 
11073
- #: includes/settings/wcj-settings-general.php:88
11074
  msgid "Datepicker/Weekpicker CSS Source"
11075
  msgstr ""
11076
 
11077
- #: includes/settings/wcj-settings-general.php:95
11078
  msgid "Datepicker/Weekpicker JavaScript Loading"
11079
  msgstr ""
11080
 
11081
- #: includes/settings/wcj-settings-general.php:96
11082
  msgid "Disables datepicker/weekpicker JavaScript loading."
11083
  msgstr ""
11084
 
11085
- #: includes/settings/wcj-settings-general.php:103
11086
  msgid "Timepicker CSS Loading"
11087
  msgstr ""
11088
 
11089
- #: includes/settings/wcj-settings-general.php:104
11090
  msgid "Disables timepicker CSS loading."
11091
  msgstr ""
11092
 
11093
- #: includes/settings/wcj-settings-general.php:111
11094
  msgid "Timepicker JavaScript Loading"
11095
  msgstr ""
11096
 
11097
- #: includes/settings/wcj-settings-general.php:112
11098
  msgid "Disables timepicker JavaScript loading."
11099
  msgstr ""
11100
 
11101
- #: includes/settings/wcj-settings-general.php:123
11102
  msgid "PayPal Email per Product Options"
11103
  msgstr ""
11104
 
11105
- #: includes/settings/wcj-settings-general.php:128
11106
  msgid "PayPal Email per Product"
11107
  msgstr ""
11108
 
11109
- #: includes/settings/wcj-settings-general.php:130
11110
  #: includes/settings/wcj-settings-max-products-per-user.php:44
11111
  #: includes/settings/wcj-settings-product-by-date.php:54
11112
  #: includes/settings/wcj-settings-product-by-time.php:54
@@ -11114,57 +11180,57 @@ msgstr ""
11114
  msgid "This will add new meta box to each product's edit page."
11115
  msgstr ""
11116
 
11117
- #: includes/settings/wcj-settings-general.php:140
11118
  msgid "Session Expiration Options"
11119
  msgstr ""
11120
 
11121
- #: includes/settings/wcj-settings-general.php:145
11122
- #: includes/settings/wcj-settings-general.php:160
11123
  msgid "Session Expiration"
11124
  msgstr ""
11125
 
11126
- #: includes/settings/wcj-settings-general.php:152
11127
  msgid "Session Expiring"
11128
  msgstr ""
11129
 
11130
- #: includes/settings/wcj-settings-general.php:153
11131
  msgid "In seconds. Default: 47 hours (60 * 60 * 47)"
11132
  msgstr ""
11133
 
11134
- #: includes/settings/wcj-settings-general.php:161
11135
  msgid "In seconds. Default: 48 hours (60 * 60 * 48)"
11136
  msgstr ""
11137
 
11138
- #: includes/settings/wcj-settings-general.php:172
11139
  msgid "Booster User Roles Changer Options"
11140
  msgstr ""
11141
 
11142
- #: includes/settings/wcj-settings-general.php:173
11143
  msgid "This will add user roles changer tool to admin bar."
11144
  msgstr ""
11145
 
11146
- #: includes/settings/wcj-settings-general.php:179
11147
  msgid "Booster User Roles Changer"
11148
  msgstr ""
11149
 
11150
- #: includes/settings/wcj-settings-general.php:188
11151
  msgid "Enabled for"
11152
  msgstr ""
11153
 
11154
- #: includes/settings/wcj-settings-general.php:200
11155
  msgid "PHP Options"
11156
  msgstr ""
11157
 
11158
- #: includes/settings/wcj-settings-general.php:205
11159
  msgid "PHP Memory Limit"
11160
  msgstr ""
11161
 
11162
- #: includes/settings/wcj-settings-general.php:206
11163
  msgid "megabytes."
11164
  msgstr ""
11165
 
11166
- #: includes/settings/wcj-settings-general.php:207
11167
- #: includes/settings/wcj-settings-general.php:216
11168
  #: includes/settings/wcj-settings-offer-price.php:183
11169
  #: includes/settings/wcj-settings-offer-price.php:191
11170
  #: includes/settings/meta-box/wcj-settings-meta-box-offer-price.php:43
@@ -11172,11 +11238,11 @@ msgstr ""
11172
  msgid "Set zero to disable."
11173
  msgstr ""
11174
 
11175
- #: includes/settings/wcj-settings-general.php:214
11176
  msgid "PHP Time Limit"
11177
  msgstr ""
11178
 
11179
- #: includes/settings/wcj-settings-general.php:215
11180
  msgid "seconds."
11181
  msgstr ""
11182
 
@@ -11334,7 +11400,7 @@ msgstr ""
11334
 
11335
  #: includes/settings/wcj-settings-global-discount.php:188
11336
  #: includes/settings/wcj-settings-multicurrency-base-price.php:76
11337
- #: includes/settings/wcj-settings-multicurrency.php:151
11338
  #: includes/settings/wcj-settings-price-by-country.php:165
11339
  #: includes/settings/wcj-settings-product-price-by-formula.php:100
11340
  msgid "Price Filters Priority"
@@ -11342,10 +11408,10 @@ msgstr ""
11342
 
11343
  #: includes/settings/wcj-settings-global-discount.php:189
11344
  #: includes/settings/wcj-settings-multicurrency-base-price.php:77
11345
- #: includes/settings/wcj-settings-multicurrency.php:152
11346
  #: includes/settings/wcj-settings-price-by-country.php:166
11347
  #: includes/settings/wcj-settings-price-by-user-role.php:70
11348
- #: includes/settings/wcj-settings-product-addons.php:242
11349
  #: includes/settings/wcj-settings-product-price-by-formula.php:101
11350
  #: includes/settings/wcj-settings-wholesale-price.php:121
11351
  msgid ""
@@ -11693,58 +11759,95 @@ msgid "Compatibility"
11693
  msgstr ""
11694
 
11695
  #: includes/settings/wcj-settings-multicurrency.php:111
 
 
 
 
 
 
 
 
 
 
11696
  msgid "WooCommerce Smart Coupons"
11697
  msgstr ""
11698
 
11699
- #: includes/settings/wcj-settings-multicurrency.php:118
11700
  msgid "WooCommerce Price Filter"
11701
  msgstr ""
11702
 
11703
- #: includes/settings/wcj-settings-multicurrency.php:125
 
 
 
 
 
 
 
 
 
 
 
 
11704
  msgid "WooCommerce Import"
11705
  msgstr ""
11706
 
11707
- #: includes/settings/wcj-settings-multicurrency.php:127
11708
  msgid ""
11709
- "This option fixes WooCommerce Import Tool preventing it from converting some "
11710
- "uppercase meta to lowercase"
11711
  msgstr ""
11712
 
11713
- #: includes/settings/wcj-settings-multicurrency.php:142
11714
  msgid "Additional Price Filters"
11715
  msgstr ""
11716
 
11717
- #: includes/settings/wcj-settings-multicurrency.php:143
11718
  msgid ""
11719
  "Add additional price filters here. One per line. Leave blank if not sure."
11720
  msgstr ""
11721
 
11722
- #: includes/settings/wcj-settings-multicurrency.php:164
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11723
  msgid ""
11724
  "One currency probably should be set to current (original) shop currency with "
11725
  "an exchange rate of 1."
11726
  msgstr ""
11727
 
11728
- #: includes/settings/wcj-settings-multicurrency.php:169
11729
  msgid ""
11730
  "Press Save changes after setting this option, so new settings fields will be "
11731
  "added."
11732
  msgstr ""
11733
 
11734
- #: includes/settings/wcj-settings-multicurrency.php:218
11735
  msgid "Role Defaults"
11736
  msgstr ""
11737
 
11738
- #: includes/settings/wcj-settings-multicurrency.php:225
11739
  msgid "Roles"
11740
  msgstr ""
11741
 
11742
- #: includes/settings/wcj-settings-multicurrency.php:226
11743
  #: includes/settings/wcj-settings-wholesale-price.php:180
11744
  msgid "Save settings after you change this option. Leave blank to disable."
11745
  msgstr ""
11746
 
11747
- #: includes/settings/wcj-settings-multicurrency.php:249
11748
  msgid "No default currency"
11749
  msgstr ""
11750
 
@@ -13579,7 +13682,7 @@ msgstr ""
13579
 
13580
  #: includes/settings/wcj-settings-pdf-invoicing-header.php:42
13581
  #: includes/settings/wcj-settings-pdf-invoicing-page.php:88
13582
- #: includes/settings/wcj-settings-purchase-data.php:67
13583
  msgid "Leave blank to disable"
13584
  msgstr ""
13585
 
@@ -14026,7 +14129,7 @@ msgid "Disable Price based on User Role for Bots"
14026
  msgstr ""
14027
 
14028
  #: includes/settings/wcj-settings-price-by-user-role.php:69
14029
- #: includes/settings/wcj-settings-product-addons.php:241
14030
  #: includes/settings/wcj-settings-wholesale-price.php:120
14031
  msgid "Advanced: Price Filters Priority"
14032
  msgstr ""
@@ -14420,11 +14523,6 @@ msgstr ""
14420
  msgid "Reposition Button on Single Product Pages"
14421
  msgstr ""
14422
 
14423
- #: includes/settings/wcj-settings-product-add-to-cart.php:297
14424
- #: includes/settings/wcj-settings-product-add-to-cart.php:333
14425
- msgid "Priority"
14426
- msgstr ""
14427
-
14428
  #: includes/settings/wcj-settings-product-add-to-cart.php:298
14429
  #, php-format
14430
  msgid ""
@@ -14531,7 +14629,7 @@ msgid "For radio enter one value per line."
14531
  msgstr ""
14532
 
14533
  #: includes/settings/wcj-settings-product-addons.php:123
14534
- #: includes/settings/wcj-settings-purchase-data.php:83
14535
  #: includes/settings/meta-box/wcj-settings-meta-box-product-addons.php:88
14536
  msgid "Default Value"
14537
  msgstr ""
@@ -14565,123 +14663,134 @@ msgid "Enable AJAX on Single Product Page"
14565
  msgstr ""
14566
 
14567
  #: includes/settings/wcj-settings-product-addons.php:185
 
 
 
 
 
 
 
 
 
 
 
14568
  msgid "Decrease Quantity"
14569
  msgstr ""
14570
 
14571
- #: includes/settings/wcj-settings-product-addons.php:186
14572
  msgid ""
14573
  "If you select multiple triggers to decrease quantity, it will be decreased "
14574
  "only once (on whichever trigger is executed first)."
14575
  msgstr ""
14576
 
14577
- #: includes/settings/wcj-settings-product-addons.php:194
14578
  msgid "Admin Order Page"
14579
  msgstr ""
14580
 
14581
- #: includes/settings/wcj-settings-product-addons.php:195
14582
  msgid "Hide all addons"
14583
  msgstr ""
14584
 
14585
- #: includes/settings/wcj-settings-product-addons.php:201
14586
  msgid "Position on Frontend"
14587
  msgstr ""
14588
 
14589
- #: includes/settings/wcj-settings-product-addons.php:206
14590
  #: includes/settings/wcj-settings-product-custom-info.php:108
14591
  #: includes/settings/wcj-settings-product-input-fields.php:195
14592
  #: includes/settings/wcj-settings-product-open-pricing.php:17
14593
  msgid "Before add to cart button"
14594
  msgstr ""
14595
 
14596
- #: includes/settings/wcj-settings-product-addons.php:207
14597
  #: includes/settings/wcj-settings-product-custom-info.php:109
14598
  #: includes/settings/wcj-settings-product-input-fields.php:196
14599
  #: includes/settings/wcj-settings-product-open-pricing.php:18
14600
  msgid "After add to cart button"
14601
  msgstr ""
14602
 
14603
- #: includes/settings/wcj-settings-product-addons.php:211
14604
  msgid "Position Priority on Frontend"
14605
  msgstr ""
14606
 
14607
- #: includes/settings/wcj-settings-product-addons.php:212
14608
  #: includes/settings/wcj-settings-shipping-by-condition.php:114
14609
  #: includes/settings/wcj-settings-shipping-options.php:41
14610
  msgid "Set to zero to use the default priority."
14611
  msgstr ""
14612
 
14613
- #: includes/settings/wcj-settings-product-addons.php:218
14614
  msgid "Advanced: Apply Price Filter"
14615
  msgstr ""
14616
 
14617
- #: includes/settings/wcj-settings-product-addons.php:223
14618
  msgid "By module"
14619
  msgstr ""
14620
 
14621
- #: includes/settings/wcj-settings-product-addons.php:229
14622
  msgid ""
14623
  "If you have selected \"By module\" for \"Advanced: Apply Price Filter\" "
14624
  "option, you can set which modules to apply here. Leave empty to apply all "
14625
  "modules."
14626
  msgstr ""
14627
 
14628
- #: includes/settings/wcj-settings-product-addons.php:248
14629
  #: includes/settings/wcj-settings-product-bookings.php:106
14630
  #: includes/settings/wcj-settings-product-open-pricing.php:139
14631
  msgid "Advanced: Check for Outputted Data"
14632
  msgstr ""
14633
 
14634
- #: includes/settings/wcj-settings-product-addons.php:250
14635
  #: includes/settings/wcj-settings-product-bookings.php:108
14636
- #: includes/settings/wcj-settings-product-input-fields.php:339
14637
  #: includes/settings/wcj-settings-product-open-pricing.php:141
14638
  msgid ""
14639
  "Ensures that data outputted only once. Enable this if you see data outputted "
14640
  "on frontend twice. Disable if you see no data outputted."
14641
  msgstr ""
14642
 
14643
- #: includes/settings/wcj-settings-product-addons.php:260
14644
  msgid "Frontend Templates"
14645
  msgstr ""
14646
 
14647
- #: includes/settings/wcj-settings-product-addons.php:265
14648
  msgid "Each Addon - Title"
14649
  msgstr ""
14650
 
14651
- #: includes/settings/wcj-settings-product-addons.php:273
14652
  msgid "Each Addon - Type: Checkbox"
14653
  msgstr ""
14654
 
14655
- #: includes/settings/wcj-settings-product-addons.php:281
14656
  msgid "Each Addon - Type: Text"
14657
  msgstr ""
14658
 
14659
- #: includes/settings/wcj-settings-product-addons.php:289
14660
  msgid "Each Addon - Type: Select Box"
14661
  msgstr ""
14662
 
14663
- #: includes/settings/wcj-settings-product-addons.php:297
14664
  msgid "Each Addon - Type: Select Box (Each Option)"
14665
  msgstr ""
14666
 
14667
- #: includes/settings/wcj-settings-product-addons.php:305
14668
  msgid "Each Addon - Type: Radio Button (Each)"
14669
  msgstr ""
14670
 
14671
- #: includes/settings/wcj-settings-product-addons.php:313
14672
  msgid "All Addons - Final"
14673
  msgstr ""
14674
 
14675
- #: includes/settings/wcj-settings-product-addons.php:325
14676
  msgid "Cart Template"
14677
  msgstr ""
14678
 
14679
- #: includes/settings/wcj-settings-product-addons.php:337
14680
- #: includes/settings/wcj-settings-product-addons.php:368
14681
  msgid "Each Addon"
14682
  msgstr ""
14683
 
14684
- #: includes/settings/wcj-settings-product-addons.php:356
14685
  msgid "Order Details Table Template"
14686
  msgstr ""
14687
 
@@ -15475,33 +15584,49 @@ msgstr ""
15475
  msgid "Affects Order received page, Emails and Admin Orders View"
15476
  msgstr ""
15477
 
15478
- #: includes/settings/wcj-settings-product-input-fields.php:312
 
 
 
 
 
 
 
 
 
 
 
15479
  msgid "Admin Order View Options"
15480
  msgstr ""
15481
 
15482
- #: includes/settings/wcj-settings-product-input-fields.php:317
15483
  msgid "Replace Field ID with Field Label"
15484
  msgstr ""
15485
 
15486
- #: includes/settings/wcj-settings-product-input-fields.php:319
15487
  #, php-format
15488
  msgid "Please note: %s"
15489
  msgstr ""
15490
 
15491
- #: includes/settings/wcj-settings-product-input-fields.php:320
15492
  msgid ""
15493
  "When checked - will disable input fields editing on admin order edit page."
15494
  msgstr ""
15495
 
15496
- #: includes/settings/wcj-settings-product-input-fields.php:337
 
 
 
 
 
15497
  msgid "Check for Outputted Data"
15498
  msgstr ""
15499
 
15500
- #: includes/settings/wcj-settings-product-input-fields.php:345
15501
  msgid "Strip Slashes"
15502
  msgstr ""
15503
 
15504
- #: includes/settings/wcj-settings-product-input-fields.php:347
15505
  #, php-format
15506
  msgid "Enable this if you have single quotes %s converted to %s."
15507
  msgstr ""
@@ -16266,7 +16391,7 @@ msgid "Price Fields"
16266
  msgstr ""
16267
 
16268
  #: includes/settings/wcj-settings-purchase-data.php:17
16269
- #: includes/settings/wcj-settings-purchase-data.php:48
16270
  msgid ""
16271
  "These fields will be added to product's edit page and will be included in "
16272
  "product's purchase cost calculation."
@@ -16287,66 +16412,90 @@ msgstr ""
16287
  msgid "Affiliate commission"
16288
  msgstr ""
16289
 
16290
- #: includes/settings/wcj-settings-purchase-data.php:46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16291
  msgid "Custom Price Fields"
16292
  msgstr ""
16293
 
16294
- #: includes/settings/wcj-settings-purchase-data.php:52
16295
  msgid "Total Custom Price Fields"
16296
  msgstr ""
16297
 
16298
- #: includes/settings/wcj-settings-purchase-data.php:64
16299
  msgid "Custom Price Field"
16300
  msgstr ""
16301
 
16302
- #: includes/settings/wcj-settings-purchase-data.php:96
16303
  msgid "Info Fields"
16304
  msgstr ""
16305
 
16306
- #: includes/settings/wcj-settings-purchase-data.php:98
16307
  msgid "These fields will be added to product's edit page."
16308
  msgstr ""
16309
 
16310
- #: includes/settings/wcj-settings-purchase-data.php:102
16311
  #: includes/settings/meta-box/wcj-settings-meta-box-purchase-data.php:87
16312
  msgid "(Last) Purchase date"
16313
  msgstr ""
16314
 
16315
- #: includes/settings/wcj-settings-purchase-data.php:109
16316
  #: includes/settings/meta-box/wcj-settings-meta-box-purchase-data.php:97
16317
  msgid "Seller"
16318
  msgstr ""
16319
 
16320
- #: includes/settings/wcj-settings-purchase-data.php:116
16321
  #: includes/settings/meta-box/wcj-settings-meta-box-purchase-data.php:107
16322
  msgid "Purchase info"
16323
  msgstr ""
16324
 
16325
- #: includes/settings/wcj-settings-purchase-data.php:127
16326
  msgid "Admin Products List Custom Columns"
16327
  msgstr ""
16328
 
16329
- #: includes/settings/wcj-settings-purchase-data.php:129
16330
  msgid ""
16331
  "This section lets you add custom columns to WooCommerce admin products list."
16332
  msgstr ""
16333
 
16334
- #: includes/settings/wcj-settings-purchase-data.php:155
16335
  msgid "Admin Orders List Custom Columns"
16336
  msgstr ""
16337
 
16338
- #: includes/settings/wcj-settings-purchase-data.php:157
16339
  msgid ""
16340
  "This section lets you add custom columns to WooCommerce admin orders list."
16341
  msgstr ""
16342
 
16343
- #: includes/settings/wcj-settings-purchase-data.php:179
16344
  #: includes/settings/wcj-settings-sku.php:210
16345
  #: includes/settings/wcj-settings-stock.php:199
16346
  msgid "More Options"
16347
  msgstr ""
16348
 
16349
- #: includes/settings/wcj-settings-purchase-data.php:184
16350
  msgid "Treat Variable Products as Simple Products"
16351
  msgstr ""
16352
 
@@ -16906,7 +17055,7 @@ msgid "Visit %s to set method's options."
16906
  msgstr ""
16907
 
16908
  #: includes/settings/wcj-settings-shipping.php:32
16909
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:39
16910
  msgid "Booster: Custom Shipping"
16911
  msgstr ""
16912
 
@@ -17796,48 +17945,58 @@ msgstr ""
17796
  msgid "Use Translation Product IDs"
17797
  msgstr ""
17798
 
17799
- #: includes/settings/wcj-settings-wpml.php:38
 
 
 
 
 
 
 
 
 
 
17800
  msgid "WPML Language Configuration File Options"
17801
  msgstr ""
17802
 
17803
- #: includes/settings/wcj-settings-wpml.php:40
17804
  #, php-format
17805
  msgid "Options for regenerating %s file."
17806
  msgstr ""
17807
 
17808
- #: includes/settings/wcj-settings-wpml.php:44
17809
  msgid "Automatically Regenerate"
17810
  msgstr ""
17811
 
17812
- #: includes/settings/wcj-settings-wpml.php:46
17813
  #, php-format
17814
  msgid "Automatically regenerate %s file on each Booster version update."
17815
  msgstr ""
17816
 
17817
- #: includes/settings/wcj-settings-wpml.php:52
17818
  msgid "Modules to Skip"
17819
  msgstr ""
17820
 
17821
- #: includes/settings/wcj-settings-wpml.php:53
17822
  msgid ""
17823
  "Select modules, which options you wish to exclude from wpml-config.xml file."
17824
  msgstr ""
17825
 
17826
- #: includes/settings/wcj-settings-wpml.php:61
17827
  msgid "Option IDs to Skip"
17828
  msgstr ""
17829
 
17830
- #: includes/settings/wcj-settings-wpml.php:62
17831
  msgid "Select options, which you wish to exclude from wpml-config.xml file."
17832
  msgstr ""
17833
 
17834
- #: includes/settings/wcj-settings-wpml.php:63
17835
  #, php-format
17836
  msgid "Full or part of option ID. Separated by vertical bar %s."
17837
  msgstr ""
17838
 
17839
- #: includes/settings/wcj-settings-wpml.php:85
17840
- #: includes/settings/wcj-settings-wpml.php:87
17841
  msgid "Regenerate wpml-config.xml file"
17842
  msgstr ""
17843
 
@@ -18091,91 +18250,91 @@ msgstr ""
18091
  msgid "Min quantity"
18092
  msgstr ""
18093
 
18094
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:40
18095
  #: includes/shipping/class-wc-shipping-wcj-custom.php:38
18096
  msgid "Booster: Custom Shipping Method"
18097
  msgstr ""
18098
 
18099
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:86
18100
  #: includes/shipping/class-wc-shipping-wcj-custom.php:157
18101
  msgid "Max Weight or Quantity"
18102
  msgstr ""
18103
 
18104
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:137
18105
  msgid "Flat rate"
18106
  msgstr ""
18107
 
18108
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:138
18109
  msgid "By total cart weight"
18110
  msgstr ""
18111
 
18112
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:139
18113
  msgid "By total cart weight table"
18114
  msgstr ""
18115
 
18116
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:140
18117
  msgid "By total cart quantity"
18118
  msgstr ""
18119
 
18120
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:143
18121
  msgid "By total cart quantity table"
18122
  msgstr ""
18123
 
18124
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:157
18125
  #: includes/shipping/class-wc-shipping-wcj-custom.php:116
18126
  msgid "Cost calculation type."
18127
  msgstr ""
18128
 
18129
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:158
18130
  #: includes/shipping/class-wc-shipping-wcj-custom.php:97
18131
  #: includes/shipping/class-wc-shipping-wcj-custom.php:116
18132
  msgid "By Total Cart Quantity Table"
18133
  msgstr ""
18134
 
18135
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:167
18136
  #: includes/shipping/class-wc-shipping-wcj-custom.php:124
18137
  msgid ""
18138
  "Cost. If calculating by weight - then cost per one weight unit. If "
18139
  "calculating by quantity - then cost per one piece."
18140
  msgstr ""
18141
 
18142
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:173
18143
  #: includes/shipping/class-wc-shipping-wcj-custom.php:130
18144
  msgid "Min Weight"
18145
  msgstr ""
18146
 
18147
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:175
18148
  #: includes/shipping/class-wc-shipping-wcj-custom.php:132
18149
  msgid "Minimum total cart weight. Set zero to disable."
18150
  msgstr ""
18151
 
18152
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:182
18153
  #: includes/shipping/class-wc-shipping-wcj-custom.php:138
18154
  msgid "Max Weight"
18155
  msgstr ""
18156
 
18157
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:184
18158
  #: includes/shipping/class-wc-shipping-wcj-custom.php:140
18159
  msgid "Maximum total cart weight. Set zero to disable."
18160
  msgstr ""
18161
 
18162
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:191
18163
  msgid "Apply Formula and Shortcodes to Costs"
18164
  msgstr ""
18165
 
18166
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:192
18167
  #, php-format
18168
  msgid ""
18169
  "You can use %s and %s params in formula, e.g.: %s. Also you can use "
18170
  "shortcodes, e.g.: %s."
18171
  msgstr ""
18172
 
18173
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:201
18174
  #: includes/shipping/class-wc-shipping-wcj-custom.php:146
18175
  msgid "Table Total Rows"
18176
  msgstr ""
18177
 
18178
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:203
18179
  msgid ""
18180
  "Press \"Save changes\" and reload the page after you change this number."
18181
  msgstr ""
@@ -18212,6 +18371,11 @@ msgstr ""
18212
  msgid "Attribute \"name\" is required!"
18213
  msgstr ""
18214
 
 
 
 
 
 
18215
  #: includes/shortcodes/class-wcj-shortcodes-products-add-form.php:54
18216
  msgid "Product by User"
18217
  msgstr ""
77
 
78
  #: includes/class-wcj-admin-bar.php:172
79
  #: includes/admin/class-wc-settings-jetpack.php:416
80
+ #: includes/classes/class-wcj-module.php:721
81
  msgid "Documentation"
82
  msgstr ""
83
 
96
 
97
  #: includes/class-wcj-admin-bar.php:245 includes/class-wcj-admin-bar.php:288
98
  #: includes/class-wcj-admin-bar.php:632
99
+ #: includes/classes/class-wcj-module.php:554
100
+ #: includes/settings/wcj-settings-wpml.php:82
101
  msgid "Tools"
102
  msgstr ""
103
 
119
  #: includes/class-wcj-track-users.php:251
120
  #: includes/admin/class-wc-settings-jetpack.php:24
121
  #: includes/admin/class-wc-settings-jetpack.php:221
122
+ #: includes/classes/class-wcj-module.php:381
123
+ #: includes/classes/class-wcj-module.php:581
124
  #: includes/settings/wcj-settings-price-by-country.php:178
125
  msgid "Booster"
126
  msgstr ""
622
  msgid "Add fees to WooCommerce cart & checkout."
623
  msgstr ""
624
 
625
+ #: includes/class-wcj-checkout-fees.php:219
626
+ #: includes/settings/wcj-settings-checkout-fees.php:41
627
+ #: includes/settings/wcj-settings-checkout-fees.php:62
628
  msgid "Fee"
629
  msgstr ""
630
 
1051
  msgstr ""
1052
 
1053
  #: includes/class-wcj-custom-php.php:32
1054
+ #: includes/settings/wcj-settings-multicurrency.php:161
1055
  #: includes/settings/wcj-settings-offer-price.php:84
1056
  #, php-format
1057
  msgid "E.g.: %s"
1461
  msgid "Current PHP time limit: %s seconds."
1462
  msgstr ""
1463
 
1464
+ #: includes/class-wcj-general.php:123
1465
  msgid "Booster User Role"
1466
  msgstr ""
1467
 
1468
+ #: includes/class-wcj-general.php:184
1469
  msgid "All fields are required!"
1470
  msgstr ""
1471
 
1472
+ #: includes/class-wcj-general.php:188
1473
  msgid "Role ID must not be numbers only!"
1474
  msgstr ""
1475
 
1476
+ #: includes/class-wcj-general.php:197
1477
  msgid "Role successfully added!"
1478
  msgstr ""
1479
 
1480
+ #: includes/class-wcj-general.php:199
1481
  msgid "Role already exists!"
1482
  msgstr ""
1483
 
1484
+ #: includes/class-wcj-general.php:212
1485
  #, php-format
1486
  msgid "Role %s successfully deleted!"
1487
  msgstr ""
1488
 
1489
+ #: includes/class-wcj-general.php:218 includes/class-wcj-general.php:233
1490
  #: includes/class-wcj-sku.php:536
1491
  #: includes/reports/wcj-class-reports-sales.php:196
1492
  #: includes/settings/wcj-settings-cross-sells.php:43
1498
  msgid "ID"
1499
  msgstr ""
1500
 
1501
+ #: includes/class-wcj-general.php:218 includes/class-wcj-general.php:234
1502
  #: includes/class-wcj-offer-price.php:167
1503
  #: includes/export/class-wcj-fields-helper.php:282
1504
  #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:70
1506
  msgid "Name"
1507
  msgstr ""
1508
 
1509
+ #: includes/class-wcj-general.php:218 includes/class-wcj-general.php:235
1510
  msgid "Capabilities"
1511
  msgstr ""
1512
 
1513
+ #: includes/class-wcj-general.php:218
1514
  #: includes/class-wcj-product-by-user.php:197
1515
  #: includes/settings/wcj-settings-pdf-invoicing-advanced.php:107
1516
  #: includes/tools/class-wcj-order-statuses-tool.php:145
1518
  msgid "Actions"
1519
  msgstr ""
1520
 
1521
+ #: includes/class-wcj-general.php:225
1522
  #: includes/class-wcj-payment-gateways.php:117
1523
  #: includes/class-wcj-product-bulk-meta-editor.php:367
1524
  #: includes/class-wcj-product-by-user.php:206
1529
  msgid "Delete"
1530
  msgstr ""
1531
 
1532
+ #: includes/class-wcj-general.php:229
1533
  msgid "Existing Roles"
1534
  msgstr ""
1535
 
1536
+ #: includes/class-wcj-general.php:236
1537
  msgid "Add New Role"
1538
  msgstr ""
1539
 
1540
+ #: includes/class-wcj-general.php:239
1541
  #: includes/class-wcj-shipping-by-products.php:206
1542
  #: includes/settings/wcj-settings-admin-orders-list.php:134
1543
  #: includes/settings/wcj-settings-checkout-custom-fields.php:22
1561
  #: includes/settings/wcj-settings-product-by-user.php:114
1562
  #: includes/settings/wcj-settings-product-open-pricing.php:123
1563
  #: includes/settings/wcj-settings-product-tabs.php:247
1564
+ #: includes/settings/wcj-settings-purchase-data.php:145
1565
+ #: includes/settings/wcj-settings-purchase-data.php:154
1566
+ #: includes/settings/wcj-settings-purchase-data.php:173
1567
+ #: includes/settings/wcj-settings-purchase-data.php:180
1568
  #: includes/settings/wcj-settings-sku.php:240
1569
  #: includes/settings/wcj-settings-sku.php:267
1570
  #: includes/shortcodes/class-wcj-shortcodes-products-add-form.php:422
1574
 
1575
  #: includes/class-wcj-global-discount.php:27
1576
  #: includes/admin/class-wc-settings-jetpack.php:486
1577
+ #: includes/settings/wcj-settings-product-addons.php:245
1578
  msgid "Global Discount"
1579
  msgstr ""
1580
 
1681
  msgstr ""
1682
 
1683
  #: includes/class-wcj-multicurrency-product-base-price.php:25
1684
+ #: includes/settings/wcj-settings-product-addons.php:243
1685
  msgid "Multicurrency Product Base Price"
1686
  msgstr ""
1687
 
1689
  msgid "Enter prices for products in different currencies."
1690
  msgstr ""
1691
 
1692
+ #: includes/class-wcj-multicurrency.php:30
1693
+ #: includes/settings/wcj-settings-product-addons.php:244
1694
  msgid "Multicurrency (Currency Switcher)"
1695
  msgstr ""
1696
 
1697
+ #: includes/class-wcj-multicurrency.php:31
1698
  msgid "Add multiple currencies (currency switcher) to WooCommerce."
1699
  msgstr ""
1700
 
1701
+ #: includes/class-wcj-multicurrency.php:33
1702
  #, php-format
1703
  msgid ""
1704
  "After setting currencies in the Currencies Options section below, you can "
1705
  "add switcher to the frontend with: %s"
1706
  msgstr ""
1707
 
1708
+ #: includes/class-wcj-multicurrency.php:35
1709
  #, php-format
1710
  msgid "<strong>Widget:</strong> \"%s\""
1711
  msgstr ""
1712
 
1713
+ #: includes/class-wcj-multicurrency.php:36
1714
  #: includes/widgets/class-wcj-widget-multicurrency.php:27
1715
  msgid "Booster - Multicurrency Switcher"
1716
  msgstr ""
1717
 
1718
+ #: includes/class-wcj-multicurrency.php:38
1719
  #, php-format
1720
  msgid "<strong>Shortcodes:</strong> %s"
1721
  msgstr ""
1722
 
1723
+ #: includes/class-wcj-multicurrency.php:41
1724
  #, php-format
1725
  msgid "<strong>PHP code:</strong> by using %s function, e.g.: %s"
1726
  msgstr ""
1767
  msgid "Lost password"
1768
  msgstr ""
1769
 
1770
+ #: includes/class-wcj-my-account.php:227
1771
  #, php-format
1772
  msgid "Hello %1$s (not %1$s? <a href=\"%2$s\">Log out</a>)"
1773
  msgstr ""
1774
 
1775
+ #: includes/class-wcj-my-account.php:237
1776
  #, php-format
1777
  msgid ""
1778
  "From your account dashboard you can view your <a href=\"%1$s\">recent "
1780
  "and <a href=\"%3$s\">edit your password and account details</a>."
1781
  msgstr ""
1782
 
1783
+ #: includes/class-wcj-my-account.php:343
1784
  msgid "User role"
1785
  msgstr ""
1786
 
1787
+ #: includes/class-wcj-my-account.php:423
1788
  #: includes/class-wcj-product-bulk-meta-editor.php:279
1789
  #: includes/class-wcj-product-by-user.php:206
1790
  #: includes/class-wcj-purchase-data.php:94
1791
  #: includes/class-wcj-track-users.php:334
1792
+ #: includes/classes/class-wcj-module.php:690
1793
  #: includes/functions/wcj-functions-general.php:189
1794
  #: includes/functions/wcj-functions-html.php:117
1795
  #: includes/reports/wcj-class-reports-monthly-sales.php:351
2342
  msgid "Invoices Monthly Reports."
2343
  msgstr ""
2344
 
2345
+ #: includes/class-wcj-pdf-invoicing.php:93
2346
  msgid "Generate"
2347
  msgstr ""
2348
 
2349
+ #: includes/class-wcj-pdf-invoicing.php:94
2350
  msgid "Download (Zip)"
2351
  msgstr ""
2352
 
2353
+ #: includes/class-wcj-pdf-invoicing.php:95
2354
  msgid "Merge (Print)"
2355
  msgstr ""
2356
 
2357
+ #: includes/class-wcj-pdf-invoicing.php:117
2358
  #, php-format
2359
  msgid "Document generated."
2360
  msgid_plural "%s documents generated."
2361
  msgstr[0] ""
2362
  msgstr[1] ""
2363
 
2364
+ #: includes/class-wcj-pdf-invoicing.php:124
2365
  #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:172
2366
  #, php-format
2367
  msgid ""
2369
  "hosting provider."
2370
  msgstr ""
2371
 
2372
+ #: includes/class-wcj-pdf-invoicing.php:130
2373
  msgid "Booster: ZipArchive error."
2374
  msgstr ""
2375
 
2376
+ #: includes/class-wcj-pdf-invoicing.php:135
2377
  msgid "Booster: Merge PDFs: No files."
2378
  msgstr ""
2379
 
2380
+ #: includes/class-wcj-pdf-invoicing.php:140
2381
  #, php-format
2382
  msgid ""
2383
  "Booster: Merge PDFs: Command requires PHP version 5.3.0 at least. You have "
2384
  "PHP version %s installed."
2385
  msgstr ""
2386
 
2387
+ #: includes/class-wcj-pdf-invoicing.php:145
2388
  #, php-format
2389
  msgid "Booster: %s."
2390
  msgstr ""
2391
 
2392
+ #: includes/class-wcj-pdf-invoicing.php:438
2393
  msgid "You are not allowed to view the invoice."
2394
  msgstr ""
2395
 
2502
  #: includes/settings/wcj-settings-checkout-customization.php:174
2503
  #: includes/settings/wcj-settings-checkout-customization.php:197
2504
  #: includes/settings/wcj-settings-checkout-customization.php:222
2505
+ #: includes/settings/wcj-settings-checkout-fees.php:47
2506
+ #: includes/settings/wcj-settings-checkout-fees.php:54
2507
  #: includes/settings/wcj-settings-checkout-files-upload.php:227
2508
  #: includes/settings/wcj-settings-checkout-files-upload.php:329
2509
  #: includes/settings/wcj-settings-checkout-files-upload.php:438
2529
  #: includes/settings/wcj-settings-emails-verification.php:36
2530
  #: includes/settings/wcj-settings-emails-verification.php:43
2531
  #: includes/settings/wcj-settings-general.php:21
2532
+ #: includes/settings/wcj-settings-general.php:73
2533
+ #: includes/settings/wcj-settings-general.php:146
2534
+ #: includes/settings/wcj-settings-general.php:197
2535
  #: includes/settings/wcj-settings-global-discount.php:52
2536
  #: includes/settings/wcj-settings-global-discount.php:181
2537
  #: includes/settings/wcj-settings-left-to-free-shipping.php:28
2545
  #: includes/settings/wcj-settings-multicurrency-base-price.php:70
2546
  #: includes/settings/wcj-settings-multicurrency.php:39
2547
  #: includes/settings/wcj-settings-multicurrency.php:112
2548
+ #: includes/settings/wcj-settings-multicurrency.php:120
2549
+ #: includes/settings/wcj-settings-multicurrency.php:127
2550
+ #: includes/settings/wcj-settings-multicurrency.php:135
2551
+ #: includes/settings/wcj-settings-multicurrency.php:143
2552
+ #: includes/settings/wcj-settings-multicurrency.php:176
2553
  #: includes/settings/wcj-settings-my-account.php:29
2554
  #: includes/settings/wcj-settings-my-account.php:87
2555
  #: includes/settings/wcj-settings-my-account.php:104
2606
  #: includes/settings/wcj-settings-product-addons.php:50
2607
  #: includes/settings/wcj-settings-product-addons.php:74
2608
  #: includes/settings/wcj-settings-product-addons.php:179
2609
+ #: includes/settings/wcj-settings-product-addons.php:257
2610
  #: includes/settings/wcj-settings-product-bookings.php:107
2611
  #: includes/settings/wcj-settings-product-bulk-meta-editor.php:21
2612
  #: includes/settings/wcj-settings-product-bulk-meta-editor.php:29
2625
  #: includes/settings/wcj-settings-product-info.php:68
2626
  #: includes/settings/wcj-settings-product-input-fields.php:24
2627
  #: includes/settings/wcj-settings-product-input-fields.php:54
2628
+ #: includes/settings/wcj-settings-product-input-fields.php:282
2629
+ #: includes/settings/wcj-settings-product-input-fields.php:326
2630
+ #: includes/settings/wcj-settings-product-input-fields.php:335
2631
+ #: includes/settings/wcj-settings-product-input-fields.php:354
2632
+ #: includes/settings/wcj-settings-product-input-fields.php:362
2633
  #: includes/settings/wcj-settings-product-open-pricing.php:102
2634
  #: includes/settings/wcj-settings-product-open-pricing.php:109
2635
  #: includes/settings/wcj-settings-product-open-pricing.php:140
2641
  #: includes/settings/wcj-settings-purchase-data.php:22
2642
  #: includes/settings/wcj-settings-purchase-data.php:29
2643
  #: includes/settings/wcj-settings-purchase-data.php:36
2644
+ #: includes/settings/wcj-settings-purchase-data.php:114
2645
+ #: includes/settings/wcj-settings-purchase-data.php:121
2646
+ #: includes/settings/wcj-settings-purchase-data.php:128
2647
+ #: includes/settings/wcj-settings-purchase-data.php:196
2648
  #: includes/settings/wcj-settings-related-products.php:105
2649
  #: includes/settings/wcj-settings-related-products.php:112
2650
  #: includes/settings/wcj-settings-related-products.php:119
2679
  #: includes/settings/wcj-settings-wholesale-price.php:42
2680
  #: includes/settings/wcj-settings-wholesale-price.php:51
2681
  #: includes/settings/wcj-settings-wpml.php:28
2682
+ #: includes/settings/wcj-settings-wpml.php:35
2683
+ #: includes/settings/wcj-settings-wpml.php:53
2684
  #: includes/settings/meta-box/wcj-settings-meta-box-product-add-to-cart.php:68
2685
  #: includes/settings/meta-box/wcj-settings-meta-box-product-addons.php:35
2686
  #: includes/settings/meta-box/wcj-settings-meta-box-related-products.php:19
2785
  msgid "Add (paid/free/discount) addons to products."
2786
  msgstr ""
2787
 
2788
+ #: includes/class-wcj-product-addons.php:207
2789
  msgid "Some of the required addons are not selected!"
2790
  msgstr ""
2791
 
2792
+ #: includes/class-wcj-product-addons.php:222
2793
  msgid ""
2794
  "Booster: Free plugin's version is limited to only three products with per "
2795
  "product addons enabled at a time. You will need to get <a href=\"https://"
2922
  #: includes/class-wcj-product-bulk-meta-editor.php:294
2923
  #: includes/settings/wcj-settings-admin-orders-list.php:71
2924
  #: includes/settings/wcj-settings-admin-products-list.php:56
2925
+ #: includes/settings/wcj-settings-checkout-fees.php:76
2926
  #: includes/settings/wcj-settings-export.php:91
2927
  #: includes/settings/wcj-settings-export.php:162
2928
  #: includes/settings/wcj-settings-export.php:241
3250
  #: includes/gateways/class-wc-gateway-wcj-custom.php:55
3251
  #: includes/input-fields/wcj-product-input-fields-options.php:51
3252
  #: includes/settings/wcj-settings-admin-orders-list.php:172
3253
+ #: includes/settings/wcj-settings-checkout-fees.php:60
3254
  #: includes/settings/wcj-settings-cross-sells.php:42
3255
  #: includes/settings/wcj-settings-export.php:75
3256
  #: includes/settings/wcj-settings-export.php:143
3264
  #: includes/settings/wcj-settings-product-tabs.php:409
3265
  #: includes/settings/wcj-settings-product-tabs.php:430
3266
  #: includes/settings/wcj-settings-products-xml.php:223
3267
+ #: includes/settings/wcj-settings-purchase-data.php:77
3268
  #: includes/settings/wcj-settings-related-products.php:24
3269
  #: includes/settings/wcj-settings-upsells.php:42
3270
  #: includes/settings/meta-box/wcj-settings-meta-box-product-addons.php:57
3271
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:176
3272
  #: includes/shipping/class-wc-shipping-wcj-custom.php:107
3273
  #: includes/shortcodes/class-wcj-shortcodes-products-add-form.php:334
3274
  #: includes/widgets/class-wcj-widget-country-switcher.php:62
3669
  #: includes/input-fields/wcj-product-input-fields-options.php:101
3670
  #: includes/settings/wcj-settings-admin-orders-list.php:84
3671
  #: includes/settings/wcj-settings-checkout-custom-fields.php:265
3672
+ #: includes/settings/wcj-settings-product-addons.php:233
3673
  #: includes/settings/wcj-settings-related-products.php:176
3674
  #: includes/settings/meta-box/wcj-settings-meta-box-custom-css.php:20
3675
  #: includes/settings/meta-box/wcj-settings-meta-box-multicurrency.php:60
3704
  #: includes/settings/wcj-settings-eu-vat-number.php:101
3705
  #: includes/settings/wcj-settings-eu-vat-number.php:111
3706
  #: includes/settings/wcj-settings-eu-vat-number.php:130
3707
+ #: includes/settings/wcj-settings-product-addons.php:232
3708
  #: includes/settings/wcj-settings-related-products.php:175
3709
  #: includes/settings/meta-box/wcj-settings-meta-box-custom-css.php:19
3710
  #: includes/settings/meta-box/wcj-settings-meta-box-multicurrency.php:61
3823
  msgstr ""
3824
 
3825
  #: includes/class-wcj-purchase-data.php:115
3826
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:124
3827
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:194
3828
  #: includes/shipping/class-wc-shipping-wcj-custom.php:122
3829
  #: includes/shipping/class-wc-shipping-wcj-custom.php:164
3830
  msgid "Cost"
3834
  #: includes/class-wcj-purchase-data.php:181
3835
  #: includes/class-wcj-purchase-data.php:268
3836
  #: includes/functions/wcj-functions-reports.php:28
3837
+ #: includes/settings/wcj-settings-purchase-data.php:144
3838
+ #: includes/settings/wcj-settings-purchase-data.php:172
3839
  msgid "Profit"
3840
  msgstr ""
3841
 
3842
  #: includes/class-wcj-purchase-data.php:184
3843
+ #: includes/settings/wcj-settings-purchase-data.php:153
3844
+ #: includes/settings/wcj-settings-purchase-data.php:179
3845
  msgid "Purchase Cost"
3846
  msgstr ""
3847
 
3853
  msgid "Buying"
3854
  msgstr ""
3855
 
3856
+ #: includes/class-wcj-purchase-data.php:275
3857
  msgid "Report"
3858
  msgstr ""
3859
 
4151
  msgstr ""
4152
 
4153
  #: includes/class-wcj-shipping-by-user-role.php:33
4154
+ #: includes/settings/wcj-settings-multicurrency.php:245
4155
  #: includes/settings/wcj-settings-order-min-amount.php:104
4156
  #: includes/settings/wcj-settings-price-by-user-role.php:90
4157
  #, php-format
4252
  msgid "Add delivery time estimation to shipping methods."
4253
  msgstr ""
4254
 
4255
+ #: includes/class-wcj-shipping.php:23
4256
  #: includes/settings/wcj-settings-shipping.php:16
4257
  #: includes/settings/wcj-settings-shipping.php:23
4258
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:179
4259
  #: includes/shipping/class-wc-shipping-wcj-custom.php:110
4260
  msgid "Custom Shipping"
4261
  msgstr ""
4262
 
4263
+ #: includes/class-wcj-shipping.php:24
4264
  msgid "Add multiple custom shipping methods to WooCommerce."
4265
  msgstr ""
4266
 
4477
  msgid "Booster for WooCommerce basic WPML support."
4478
  msgstr ""
4479
 
4480
+ #: includes/class-wcj-wpml.php:137
4481
  msgid "File wpml-config.xml successfully regenerated!"
4482
  msgstr ""
4483
 
4651
  msgstr ""
4652
 
4653
  #: includes/admin/class-wcj-settings-custom-fields.php:260
4654
+ #: includes/settings/wcj-settings-wpml.php:88
4655
  msgid "To use tools, module must be enabled."
4656
  msgstr ""
4657
 
4810
  msgid "Invisible"
4811
  msgstr ""
4812
 
4813
+ #: includes/classes/class-wcj-module.php:153
4814
  #, php-format
4815
  msgid ""
4816
  "Booster: Free plugin's version is limited to only one \"%1$s\" product with "
4819
  "\"%1$s\" products."
4820
  msgstr ""
4821
 
4822
+ #: includes/classes/class-wcj-module.php:473
4823
  #, php-format
4824
  msgid "Selected: %s."
4825
  msgstr ""
4826
 
4827
+ #: includes/classes/class-wcj-module.php:542
4828
  msgid "Back to Module Settings"
4829
  msgstr ""
4830
 
4831
+ #: includes/classes/class-wcj-module.php:560
4832
+ #: includes/settings/wcj-settings-wpml.php:87
4833
  msgid "Module Tools"
4834
  msgstr ""
4835
 
4836
+ #: includes/classes/class-wcj-module.php:633
4837
  #: includes/settings/wcj-settings-checkout-core-fields.php:64
4838
  msgid "enabled"
4839
  msgstr ""
4840
 
4841
+ #: includes/classes/class-wcj-module.php:634
4842
  msgid "disabled"
4843
  msgstr ""
4844
 
4845
+ #: includes/classes/class-wcj-module.php:642
4846
  #: includes/settings/wcj-settings-product-tabs.php:172
4847
  #: includes/settings/wcj-settings-product-tabs.php:184
4848
  #: includes/settings/wcj-settings-product-tabs.php:196
4850
  msgid "Deprecated"
4851
  msgstr ""
4852
 
4853
+ #: includes/classes/class-wcj-module.php:680
4854
  msgid "Reset Settings"
4855
  msgstr ""
4856
 
4857
+ #: includes/classes/class-wcj-module.php:686
4858
  msgid "Reset Module to Default Settings"
4859
  msgstr ""
4860
 
4861
+ #: includes/classes/class-wcj-module.php:687
4862
  msgid "Reset Submodule to Default Settings"
4863
  msgstr ""
4864
 
4865
+ #: includes/classes/class-wcj-module.php:691
4866
  msgid "Reset settings"
4867
  msgstr ""
4868
 
4869
+ #: includes/classes/class-wcj-module.php:725
4870
  msgid "Module Options"
4871
  msgstr ""
4872
 
4873
+ #: includes/classes/class-wcj-module.php:732
4874
  msgid "Enable Module"
4875
  msgstr ""
4876
 
4965
  #: includes/settings/wcj-settings-admin-products-list.php:19
4966
  #: includes/settings/wcj-settings-admin-products-list.php:75
4967
  #: includes/settings/wcj-settings-checkout-custom-fields.php:121
4968
+ #: includes/settings/wcj-settings-checkout-fees.php:46
4969
  #: includes/shipping/class-wc-shipping-wcj-custom.php:101
4970
  msgid "Enable/Disable"
4971
  msgstr ""
5436
  #: includes/export/class-wcj-fields-helper.php:289
5437
  #: includes/input-fields/wcj-product-input-fields-options.php:28
5438
  #: includes/settings/wcj-settings-checkout-custom-fields.php:130
5439
+ #: includes/settings/wcj-settings-checkout-fees.php:66
5440
  #: includes/settings/wcj-settings-export.php:81
5441
  #: includes/settings/wcj-settings-export.php:149
5442
  #: includes/settings/wcj-settings-export.php:231
5443
  #: includes/settings/wcj-settings-global-discount.php:58
5444
  #: includes/settings/wcj-settings-product-addons.php:80
5445
+ #: includes/settings/wcj-settings-purchase-data.php:84
5446
  #: includes/settings/wcj-settings-shipping-options.php:77
5447
  #: includes/settings/meta-box/wcj-settings-meta-box-product-addons.php:45
5448
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:184
5449
  #: includes/shipping/class-wc-shipping-wcj-custom.php:114
5450
  #: includes/widgets/class-wcj-widget-multicurrency.php:76
5451
  msgid "Type"
6942
  msgstr ""
6943
 
6944
  #: includes/gateways/class-wc-gateway-wcj-custom.php:57
6945
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:178
6946
  #: includes/shipping/class-wc-shipping-wcj-custom.php:109
6947
  msgid "This controls the title which the user sees during checkout."
6948
  msgstr ""
7550
  #: includes/settings/wcj-settings-add-to-cart-button-visibility.php:36
7551
  #: includes/settings/wcj-settings-add-to-cart-button-visibility.php:62
7552
  #: includes/settings/wcj-settings-multicurrency-base-price.php:63
7553
+ #: includes/settings/wcj-settings-multicurrency.php:154
7554
  #: includes/settings/wcj-settings-order-min-amount.php:69
7555
  #: includes/settings/wcj-settings-price-by-country.php:160
7556
  msgid "Advanced"
8068
  #: includes/settings/wcj-settings-add-to-cart-button-visibility.php:30
8069
  #: includes/settings/wcj-settings-add-to-cart-button-visibility.php:56
8070
  #: includes/settings/wcj-settings-general.php:30
8071
+ #: includes/settings/wcj-settings-general.php:99
8072
+ #: includes/settings/wcj-settings-general.php:114
8073
+ #: includes/settings/wcj-settings-general.php:122
8074
+ #: includes/settings/wcj-settings-general.php:130
8075
  #: includes/settings/wcj-settings-pdf-invoicing-advanced.php:84
8076
  #: includes/settings/wcj-settings-pdf-invoicing-advanced.php:116
8077
  #: includes/settings/wcj-settings-price-by-user-role.php:56
8171
  #: includes/settings/wcj-settings-add-to-cart.php:21
8172
  #: includes/settings/wcj-settings-add-to-cart.php:92
8173
  #: includes/settings/wcj-settings-add-to-cart.php:110
8174
+ #: includes/settings/wcj-settings-general.php:163
8175
  #: includes/settings/wcj-settings-shipping-calculator.php:69
8176
  #: includes/settings/wcj-settings-sorting.php:20
8177
  #: includes/settings/wcj-settings-sorting.php:99
9525
  msgid "Total Fees"
9526
  msgstr ""
9527
 
9528
+ #: includes/settings/wcj-settings-checkout-fees.php:53
9529
+ #: includes/settings/wcj-settings-payment-gateways-fees.php:82
9530
+ msgid "Taxable"
9531
+ msgstr ""
9532
+
9533
+ #: includes/settings/wcj-settings-checkout-fees.php:71
9534
  #: includes/settings/wcj-settings-global-discount.php:65
9535
  #: includes/settings/wcj-settings-payment-gateways-fees.php:37
9536
  #: includes/settings/wcj-settings-price-by-user-role.php:32
9537
+ #: includes/settings/wcj-settings-purchase-data.php:88
9538
  #: includes/settings/wcj-settings-wholesale-price.php:78
9539
  #: includes/settings/meta-box/wcj-settings-meta-box-wholesale-price.php:19
9540
  msgid "Fixed"
9541
  msgstr ""
9542
 
9543
+ #: includes/settings/wcj-settings-checkout-fees.php:72
9544
  #: includes/settings/wcj-settings-global-discount.php:64
9545
  #: includes/settings/wcj-settings-payment-gateways-fees.php:38
9546
+ #: includes/settings/wcj-settings-purchase-data.php:89
9547
  #: includes/settings/wcj-settings-wholesale-price.php:77
9548
  #: includes/settings/meta-box/wcj-settings-meta-box-wholesale-price.php:18
9549
  msgid "Percent"
9550
  msgstr ""
9551
 
9552
+ #: includes/settings/wcj-settings-checkout-fees.php:83
9553
+ msgid "Cart Min"
9554
+ msgstr ""
9555
+
9556
+ #: includes/settings/wcj-settings-checkout-fees.php:84
9557
+ msgid "Cart minimum amount"
9558
+ msgstr ""
9559
+
9560
+ #: includes/settings/wcj-settings-checkout-fees.php:91
9561
+ msgid "Cart Max"
9562
  msgstr ""
9563
 
9564
+ #: includes/settings/wcj-settings-checkout-fees.php:92
9565
+ msgid "Cart maximum amount."
9566
+ msgstr ""
9567
+
9568
+ #: includes/settings/wcj-settings-checkout-fees.php:92
9569
+ msgid "Zero or empty values will not be considered"
9570
+ msgstr ""
9571
+
9572
+ #: includes/settings/wcj-settings-checkout-fees.php:98
9573
  msgid "Checkout Field"
9574
  msgstr ""
9575
 
9576
+ #: includes/settings/wcj-settings-checkout-fees.php:99
9577
  #, php-format
9578
  msgid ""
9579
  "If you want fee to be added only if some checkout field is enabled, enter "
9581
  "field with Booster's \"Checkout Custom Fields\" module, enter %s here."
9582
  msgstr ""
9583
 
9584
+ #: includes/settings/wcj-settings-checkout-fees.php:100
9585
  msgid "Ignored if empty (i.e. fee will be always added)."
9586
  msgstr ""
9587
 
9588
+ #: includes/settings/wcj-settings-checkout-fees.php:106
9589
+ msgid "Overlap"
9590
+ msgstr ""
9591
+
9592
+ #: includes/settings/wcj-settings-checkout-fees.php:107
9593
+ msgid "If valid, will overlap other fee"
9594
+ msgstr ""
9595
+
9596
+ #: includes/settings/wcj-settings-checkout-fees.php:117
9597
+ #: includes/settings/wcj-settings-product-add-to-cart.php:297
9598
+ #: includes/settings/wcj-settings-product-add-to-cart.php:333
9599
+ msgid "Priority"
9600
+ msgstr ""
9601
+
9602
+ #: includes/settings/wcj-settings-checkout-fees.php:118
9603
+ msgid "The higher the number the higher the priority."
9604
+ msgstr ""
9605
+
9606
+ #: includes/settings/wcj-settings-checkout-fees.php:118
9607
+ msgid "Will mostly make sense for overlapping."
9608
+ msgstr ""
9609
+
9610
  #: includes/settings/wcj-settings-checkout-files-upload.php:23
9611
  #: includes/settings/wcj-settings-products-xml.php:25
9612
  msgid "Total Files"
9765
  msgstr ""
9766
 
9767
  #: includes/settings/wcj-settings-checkout-files-upload.php:250
9768
+ #: includes/settings/wcj-settings-product-input-fields.php:295
9769
  msgid "Emails Options"
9770
  msgstr ""
9771
 
9772
  #: includes/settings/wcj-settings-checkout-files-upload.php:255
9773
+ #: includes/settings/wcj-settings-product-input-fields.php:300
9774
  msgid "Attach Files to Admin's New Order Emails"
9775
  msgstr ""
9776
 
9777
  #: includes/settings/wcj-settings-checkout-files-upload.php:256
9778
  #: includes/settings/wcj-settings-checkout-files-upload.php:263
9779
+ #: includes/settings/wcj-settings-product-input-fields.php:301
9780
+ #: includes/settings/wcj-settings-product-input-fields.php:308
9781
  msgid "Attach"
9782
  msgstr ""
9783
 
9784
  #: includes/settings/wcj-settings-checkout-files-upload.php:262
9785
+ #: includes/settings/wcj-settings-product-input-fields.php:307
9786
  msgid "Attach Files to Customer's Processing Order Emails"
9787
  msgstr ""
9788
 
9814
  #: includes/settings/wcj-settings-checkout-files-upload.php:298
9815
  #: includes/settings/wcj-settings-checkout-files-upload.php:352
9816
  #: includes/settings/wcj-settings-checkout-files-upload.php:393
9817
+ #: includes/settings/wcj-settings-product-addons.php:338
9818
+ #: includes/settings/wcj-settings-product-addons.php:369
9819
  msgid "Before"
9820
  msgstr ""
9821
 
9837
  #: includes/settings/wcj-settings-checkout-files-upload.php:321
9838
  #: includes/settings/wcj-settings-checkout-files-upload.php:367
9839
  #: includes/settings/wcj-settings-checkout-files-upload.php:408
9840
+ #: includes/settings/wcj-settings-product-addons.php:353
9841
+ #: includes/settings/wcj-settings-product-addons.php:384
9842
  msgid "After"
9843
  msgstr ""
9844
 
9873
  #: includes/settings/wcj-settings-checkout-files-upload.php:421
9874
  #: includes/settings/wcj-settings-currency-per-product.php:251
9875
  #: includes/settings/wcj-settings-eu-vat-number.php:203
9876
+ #: includes/settings/wcj-settings-general.php:65
9877
  #: includes/settings/wcj-settings-payment-gateways.php:49
9878
  #: includes/settings/wcj-settings-pdf-invoicing-advanced.php:43
9879
  #: includes/settings/wcj-settings-product-by-date.php:117
9880
  #: includes/settings/wcj-settings-product-custom-info.php:185
9881
+ #: includes/settings/wcj-settings-product-input-fields.php:348
9882
  #: includes/settings/wcj-settings-shipping-by-condition.php:108
9883
  msgid "Advanced Options"
9884
  msgstr ""
10291
  #: includes/settings/wcj-settings-currency-external-products.php:20
10292
  #: includes/settings/wcj-settings-currency-per-product.php:180
10293
  #: includes/settings/wcj-settings-multicurrency-base-price.php:131
10294
+ #: includes/settings/wcj-settings-multicurrency.php:218
10295
  #: includes/settings/wcj-settings-price-by-country.php:277
10296
  #: includes/settings/wcj-settings-price-formats.php:59
10297
  msgid "Currency"
10397
 
10398
  #: includes/settings/wcj-settings-currency-per-product.php:138
10399
  #: includes/settings/wcj-settings-multicurrency-base-price.php:102
10400
+ #: includes/settings/wcj-settings-multicurrency.php:187
10401
  msgid "Currencies Options"
10402
  msgstr ""
10403
 
10410
 
10411
  #: includes/settings/wcj-settings-currency-per-product.php:144
10412
  #: includes/settings/wcj-settings-multicurrency-base-price.php:107
10413
+ #: includes/settings/wcj-settings-multicurrency.php:193
10414
  msgid "Total Currencies"
10415
  msgstr ""
10416
 
11055
  "memory saving)."
11056
  msgstr ""
11057
 
11058
+ #: includes/settings/wcj-settings-general.php:40
11059
+ msgid "Ip Detection"
11060
+ msgstr ""
11061
+
11062
  #: includes/settings/wcj-settings-general.php:45
11063
+ msgid "Overwrite WooCommerce IP Detection"
11064
  msgstr ""
11065
 
11066
  #: includes/settings/wcj-settings-general.php:46
11067
+ msgid "Try to overwrite WooCommerce IP detection"
11068
  msgstr ""
11069
 
11070
  #: includes/settings/wcj-settings-general.php:47
11071
  msgid ""
11072
+ "The \"HTTP_X_REAL_IP\" param on $_SERVER variable will be replaced by IP "
11073
+ "detected from Booster"
11074
+ msgstr ""
11075
+
11076
+ #: includes/settings/wcj-settings-general.php:53
11077
+ msgid "Detection Methods"
11078
  msgstr ""
11079
 
11080
  #: includes/settings/wcj-settings-general.php:54
11081
+ msgid ""
11082
+ "IP Detection Methods used by some Booster modules when not using IP "
11083
+ "detection from WooCommerce. Change order for different results."
11084
+ msgstr ""
11085
+
11086
+ #: includes/settings/wcj-settings-general.php:55
11087
+ msgid "Default values are:"
11088
+ msgstr ""
11089
+
11090
+ #: includes/settings/wcj-settings-general.php:70
11091
+ msgid "Recalculate Cart Totals"
11092
+ msgstr ""
11093
+
11094
+ #: includes/settings/wcj-settings-general.php:71
11095
+ msgid "Will recalculate cart totals on every page load."
11096
+ msgstr ""
11097
+
11098
+ #: includes/settings/wcj-settings-general.php:72
11099
+ msgid ""
11100
+ "This may solve multicurrency issues with wrong currency symbol in mini-cart."
11101
+ msgstr ""
11102
+
11103
+ #: includes/settings/wcj-settings-general.php:79
11104
  msgid "Session Type in Booster"
11105
  msgstr ""
11106
 
11107
+ #: includes/settings/wcj-settings-general.php:84
11108
  msgid "Standard PHP sessions"
11109
  msgstr ""
11110
 
11111
+ #: includes/settings/wcj-settings-general.php:85
11112
  msgid "WC sessions"
11113
  msgstr ""
11114
 
11115
+ #: includes/settings/wcj-settings-general.php:89
11116
  msgid "Read and Close"
11117
  msgstr ""
11118
 
11119
+ #: includes/settings/wcj-settings-general.php:90
11120
  msgid ""
11121
  "Enable <strong>Read and Close</strong> parameter on <strong>session_start()</"
11122
  "strong>."
11123
  msgstr ""
11124
 
11125
+ #: includes/settings/wcj-settings-general.php:91
11126
  msgid ""
11127
  "Requires Session Type option set as Standard PHP Sessions and PHP version >= "
11128
  "7.0"
11129
  msgstr ""
11130
 
11131
+ #: includes/settings/wcj-settings-general.php:97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11132
  msgid "Datepicker/Weekpicker CSS Loading"
11133
  msgstr ""
11134
 
11135
+ #: includes/settings/wcj-settings-general.php:98
11136
  msgid "Disables datepicker/weekpicker CSS loading."
11137
  msgstr ""
11138
 
11139
+ #: includes/settings/wcj-settings-general.php:105
11140
  msgid "Datepicker/Weekpicker CSS Source"
11141
  msgstr ""
11142
 
11143
+ #: includes/settings/wcj-settings-general.php:112
11144
  msgid "Datepicker/Weekpicker JavaScript Loading"
11145
  msgstr ""
11146
 
11147
+ #: includes/settings/wcj-settings-general.php:113
11148
  msgid "Disables datepicker/weekpicker JavaScript loading."
11149
  msgstr ""
11150
 
11151
+ #: includes/settings/wcj-settings-general.php:120
11152
  msgid "Timepicker CSS Loading"
11153
  msgstr ""
11154
 
11155
+ #: includes/settings/wcj-settings-general.php:121
11156
  msgid "Disables timepicker CSS loading."
11157
  msgstr ""
11158
 
11159
+ #: includes/settings/wcj-settings-general.php:128
11160
  msgid "Timepicker JavaScript Loading"
11161
  msgstr ""
11162
 
11163
+ #: includes/settings/wcj-settings-general.php:129
11164
  msgid "Disables timepicker JavaScript loading."
11165
  msgstr ""
11166
 
11167
+ #: includes/settings/wcj-settings-general.php:140
11168
  msgid "PayPal Email per Product Options"
11169
  msgstr ""
11170
 
11171
+ #: includes/settings/wcj-settings-general.php:145
11172
  msgid "PayPal Email per Product"
11173
  msgstr ""
11174
 
11175
+ #: includes/settings/wcj-settings-general.php:147
11176
  #: includes/settings/wcj-settings-max-products-per-user.php:44
11177
  #: includes/settings/wcj-settings-product-by-date.php:54
11178
  #: includes/settings/wcj-settings-product-by-time.php:54
11180
  msgid "This will add new meta box to each product's edit page."
11181
  msgstr ""
11182
 
11183
+ #: includes/settings/wcj-settings-general.php:157
11184
  msgid "Session Expiration Options"
11185
  msgstr ""
11186
 
11187
+ #: includes/settings/wcj-settings-general.php:162
11188
+ #: includes/settings/wcj-settings-general.php:177
11189
  msgid "Session Expiration"
11190
  msgstr ""
11191
 
11192
+ #: includes/settings/wcj-settings-general.php:169
11193
  msgid "Session Expiring"
11194
  msgstr ""
11195
 
11196
+ #: includes/settings/wcj-settings-general.php:170
11197
  msgid "In seconds. Default: 47 hours (60 * 60 * 47)"
11198
  msgstr ""
11199
 
11200
+ #: includes/settings/wcj-settings-general.php:178
11201
  msgid "In seconds. Default: 48 hours (60 * 60 * 48)"
11202
  msgstr ""
11203
 
11204
+ #: includes/settings/wcj-settings-general.php:189
11205
  msgid "Booster User Roles Changer Options"
11206
  msgstr ""
11207
 
11208
+ #: includes/settings/wcj-settings-general.php:190
11209
  msgid "This will add user roles changer tool to admin bar."
11210
  msgstr ""
11211
 
11212
+ #: includes/settings/wcj-settings-general.php:196
11213
  msgid "Booster User Roles Changer"
11214
  msgstr ""
11215
 
11216
+ #: includes/settings/wcj-settings-general.php:205
11217
  msgid "Enabled for"
11218
  msgstr ""
11219
 
11220
+ #: includes/settings/wcj-settings-general.php:217
11221
  msgid "PHP Options"
11222
  msgstr ""
11223
 
11224
+ #: includes/settings/wcj-settings-general.php:222
11225
  msgid "PHP Memory Limit"
11226
  msgstr ""
11227
 
11228
+ #: includes/settings/wcj-settings-general.php:223
11229
  msgid "megabytes."
11230
  msgstr ""
11231
 
11232
+ #: includes/settings/wcj-settings-general.php:224
11233
+ #: includes/settings/wcj-settings-general.php:233
11234
  #: includes/settings/wcj-settings-offer-price.php:183
11235
  #: includes/settings/wcj-settings-offer-price.php:191
11236
  #: includes/settings/meta-box/wcj-settings-meta-box-offer-price.php:43
11238
  msgid "Set zero to disable."
11239
  msgstr ""
11240
 
11241
+ #: includes/settings/wcj-settings-general.php:231
11242
  msgid "PHP Time Limit"
11243
  msgstr ""
11244
 
11245
+ #: includes/settings/wcj-settings-general.php:232
11246
  msgid "seconds."
11247
  msgstr ""
11248
 
11400
 
11401
  #: includes/settings/wcj-settings-global-discount.php:188
11402
  #: includes/settings/wcj-settings-multicurrency-base-price.php:76
11403
+ #: includes/settings/wcj-settings-multicurrency.php:168
11404
  #: includes/settings/wcj-settings-price-by-country.php:165
11405
  #: includes/settings/wcj-settings-product-price-by-formula.php:100
11406
  msgid "Price Filters Priority"
11408
 
11409
  #: includes/settings/wcj-settings-global-discount.php:189
11410
  #: includes/settings/wcj-settings-multicurrency-base-price.php:77
11411
+ #: includes/settings/wcj-settings-multicurrency.php:169
11412
  #: includes/settings/wcj-settings-price-by-country.php:166
11413
  #: includes/settings/wcj-settings-price-by-user-role.php:70
11414
+ #: includes/settings/wcj-settings-product-addons.php:250
11415
  #: includes/settings/wcj-settings-product-price-by-formula.php:101
11416
  #: includes/settings/wcj-settings-wholesale-price.php:121
11417
  msgid ""
11759
  msgstr ""
11760
 
11761
  #: includes/settings/wcj-settings-multicurrency.php:111
11762
+ msgid "WooCommerce Coupons"
11763
+ msgstr ""
11764
+
11765
+ #: includes/settings/wcj-settings-multicurrency.php:113
11766
+ msgid ""
11767
+ "When a fixed coupon is used its value changes according to the current "
11768
+ "currency"
11769
+ msgstr ""
11770
+
11771
+ #: includes/settings/wcj-settings-multicurrency.php:119
11772
  msgid "WooCommerce Smart Coupons"
11773
  msgstr ""
11774
 
11775
+ #: includes/settings/wcj-settings-multicurrency.php:126
11776
  msgid "WooCommerce Price Filter"
11777
  msgstr ""
11778
 
11779
+ #: includes/settings/wcj-settings-multicurrency.php:128
11780
+ msgid "Adds Compatibility with Price Filter widget"
11781
+ msgstr ""
11782
+
11783
+ #: includes/settings/wcj-settings-multicurrency.php:134
11784
+ msgid "Price Sorting with Per Product"
11785
+ msgstr ""
11786
+
11787
+ #: includes/settings/wcj-settings-multicurrency.php:136
11788
+ msgid "Fixes Price Sorting if Per Product option is enabled"
11789
+ msgstr ""
11790
+
11791
+ #: includes/settings/wcj-settings-multicurrency.php:142
11792
  msgid "WooCommerce Import"
11793
  msgstr ""
11794
 
11795
+ #: includes/settings/wcj-settings-multicurrency.php:144
11796
  msgid ""
11797
+ "Fixes WooCommerce Import Tool preventing it from converting some uppercase "
11798
+ "meta to lowercase"
11799
  msgstr ""
11800
 
11801
+ #: includes/settings/wcj-settings-multicurrency.php:159
11802
  msgid "Additional Price Filters"
11803
  msgstr ""
11804
 
11805
+ #: includes/settings/wcj-settings-multicurrency.php:160
11806
  msgid ""
11807
  "Add additional price filters here. One per line. Leave blank if not sure."
11808
  msgstr ""
11809
 
11810
+ #: includes/settings/wcj-settings-multicurrency.php:175
11811
+ msgid "Save Prices on Exchange Update"
11812
+ msgstr ""
11813
+
11814
+ #: includes/settings/wcj-settings-multicurrency.php:177
11815
+ msgid ""
11816
+ "Save min and max prices on exchange rate update, via background processing."
11817
+ msgstr ""
11818
+
11819
+ #: includes/settings/wcj-settings-multicurrency.php:177
11820
+ msgid ""
11821
+ "All products with \"per product\" options registered related to the currency "
11822
+ "will be affected."
11823
+ msgstr ""
11824
+
11825
+ #: includes/settings/wcj-settings-multicurrency.php:189
11826
  msgid ""
11827
  "One currency probably should be set to current (original) shop currency with "
11828
  "an exchange rate of 1."
11829
  msgstr ""
11830
 
11831
+ #: includes/settings/wcj-settings-multicurrency.php:194
11832
  msgid ""
11833
  "Press Save changes after setting this option, so new settings fields will be "
11834
  "added."
11835
  msgstr ""
11836
 
11837
+ #: includes/settings/wcj-settings-multicurrency.php:243
11838
  msgid "Role Defaults"
11839
  msgstr ""
11840
 
11841
+ #: includes/settings/wcj-settings-multicurrency.php:250
11842
  msgid "Roles"
11843
  msgstr ""
11844
 
11845
+ #: includes/settings/wcj-settings-multicurrency.php:251
11846
  #: includes/settings/wcj-settings-wholesale-price.php:180
11847
  msgid "Save settings after you change this option. Leave blank to disable."
11848
  msgstr ""
11849
 
11850
+ #: includes/settings/wcj-settings-multicurrency.php:274
11851
  msgid "No default currency"
11852
  msgstr ""
11853
 
13682
 
13683
  #: includes/settings/wcj-settings-pdf-invoicing-header.php:42
13684
  #: includes/settings/wcj-settings-pdf-invoicing-page.php:88
13685
+ #: includes/settings/wcj-settings-purchase-data.php:78
13686
  msgid "Leave blank to disable"
13687
  msgstr ""
13688
 
14129
  msgstr ""
14130
 
14131
  #: includes/settings/wcj-settings-price-by-user-role.php:69
14132
+ #: includes/settings/wcj-settings-product-addons.php:249
14133
  #: includes/settings/wcj-settings-wholesale-price.php:120
14134
  msgid "Advanced: Price Filters Priority"
14135
  msgstr ""
14523
  msgid "Reposition Button on Single Product Pages"
14524
  msgstr ""
14525
 
 
 
 
 
 
14526
  #: includes/settings/wcj-settings-product-add-to-cart.php:298
14527
  #, php-format
14528
  msgid ""
14629
  msgstr ""
14630
 
14631
  #: includes/settings/wcj-settings-product-addons.php:123
14632
+ #: includes/settings/wcj-settings-purchase-data.php:94
14633
  #: includes/settings/meta-box/wcj-settings-meta-box-product-addons.php:88
14634
  msgid "Default Value"
14635
  msgstr ""
14663
  msgstr ""
14664
 
14665
  #: includes/settings/wcj-settings-product-addons.php:185
14666
+ #: includes/settings/wcj-settings-product-addons.php:186
14667
+ msgid "Ignore Strikethrough Price"
14668
+ msgstr ""
14669
+
14670
+ #: includes/settings/wcj-settings-product-addons.php:187
14671
+ msgid ""
14672
+ "If a product has both regular and sale prices, only the sale price will be "
14673
+ "updated on AJAX. The regular price will be ignored"
14674
+ msgstr ""
14675
+
14676
+ #: includes/settings/wcj-settings-product-addons.php:193
14677
  msgid "Decrease Quantity"
14678
  msgstr ""
14679
 
14680
+ #: includes/settings/wcj-settings-product-addons.php:194
14681
  msgid ""
14682
  "If you select multiple triggers to decrease quantity, it will be decreased "
14683
  "only once (on whichever trigger is executed first)."
14684
  msgstr ""
14685
 
14686
+ #: includes/settings/wcj-settings-product-addons.php:202
14687
  msgid "Admin Order Page"
14688
  msgstr ""
14689
 
14690
+ #: includes/settings/wcj-settings-product-addons.php:203
14691
  msgid "Hide all addons"
14692
  msgstr ""
14693
 
14694
+ #: includes/settings/wcj-settings-product-addons.php:209
14695
  msgid "Position on Frontend"
14696
  msgstr ""
14697
 
14698
+ #: includes/settings/wcj-settings-product-addons.php:214
14699
  #: includes/settings/wcj-settings-product-custom-info.php:108
14700
  #: includes/settings/wcj-settings-product-input-fields.php:195
14701
  #: includes/settings/wcj-settings-product-open-pricing.php:17
14702
  msgid "Before add to cart button"
14703
  msgstr ""
14704
 
14705
+ #: includes/settings/wcj-settings-product-addons.php:215
14706
  #: includes/settings/wcj-settings-product-custom-info.php:109
14707
  #: includes/settings/wcj-settings-product-input-fields.php:196
14708
  #: includes/settings/wcj-settings-product-open-pricing.php:18
14709
  msgid "After add to cart button"
14710
  msgstr ""
14711
 
14712
+ #: includes/settings/wcj-settings-product-addons.php:219
14713
  msgid "Position Priority on Frontend"
14714
  msgstr ""
14715
 
14716
+ #: includes/settings/wcj-settings-product-addons.php:220
14717
  #: includes/settings/wcj-settings-shipping-by-condition.php:114
14718
  #: includes/settings/wcj-settings-shipping-options.php:41
14719
  msgid "Set to zero to use the default priority."
14720
  msgstr ""
14721
 
14722
+ #: includes/settings/wcj-settings-product-addons.php:226
14723
  msgid "Advanced: Apply Price Filter"
14724
  msgstr ""
14725
 
14726
+ #: includes/settings/wcj-settings-product-addons.php:231
14727
  msgid "By module"
14728
  msgstr ""
14729
 
14730
+ #: includes/settings/wcj-settings-product-addons.php:237
14731
  msgid ""
14732
  "If you have selected \"By module\" for \"Advanced: Apply Price Filter\" "
14733
  "option, you can set which modules to apply here. Leave empty to apply all "
14734
  "modules."
14735
  msgstr ""
14736
 
14737
+ #: includes/settings/wcj-settings-product-addons.php:256
14738
  #: includes/settings/wcj-settings-product-bookings.php:106
14739
  #: includes/settings/wcj-settings-product-open-pricing.php:139
14740
  msgid "Advanced: Check for Outputted Data"
14741
  msgstr ""
14742
 
14743
+ #: includes/settings/wcj-settings-product-addons.php:258
14744
  #: includes/settings/wcj-settings-product-bookings.php:108
14745
+ #: includes/settings/wcj-settings-product-input-fields.php:355
14746
  #: includes/settings/wcj-settings-product-open-pricing.php:141
14747
  msgid ""
14748
  "Ensures that data outputted only once. Enable this if you see data outputted "
14749
  "on frontend twice. Disable if you see no data outputted."
14750
  msgstr ""
14751
 
14752
+ #: includes/settings/wcj-settings-product-addons.php:268
14753
  msgid "Frontend Templates"
14754
  msgstr ""
14755
 
14756
+ #: includes/settings/wcj-settings-product-addons.php:273
14757
  msgid "Each Addon - Title"
14758
  msgstr ""
14759
 
14760
+ #: includes/settings/wcj-settings-product-addons.php:281
14761
  msgid "Each Addon - Type: Checkbox"
14762
  msgstr ""
14763
 
14764
+ #: includes/settings/wcj-settings-product-addons.php:289
14765
  msgid "Each Addon - Type: Text"
14766
  msgstr ""
14767
 
14768
+ #: includes/settings/wcj-settings-product-addons.php:297
14769
  msgid "Each Addon - Type: Select Box"
14770
  msgstr ""
14771
 
14772
+ #: includes/settings/wcj-settings-product-addons.php:305
14773
  msgid "Each Addon - Type: Select Box (Each Option)"
14774
  msgstr ""
14775
 
14776
+ #: includes/settings/wcj-settings-product-addons.php:313
14777
  msgid "Each Addon - Type: Radio Button (Each)"
14778
  msgstr ""
14779
 
14780
+ #: includes/settings/wcj-settings-product-addons.php:321
14781
  msgid "All Addons - Final"
14782
  msgstr ""
14783
 
14784
+ #: includes/settings/wcj-settings-product-addons.php:333
14785
  msgid "Cart Template"
14786
  msgstr ""
14787
 
14788
+ #: includes/settings/wcj-settings-product-addons.php:345
14789
+ #: includes/settings/wcj-settings-product-addons.php:376
14790
  msgid "Each Addon"
14791
  msgstr ""
14792
 
14793
+ #: includes/settings/wcj-settings-product-addons.php:364
14794
  msgid "Order Details Table Template"
14795
  msgstr ""
14796
 
15584
  msgid "Affects Order received page, Emails and Admin Orders View"
15585
  msgstr ""
15586
 
15587
+ #: includes/settings/wcj-settings-product-input-fields.php:281
15588
+ #: includes/settings/wcj-settings-product-input-fields.php:334
15589
+ msgid "Preserve Line Breaks"
15590
+ msgstr ""
15591
+
15592
+ #: includes/settings/wcj-settings-product-input-fields.php:283
15593
+ msgid ""
15594
+ "Preserves line breaks on frontend, making some inputs like textarea more "
15595
+ "legible"
15596
+ msgstr ""
15597
+
15598
+ #: includes/settings/wcj-settings-product-input-fields.php:320
15599
  msgid "Admin Order View Options"
15600
  msgstr ""
15601
 
15602
+ #: includes/settings/wcj-settings-product-input-fields.php:325
15603
  msgid "Replace Field ID with Field Label"
15604
  msgstr ""
15605
 
15606
+ #: includes/settings/wcj-settings-product-input-fields.php:327
15607
  #, php-format
15608
  msgid "Please note: %s"
15609
  msgstr ""
15610
 
15611
+ #: includes/settings/wcj-settings-product-input-fields.php:328
15612
  msgid ""
15613
  "When checked - will disable input fields editing on admin order edit page."
15614
  msgstr ""
15615
 
15616
+ #: includes/settings/wcj-settings-product-input-fields.php:336
15617
+ msgid ""
15618
+ "Preserves line breaks on admin, making some inputs like textarea more legible"
15619
+ msgstr ""
15620
+
15621
+ #: includes/settings/wcj-settings-product-input-fields.php:353
15622
  msgid "Check for Outputted Data"
15623
  msgstr ""
15624
 
15625
+ #: includes/settings/wcj-settings-product-input-fields.php:361
15626
  msgid "Strip Slashes"
15627
  msgstr ""
15628
 
15629
+ #: includes/settings/wcj-settings-product-input-fields.php:363
15630
  #, php-format
15631
  msgid "Enable this if you have single quotes %s converted to %s."
15632
  msgstr ""
16391
  msgstr ""
16392
 
16393
  #: includes/settings/wcj-settings-purchase-data.php:17
16394
+ #: includes/settings/wcj-settings-purchase-data.php:59
16395
  msgid ""
16396
  "These fields will be added to product's edit page and will be included in "
16397
  "product's purchase cost calculation."
16412
  msgid "Affiliate commission"
16413
  msgstr ""
16414
 
16415
+ #: includes/settings/wcj-settings-purchase-data.php:42
16416
+ msgid "Profit Percentage Type"
16417
+ msgstr ""
16418
+
16419
+ #: includes/settings/wcj-settings-purchase-data.php:43
16420
+ msgid "Example:"
16421
+ msgstr ""
16422
+
16423
+ #: includes/settings/wcj-settings-purchase-data.php:43
16424
+ msgid "Selling: $3.000 | Buying: $1.000"
16425
+ msgstr ""
16426
+
16427
+ #: includes/settings/wcj-settings-purchase-data.php:43
16428
+ msgid "Margin: 66% | Markup: $200%"
16429
+ msgstr ""
16430
+
16431
+ #: includes/settings/wcj-settings-purchase-data.php:47
16432
+ msgid "Margin"
16433
+ msgstr ""
16434
+
16435
+ #: includes/settings/wcj-settings-purchase-data.php:48
16436
+ msgid "Markup"
16437
+ msgstr ""
16438
+
16439
+ #: includes/settings/wcj-settings-purchase-data.php:57
16440
  msgid "Custom Price Fields"
16441
  msgstr ""
16442
 
16443
+ #: includes/settings/wcj-settings-purchase-data.php:63
16444
  msgid "Total Custom Price Fields"
16445
  msgstr ""
16446
 
16447
+ #: includes/settings/wcj-settings-purchase-data.php:75
16448
  msgid "Custom Price Field"
16449
  msgstr ""
16450
 
16451
+ #: includes/settings/wcj-settings-purchase-data.php:107
16452
  msgid "Info Fields"
16453
  msgstr ""
16454
 
16455
+ #: includes/settings/wcj-settings-purchase-data.php:109
16456
  msgid "These fields will be added to product's edit page."
16457
  msgstr ""
16458
 
16459
+ #: includes/settings/wcj-settings-purchase-data.php:113
16460
  #: includes/settings/meta-box/wcj-settings-meta-box-purchase-data.php:87
16461
  msgid "(Last) Purchase date"
16462
  msgstr ""
16463
 
16464
+ #: includes/settings/wcj-settings-purchase-data.php:120
16465
  #: includes/settings/meta-box/wcj-settings-meta-box-purchase-data.php:97
16466
  msgid "Seller"
16467
  msgstr ""
16468
 
16469
+ #: includes/settings/wcj-settings-purchase-data.php:127
16470
  #: includes/settings/meta-box/wcj-settings-meta-box-purchase-data.php:107
16471
  msgid "Purchase info"
16472
  msgstr ""
16473
 
16474
+ #: includes/settings/wcj-settings-purchase-data.php:138
16475
  msgid "Admin Products List Custom Columns"
16476
  msgstr ""
16477
 
16478
+ #: includes/settings/wcj-settings-purchase-data.php:140
16479
  msgid ""
16480
  "This section lets you add custom columns to WooCommerce admin products list."
16481
  msgstr ""
16482
 
16483
+ #: includes/settings/wcj-settings-purchase-data.php:166
16484
  msgid "Admin Orders List Custom Columns"
16485
  msgstr ""
16486
 
16487
+ #: includes/settings/wcj-settings-purchase-data.php:168
16488
  msgid ""
16489
  "This section lets you add custom columns to WooCommerce admin orders list."
16490
  msgstr ""
16491
 
16492
+ #: includes/settings/wcj-settings-purchase-data.php:190
16493
  #: includes/settings/wcj-settings-sku.php:210
16494
  #: includes/settings/wcj-settings-stock.php:199
16495
  msgid "More Options"
16496
  msgstr ""
16497
 
16498
+ #: includes/settings/wcj-settings-purchase-data.php:195
16499
  msgid "Treat Variable Products as Simple Products"
16500
  msgstr ""
16501
 
17055
  msgstr ""
17056
 
17057
  #: includes/settings/wcj-settings-shipping.php:32
17058
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:41
17059
  msgid "Booster: Custom Shipping"
17060
  msgstr ""
17061
 
17945
  msgid "Use Translation Product IDs"
17946
  msgstr ""
17947
 
17948
+ #: includes/settings/wcj-settings-wpml.php:34
17949
+ msgid "Auto Switch Booster Currency"
17950
+ msgstr ""
17951
+
17952
+ #: includes/settings/wcj-settings-wpml.php:36
17953
+ msgid ""
17954
+ "Try to automatically switch Booster currency according to WPML. It's "
17955
+ "necessary to enable MultiCurrency module"
17956
+ msgstr ""
17957
+
17958
+ #: includes/settings/wcj-settings-wpml.php:46
17959
  msgid "WPML Language Configuration File Options"
17960
  msgstr ""
17961
 
17962
+ #: includes/settings/wcj-settings-wpml.php:48
17963
  #, php-format
17964
  msgid "Options for regenerating %s file."
17965
  msgstr ""
17966
 
17967
+ #: includes/settings/wcj-settings-wpml.php:52
17968
  msgid "Automatically Regenerate"
17969
  msgstr ""
17970
 
17971
+ #: includes/settings/wcj-settings-wpml.php:54
17972
  #, php-format
17973
  msgid "Automatically regenerate %s file on each Booster version update."
17974
  msgstr ""
17975
 
17976
+ #: includes/settings/wcj-settings-wpml.php:60
17977
  msgid "Modules to Skip"
17978
  msgstr ""
17979
 
17980
+ #: includes/settings/wcj-settings-wpml.php:61
17981
  msgid ""
17982
  "Select modules, which options you wish to exclude from wpml-config.xml file."
17983
  msgstr ""
17984
 
17985
+ #: includes/settings/wcj-settings-wpml.php:69
17986
  msgid "Option IDs to Skip"
17987
  msgstr ""
17988
 
17989
+ #: includes/settings/wcj-settings-wpml.php:70
17990
  msgid "Select options, which you wish to exclude from wpml-config.xml file."
17991
  msgstr ""
17992
 
17993
+ #: includes/settings/wcj-settings-wpml.php:71
17994
  #, php-format
17995
  msgid "Full or part of option ID. Separated by vertical bar %s."
17996
  msgstr ""
17997
 
17998
+ #: includes/settings/wcj-settings-wpml.php:93
17999
+ #: includes/settings/wcj-settings-wpml.php:95
18000
  msgid "Regenerate wpml-config.xml file"
18001
  msgstr ""
18002
 
18250
  msgid "Min quantity"
18251
  msgstr ""
18252
 
18253
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:42
18254
  #: includes/shipping/class-wc-shipping-wcj-custom.php:38
18255
  msgid "Booster: Custom Shipping Method"
18256
  msgstr ""
18257
 
18258
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:116
18259
  #: includes/shipping/class-wc-shipping-wcj-custom.php:157
18260
  msgid "Max Weight or Quantity"
18261
  msgstr ""
18262
 
18263
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:166
18264
  msgid "Flat rate"
18265
  msgstr ""
18266
 
18267
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:167
18268
  msgid "By total cart weight"
18269
  msgstr ""
18270
 
18271
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:168
18272
  msgid "By total cart weight table"
18273
  msgstr ""
18274
 
18275
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:169
18276
  msgid "By total cart quantity"
18277
  msgstr ""
18278
 
18279
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:172
18280
  msgid "By total cart quantity table"
18281
  msgstr ""
18282
 
18283
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:186
18284
  #: includes/shipping/class-wc-shipping-wcj-custom.php:116
18285
  msgid "Cost calculation type."
18286
  msgstr ""
18287
 
18288
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:187
18289
  #: includes/shipping/class-wc-shipping-wcj-custom.php:97
18290
  #: includes/shipping/class-wc-shipping-wcj-custom.php:116
18291
  msgid "By Total Cart Quantity Table"
18292
  msgstr ""
18293
 
18294
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:196
18295
  #: includes/shipping/class-wc-shipping-wcj-custom.php:124
18296
  msgid ""
18297
  "Cost. If calculating by weight - then cost per one weight unit. If "
18298
  "calculating by quantity - then cost per one piece."
18299
  msgstr ""
18300
 
18301
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:202
18302
  #: includes/shipping/class-wc-shipping-wcj-custom.php:130
18303
  msgid "Min Weight"
18304
  msgstr ""
18305
 
18306
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:204
18307
  #: includes/shipping/class-wc-shipping-wcj-custom.php:132
18308
  msgid "Minimum total cart weight. Set zero to disable."
18309
  msgstr ""
18310
 
18311
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:211
18312
  #: includes/shipping/class-wc-shipping-wcj-custom.php:138
18313
  msgid "Max Weight"
18314
  msgstr ""
18315
 
18316
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:213
18317
  #: includes/shipping/class-wc-shipping-wcj-custom.php:140
18318
  msgid "Maximum total cart weight. Set zero to disable."
18319
  msgstr ""
18320
 
18321
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:220
18322
  msgid "Apply Formula and Shortcodes to Costs"
18323
  msgstr ""
18324
 
18325
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:221
18326
  #, php-format
18327
  msgid ""
18328
  "You can use %s and %s params in formula, e.g.: %s. Also you can use "
18329
  "shortcodes, e.g.: %s."
18330
  msgstr ""
18331
 
18332
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:230
18333
  #: includes/shipping/class-wc-shipping-wcj-custom.php:146
18334
  msgid "Table Total Rows"
18335
  msgstr ""
18336
 
18337
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:232
18338
  msgid ""
18339
  "Press \"Save changes\" and reload the page after you change this number."
18340
  msgstr ""
18371
  msgid "Attribute \"name\" is required!"
18372
  msgstr ""
18373
 
18374
+ #: includes/shortcodes/class-wcj-shortcodes-orders.php:333
18375
+ #, php-format
18376
+ msgid "Refund #%1$s - %2$s"
18377
+ msgstr ""
18378
+
18379
  #: includes/shortcodes/class-wcj-shortcodes-products-add-form.php:54
18380
  msgid "Product by User"
18381
  msgstr ""
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: algoritmika, anbinder, debugeris, karzin
3
  Tags: woocommerce, booster for woocommerce, woocommerce jetpack
4
  Requires at least: 4.4
5
  Tested up to: 5.2
6
- Stable tag: 4.4.1
7
  License: GNU General Public License v3.0
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -193,6 +193,44 @@ You can see the differences between versions in this [table](https://booster.io/
193
 
194
  == Changelog ==
195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  = 4.4.1 - 26/06/2019 =
197
  * Fix - SHIPPING & ORDERS - Custom Shipping - Fix missing custom shipping settings.
198
 
3
  Tags: woocommerce, booster for woocommerce, woocommerce jetpack
4
  Requires at least: 4.4
5
  Tested up to: 5.2
6
+ Stable tag: 4.5.0
7
  License: GNU General Public License v3.0
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
193
 
194
  == Changelog ==
195
 
196
+ = 4.5.0 - 05/09/2019 =
197
+ * Fix - Core - `WCJ_Modules` - Change the order some submodules are loaded to make it compatible with "Load Modules on Init Hook" option.
198
+ * Fix - EMAILS & MISC. - My Account - Fix custom page title on my account page changing the my account title on wp nav menu.
199
+ * Fix - EMAILS & MISC. - My Account - Fix compatibility problem with PublishPress plugin regarding `the_title` filter.
200
+ * Fix - PDF INVOICING & PACKING SLIPS - Email Options - Fix attachments not getting sent via email due to unsuccessful WP_Order class checking.
201
+ * Fix - PDF INVOICING & PACKING SLIPS - Make module compatible with "Load Modules on Init Hook" option.
202
+ * Fix - PDF INVOICING & PACKING SLIPS - Fix empty return on `bulk_actions_handle()`.
203
+ * Fix - Plugin update checker - Fix PHP warning 'strpos(): Non-string needles will be interpreted as strings in the future'.
204
+ * Fix - PAYMENT GATEWAYS - Gateways by Country, State or Postcode - Fix "Invalid payment method" error when using the postcodes option.
205
+ * Fix - PRODUCTS - Product Visibility by User Role - Fix search on ajax.
206
+ * Fix - PRODUCTS - Product Addons - Replace old method for setting price by correct one on `woocommerce_add_cart_item` and `woocommerce_get_cart_item_from_session`.
207
+ * Fix - PRODUCTS - Product Addons - Format order metadata properly.
208
+ * Fix - PRODUCTS - Product Addons - Fix "A non well formed numeric value" php warning on `price_change_ajax()`.
209
+ * Fix - PRICES & CURRENCIES - Multicurrency (Currency Switcher) - Fix Price Filter Widget step on Compatibility option.
210
+ * Fix - PRICES & CURRENCIES - Multicurrency (Currency Switcher) - Fix "A non well formed numeric value" php warning on `change_price()`.
211
+ * Fix - SHIPPING & ORDERS - Custom Shipping - Improve performance of Custom Shipping Zones.
212
+ * Fix - Shortcodes - Orders - `[wcj_order_refunds_table]` - `columns` - `refund_title` param fixed.
213
+ * Dev - Core - `WCJ_Module` - Create `get_option()` method to get an option from database or from the class itself for performance reasons.
214
+ * Dev - CART & CHECKOUT - Checkout Custom Fields - Allow fields to be updated from order admin edit page.
215
+ * Dev - CART & CHECKOUT - Checkout Fees - Add Overlap field.
216
+ * Dev - CART & CHECKOUT - Checkout Fees - Add Cart Min field.
217
+ * Dev - CART & CHECKOUT - Checkout Fees - Add Cart Max field.
218
+ * Dev - CART & CHECKOUT - Checkout Fees - Add Priority field.
219
+ * Dev - EMAILS & MISC. - Booster WPML - General Options - Add new option 'Auto Switch Booster Currency' to automatically switch Booster currency according to WPML.
220
+ * Dev - PRICES & CURRENCIES - Multicurrency (Currency Switcher) - Price Filter Widget Compatibility now works with `wcj_multicurrency_per_product_enabled` option enabled.
221
+ * Dev - PRICES & CURRENCIES - Multicurrency (Currency Switcher) - Change `wcj_multicurrency_compatibility_wc_price_filter` option default value from 'yes' to 'no'
222
+ * Dev - PRICES & CURRENCIES - Multicurrency (Currency Switcher) - Create new option to make the "Sort By Price" work with `wcj_multicurrency_per_product_enabled` option enabled.
223
+ * Dev - PRICES & CURRENCIES - Multicurrency (Currency Switcher) - Create new option to save min and max prices on currency rate update via background processing.
224
+ * Dev - PRICES & CURRENCIES - Multicurrency (Currency Switcher) - Add new compatibility option with native WooCommerce coupons.
225
+ * Dev - PRODUCTS - Cost of Goods - Price Fields - Add 'Profit Percentage Type' option to choose between 'Margin' and 'Markup' values.
226
+ * Dev - PRODUCTS - Product Addons - Add option to ignore strike-through price on AJAX update. If a product has both regular and sale prices, only the sale price will be updated on AJAX. The regular price will be ignored.
227
+ * Dev - PRODUCTS - Product Input Fields - Add option to preserve line breaks on admin and frontend.
228
+ * Dev - Shortcodes - Orders - `[wcj_order_refunds_table]` - `columns` - `refund_date` param added.
229
+ * Dev - Orders Shortcodes - Add param `plus_fees` for `[wcj_order_subtotal_plus_shipping]` shortcode.
230
+ * Dev - Functions - Orders - Add `wcj_get_order_fees_total()` and `wcj_get_order_fees_total_tax()`.
231
+ * Dev - Functions - General - Add option to overwrite WooCommerce IP detection method by Booster.
232
+ * Tweak - Functions - General - Change default options from `wcj_general_advanced_ip_detection` on `wcj_get_the_ip()` function to 'REMOTE_ADDR', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR'.
233
+
234
  = 4.4.1 - 26/06/2019 =
235
  * Fix - SHIPPING & ORDERS - Custom Shipping - Fix missing custom shipping settings.
236
 
woocommerce-jetpack.php CHANGED
@@ -3,13 +3,13 @@
3
  Plugin Name: Booster for WooCommerce
4
  Plugin URI: https://booster.io
5
  Description: Supercharge your WooCommerce site with these awesome powerful features. More than 100 modules. All in one WooCommerce plugin.
6
- Version: 4.4.1
7
  Author: Algoritmika Ltd
8
  Author URI: https://booster.io
9
  Text Domain: woocommerce-jetpack
10
  Domain Path: /langs
11
  Copyright: © 2019 Algoritmika Ltd.
12
- WC tested up to: 3.6
13
  License: GNU General Public License v3.0
14
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
  */
@@ -57,7 +57,7 @@ final class WC_Jetpack {
57
  * @var string
58
  * @since 2.4.7
59
  */
60
- public $version = '4.4.1';
61
 
62
  /**
63
  * @var WC_Jetpack The single instance of the class
3
  Plugin Name: Booster for WooCommerce
4
  Plugin URI: https://booster.io
5
  Description: Supercharge your WooCommerce site with these awesome powerful features. More than 100 modules. All in one WooCommerce plugin.
6
+ Version: 4.5.0
7
  Author: Algoritmika Ltd
8
  Author URI: https://booster.io
9
  Text Domain: woocommerce-jetpack
10
  Domain Path: /langs
11
  Copyright: © 2019 Algoritmika Ltd.
12
+ WC tested up to: 3.7
13
  License: GNU General Public License v3.0
14
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
  */
57
  * @var string
58
  * @since 2.4.7
59
  */
60
+ public $version = '4.5.0';
61
 
62
  /**
63
  * @var WC_Jetpack The single instance of the class