Booster for WooCommerce - Version 5.6.2

Version Description

27/07/2022 =

  • NEW FEATURE - PDF INVOICING & PACKING SLIPS - PDF Invoicing - Added a new shortcode Attribute to exclude tax in order to refund the Total. [wcj_order_shipping_price excl_tax="yes" ]
  • FIXED - SHIPPING & ORDERS - Maximum Products per User - Remove Max product per user meta from product while duplicating Product.
  • FIXED - EMAILS & MISC. - Export - Escape the html content from the "Additional Export Orders Fields" value.
  • FIXED - EMAILS & MISC. - Export - Array to string conversion for the "Additional Export Products Fields" value.
  • FIXED - PHP Warning: Undefined array key "path" in /includes/functions/wcj-functions-booster-core.php ...
  • FIXED - Added Security vulnerability fixes.
  • WooCommerce 6.7.0 tested
  • WordPress 6.0.1 tested
Download this release

Release Info

Developer ronyp
Plugin Icon 128x128 Booster for WooCommerce
Version 5.6.2
Comparing to
See all releases

Code changes from version 5.6.1 to 5.6.2

Files changed (225) hide show
  1. includes/add-to-cart/class-wcj-add-to-cart-per-product.php +8 -3
  2. includes/admin/class-wc-settings-jetpack.php +339 -295
  3. includes/admin/class-wcj-settings-custom-fields.php +14 -10
  4. includes/admin/class-wcj-settings-manager.php +21 -17
  5. includes/admin/class-wcj-tools.php +15 -7
  6. includes/admin/class-wcj-welcome.php +12 -5
  7. includes/admin/wcj-welcome-screen-content.php +13 -9
  8. includes/class-wcj-add-to-cart-button-visibility.php +0 -0
  9. includes/class-wcj-add-to-cart.php +0 -0
  10. includes/class-wcj-address-formats.php +0 -0
  11. includes/class-wcj-admin-bar.php +0 -0
  12. includes/class-wcj-admin-orders-list.php +41 -21
  13. includes/class-wcj-admin-products-list.php +0 -0
  14. includes/class-wcj-admin-tools.php +9 -5
  15. includes/class-wcj-breadcrumbs.php +0 -0
  16. includes/class-wcj-call-for-price.php +0 -0
  17. includes/class-wcj-cart-customization.php +0 -0
  18. includes/class-wcj-cart.php +0 -0
  19. includes/class-wcj-checkout-core-fields.php +0 -0
  20. includes/class-wcj-checkout-custom-fields.php +14 -9
  21. includes/class-wcj-checkout-custom-info.php +0 -0
  22. includes/class-wcj-checkout-customization.php +5 -5
  23. includes/class-wcj-checkout-fees.php +13 -4
  24. includes/class-wcj-checkout-files-upload.php +87 -82
  25. includes/class-wcj-coupon-by-user-role.php +4 -4
  26. includes/class-wcj-coupon-code-generator.php +7 -3
  27. includes/class-wcj-cross-sells.php +13 -8
  28. includes/class-wcj-crowdfunding.php +6 -6
  29. includes/{class-wcj-currency.php → class-wcj-currencies.php} +0 -0
  30. includes/class-wcj-currency-exchange-rates.php +7 -5
  31. includes/class-wcj-currency-per-product.php +18 -11
  32. includes/class-wcj-custom-php.php +11 -6
  33. includes/class-wcj-debug-tools.php +13 -6
  34. includes/class-wcj-emails-verification.php +13 -13
  35. includes/class-wcj-empty-cart-button.php +6 -2
  36. includes/class-wcj-eu-vat-number.php +21 -13
  37. includes/class-wcj-export-import.php +42 -18
  38. includes/class-wcj-general.php +15 -7
  39. includes/class-wcj-global-discount.php +30 -25
  40. includes/class-wcj-max-products-per-user.php +23 -10
  41. includes/class-wcj-multicurrency-product-base-price.php +10 -10
  42. includes/class-wcj-multicurrency.php +74 -61
  43. includes/class-wcj-my-account.php +32 -23
  44. includes/class-wcj-offer-price.php +30 -25
  45. includes/class-wcj-old-slugs.php +13 -6
  46. includes/class-wcj-order-custom-statuses.php +7 -7
  47. includes/class-wcj-order-numbers.php +20 -9
  48. includes/class-wcj-order-quantities.php +7 -3
  49. includes/class-wcj-orders.php +27 -13
  50. includes/class-wcj-payment-gateways-by-country.php +13 -13
  51. includes/class-wcj-payment-gateways-currency.php +14 -7
  52. includes/class-wcj-payment-gateways-fees.php +6 -7
  53. includes/class-wcj-payment-gateways-min-max.php +4 -4
  54. includes/class-wcj-payment-gateways-per-category.php +13 -10
  55. includes/class-wcj-payment-gateways.php +13 -11
  56. includes/class-wcj-pdf-invoicing.php +22 -16
  57. includes/class-wcj-price-by-country.php +12 -7
  58. includes/class-wcj-price-by-user-role.php +35 -24
  59. includes/class-wcj-price-labels.php +9 -7
  60. includes/class-wcj-product-add-to-cart.php +24 -14
  61. includes/class-wcj-product-addons.php +32 -31
  62. includes/class-wcj-product-bookings.php +47 -35
  63. includes/class-wcj-product-bulk-meta-editor.php +50 -41
  64. includes/class-wcj-product-bulk-price-converter.php +47 -27
  65. includes/class-wcj-product-by-country.php +12 -12
  66. includes/class-wcj-product-by-date.php +3 -4
  67. includes/class-wcj-product-by-time.php +3 -4
  68. includes/class-wcj-product-by-user-role.php +4 -3
  69. includes/class-wcj-product-by-user.php +29 -26
  70. includes/class-wcj-product-custom-info.php +10 -10
  71. includes/class-wcj-product-custom-visibility.php +10 -5
  72. includes/class-wcj-product-info.php +10 -9
  73. includes/class-wcj-product-input-fields.php +6 -6
  74. includes/class-wcj-product-listings.php +6 -5
  75. includes/class-wcj-product-msrp.php +18 -13
  76. includes/class-wcj-product-open-pricing.php +33 -17
  77. includes/class-wcj-product-price-by-formula.php +18 -20
  78. includes/class-wcj-product-tabs.php +134 -121
  79. includes/class-wcj-products-per-page.php +23 -15
  80. includes/class-wcj-products-xml.php +22 -22
  81. includes/class-wcj-purchase-data.php +23 -19
  82. includes/class-wcj-related-products.php +38 -38
  83. includes/class-wcj-reports.php +25 -22
  84. includes/class-wcj-sale-flash.php +3 -3
  85. includes/class-wcj-shipping-by-cities.php +15 -5
  86. includes/class-wcj-shipping-by-order-amount.php +5 -4
  87. includes/class-wcj-shipping-by-order-qty.php +6 -4
  88. includes/class-wcj-shipping-by-products.php +9 -9
  89. includes/class-wcj-shipping-by-time.php +7 -7
  90. includes/class-wcj-shipping-by-user-role.php +3 -3
  91. includes/class-wcj-shipping-calculator.php +3 -3
  92. includes/{class-wcj-shipping-description.php → class-wcj-shipping-descriptions.php} +3 -3
  93. includes/class-wcj-shipping-icons.php +2 -2
  94. includes/class-wcj-shipping-options.php +6 -6
  95. includes/class-wcj-shipping.php +3 -3
  96. includes/class-wcj-sku.php +36 -34
  97. includes/class-wcj-sorting.php +14 -10
  98. includes/class-wcj-tax-display.php +18 -14
  99. includes/class-wcj-template-editor.php +6 -6
  100. includes/class-wcj-track-users.php +36 -36
  101. includes/class-wcj-upsells.php +7 -7
  102. includes/class-wcj-url-coupons.php +7 -3
  103. includes/class-wcj-wholesale-price.php +7 -7
  104. includes/class-wcj-wpml.php +7 -5
  105. includes/classes/class-wcj-invoice.php +7 -6
  106. includes/classes/class-wcj-module-product-by-condition.php +18 -19
  107. includes/classes/class-wcj-module-shipping-by-condition.php +3 -4
  108. includes/classes/class-wcj-module.php +34 -29
  109. includes/classes/class-wcj-pdf-invoice.php +23 -22
  110. includes/classes/class-wcj-shortcodes.php +18 -12
  111. includes/classes/class-wcj-widget.php +3 -3
  112. includes/core/class-wcj-admin.php +5 -1
  113. includes/core/wcj-loader.php +2 -2
  114. includes/core/wcj-modules.php +3 -3
  115. includes/core/wcj-options.php +2 -2
  116. includes/css/admin-style.css +2 -1
  117. includes/css/wcj-offer-price.css +0 -4
  118. includes/emails/class-wc-email-wcj-custom.php +5 -5
  119. includes/emails/email-html.php +2 -1
  120. includes/emails/email-plain.php +2 -1
  121. includes/exchange-rates/class-wcj-exchange-rates.php +21 -14
  122. includes/export/class-wcj-exporter-customers.php +5 -4
  123. includes/export/class-wcj-exporter-orders.php +33 -14
  124. includes/export/class-wcj-exporter-products.php +10 -2
  125. includes/functions/wcj-functions-admin.php +7 -3
  126. includes/functions/wcj-functions-booster-core.php +9 -6
  127. includes/functions/wcj-functions-date-time.php +7 -6
  128. includes/functions/wcj-functions-debug.php +5 -5
  129. includes/functions/wcj-functions-eu-vat.php +3 -3
  130. includes/functions/wcj-functions-exchange-rates.php +6 -4
  131. includes/functions/wcj-functions-general.php +64 -57
  132. includes/functions/wcj-functions-html.php +3 -3
  133. includes/functions/wcj-functions-invoicing.php +9 -9
  134. includes/functions/wcj-functions-number-to-words-lt.php +4 -4
  135. includes/functions/wcj-functions-number-to-words.php +4 -4
  136. includes/functions/wcj-functions-orders.php +3 -3
  137. includes/functions/wcj-functions-price-currency.php +5 -3
  138. includes/functions/wcj-functions-products.php +12 -12
  139. includes/functions/wcj-functions-reports.php +8 -8
  140. includes/gateways/class-wc-gateway-wcj-custom.php +2 -2
  141. includes/input-fields/class-wcj-product-input-fields-core.php +50 -28
  142. includes/js/admin-script.js +10 -2
  143. includes/js/wcj-admin.js +7 -8
  144. includes/js/wcj-ajax-exchange-rates-average.js +5 -2
  145. includes/js/wcj-ajax-exchange-rates.js +4 -2
  146. includes/js/wcj-bookings.js +5 -3
  147. includes/js/wcj-cart-customization.js +4 -2
  148. includes/js/wcj-checkout-core-fields.js +3 -2
  149. includes/js/wcj-checkout-custom-fields.js +4 -2
  150. includes/js/wcj-checkout-fees.js +4 -2
  151. includes/js/wcj-checkout.js +7 -4
  152. includes/js/wcj-coupons-code-generator.js +4 -2
  153. includes/js/wcj-custom-tabs-yoast-seo.js +4 -2
  154. includes/js/wcj-datepicker.js +10 -7
  155. includes/js/wcj-disable-quantity.js +5 -3
  156. includes/js/wcj-eu-vat-number.js +15 -14
  157. includes/js/wcj-new_desing.js +5 -6
  158. includes/js/wcj-offer-price.js +14 -13
  159. includes/js/wcj-order-quantities.js +10 -5
  160. includes/js/wcj-pdf-invoicing.js +5 -3
  161. includes/js/wcj-price-by-user-role-admin.js +4 -2
  162. includes/js/wcj-product-addons.js +13 -8
  163. includes/js/wcj-product-input-fields.js +9 -0
  164. includes/js/wcj-shipping-calculator.js +4 -2
  165. includes/js/wcj-timepicker.js +4 -1
  166. includes/js/wcj-track-users.js +4 -3
  167. includes/js/wcj-variations-frontend.js +9 -8
  168. includes/js/wcj-wSelect.js +5 -2
  169. includes/js/wcj-weekpicker.js +6 -4
  170. includes/pdf-invoices/class-wcj-pdf-invoicing-renumerate-tool.php +16 -16
  171. includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php +32 -29
  172. includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-display.php +7 -7
  173. includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-styling.php +9 -5
  174. includes/price-by-country/class-wcj-price-by-country-core.php +198 -168
  175. includes/price-by-country/class-wcj-price-by-country-group-generator.php +36 -22
  176. includes/price-by-country/class-wcj-price-by-country-local.php +75 -43
  177. includes/reports/class-wcj-currency-reports.php +14 -11
  178. includes/reports/{wcj-class-reports-customers.php → class-wcj-reports-customers.php} +5 -1
  179. includes/reports/{wcj-class-reports-monthly-sales.php → class-wcj-reports-monthly-sales.php} +19 -11
  180. includes/reports/{wcj-class-reports-sales-daily.php → class-wcj-reports-product-sales-daily.php} +15 -7
  181. includes/reports/{wcj-class-reports-sales.php → class-wcj-reports-sales.php} +24 -13
  182. includes/reports/{wcj-class-reports-stock.php → class-wcj-reports-stock.php} +4 -3
  183. includes/reports/wcj-class-reports-sales-gateways.php +24 -12
  184. includes/settings/meta-box/wcj-settings-meta-box-price-by-user-role.php +3 -2
  185. includes/settings/pdf-invoicing/wcj-content-template-credit_note.php +2 -1
  186. includes/settings/pdf-invoicing/wcj-content-template-custom_doc.php +2 -1
  187. includes/settings/pdf-invoicing/wcj-content-template-invoice.php +2 -1
  188. includes/settings/pdf-invoicing/wcj-content-template-packing_slip.php +2 -1
  189. includes/settings/pdf-invoicing/wcj-content-template-proforma_invoice.php +2 -1
  190. includes/settings/wcj-settings-admin-orders-list.php +2 -2
  191. includes/settings/wcj-settings-admin-tools.php +3 -3
  192. includes/settings/wcj-settings-checkout-files-upload.php +4 -4
  193. includes/settings/wcj-settings-cross-sells.php +2 -2
  194. includes/settings/wcj-settings-left-to-free-shipping.php +5 -5
  195. includes/settings/wcj-settings-my-account.php +3 -3
  196. includes/settings/wcj-settings-offer-price.php +4 -4
  197. includes/settings/wcj-settings-order-min-amount.php +5 -5
  198. includes/settings/wcj-settings-price-by-country.php +4 -4
  199. includes/settings/wcj-settings-product-custom-info.php +4 -3
  200. includes/settings/wcj-settings-product-input-fields.php +3 -3
  201. includes/settings/wcj-settings-product-price-by-formula.php +3 -3
  202. includes/settings/wcj-settings-product-tabs.php +4 -3
  203. includes/settings/wcj-settings-products-per-page.php +2 -2
  204. includes/settings/wcj-settings-products-xml.php +1 -1
  205. includes/settings/wcj-settings-related-products.php +1 -1
  206. includes/settings/wcj-settings-sku.php +2 -2
  207. includes/settings/wcj-settings-stock.php +3 -3
  208. includes/settings/wcj-settings-template-editor.php +3 -2
  209. includes/shipping/{class-wc-shipping-wcj-custom.php → class-wc-shipping-wcj-custom-template.php} +0 -0
  210. includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php +3 -3
  211. includes/shortcodes/class-wcj-general-shortcodes.php +18 -19
  212. includes/shortcodes/class-wcj-invoices-shortcodes.php +11 -2
  213. includes/shortcodes/class-wcj-order-items-shortcodes.php +16 -11
  214. includes/shortcodes/class-wcj-orders-shortcodes.php +11 -9
  215. includes/shortcodes/class-wcj-products-add-form-shortcodes.php +7 -4
  216. includes/shortcodes/class-wcj-products-crowdfunding-shortcodes.php +14 -14
  217. includes/shortcodes/class-wcj-products-shortcodes.php +13 -14
  218. includes/templates/wcj-empty.php +10 -0
  219. includes/tools/class-wcj-eu-countries-vat-rates-tool.php +16 -8
  220. includes/tools/class-wcj-order-statuses-tool.php +28 -14
  221. langs/woocommerce-jetpack.pot +1024 -1017
  222. readme.txt +13 -2
  223. version-details.json +6 -0
  224. version-details.txt +0 -5
  225. woocommerce-jetpack.php +4 -4
includes/add-to-cart/class-wcj-add-to-cart-per-product.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce Add to Cart per Product
4
  *
5
- * @version 2.7.0
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -71,12 +71,15 @@ if ( ! class_exists( 'WCJ_Add_To_Cart_Per_Product' ) ) :
71
  /**
72
  * Save_custom_add_to_cart_meta_box.
73
  *
 
 
74
  * @param int $post_id Get post Id.
75
  * @param Array $post Get post.
76
  */
77
  public function save_custom_add_to_cart_meta_box( $post_id, $post ) {
 
78
  // Check that we are saving with custom add to cart metabox displayed.
79
- if ( ! isset( $_POST['woojetpack_custom_add_to_cart_save_post'] ) ) {
80
  return;
81
  }
82
  $option_name = 'wcj_custom_add_to_cart_local_single';
@@ -103,6 +106,8 @@ if ( ! class_exists( 'WCJ_Add_To_Cart_Per_Product' ) ) :
103
 
104
  /**
105
  * Create_custom_add_to_cart_meta_box.
 
 
106
  */
107
  public function create_custom_add_to_cart_meta_box() {
108
 
@@ -138,7 +143,7 @@ if ( ! class_exists( 'WCJ_Add_To_Cart_Per_Product' ) ) :
138
  }
139
  $html .= '</table>';
140
  $html .= '<input type="hidden" name="woojetpack_custom_add_to_cart_save_post" value="woojetpack_custom_add_to_cart_save_post">';
141
- echo $html;
142
  }
143
  }
144
 
2
  /**
3
  * Booster for WooCommerce Add to Cart per Product
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
71
  /**
72
  * Save_custom_add_to_cart_meta_box.
73
  *
74
+ * @version 5.6.2
75
+ *
76
  * @param int $post_id Get post Id.
77
  * @param Array $post Get post.
78
  */
79
  public function save_custom_add_to_cart_meta_box( $post_id, $post ) {
80
+ $nonce = wp_verify_nonce( wp_unslash( isset( $_POST['woocommerce_meta_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['woocommerce_meta_nonce'] ) ) : '' ), 'woocommerce_save_data' );
81
  // Check that we are saving with custom add to cart metabox displayed.
82
+ if ( ! $nonce || ! isset( $_POST['woojetpack_custom_add_to_cart_save_post'] ) ) {
83
  return;
84
  }
85
  $option_name = 'wcj_custom_add_to_cart_local_single';
106
 
107
  /**
108
  * Create_custom_add_to_cart_meta_box.
109
+ *
110
+ * @version 5.6.2
111
  */
112
  public function create_custom_add_to_cart_meta_box() {
113
 
143
  }
144
  $html .= '</table>';
145
  $html .= '<input type="hidden" name="woojetpack_custom_add_to_cart_save_post" value="woojetpack_custom_add_to_cart_save_post">';
146
+ echo wp_kses_post( $html );
147
  }
148
  }
149
 
includes/admin/class-wc-settings-jetpack.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings
4
  *
5
- * @version 5.6.1
6
  * @since 1.0.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/admin
@@ -59,22 +59,24 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
59
  /**
60
  * Wcj_new_desing_dashboard.
61
  *
62
- * @version 5.5.6
63
  * @since 5.5.6
64
  */
65
  public function wcj_new_desing_dashboard() {
66
-
67
- if ( isset( $_GET['tab'] ) && 'jetpack' === $_GET['tab'] ) {
68
- wp_enqueue_style( 'wcj-admin-wcj-new_desing', wcj_plugin_url() . '/includes/css/admin-style.css' );
 
 
 
69
  wp_enqueue_script( 'wcj-admin-script', wcj_plugin_url() . '/includes/js/admin-script.js', array( 'jquery' ), '5.0.0', true );
70
- // wp_enqueue_script('wcj-admin-dasboard-js', wcj_plugin_url() . '/includes/js/wcj-new_desing.js').
71
  }
72
  }
73
 
74
  /**
75
  * Create_free_version_notice_about_plus.
76
  *
77
- * @version 5.6.1
78
  * @since 5.3.0
79
  */
80
  public function create_free_version_notice_about_plus() {
@@ -87,7 +89,7 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
87
  $booster_icon = '<span class="wcj-booster-logo"></span>';
88
  ?>
89
  <style>
90
- .wcj-booster-logo { width: 19px; height: 19px; display: inline-block; background: url('https://ps.w.org/woocommerce-jetpack/assets/icon-128x128.png?rev=1813426') center/cover; vertical-align: middle; position: relative; top: -1px; margin: 0 6px 0 0; }
91
  </style>
92
  <?php
93
  echo wp_kses_post( '<div class="' . $class . '"><p>' . $booster_icon . $message . '</p></div>' );
@@ -96,7 +98,7 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
96
  /**
97
  * Create_free_version_footer_review_notice.
98
  *
99
- * @version 5.6.1
100
  * @since 5.3.0
101
  */
102
  public function create_free_version_footer_review_notice() {
@@ -107,18 +109,19 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
107
  $link = 'https://wordpress.org/support/plugin/woocommerce-jetpack/reviews/?filter=5#new-post';
108
  $star = '<span class="wcj-review-icon dashicons dashicons-star-filled"></span>';
109
  $stars_link = '<a href="' . $link . '" target="_blank">' . $star . $star . $star . $star . $star . '</a>';
110
- $message = sprintf( __( 'Please rate <strong>Booster for WooCommerce</strong> %s on <a href="%s" target="_blank">WordPress.org</a> to help us spread the word. Thank you from Booster team!', 'woocommerce-jetpack' ), $stars_link, $link );
 
111
  ?>
112
  <style>
113
- .wcj-review-icon { vertical-align: middle; margin: -6px 0 0 0; }
114
- </style>
115
  <?php
116
  // echo '<div class="' . $class . '"><p>' . $message . '</p></div>';.
117
  }
118
  /**
119
  * Create_pro_version_footer_review_notice.
120
  *
121
- * @version 5.6.1
122
  * @since 5.3.1
123
  */
124
  public function create_pro_version_footer_review_notice() {
@@ -166,10 +169,10 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
166
  $star = '<span class="wcj-review-icon dashicons dashicons-star-filled"></span>';
167
  $stars_link = '<a href="' . $link . '" target="_blank">' . $star . $star . $star . $star . $star . '</a>';
168
  /* translators: %s: search term */
169
- $message = sprintf( __( 'Please rate <strong>Booster for WooCommerce</strong> %s on <a href="%s" target="_blank">WordPress.org</a> to help us spread the word. Thank you from Booster team!', 'woocommerce-jetpack' ), $stars_link, $link );
170
  ?>
171
- <style>
172
- .wcj-review-icon { vertical-align: middle; margin: -6px 0 0 0; }
173
  </style>
174
  <?php
175
  echo wp_kses_post( '<div class="' . $class . '"><p>' . $message . '</p></div>' );
@@ -189,25 +192,29 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
189
  /**
190
  * Output cats
191
  *
192
- * @version 5.5.6
193
  */
194
  public function output_cats_submenu() {
195
  global $current_section;
196
- $current_cat = empty( $_REQUEST['wcj-cat'] ) ? 'dashboard' : sanitize_title( $_REQUEST['wcj-cat'] );
 
 
 
 
197
  if ( empty( $this->cats ) ) {
198
  return;}
199
  echo '<ul class="wcj-dashboard-header">';
200
  $array_keys = array_keys( $this->cats );
201
  foreach ( $this->cats as $id => $label_info ) {
202
  $dashboard_section = '';
203
- if ( $id == 'dashboard' ) {
204
  $dashboard_section = '&section=by_category';
205
  }
206
  echo wp_kses_post(
207
- '<li class="wcj-header-item ' . ( $current_cat == $id ? 'active' : '' ) . '"><a
208
  href="' . admin_url( 'admin.php?page=wc-settings&tab=' . $this->id . '&wcj-cat=' . sanitize_title( $id ) . '' . $dashboard_section ) . '"
209
- class="' . ( $current_cat == $id ? 'current' : '' ) . '">' . $label_info['label'] . '</a> ' .
210
- ( end( $array_keys ) == $id ? '' : '' ) . ' </li>'
211
  );
212
  }
213
  echo '</ul> <br class="clear" />';
@@ -216,16 +223,20 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
216
  /**
217
  * Output sections (modules) sub menu.
218
  *
219
- * @version 5.5.6
220
  * @todo (maybe) for case insensitive sorting: `array_multisort( array_map( 'strtolower', $menu ), $menu );` instead of `asort( $menu );` (see http://php.net/manual/en/function.asort.php)
221
  */
222
  public function output_sections_submenu() {
223
  global $current_section;
224
- $sections = $this->get_sections();
225
- $current_cat = empty( $_REQUEST['wcj-cat'] ) ? 'dashboard' : sanitize_title( $_REQUEST['wcj-cat'] );
 
 
 
 
226
  if ( 'dashboard' === $current_cat ) {
227
 
228
- // Counting modules
229
  $all = 0;
230
  $active = 0;
231
  foreach ( $this->module_statuses as $module_status ) {
@@ -248,13 +259,13 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
248
  $sections[ $custom_dashboard_module_id ] = $custom_dashboard_module_data['title'];
249
  }
250
  }
251
- if ( '' == $current_section ) {
252
  $current_section = 'by_category';
253
  }
254
  }
255
  if ( ! empty( $this->cats[ $current_cat ]['all_cat_ids'] ) ) {
256
  foreach ( $sections as $id => $label ) {
257
- if ( ! in_array( $id, $this->cats[ $current_cat ]['all_cat_ids'] ) ) {
258
  unset( $sections[ $id ] );
259
  }
260
  }
@@ -279,7 +290,7 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
279
 
280
  foreach ( $menu as $id => $label ) {
281
  $url = admin_url( 'admin.php?page=wc-settings&tab=' . $this->id . '&wcj-cat=' . $current_cat . '&section=' . sanitize_title( $id ) );
282
- $menu_links[] = '<li class="wcj-sidebar-item ' . ( $current_section == $id ? 'active' : '' ) . '"><a href="' . $url . '" class="' . ( $current_section == $id ? 'current' : '' ) . '">' . $label . '</a></li>';
283
  }
284
  echo wp_kses_post( implode( ' ', $menu_links ) . '<br class="clear" />' );
285
  }
@@ -291,7 +302,7 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
291
  public function get_cat_by_section( $section ) {
292
  foreach ( $this->cats as $id => $label_info ) {
293
  if ( ! empty( $label_info['all_cat_ids'] ) ) {
294
- if ( in_array( $section, $label_info['all_cat_ids'] ) ) {
295
  return $id;
296
  }
297
  }
@@ -332,28 +343,28 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
332
  /**
333
  * Output the settings.
334
  *
335
- * @version 5.6.1
336
  * @todo (maybe) admin_notices
337
  */
338
  public function output() {
339
 
340
  global $current_section, $wcj_notice;
341
 
342
- if ( '' != $wcj_notice ) {
343
  echo wp_kses_post( '<div id="wcj_message" class="updated"><p><strong>' . $wcj_notice . '</strong></p></div>' );
344
  }
345
- if ( $current_section !== 'by_category' ) {
346
- $is_dashboard = $this->is_dashboard_section( $current_section );
347
-
348
  // Deprecated message.
349
- if ( $replacement_module = wcj_is_module_deprecated( $current_section ) ) {
350
  echo '<div id="wcj_message" class="error">';
351
  echo '<p>';
352
  echo '<strong>';
353
  echo wp_kses_post(
354
  sprintf(
355
  /* translators: %s: search term */
356
- __( 'Please note that current <em>%s</em> module is deprecated and will be removed in future updates. Please use <em>%s</em> module instead.', 'woocommerce-jetpack' ),
357
  w_c_j()->modules[ $current_section ]->short_desc,
358
  '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=jetpack&wcj-cat=' . $replacement_module['cat'] . '&section=' . $replacement_module['module'] ) . '">' .
359
  $replacement_module['title'] . '</a>'
@@ -370,6 +381,7 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
370
  echo '<div id="wcj_message" class="error">';
371
  echo '<p>';
372
  echo '<strong>';
 
373
  echo wp_kses_post( sprintf( __( 'Please note that <em>%s</em> module is currently under development. Until stable module version is released, options can be changed or some options can be moved to paid plugin version.', 'woocommerce-jetpack' ), w_c_j()->modules[ $current_section ]->short_desc ) );
374
  echo '</strong>';
375
  echo '</p>';
@@ -393,8 +405,12 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
393
  break;
394
  }
395
  }
396
- if ( $is_dashboard && isset( $_GET['wcj-cat'] ) && 'dashboard' != $_GET['wcj-cat'] ) {
397
- $breadcrumbs_html .= $this->cats[ $_GET['wcj-cat'] ]['label'];
 
 
 
 
398
  }
399
  if ( ! $is_dashboard ) {
400
  $breadcrumbs_html .= ' > ';
@@ -419,12 +435,12 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
419
  /**
420
  * Output_dashboard.
421
  *
422
- * @version 5.6.1
423
  * @param array $current_section defines the current section.
424
  */
425
  public function output_dashboard( $current_section ) {
426
 
427
- if ( '' == $current_section ) {
428
  $current_section = 'by_category';
429
  }
430
 
@@ -433,7 +449,7 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
433
  echo wp_kses_post( '<h3>' . $the_settings[0]['title'] . '</h3>' );
434
  if ( isset( $this->custom_dashboard_modules[ $current_section ] ) ) {
435
  echo wp_kses_post( '<p>' . $this->custom_dashboard_modules[ $current_section ]['desc'] . '</p>' );
436
- } elseif ( 'manager' != $current_section ) {
437
  echo wp_kses_post( '<p>' . $the_settings[0]['desc'] . '</p>' );
438
  } else {
439
  echo wp_kses_post( '<p>' . __( 'This section lets you export, import or reset all Booster\'s modules settings.', 'woocommerce-jetpack' ) . '</p>' );
@@ -446,8 +462,12 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
446
  if ( 'dashboard' === $cat_id ) {
447
  continue;
448
  }
449
- if ( isset( $_GET['wcj-cat'] ) && 'dashboard' != $_GET['wcj-cat'] ) {
450
- if ( $cat_id != $_GET['wcj-cat'] ) {
 
 
 
 
451
  continue;
452
  }
453
  } else {
@@ -548,7 +568,7 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
548
  /**
549
  * Output_dashboard_modules.
550
  *
551
- * @version 3.3.0
552
  * @param array $settings this defines title.
553
  * @param string $cat_id this defines title.
554
  */
@@ -558,20 +578,20 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
558
  <table class="wp-list-table widefat striped plugins">
559
  <thead>
560
  <tr>
561
- <th scope="col" id="cb" class="manage-column column-cb check-column" style=""><label class="screen-reader-text" for="cb-select-all-1"><?php _e( 'Select All', 'woocommerce-jetpack' ); ?></label><input id="cb-select-all-1" type="checkbox" style="margin-top:15px;"></th>
562
  <th scope="col" id="name" class="manage-column column-name" style="">
563
- <?php _e( 'Module', 'woocommerce-jetpack' ); ?></th>
564
  <th scope="col" id="description" class="manage-column column-description" style="">
565
- <?php _e( 'Description', 'woocommerce-jetpack' ); ?></th>
566
  </tr>
567
  </thead>
568
  <tfoot>
569
  <tr>
570
- <th scope="col" class="manage-column column-cb check-column" style=""><label class="screen-reader-text" for="cb-select-all-2"><?php _e( 'Select All', 'woocommerce-jetpack' ); ?></label><input id="cb-select-all-2" type="checkbox" style="margin-top:15px;"></th>
571
- <th scope="col" class="manage-column column-name" style=""><?php _e( 'Module', 'woocommerce-jetpack' ); ?>
572
  </th>
573
  <th scope="col" class="manage-column column-description" style="">
574
- <?php _e( 'Description', 'woocommerce-jetpack' ); ?></th>
575
  </tr>
576
  </tfoot>
577
  <tbody id="the-list">
@@ -589,12 +609,12 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
589
  if ( wcj_is_module_deprecated( $section, false, true ) ) {
590
  continue;
591
  }
592
- if ( '' != $cat_id ) {
593
  if ( 'active_modules_only' === $cat_id ) {
594
  if ( 'no' === wcj_get_option( $the_feature['id'], 'no' ) ) {
595
  continue;
596
  }
597
- } elseif ( $cat_id != $this->get_cat_by_section( $section ) ) {
598
  continue;
599
  }
600
  }
@@ -607,7 +627,7 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
607
  $html .= '<td class="plugin-title"><strong>' . $the_feature['title'] . '</strong>';
608
  $html .= '<div class="row-actions visible">';
609
  $html .= '<span class="0"><a href="' . admin_url() . 'admin.php?page=wc-settings&tab=jetpack&wcj-cat=' . $this->get_cat_by_section( $section ) . '&section=' . $section . '">' . __( 'Settings', 'woocommerce' ) . '</a></span>';
610
- if ( isset( $the_feature['wcj_link'] ) && '' != $the_feature['wcj_link'] ) {
611
  $html .= ' | <span class="0"><a href="' . $the_feature['wcj_link'] . '?utm_source=module_documentation&utm_medium=dashboard_link&utm_campaign=booster_documentation" target="_blank">' . __( 'Documentation', 'woocommerce' ) . '</a></span>';
612
  }
613
  $html .= '</div>';
@@ -618,15 +638,15 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
618
  $html .= '</tr>';
619
  }
620
  echo wp_kses_post( $html );
621
- if ( 0 == $total_modules && 'active_modules_only' === $cat_id ) {
622
  echo wp_kses_post( '<tr><td colspan="3"><em>' . __( 'No active modules found.', 'woocommerce-jetpack' ) . '</em></td></tr>' );
623
  }
624
  ?>
625
  </tbody>
626
  </table>
627
- <p style="color:#000;font-size:12px;font-style:italic;">
628
  <?php echo wp_kses_post( __( 'Total Modules:' ) . ' ' . $total_modules ); ?>
629
- </p>
630
  </div>
631
  <?php
632
  }
@@ -648,7 +668,7 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
648
  /**
649
  * Disable_autoload_options.
650
  *
651
- * @version 5.3.3
652
  * @since 5.3.3
653
  *
654
  * @param array $settings defines the settings.
@@ -658,23 +678,23 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
658
  $fields = wp_list_filter( $fields, array( 'type' => 'title' ), 'NOT' );
659
  $fields = wp_list_filter( $fields, array( 'type' => 'sectionend' ), 'NOT' );
660
  $field_ids = wp_list_pluck( $fields, 'id' );
661
- $fields_ids_str = '\'' . implode( '\',\'', $field_ids ) . '\'';
662
  global $wpdb;
663
- $sql = "
664
- UPDATE {$wpdb->options} SET autoload = 'no'
665
- WHERE option_name IN ({$fields_ids_str}) AND autoload != 'no'
666
- ";
667
- $wpdb->query( $sql );
668
  }
669
 
670
  /**
671
  * Booster_message_global.
672
  *
673
- * @version 3.6.0
674
  * @since 3.6.0
675
  */
676
  public function booster_message_global() {
677
- if ( '' != ( $message = apply_filters( 'booster_message', '', 'global' ) ) ) {
 
678
  echo wp_kses_post( $message );
679
  }
680
  }
@@ -682,7 +702,7 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
682
  /**
683
  * Get_manager_settings.
684
  *
685
- * @version 3.5.0
686
  * @since 2.6.0
687
  * @return array
688
  */
@@ -706,6 +726,7 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
706
  'title' => __( 'Use List Instead of Comma Separated Text for Products in Settings', 'woocommerce-jetpack' ),
707
  'type' => 'checkbox',
708
  'desc' => sprintf(
 
709
  __( 'Supported modules: %s.', 'woocommerce-jetpack' ),
710
  implode(
711
  ', ',
@@ -726,6 +747,7 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
726
  'title' => __( 'Use List Instead of Comma Separated Text for Products Categories in Settings', 'woocommerce-jetpack' ),
727
  'type' => 'checkbox',
728
  'desc' => sprintf(
 
729
  __( 'Supported modules: %s.', 'woocommerce-jetpack' ),
730
  implode(
731
  ', ',
@@ -741,6 +763,7 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
741
  'title' => __( 'Use List Instead of Comma Separated Text for Products Tags in Settings', 'woocommerce-jetpack' ),
742
  'type' => 'checkbox',
743
  'desc' => sprintf(
 
744
  __( 'Supported modules: %s.', 'woocommerce-jetpack' ),
745
  implode(
746
  ', ',
@@ -754,11 +777,13 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
754
  ),
755
  );
756
  }
 
757
  /**
758
  * Get settings array
759
  *
760
- * @version 3.0.0
761
- * @return array $current_section defines the current section.
 
762
  */
763
  public function get_settings( $current_section = '' ) {
764
  if ( ! $this->is_dashboard_section( $current_section ) ) {
@@ -768,7 +793,11 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
768
  } elseif ( isset( $this->custom_dashboard_modules[ $current_section ] ) ) {
769
  return $this->custom_dashboard_modules[ $current_section ]['settings'];
770
  } else {
771
- $cat_id = ( isset( $_GET['wcj-cat'] ) && '' != $_GET['wcj-cat'] ) ? $_GET['wcj-cat'] : 'dashboard';
 
 
 
 
772
  $settings[] = array(
773
  'title' => __( 'Booster for WooCommerce', 'woocommerce-jetpack' ) . ' - ' . $this->cats[ $cat_id ]['label'],
774
  'type' => 'title',
@@ -800,20 +829,32 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
800
 
801
  /**
802
  * Add_module_statuses.
 
 
803
  */
804
  public function add_module_statuses( $statuses ) {
805
  $this->module_statuses = $statuses;
806
  }
807
 
 
 
 
808
  public function version_details() {
809
 
810
- $file = wcj_free_plugin_path() . '/version-details.txt';
811
- if ( file_exists( $file ) ) {
812
 
813
- $doc = file_get_contents( $file );
814
- $line = explode( "\n", $doc );
815
- foreach ( $line as $newline ) {
816
- echo wp_kses_post( $newline . '<br>' );
 
 
 
 
 
 
 
 
817
  }
818
  }
819
 
@@ -822,257 +863,260 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
822
  /**
823
  * Dasboard_menu.
824
  *
825
- * @version 5.5.6
826
- * @return array
827
  */
828
  public function dasboard_menu() {
829
  global $current_section;
830
- $_section = isset( $_GET['section'] ) ? $_GET['section'] : '';
831
- $_wcj_cat = isset( $_GET['wcj-cat'] ) ? $_GET['wcj-cat'] : '';
832
- $_wcj_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : '';
833
- if ( $_wcj_tab == 'jetpack' && ( $_section == '' || $_section == 'by_category' ) && ( $_wcj_cat == '' || $_wcj_cat == 'dashboard' ) ) {
 
 
 
 
834
  ?>
835
  <style>
836
  button.button-primary.woocommerce-save-button {
837
- display: none;
838
  }
839
- </style>
840
  <?php
841
  }
842
  ?>
843
  <div class="wcj-main-container dashboard">
844
- <div class="wcj-body">
845
- <section class="wcj-sidebar">
846
- <div class="wcj-dashboard-logo">
847
- <img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/logo.png'; ?>">
848
- </div>
849
- <div class="wcj-nav-sidebar">
850
- <ul>
851
- <?php echo wp_kses_post( $this->output_sections_submenu() ); ?>
852
- <a href="https://booster.io/contact-us/" class="wcj-button" target="_blank"><?php _e( 'Need Help?', 'woocommerce-jetpack' ); ?><span><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/need-help.png'; ?>"></span></a>
853
- </ul>
854
- </div>
855
- </section>
856
- <section class="wcj-body-container wcj-setting-jetpack">
857
- <header>
858
- <?php echo wp_kses_post( $this->output_cats_submenu() ); ?>
859
- </header>
860
- <div class="wcj-setting-jetpack-body
861
- <?php
862
- if ( $_section === 'pdf_invoicing_extra_columns' ) {
863
  echo 'wcj_invoice_pdf_dtl';}
864
  ?>
865
  " style="
866
- <?php
867
- if ( $_section === 'by_category' ) {
868
- echo 'display:none;';
869
- }if ( $_wcj_tab == 'jetpack' && $_wcj_cat == '' ) {
870
- echo 'padding: 0px;';}
871
- ?>
872
- ">
873
- <?php if ( $current_section === 'by_category' ) { ?>
874
- </div>
875
- <div class="wcj-body-part">
876
  <div class="wcj-sub-cnt-top">
877
- <div class="wcj-sub-cnt-top-left">
878
- <div class="wcj-tit">
879
- <h1><?php _e( 'My Account', 'woocommerce-jetpack' ); ?></h1>
 
 
 
 
880
  </div>
881
- </div>
882
- <div class="wcj-btn-main">
883
- <a href="https://booster.io/buy-booster/" class="wcj-button" target="_blank"><?php _e( 'Get Booster Plus', 'woocommerce-jetpack' ); ?></a>
884
- </div>
885
  </div>
886
  <div class="wcj-body-sec-part-main">
887
- <div class="wcj-body-parts wcj-body-left">
888
- <div class="wcj-info-section wcj-box">
889
- <div class="wcj-tit">
890
- <h3><?php _e( 'Getting Started', 'woocommerce-jetpack' ); ?></h3>
891
- </div>
892
- <ul class="wcj-dashboard-info-ul">
893
- <li><a target="_blank" href="https://booster.io/docs/dashboard"><?php _e( 'Dashboard', 'woocommerce-jetpack' ); ?></a></li>
894
- <li><a target="_blank" href="https://booster.io/docs/how-to-navigate-through-booster-categories-and-modules-smoothly"><?php _e( 'Navigating Categories', 'woocommerce-jetpack' ); ?></a></li>
895
- <li><a target="_blank" href="https://booster.io/docs/how-to-get-started-with-booster"><?php _e( 'How to get started with booster', 'woocommerce-jetpack' ); ?></a></li>
896
- </ul>
897
- </div>
898
- <div class="wcj-faq-section wcj-box">
899
- <div class="wcj-tit">
900
- <h3><?php _e( 'Frequently Asked Questions', 'woocommerce-jetpack' ); ?></h3>
901
- </div>
902
- <div class="wcj-faq-body">
903
- <div class="wcj-faq-sing-box">
904
- <div class="wcj-accordion">
905
- <h6><?php _e( 'Do I need to have coding skills to use Booster Plus?', 'woocommerce-jetpack' ); ?></h6>
906
- <span><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/down-arw.png'; ?>"></span>
907
- </div>
908
- <div class="wcj-panel">
909
- <p><?php _e( 'Absolutely not. You can configure pretty much everything Booster Plus has to offer without any coding knowledge.', 'woocommerce-jetpack' ); ?></p>
910
- </div>
911
- </div>
912
- <div class="wcj-faq-sing-box">
913
- <div class="wcj-accordion">
914
- <h6><?php _e( 'Will Booster Plus slow down my website?', 'woocommerce-jetpack' ); ?></h6>
915
- <span><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/down-arw.png'; ?>"></span>
916
- </div>
917
- <div class="wcj-panel">
918
- <p><?php _e( 'Absolutely not. Booster Plus is carefully built with performance in mind.', 'woocommerce-jetpack' ); ?></p>
919
- </div>
920
- </div>
921
- <div class="wcj-faq-sing-box">
922
- <div class="wcj-accordion">
923
- <h6><?php _e( 'Do you offer refunds?', 'woocommerce-jetpack' ); ?></h6>
924
- <span><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/down-arw.png'; ?>"></span>
925
- </div>
926
- <div class="wcj-panel">
927
- <p><?php _e( 'If you are not completely satisfied with Booster Plus within the fist 30 days, you can request a refund and we will give you 100% of your money back – no questions asked.', 'woocommerce-jetpack' ); ?></p>
928
- </div>
929
- </div>
930
- <div class="wcj-faq-sing-box">
931
- <div class="wcj-accordion">
932
- <h6><?php _e( 'Can I use Booster Plus on client sites?', 'woocommerce-jetpack' ); ?></h6>
933
- <span><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/down-arw.png'; ?>"></span>
934
- </div>
935
- <div class="wcj-panel">
936
- <p><?php _e( 'Yes, you can use Booster Plus on client sites. You can purchase the multiple sites license of Booster Plus.', 'woocommerce-jetpack' ); ?></p>
937
- </div>
938
- </div>
939
- <div class="wcj-faq-sing-box">
940
- <div class="wcj-accordion">
941
- <h6><?php _e( 'Do you have an affiliate program?', 'woocommerce-jetpack' ); ?></h6>
942
- <span><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/down-arw.png'; ?>"></span>
943
- </div>
944
- <div class="wcj-panel">
945
- <p><?php _e( 'Yes, We do have an affiliate program. ', 'woocommerce-jetpack' ); ?><a href="https://booster.io/affiliate-program/" target="_blannk"><?php _e( 'Click here', 'woocommerce-jetpack' ); ?></a><?php _e( ' for the details.', 'woocommerce-jetpack' ); ?></p>
946
- </div>
947
- </div>
948
- <div class="wcj-faq-sing-box">
949
- <div class="wcj-accordion">
950
- <h6><?php _e( 'Why should I choose the Booster Plus suite over other individual plugins?', 'woocommerce-jetpack' ); ?></h6>
951
- <span><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/down-arw.png'; ?>"></span>
952
- </div>
953
- <div class="wcj-panel">
954
- <p><?php _e( "Oh, that's an easy one! Implementing just a few modules from the Booster Plus suite is more cost-effective than using dozens of individual plugins often priced at $15-$30 each. On top of that, stacking your site with a lot of different plugins can make it bloated and slow. What's worse, all those individual plugins don't always play nice together. But Booster Plus is the solution to all that nonsense. The Booster Plus suite features over 100 compatible modules that allow you to add custom features and functionality to your WooCommerce site easily.", 'woocommerce-jetpack' ); ?></p>
955
- </div>
956
  </div>
957
- <div class="wcj-faq-sing-box">
958
- <div class="wcj-accordion">
959
- <h6><?php _e( 'What features does Booster Plus have?', 'woocommerce-jetpack' ); ?></h6>
960
- <span><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/down-arw.png'; ?>"></span>
961
- </div>
962
- <div class="wcj-panel">
963
- <p><?php _e( 'You can see all the features at ', 'woocommerce-jetpack' ); ?><a href="https://booster.io/about/" target="_blank"><?php _e( 'About Booster', 'woocommerce-jetpack' ); ?></a><?php _e( ' page.', 'woocommerce-jetpack' ); ?></p>
964
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
965
  </div>
966
- <div class="wcj-additional-que">
967
- <h6><?php _e( 'Still have a question?', 'woocommerce-jetpack' ); ?></h6>
968
- <a href="https://booster.io/contact-us/" class="wcj-button" target="_blank"><?php _e( 'CONTACT BOOSTER SUPPORT', 'woocommerce-jetpack' ); ?></a>
 
 
 
 
 
 
 
 
 
 
 
 
969
  </div>
970
  </div>
971
- </div>
972
- <div class="wcj-social-connect wcj-box">
973
- <div class="wcj-tit">
974
- <h3><?php _e( 'Connect with Booster', 'woocommerce-jetpack' ); ?></h3>
975
- </div>
976
- <div class="wcj-socialmedia-connect">
977
- <div class="wcj-btn-main">
978
- <a href="https://booster.io/" class="wcj-button" target="_blank"><?php _e( 'BOOSTER WEBSITE', 'woocommerce-jetpack' ); ?></a>
979
- </div>
980
- <ul class="wcj-social-icn">
981
- <li><a href="https://www.youtube.com/channel/UCVQg0c4XIirUI3UnGoX9HVg?sub_confirmation=1"><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/YouTube.png'; ?>"></a></li>
982
- <li><a href="https://www.facebook.com/booster.for.woocommerce"><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/Facebook.png'; ?>"></a></li>
983
- <li><a href="https://twitter.com/intent/follow?screen_name=BoosterForWoo"><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/Twitter.png'; ?>"></a></li>
984
- <li><a href="https://www.linkedin.com/company/booster-for-woocommerce"><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/Linkedin.png'; ?>"></a></li>
985
- </ul>
986
- </div>
987
- </div>
988
- </div>
989
  <div class="wcj-body-parts wcj-body-right">
990
- <div class="wcj-partitions action-section">
991
  <div class="wcj-tit">
992
- <h3><?php _e( 'Actions', 'woocommerce-jetpack' ); ?></h3>
993
  </div>
994
  <div class="wcj-action-sub-part">
995
- <div class="wcj-action-sub-sing-box">
996
- <div class="wcj-action-single-bx">
997
- <div class="wcj-action-sub-sing-icon">
998
- <img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/ArrowSquareIn.png'; ?>">
999
- </div>
1000
- <div class="wcj-actions-part">
1001
- <input type="file" name="booster_import_settings_file">
1002
- <h6><button style="width:100px;" class="button-primary" type="submit" name="booster_import_settings"><?php _e( 'Import', 'woocommerce-jetpack' ); ?></button></h6>
1003
- <p><?php _e( 'Import Booster options', 'woocommerce-jetpack' ); ?></p>
1004
- </div>
1005
- </div>
1006
- <div class="wcj-action-single-bx">
1007
  <div class="wcj-action-sub-sing-icon">
1008
- <img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/Export.png'; ?>">
1009
  </div>
1010
  <div class="wcj-actions-part">
1011
- <h6><button style="width:100px;" class="button-primary wcj-export-btn" type="submit" name="booster_export_settings"><?php _e( 'Export', 'woocommerce-jetpack' ); ?></button></h6>
1012
- <p><?php _e( 'Export Booster options', 'woocommerce-jetpack' ); ?></p>
 
1013
  </div>
1014
- </div>
1015
- </div>
1016
- <div class="wcj-action-sub-sing-box">
1017
  <div class="wcj-action-single-bx">
1018
- <div class="wcj-action-sub-sing-icon">
1019
- <img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/Repeat.png'; ?>">
1020
- </div>
1021
- <div class="wcj-actions-part">
1022
- <h6><button style="width:100px;" class="button-primary" type="submit" name="booster_reset_settings" onclick="return confirm('This will reset settings to defaults for all Booster modules. Are you sure?')"><?php _e( 'Reset', 'woocommerce-jetpack' ); ?></button></h6>
1023
- <p><?php _e( "Reset all Booster's options", 'woocommerce-jetpack' ); ?></p>
1024
- </div>
1025
- </div>
1026
- <div class="wcj-action-single-bx">
1027
  <div class="wcj-action-sub-sing-icon">
1028
- <img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/RepeatOnce.png'; ?>">
1029
  </div>
1030
  <div class="wcj-actions-part">
1031
- <h6><button style="width:100px;" class="button-primary" type="submit" name="booster_reset_settings_meta" onclick="return confirm('This will delete all Booster meta. Are you sure?')"><?php _e( 'Reset meta', 'woocommerce-jetpack' ); ?></button></h6>
1032
- <p><?php _e( "Reset all Booster's meta", 'woocommerce-jetpack' ); ?></p>
1033
  </div>
1034
- </div>
1035
  </div>
1036
- </div>
1037
  </div>
1038
- <div class="wcj-partitions documentation-section">
1039
- <div class="wcj-tit">
1040
- <h3><?php _e( 'Documentation', 'woocommerce-jetpack' ); ?></h3>
1041
- </div>
1042
- <div class="wcj-documentation-dtl">
1043
- <div class="wcj-documentation-icon">
1044
- <img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/documentation.png'; ?>">
 
 
1045
  </div>
1046
- <div class="wcj-documentation-sm-rh-dtl">
1047
- <p><?php _e( 'Here you can find all documentation of Booster', 'woocommerce-jetpack' ); ?></p>
1048
- <div class="wcj-btn-main">
1049
- <a href="https://booster.io/docs/" class="wcj-button" target="_blank"><?php _e( 'See Documentation', 'woocommerce-jetpack' ); ?></a>
1050
- </div>
 
 
 
1051
  </div>
1052
  </div>
1053
- </div>
1054
- <div class="wcj-partitions updates-section">
1055
- <div class="wcj-tit">
1056
- <h3><?php _e( 'Latest updates', 'woocommerce-jetpack' ); ?></h3>
 
 
 
 
 
 
 
 
 
 
 
1057
  </div>
1058
- <div class="wcj-partitions-sub-dtl">
1059
- <h6><?php _e( 'Version ', 'woocommerce-jetpack' ); ?><?php echo wp_kses_post( w_c_j()->version ); ?></h6>
1060
- <ul class="wcj-updates-ul">
 
 
 
 
 
 
1061
  <li><?php $this->version_details(); ?></li>
1062
- </ul>
1063
- <div class="wcj-btn-main">
1064
- <a href="https://booster.io/changelog/" class="wcj-button" target="_blank"><?php _e( 'SEE MORE', 'woocommerce-jetpack' ); ?></a>
1065
- </div>
1066
  </div>
1067
- </div>
1068
- </div>
1069
  </div>
1070
- </div>
1071
- </section>
1072
- </div>
1073
- <div class="wcj-footer">
 
 
1074
  <div class="wcj-review-footer">
1075
- <p><?php _e( 'Please rate ', 'woocommerce-jetpack' ); ?><strong><?php _e( 'Booster for Woocommerce', 'woocommerce-jetpack' ); ?></strong>
1076
  <span class="wcj-woo-star">
1077
  <img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/star.png'; ?>">
1078
  <img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/star.png'; ?>">
@@ -1080,23 +1124,23 @@ if ( ! class_exists( 'WC_Settings_Jetpack' ) ) :
1080
  <img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/star.png'; ?>">
1081
  <img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/star.png'; ?>">
1082
  </span>
1083
- <strong><a href="https://wordpress.org/support/plugin/woocommerce-jetpack/reviews/?rate=5#new-post" target="_blank"><?php _e( 'WordPress.org', 'woocommerce-jetpack' ); ?></a></strong><?php _e( ' to help us spread the word. Thank you from Booster team!', 'woocommerce-jetpack' ); ?>
1084
  </p>
1085
- </div>
1086
- <div class="wcj-review-footer wcj-premium-features-footer">
1087
- <h6><?php _e( 'Upgrade today to unlock these popular premium features:', 'woocommerce-jetpack' ); ?></h6>
1088
  <ul>
1089
- <li><strong><?php _e( '+ PDF Invoices and Packing slips –', 'woocommerce-jetpack' ); ?></strong><?php _e( 'Add ability to create Proforma Invoices, Credit Notes and Packaging slips', 'woocommerce-jetpack' ); ?></li>
1090
- <li><strong><?php _e( '+ Empty Cart –', 'woocommerce-jetpack' ); ?></strong><?php _e( 'customize empty cart button text, different button positions on cart page', 'woocommerce-jetpack' ); ?></li>
1091
- <li><strong><?php _e( '+ Cart and checkout –', 'woocommerce-jetpack' ); ?></strong><?php _e( 'add multiple – custom fields, custom info blocks, check out file uploads', 'woocommerce-jetpack' ); ?></li>
1092
- <li><strong><?php _e( '+ Mini cart –', 'woocommerce-jetpack' ); ?></strong><?php _e( 'More custom information options', 'woocommerce-jetpack' ); ?> </li>
1093
- <li><strong><?php _e( '+ Prices and currencies –', 'woocommerce-jetpack' ); ?></strong><?php _e( 'add more unlimited number of currencies to WooCommerce', 'woocommerce-jetpack' ); ?> </li>
1094
- <li><strong><?php _e( '+ Export options –', 'woocommerce-jetpack' ); ?></strong><?php _e( 'more fields enabled', 'woocommerce-jetpack' ); ?> </li>
1095
- <li><strong><?php _e( '+ Add to cart –', 'woocommerce-jetpack' ); ?></strong><?php _e( 'customize add to cart messages, Button labels - multiple category groups allowed+ +', 'woocommerce-jetpack' ); ?></li>
1096
- <li><?php _e( '+ More configuration options for payments and shipping', 'woocommerce-jetpack' ); ?></li>
1097
  </ul>
1098
  <div class="wcj-btn-main">
1099
- <a href="https://booster.io/buy-booster/" class="wcj-button" target="_blank"><?php _e( 'Upgrade to Booster Plus', 'woocommerce-jetpack' ); ?></a>
1100
  </div>
1101
  </div>
1102
  </div>
2
  /**
3
  * Booster for WooCommerce - Settings
4
  *
5
+ * @version 5.6.2
6
  * @since 1.0.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/admin
59
  /**
60
  * Wcj_new_desing_dashboard.
61
  *
62
+ * @version 5.6.2
63
  * @since 5.5.6
64
  */
65
  public function wcj_new_desing_dashboard() {
66
+ $wpnonce = true;
67
+ if ( function_exists( 'wp_verify_nonce' ) ) {
68
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
69
+ }
70
+ if ( $wpnonce && isset( $_GET['tab'] ) && 'jetpack' === $_GET['tab'] ) {
71
+ wp_enqueue_style( 'wcj-admin-wcj-new_desing', wcj_plugin_url() . '/includes/css/admin-style.css', array(), w_c_j()->version );
72
  wp_enqueue_script( 'wcj-admin-script', wcj_plugin_url() . '/includes/js/admin-script.js', array( 'jquery' ), '5.0.0', true );
 
73
  }
74
  }
75
 
76
  /**
77
  * Create_free_version_notice_about_plus.
78
  *
79
+ * @version 5.6.2
80
  * @since 5.3.0
81
  */
82
  public function create_free_version_notice_about_plus() {
89
  $booster_icon = '<span class="wcj-booster-logo"></span>';
90
  ?>
91
  <style>
92
+ .wcj-booster-logo { width: 19px; height: 19px; display: inline-block; background: url('https://ps.w.org/woocommerce-jetpack/assets/icon-128x128.png?rev=1813426') center/cover; vertical-align: middle; position: relative; top: -1px; margin: 0 6px 0 0; }
93
  </style>
94
  <?php
95
  echo wp_kses_post( '<div class="' . $class . '"><p>' . $booster_icon . $message . '</p></div>' );
98
  /**
99
  * Create_free_version_footer_review_notice.
100
  *
101
+ * @version 5.6.2
102
  * @since 5.3.0
103
  */
104
  public function create_free_version_footer_review_notice() {
109
  $link = 'https://wordpress.org/support/plugin/woocommerce-jetpack/reviews/?filter=5#new-post';
110
  $star = '<span class="wcj-review-icon dashicons dashicons-star-filled"></span>';
111
  $stars_link = '<a href="' . $link . '" target="_blank">' . $star . $star . $star . $star . $star . '</a>';
112
+ /* translators: %s: search term */
113
+ $message = sprintf( __( 'Please rate <strong>Booster for WooCommerce</strong> %1$s on <a href="%2$s" target="_blank">WordPress.org</a> to help us spread the word. Thank you from Booster team!', 'woocommerce-jetpack' ), $stars_link, $link );
114
  ?>
115
  <style>
116
+ .wcj-review-icon { vertical-align: middle; margin: -6px 0 0 0; }
117
+ </style>
118
  <?php
119
  // echo '<div class="' . $class . '"><p>' . $message . '</p></div>';.
120
  }
121
  /**
122
  * Create_pro_version_footer_review_notice.
123
  *
124
+ * @version 5.6.2
125
  * @since 5.3.1
126
  */
127
  public function create_pro_version_footer_review_notice() {
169
  $star = '<span class="wcj-review-icon dashicons dashicons-star-filled"></span>';
170
  $stars_link = '<a href="' . $link . '" target="_blank">' . $star . $star . $star . $star . $star . '</a>';
171
  /* translators: %s: search term */
172
+ $message = sprintf( __( 'Please rate <strong>Booster for WooCommerce</strong> %1$s on <a href="%2$s" target="_blank">WordPress.org</a> to help us spread the word. Thank you from Booster team!', 'woocommerce-jetpack' ), $stars_link, $link );
173
  ?>
174
+ <style>
175
+ .wcj-review-icon { vertical-align: middle; margin: -6px 0 0 0; }
176
  </style>
177
  <?php
178
  echo wp_kses_post( '<div class="' . $class . '"><p>' . $message . '</p></div>' );
192
  /**
193
  * Output cats
194
  *
195
+ * @version 5.6.2
196
  */
197
  public function output_cats_submenu() {
198
  global $current_section;
199
+ $wpnonce = true;
200
+ if ( function_exists( 'wp_verify_nonce' ) ) {
201
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
202
+ }
203
+ $current_cat = $wpnonce && empty( $_REQUEST['wcj-cat'] ) ? 'dashboard' : sanitize_title( wp_unslash( $_REQUEST['wcj-cat'] ) );
204
  if ( empty( $this->cats ) ) {
205
  return;}
206
  echo '<ul class="wcj-dashboard-header">';
207
  $array_keys = array_keys( $this->cats );
208
  foreach ( $this->cats as $id => $label_info ) {
209
  $dashboard_section = '';
210
+ if ( 'dashboard' === $id ) {
211
  $dashboard_section = '&section=by_category';
212
  }
213
  echo wp_kses_post(
214
+ '<li class="wcj-header-item ' . ( $current_cat === $id ? 'active' : '' ) . '"><a
215
  href="' . admin_url( 'admin.php?page=wc-settings&tab=' . $this->id . '&wcj-cat=' . sanitize_title( $id ) . '' . $dashboard_section ) . '"
216
+ class="' . ( $current_cat === $id ? 'current' : '' ) . '">' . $label_info['label'] . '</a> ' .
217
+ ( end( $array_keys ) === $id ? '' : '' ) . ' </li>'
218
  );
219
  }
220
  echo '</ul> <br class="clear" />';
223
  /**
224
  * Output sections (modules) sub menu.
225
  *
226
+ * @version 5.6.2
227
  * @todo (maybe) for case insensitive sorting: `array_multisort( array_map( 'strtolower', $menu ), $menu );` instead of `asort( $menu );` (see http://php.net/manual/en/function.asort.php)
228
  */
229
  public function output_sections_submenu() {
230
  global $current_section;
231
+ $sections = $this->get_sections();
232
+ $wpnonce = true;
233
+ if ( function_exists( 'wp_verify_nonce' ) ) {
234
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
235
+ }
236
+ $current_cat = $wpnonce && empty( $_REQUEST['wcj-cat'] ) ? 'dashboard' : sanitize_title( wp_unslash( $_REQUEST['wcj-cat'] ) );
237
  if ( 'dashboard' === $current_cat ) {
238
 
239
+ // Counting modules.
240
  $all = 0;
241
  $active = 0;
242
  foreach ( $this->module_statuses as $module_status ) {
259
  $sections[ $custom_dashboard_module_id ] = $custom_dashboard_module_data['title'];
260
  }
261
  }
262
+ if ( '' === $current_section ) {
263
  $current_section = 'by_category';
264
  }
265
  }
266
  if ( ! empty( $this->cats[ $current_cat ]['all_cat_ids'] ) ) {
267
  foreach ( $sections as $id => $label ) {
268
+ if ( ! in_array( $id, $this->cats[ $current_cat ]['all_cat_ids'], true ) ) {
269
  unset( $sections[ $id ] );
270
  }
271
  }
290
 
291
  foreach ( $menu as $id => $label ) {
292
  $url = admin_url( 'admin.php?page=wc-settings&tab=' . $this->id . '&wcj-cat=' . $current_cat . '&section=' . sanitize_title( $id ) );
293
+ $menu_links[] = '<li class="wcj-sidebar-item ' . ( $current_section === $id ? 'active' : '' ) . '"><a href="' . $url . '" class="' . ( $current_section === $id ? 'current' : '' ) . '">' . $label . '</a></li>';
294
  }
295
  echo wp_kses_post( implode( ' ', $menu_links ) . '<br class="clear" />' );
296
  }
302
  public function get_cat_by_section( $section ) {
303
  foreach ( $this->cats as $id => $label_info ) {
304
  if ( ! empty( $label_info['all_cat_ids'] ) ) {
305
+ if ( in_array( $section, $label_info['all_cat_ids'], true ) ) {
306
  return $id;
307
  }
308
  }
343
  /**
344
  * Output the settings.
345
  *
346
+ * @version 5.6.2
347
  * @todo (maybe) admin_notices
348
  */
349
  public function output() {
350
 
351
  global $current_section, $wcj_notice;
352
 
353
+ if ( '' !== $wcj_notice ) {
354
  echo wp_kses_post( '<div id="wcj_message" class="updated"><p><strong>' . $wcj_notice . '</strong></p></div>' );
355
  }
356
+ if ( 'by_category' !== $current_section ) {
357
+ $is_dashboard = $this->is_dashboard_section( $current_section );
358
+ $replacement_module = wcj_is_module_deprecated( $current_section );
359
  // Deprecated message.
360
+ if ( $replacement_module ) {
361
  echo '<div id="wcj_message" class="error">';
362
  echo '<p>';
363
  echo '<strong>';
364
  echo wp_kses_post(
365
  sprintf(
366
  /* translators: %s: search term */
367
+ __( 'Please note that current <em>%1$s</em> module is deprecated and will be removed in future updates. Please use <em>%2$s</em> module instead.', 'woocommerce-jetpack' ),
368
  w_c_j()->modules[ $current_section ]->short_desc,
369
  '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=jetpack&wcj-cat=' . $replacement_module['cat'] . '&section=' . $replacement_module['module'] ) . '">' .
370
  $replacement_module['title'] . '</a>'
381
  echo '<div id="wcj_message" class="error">';
382
  echo '<p>';
383
  echo '<strong>';
384
+ /* translators: %s: search term */
385
  echo wp_kses_post( sprintf( __( 'Please note that <em>%s</em> module is currently under development. Until stable module version is released, options can be changed or some options can be moved to paid plugin version.', 'woocommerce-jetpack' ), w_c_j()->modules[ $current_section ]->short_desc ) );
386
  echo '</strong>';
387
  echo '</p>';
405
  break;
406
  }
407
  }
408
+ $wpnonce = true;
409
+ if ( function_exists( 'wp_verify_nonce' ) ) {
410
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
411
+ }
412
+ if ( $wpnonce && $is_dashboard && isset( $_GET['wcj-cat'] ) && 'dashboard' !== $_GET['wcj-cat'] ) {
413
+ $breadcrumbs_html .= $this->cats[ sanitize_text_field( wp_unslash( $_GET['wcj-cat'] ) ) ]['label'];
414
  }
415
  if ( ! $is_dashboard ) {
416
  $breadcrumbs_html .= ' > ';
435
  /**
436
  * Output_dashboard.
437
  *
438
+ * @version 5.6.2
439
  * @param array $current_section defines the current section.
440
  */
441
  public function output_dashboard( $current_section ) {
442
 
443
+ if ( '' === $current_section ) {
444
  $current_section = 'by_category';
445
  }
446
 
449
  echo wp_kses_post( '<h3>' . $the_settings[0]['title'] . '</h3>' );
450
  if ( isset( $this->custom_dashboard_modules[ $current_section ] ) ) {
451
  echo wp_kses_post( '<p>' . $this->custom_dashboard_modules[ $current_section ]['desc'] . '</p>' );
452
+ } elseif ( 'manager' !== $current_section ) {
453
  echo wp_kses_post( '<p>' . $the_settings[0]['desc'] . '</p>' );
454
  } else {
455
  echo wp_kses_post( '<p>' . __( 'This section lets you export, import or reset all Booster\'s modules settings.', 'woocommerce-jetpack' ) . '</p>' );
462
  if ( 'dashboard' === $cat_id ) {
463
  continue;
464
  }
465
+ $wpnonce = true;
466
+ if ( function_exists( 'wp_verify_nonce' ) ) {
467
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
468
+ }
469
+ if ( $wpnonce && isset( $_GET['wcj-cat'] ) && 'dashboard' !== $_GET['wcj-cat'] ) {
470
+ if ( $cat_id !== $_GET['wcj-cat'] ) {
471
  continue;
472
  }
473
  } else {
568
  /**
569
  * Output_dashboard_modules.
570
  *
571
+ * @version 5.6.2
572
  * @param array $settings this defines title.
573
  * @param string $cat_id this defines title.
574
  */
578
  <table class="wp-list-table widefat striped plugins">
579
  <thead>
580
  <tr>
581
+ <th scope="col" id="cb" class="manage-column column-cb check-column" style=""><label class="screen-reader-text" for="cb-select-all-1"><?php esc_html_e( 'Select All', 'woocommerce-jetpack' ); ?></label><input id="cb-select-all-1" type="checkbox" style="margin-top:15px;"></th>
582
  <th scope="col" id="name" class="manage-column column-name" style="">
583
+ <?php esc_html_e( 'Module', 'woocommerce-jetpack' ); ?></th>
584
  <th scope="col" id="description" class="manage-column column-description" style="">
585
+ <?php esc_html_e( 'Description', 'woocommerce-jetpack' ); ?></th>
586
  </tr>
587
  </thead>
588
  <tfoot>
589
  <tr>
590
+ <th scope="col" class="manage-column column-cb check-column" style=""><label class="screen-reader-text" for="cb-select-all-2"><?php esc_html_e( 'Select All', 'woocommerce-jetpack' ); ?></label><input id="cb-select-all-2" type="checkbox" style="margin-top:15px;"></th>
591
+ <th scope="col" class="manage-column column-name" style=""><?php esc_html_e( 'Module', 'woocommerce-jetpack' ); ?>
592
  </th>
593
  <th scope="col" class="manage-column column-description" style="">
594
+ <?php esc_html_e( 'Description', 'woocommerce-jetpack' ); ?></th>
595
  </tr>
596
  </tfoot>
597
  <tbody id="the-list">
609
  if ( wcj_is_module_deprecated( $section, false, true ) ) {
610
  continue;
611
  }
612
+ if ( '' !== $cat_id ) {
613
  if ( 'active_modules_only' === $cat_id ) {
614
  if ( 'no' === wcj_get_option( $the_feature['id'], 'no' ) ) {
615
  continue;
616
  }
617
+ } elseif ( $cat_id !== $this->get_cat_by_section( $section ) ) {
618
  continue;
619
  }
620
  }
627
  $html .= '<td class="plugin-title"><strong>' . $the_feature['title'] . '</strong>';
628
  $html .= '<div class="row-actions visible">';
629
  $html .= '<span class="0"><a href="' . admin_url() . 'admin.php?page=wc-settings&tab=jetpack&wcj-cat=' . $this->get_cat_by_section( $section ) . '&section=' . $section . '">' . __( 'Settings', 'woocommerce' ) . '</a></span>';
630
+ if ( isset( $the_feature['wcj_link'] ) && '' !== $the_feature['wcj_link'] ) {
631
  $html .= ' | <span class="0"><a href="' . $the_feature['wcj_link'] . '?utm_source=module_documentation&utm_medium=dashboard_link&utm_campaign=booster_documentation" target="_blank">' . __( 'Documentation', 'woocommerce' ) . '</a></span>';
632
  }
633
  $html .= '</div>';
638
  $html .= '</tr>';
639
  }
640
  echo wp_kses_post( $html );
641
+ if ( 0 === $total_modules && 'active_modules_only' === $cat_id ) {
642
  echo wp_kses_post( '<tr><td colspan="3"><em>' . __( 'No active modules found.', 'woocommerce-jetpack' ) . '</em></td></tr>' );
643
  }
644
  ?>
645
  </tbody>
646
  </table>
647
+ <p style="color:#000;font-size:12px;font-style:italic;">
648
  <?php echo wp_kses_post( __( 'Total Modules:' ) . ' ' . $total_modules ); ?>
649
+ </p>
650
  </div>
651
  <?php
652
  }
668
  /**
669
  * Disable_autoload_options.
670
  *
671
+ * @version 5.6.2
672
  * @since 5.3.3
673
  *
674
  * @param array $settings defines the settings.
678
  $fields = wp_list_filter( $fields, array( 'type' => 'title' ), 'NOT' );
679
  $fields = wp_list_filter( $fields, array( 'type' => 'sectionend' ), 'NOT' );
680
  $field_ids = wp_list_pluck( $fields, 'id' );
681
+ $fields_ids_str = '"' . implode( '","', $field_ids ) . '"';
682
  global $wpdb;
683
+
684
+ if ( count( $field_ids ) > 0 ) {
685
+ $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->options} SET autoload = 'no' WHERE option_name IN (" . implode( ', ', array_fill( 0, count( $field_ids ), '%s' ) ) . ") AND autoload != 'no'", $field_ids ) ); // WPCS: db call ok and cache ok.
686
+ }
 
687
  }
688
 
689
  /**
690
  * Booster_message_global.
691
  *
692
+ * @version 5.6.2
693
  * @since 3.6.0
694
  */
695
  public function booster_message_global() {
696
+ $message = apply_filters( 'booster_message', '', 'global' );
697
+ if ( '' !== $message ) {
698
  echo wp_kses_post( $message );
699
  }
700
  }
702
  /**
703
  * Get_manager_settings.
704
  *
705
+ * @version5.6.2
706
  * @since 2.6.0
707
  * @return array
708
  */
726
  'title' => __( 'Use List Instead of Comma Separated Text for Products in Settings', 'woocommerce-jetpack' ),
727
  'type' => 'checkbox',
728
  'desc' => sprintf(
729
+ /* translators: %s: search term */
730
  __( 'Supported modules: %s.', 'woocommerce-jetpack' ),
731
  implode(
732
  ', ',
747
  'title' => __( 'Use List Instead of Comma Separated Text for Products Categories in Settings', 'woocommerce-jetpack' ),
748
  'type' => 'checkbox',
749
  'desc' => sprintf(
750
+ /* translators: %s: search term */
751
  __( 'Supported modules: %s.', 'woocommerce-jetpack' ),
752
  implode(
753
  ', ',
763
  'title' => __( 'Use List Instead of Comma Separated Text for Products Tags in Settings', 'woocommerce-jetpack' ),
764
  'type' => 'checkbox',
765
  'desc' => sprintf(
766
+ /* translators: %s: search term */
767
  __( 'Supported modules: %s.', 'woocommerce-jetpack' ),
768
  implode(
769
  ', ',
777
  ),
778
  );
779
  }
780
+
781
  /**
782
  * Get settings array
783
  *
784
+ * @version 5.6.2
785
+ * @param array $current_section defines the current section array.
786
+ * @return array $current_section defines the current section.
787
  */
788
  public function get_settings( $current_section = '' ) {
789
  if ( ! $this->is_dashboard_section( $current_section ) ) {
793
  } elseif ( isset( $this->custom_dashboard_modules[ $current_section ] ) ) {
794
  return $this->custom_dashboard_modules[ $current_section ]['settings'];
795
  } else {
796
+ $wpnonce = true;
797
+ if ( function_exists( 'wp_verify_nonce' ) ) {
798
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
799
+ }
800
+ $cat_id = $wpnonce && ( isset( $_GET['wcj-cat'] ) && '' !== $_GET['wcj-cat'] ) ? sanitize_text_field( wp_unslash( $_GET['wcj-cat'] ) ) : 'dashboard';
801
  $settings[] = array(
802
  'title' => __( 'Booster for WooCommerce', 'woocommerce-jetpack' ) . ' - ' . $this->cats[ $cat_id ]['label'],
803
  'type' => 'title',
829
 
830
  /**
831
  * Add_module_statuses.
832
+ *
833
+ * @param array $statuses All module statuses.
834
  */
835
  public function add_module_statuses( $statuses ) {
836
  $this->module_statuses = $statuses;
837
  }
838
 
839
+ /**
840
+ * Version_details.
841
+ */
842
  public function version_details() {
843
 
844
+ $file = wcj_plugin_url() . '/version-details.json';
 
845
 
846
+ $response = wp_remote_get(
847
+ $file,
848
+ array(
849
+ 'headers' => array(
850
+ 'Accept' => 'application/json',
851
+ ),
852
+ )
853
+ );
854
+ if ( ( ! is_wp_error( $response ) ) && ( 200 === wp_remote_retrieve_response_code( $response ) ) ) {
855
+ $response_body = json_decode( $response['body'] );
856
+ foreach ( $response_body as $key => $lines ) {
857
+ echo wp_kses_post( $lines . '<br>' );
858
  }
859
  }
860
 
863
  /**
864
  * Dasboard_menu.
865
  *
866
+ * @version 5.6.2
 
867
  */
868
  public function dasboard_menu() {
869
  global $current_section;
870
+ $wpnonce = true;
871
+ if ( function_exists( 'wp_verify_nonce' ) ) {
872
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
873
+ }
874
+ $_section = $wpnonce && isset( $_GET['section'] ) ? sanitize_text_field( wp_unslash( $_GET['section'] ) ) : '';
875
+ $_wcj_cat = $wpnonce && isset( $_GET['wcj-cat'] ) ? sanitize_text_field( wp_unslash( $_GET['wcj-cat'] ) ) : '';
876
+ $_wcj_tab = $wpnonce && isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : '';
877
+ if ( 'jetpack' === $_wcj_tab && ( '' === $_section || 'by_category' === $_section ) && ( '' === $_wcj_cat || 'dashboard' === $_wcj_cat ) ) {
878
  ?>
879
  <style>
880
  button.button-primary.woocommerce-save-button {
881
+ display: none;
882
  }
883
+ </style>
884
  <?php
885
  }
886
  ?>
887
  <div class="wcj-main-container dashboard">
888
+ <div class="wcj-body">
889
+ <section class="wcj-sidebar">
890
+ <div class="wcj-dashboard-logo">
891
+ <img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/logo.png'; ?>">
892
+ </div>
893
+ <div class="wcj-nav-sidebar">
894
+ <ul>
895
+ <?php echo wp_kses_post( $this->output_sections_submenu() ); ?>
896
+ <a href="https://booster.io/contact-us/" class="wcj-button" target="_blank"><?php esc_html_e( 'Need Help?', 'woocommerce-jetpack' ); ?><span><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/need-help.png'; ?>"></span></a>
897
+ </ul>
898
+ </div>
899
+ </section>
900
+ <section class="wcj-body-container wcj-setting-jetpack">
901
+ <header>
902
+ <?php echo wp_kses_post( $this->output_cats_submenu() ); ?>
903
+ </header>
904
+ <div class="wcj-setting-jetpack-body
905
+ <?php
906
+ if ( 'pdf_invoicing_extra_columns' === $_section ) {
907
  echo 'wcj_invoice_pdf_dtl';}
908
  ?>
909
  " style="
910
+ <?php
911
+ if ( 'by_category' === $_section ) {
912
+ echo 'display:none;';
913
+ }if ( 'jetpack' === $_wcj_tab && '' === $_wcj_cat ) {
914
+ echo 'padding: 0px;';}
915
+ ?>
916
+ ">
917
+ <?php if ( 'by_category' === $current_section ) { ?>
918
+ </div>
919
+ <div class="wcj-body-part">
920
  <div class="wcj-sub-cnt-top">
921
+ <div class="wcj-sub-cnt-top-left">
922
+ <div class="wcj-tit">
923
+ <h1><?php esc_html_e( 'My Account', 'woocommerce-jetpack' ); ?></h1>
924
+ </div>
925
+ </div>
926
+ <div class="wcj-btn-main">
927
+ <a href="https://booster.io/buy-booster/" class="wcj-button" target="_blank"><?php esc_html_e( 'Get Booster Plus', 'woocommerce-jetpack' ); ?></a>
928
  </div>
 
 
 
 
929
  </div>
930
  <div class="wcj-body-sec-part-main">
931
+ <div class="wcj-body-parts wcj-body-left">
932
+ <div class="wcj-info-section wcj-box">
933
+ <div class="wcj-tit">
934
+ <h3><?php esc_html_e( 'Getting Started', 'woocommerce-jetpack' ); ?></h3>
935
+ </div>
936
+ <ul class="wcj-dashboard-info-ul">
937
+ <li><a target="_blank" href="https://booster.io/docs/dashboard"><?php esc_html_e( 'Dashboard', 'woocommerce-jetpack' ); ?></a></li>
938
+ <li><a target="_blank" href="https://booster.io/docs/how-to-navigate-through-booster-categories-and-modules-smoothly"><?php esc_html_e( 'Navigating Categories', 'woocommerce-jetpack' ); ?></a></li>
939
+ <li><a target="_blank" href="https://booster.io/docs/how-to-get-started-with-booster"><?php esc_html_e( 'How to get started with booster', 'woocommerce-jetpack' ); ?></a></li>
940
+ </ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
941
  </div>
942
+ <div class="wcj-faq-section wcj-box">
943
+ <div class="wcj-tit">
944
+ <h3><?php esc_html_e( 'Frequently Asked Questions', 'woocommerce-jetpack' ); ?></h3>
945
+ </div>
946
+ <div class="wcj-faq-body">
947
+ <div class="wcj-faq-sing-box">
948
+ <div class="wcj-accordion">
949
+ <h6><?php esc_html_e( 'Do I need to have coding skills to use Booster Plus?', 'woocommerce-jetpack' ); ?></h6>
950
+ <span><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/down-arw.png'; ?>"></span>
951
+ </div>
952
+ <div class="wcj-panel">
953
+ <p><?php esc_html_e( 'Absolutely not. You can configure pretty much everything Booster Plus has to offer without any coding knowledge.', 'woocommerce-jetpack' ); ?></p>
954
+ </div>
955
+ </div>
956
+ <div class="wcj-faq-sing-box">
957
+ <div class="wcj-accordion">
958
+ <h6><?php esc_html_e( 'Will Booster Plus slow down my website?', 'woocommerce-jetpack' ); ?></h6>
959
+ <span><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/down-arw.png'; ?>"></span>
960
+ </div>
961
+ <div class="wcj-panel">
962
+ <p><?php esc_html_e( 'Absolutely not. Booster Plus is carefully built with performance in mind.', 'woocommerce-jetpack' ); ?></p>
963
+ </div>
964
+ </div>
965
+ <div class="wcj-faq-sing-box">
966
+ <div class="wcj-accordion">
967
+ <h6><?php esc_html_e( 'Do you offer refunds?', 'woocommerce-jetpack' ); ?></h6>
968
+ <span><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/down-arw.png'; ?>"></span>
969
+ </div>
970
+ <div class="wcj-panel">
971
+ <p><?php esc_html_e( 'If you are not completely satisfied with Booster Plus within the fist 30 days, you can request a refund and we will give you 100% of your money back – no questions asked.', 'woocommerce-jetpack' ); ?></p>
972
+ </div>
973
+ </div>
974
+ <div class="wcj-faq-sing-box">
975
+ <div class="wcj-accordion">
976
+ <h6><?php esc_html_e( 'Can I use Booster Plus on client sites?', 'woocommerce-jetpack' ); ?></h6>
977
+ <span><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/down-arw.png'; ?>"></span>
978
+ </div>
979
+ <div class="wcj-panel">
980
+ <p><?php esc_html_e( 'Yes, you can use Booster Plus on client sites. You can purchase the multiple sites license of Booster Plus.', 'woocommerce-jetpack' ); ?></p>
981
+ </div>
982
+ </div>
983
+ <div class="wcj-faq-sing-box">
984
+ <div class="wcj-accordion">
985
+ <h6><?php esc_html_e( 'Do you have an affiliate program?', 'woocommerce-jetpack' ); ?></h6>
986
+ <span><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/down-arw.png'; ?>"></span>
987
+ </div>
988
+ <div class="wcj-panel">
989
+ <p><?php esc_html_e( 'Yes, We do have an affiliate program. ', 'woocommerce-jetpack' ); ?><a href="https://booster.io/affiliate-program/" target="_blank"><?php esc_html_e( 'Click here', 'woocommerce-jetpack' ); ?></a><?php esc_html_e( ' for the details.', 'woocommerce-jetpack' ); ?></p>
990
+ </div>
991
+ </div>
992
+ <div class="wcj-faq-sing-box">
993
+ <div class="wcj-accordion">
994
+ <h6><?php esc_html_e( 'Why should I choose the Booster Plus suite over other individual plugins?', 'woocommerce-jetpack' ); ?></h6>
995
+ <span><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/down-arw.png'; ?>"></span>
996
+ </div>
997
+ <div class="wcj-panel">
998
+ <p><?php esc_html_e( "Oh, that's an easy one! Implementing just a few modules from the Booster Plus suite is more cost-effective than using dozens of individual plugins often priced at $15-$30 each. On top of that, stacking your site with a lot of different plugins can make it bloated and slow. What's worse, all those individual plugins don't always play nice together. But Booster Plus is the solution to all that nonsense. The Booster Plus suite features over 100 compatible modules that allow you to add custom features and functionality to your WooCommerce site easily.", 'woocommerce-jetpack' ); ?></p>
999
+ </div>
1000
+ </div>
1001
+ <div class="wcj-faq-sing-box">
1002
+ <div class="wcj-accordion">
1003
+ <h6><?php esc_html_e( 'What features does Booster Plus have?', 'woocommerce-jetpack' ); ?></h6>
1004
+ <span><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/down-arw.png'; ?>"></span>
1005
+ </div>
1006
+ <div class="wcj-panel">
1007
+ <p><?php esc_html_e( 'You can see all the features at ', 'woocommerce-jetpack' ); ?><a href="https://booster.io/about/" target="_blank"><?php esc_html_e( 'About Booster', 'woocommerce-jetpack' ); ?></a><?php esc_html_e( ' page.', 'woocommerce-jetpack' ); ?></p>
1008
+ </div>
1009
+ </div>
1010
+ <div class="wcj-additional-que">
1011
+ <h6><?php esc_html_e( 'Still have a question?', 'woocommerce-jetpack' ); ?></h6>
1012
+ <a href="https://booster.io/contact-us/" class="wcj-button" target="_blank"><?php esc_html_e( 'CONTACT BOOSTER SUPPORT', 'woocommerce-jetpack' ); ?></a>
1013
+ </div>
1014
+ </div>
1015
  </div>
1016
+ <div class="wcj-social-connect wcj-box">
1017
+ <div class="wcj-tit">
1018
+ <h3><?php esc_html_e( 'Connect with Booster', 'woocommerce-jetpack' ); ?></h3>
1019
+ </div>
1020
+ <div class="wcj-socialmedia-connect">
1021
+ <div class="wcj-btn-main">
1022
+ <a href="https://booster.io/" class="wcj-button" target="_blank"><?php esc_html_e( 'BOOSTER WEBSITE', 'woocommerce-jetpack' ); ?></a>
1023
+ </div>
1024
+ <ul class="wcj-social-icn">
1025
+ <li><a href="https://www.youtube.com/channel/UCVQg0c4XIirUI3UnGoX9HVg?sub_confirmation=1"><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/YouTube.png'; ?>"></a></li>
1026
+ <li><a href="https://www.facebook.com/booster.for.woocommerce"><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/Facebook.png'; ?>"></a></li>
1027
+ <li><a href="https://twitter.com/intent/follow?screen_name=BoosterForWoo"><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/Twitter.png'; ?>"></a></li>
1028
+ <li><a href="https://www.linkedin.com/company/booster-for-woocommerce"><img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/Linkedin.png'; ?>"></a></li>
1029
+ </ul>
1030
+ </div>
1031
  </div>
1032
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1033
  <div class="wcj-body-parts wcj-body-right">
1034
+ <div class="wcj-partitions action-section">
1035
  <div class="wcj-tit">
1036
+ <h3><?php esc_html_e( 'Actions', 'woocommerce-jetpack' ); ?></h3>
1037
  </div>
1038
  <div class="wcj-action-sub-part">
1039
+ <div class="wcj-action-sub-sing-box">
1040
+ <div class="wcj-action-single-bx">
 
 
 
 
 
 
 
 
 
 
1041
  <div class="wcj-action-sub-sing-icon">
1042
+ <img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/ArrowSquareIn.png'; ?>">
1043
  </div>
1044
  <div class="wcj-actions-part">
1045
+ <input type="file" name="booster_import_settings_file">
1046
+ <h6><button style="width:100px;" class="button-primary" type="submit" name="booster_import_settings"><?php esc_html_e( 'Import', 'woocommerce-jetpack' ); ?></button></h6>
1047
+ <p><?php esc_html_e( 'Import Booster options', 'woocommerce-jetpack' ); ?></p>
1048
  </div>
1049
+ </div>
 
 
1050
  <div class="wcj-action-single-bx">
 
 
 
 
 
 
 
 
 
1051
  <div class="wcj-action-sub-sing-icon">
1052
+ <img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/Export.png'; ?>">
1053
  </div>
1054
  <div class="wcj-actions-part">
1055
+ <h6><button style="width:100px;" class="button-primary wcj-export-btn" type="submit" name="booster_export_settings"><?php esc_html_e( 'Export', 'woocommerce-jetpack' ); ?></button></h6>
1056
+ <p><?php esc_html_e( 'Export Booster options', 'woocommerce-jetpack' ); ?></p>
1057
  </div>
 
1058
  </div>
 
1059
  </div>
1060
+ <div class="wcj-action-sub-sing-box">
1061
+ <div class="wcj-action-single-bx">
1062
+ <div class="wcj-action-sub-sing-icon">
1063
+ <img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/Repeat.png'; ?>">
1064
+ </div>
1065
+ <div class="wcj-actions-part">
1066
+ <h6><button style="width:100px;" class="button-primary" type="submit" name="booster_reset_settings" onclick="return confirm('This will reset settings to defaults for all Booster modules. Are you sure?')"><?php esc_html_e( 'Reset', 'woocommerce-jetpack' ); ?></button></h6>
1067
+ <p><?php esc_html_e( "Reset all Booster's options", 'woocommerce-jetpack' ); ?></p>
1068
+ </div>
1069
  </div>
1070
+ <div class="wcj-action-single-bx">
1071
+ <div class="wcj-action-sub-sing-icon">
1072
+ <img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/RepeatOnce.png'; ?>">
1073
+ </div>
1074
+ <div class="wcj-actions-part">
1075
+ <h6><button style="width:100px;" class="button-primary" type="submit" name="booster_reset_settings_meta" onclick="return confirm('This will delete all Booster meta. Are you sure?')"><?php esc_html_e( 'Reset meta', 'woocommerce-jetpack' ); ?></button></h6>
1076
+ <p><?php esc_html_e( "Reset all Booster's meta", 'woocommerce-jetpack' ); ?></p>
1077
+ </div>
1078
  </div>
1079
  </div>
1080
+ </div>
1081
+ </div>
1082
+ <div class="wcj-partitions documentation-section">
1083
+ <div class="wcj-tit">
1084
+ <h3><?php esc_html_e( 'Documentation', 'woocommerce-jetpack' ); ?></h3>
1085
+ </div>
1086
+ <div class="wcj-documentation-dtl">
1087
+ <div class="wcj-documentation-icon">
1088
+ <img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/documentation.png'; ?>">
1089
+ </div>
1090
+ <div class="wcj-documentation-sm-rh-dtl">
1091
+ <p><?php esc_html_e( 'Here you can find all documentation of Booster', 'woocommerce-jetpack' ); ?></p>
1092
+ <div class="wcj-btn-main">
1093
+ <a href="https://booster.io/docs/" class="wcj-button" target="_blank"><?php esc_html_e( 'See Documentation', 'woocommerce-jetpack' ); ?></a>
1094
+ </div>
1095
  </div>
1096
+ </div>
1097
+ </div>
1098
+ <div class="wcj-partitions updates-section">
1099
+ <div class="wcj-tit">
1100
+ <h3><?php esc_html_e( 'Latest updates', 'woocommerce-jetpack' ); ?></h3>
1101
+ </div>
1102
+ <div class="wcj-partitions-sub-dtl">
1103
+ <h6><?php esc_html_e( 'Version ', 'woocommerce-jetpack' ); ?><?php echo wp_kses_post( w_c_j()->version ); ?></h6>
1104
+ <ul class="wcj-updates-ul">
1105
  <li><?php $this->version_details(); ?></li>
1106
+ </ul>
1107
+ <div class="wcj-btn-main">
1108
+ <a href="https://booster.io/changelog/" class="wcj-button" target="_blank"><?php esc_html_e( 'SEE MORE', 'woocommerce-jetpack' ); ?></a>
 
1109
  </div>
1110
+ </div>
 
1111
  </div>
1112
+ </div>
1113
+ </div>
1114
+ </div>
1115
+ </section>
1116
+ </div>
1117
+ <div class="wcj-footer">
1118
  <div class="wcj-review-footer">
1119
+ <p><?php esc_html_e( 'Please rate ', 'woocommerce-jetpack' ); ?><strong><?php esc_html_e( 'Booster for Woocommerce', 'woocommerce-jetpack' ); ?></strong>
1120
  <span class="wcj-woo-star">
1121
  <img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/star.png'; ?>">
1122
  <img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/star.png'; ?>">
1124
  <img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/star.png'; ?>">
1125
  <img src="<?php echo esc_url( wcj_plugin_url() ) . '/assets/images/star.png'; ?>">
1126
  </span>
1127
+ <strong><a href="https://wordpress.org/support/plugin/woocommerce-jetpack/reviews/?rate=5#new-post" target="_blank"><?php esc_html_e( 'WordPress.org', 'woocommerce-jetpack' ); ?></a></strong><?php esc_html_e( ' to help us spread the word. Thank you from Booster team!', 'woocommerce-jetpack' ); ?>
1128
  </p>
1129
+ </div>
1130
+ <div class="wcj-review-footer wcj-premium-features-footer">
1131
+ <h6><?php esc_html_e( 'Upgrade today to unlock these popular premium features:', 'woocommerce-jetpack' ); ?></h6>
1132
  <ul>
1133
+ <li><strong><?php esc_html_e( '+ PDF Invoices and Packing slips –', 'woocommerce-jetpack' ); ?></strong><?php esc_html_e( 'Add ability to create Proforma Invoices, Credit Notes and Packaging slips', 'woocommerce-jetpack' ); ?></li>
1134
+ <li><strong><?php esc_html_e( '+ Empty Cart –', 'woocommerce-jetpack' ); ?></strong><?php esc_html_e( 'customize empty cart button text, different button positions on cart page', 'woocommerce-jetpack' ); ?></li>
1135
+ <li><strong><?php esc_html_e( '+ Cart and checkout –', 'woocommerce-jetpack' ); ?></strong><?php esc_html_e( 'add multiple – custom fields, custom info blocks, check out file uploads', 'woocommerce-jetpack' ); ?></li>
1136
+ <li><strong><?php esc_html_e( '+ Mini cart –', 'woocommerce-jetpack' ); ?></strong><?php esc_html_e( 'More custom information options', 'woocommerce-jetpack' ); ?> </li>
1137
+ <li><strong><?php esc_html_e( '+ Prices and currencies –', 'woocommerce-jetpack' ); ?></strong><?php esc_html_e( 'add more unlimited number of currencies to WooCommerce', 'woocommerce-jetpack' ); ?> </li>
1138
+ <li><strong><?php esc_html_e( '+ Export options –', 'woocommerce-jetpack' ); ?></strong><?php esc_html_e( 'more fields enabled', 'woocommerce-jetpack' ); ?> </li>
1139
+ <li><strong><?php esc_html_e( '+ Add to cart –', 'woocommerce-jetpack' ); ?></strong><?php esc_html_e( 'customize add to cart messages, Button labels - multiple category groups allowed+ +', 'woocommerce-jetpack' ); ?></li>
1140
+ <li><?php esc_html_e( '+ More configuration options for payments and shipping', 'woocommerce-jetpack' ); ?></li>
1141
  </ul>
1142
  <div class="wcj-btn-main">
1143
+ <a href="https://booster.io/buy-booster/" class="wcj-button" target="_blank"><?php esc_html_e( 'Upgrade to Booster Plus', 'woocommerce-jetpack' ); ?></a>
1144
  </div>
1145
  </div>
1146
  </div>
includes/admin/class-wcj-settings-custom-fields.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings Custom Fields
4
  *
5
- * @version 5.6.1
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/admin
@@ -41,7 +41,7 @@ if ( ! class_exists( 'WCJ_Settings_Custom_Fields' ) ) :
41
  /**
42
  * Output_exchange_rate_settings_button.
43
  *
44
- * @version 5.6.1
45
  * @param Array $value Get values.
46
  */
47
  public function output_exchange_rate_settings_button( $value ) {
@@ -76,7 +76,7 @@ if ( ! class_exists( 'WCJ_Settings_Custom_Fields' ) ) :
76
  $description = '';
77
  $exchange_rate_server = wcj_get_currency_exchange_rate_server_name( $value['custom_attributes_button']['currency_from'], $value['custom_attributes_button']['currency_to'] );
78
  /* translators: %s: translation added */
79
- $value_title = sprintf( __( 'Grab raw %s rate from %s.', 'woocommerce-jetpack' ), $value['value'], $exchange_rate_server ) .
80
  ' ' . __( 'Doesn\'t apply rounding, offset etc.', 'woocommerce-jetpack' );
81
  ?>
82
  <tr valign="top">
@@ -156,7 +156,7 @@ if ( ! class_exists( 'WCJ_Settings_Custom_Fields' ) ) :
156
  /**
157
  * Output_wcj_number_plus_checkbox_start.
158
  *
159
- * @version 2.8.0
160
  * @since 2.8.0
161
  * @param Array $value Get values.
162
  */
@@ -170,7 +170,7 @@ if ( ! class_exists( 'WCJ_Settings_Custom_Fields' ) ) :
170
  }
171
  // Description handling.
172
  $field_description = WC_Admin_Settings::get_field_description( $value );
173
- extract( $field_description );
174
  // Option value.
175
  $option_value = WC_Admin_Settings::get_option( $value['id'], $value['default'] );
176
  // Output.
@@ -212,7 +212,7 @@ if ( ! class_exists( 'WCJ_Settings_Custom_Fields' ) ) :
212
  }
213
  // Description handling.
214
  $field_description = WC_Admin_Settings::get_field_description( $value );
215
- extract( $field_description );
216
  // Option value.
217
  $option_value = WC_Admin_Settings::get_option( $value['id'], $value['default'] );
218
  // Output.
@@ -249,7 +249,7 @@ if ( ! class_exists( 'WCJ_Settings_Custom_Fields' ) ) :
249
  /**
250
  * Output_custom_textarea.
251
  *
252
- * @version 2.6.0
253
  * @since 2.2.6
254
  * @param Array $value Get values.
255
  */
@@ -265,7 +265,7 @@ if ( ! class_exists( 'WCJ_Settings_Custom_Fields' ) ) :
265
  <tr valign="top">
266
  <th scope="row" class="titledesc">
267
  <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
268
- <?php echo $tooltip_html; ?>
269
  </th>
270
  <td class="forminp forminp-<?php echo wp_kses_post( $value['type'] ); ?>">
271
  <?php echo wp_kses_post( $description ); ?>
@@ -286,7 +286,7 @@ if ( ! class_exists( 'WCJ_Settings_Custom_Fields' ) ) :
286
  /**
287
  * Output_module_tools.
288
  *
289
- * @version 2.7.0
290
  * @since 2.2.3
291
  * @param Array $value Get values.
292
  */
@@ -299,7 +299,11 @@ if ( ! class_exists( 'WCJ_Settings_Custom_Fields' ) ) :
299
  </th>
300
  <td class="forminp forminp-<?php echo wp_kses_post( $value['type'] ); ?>">
301
  <?php
302
- if ( isset( $_GET['section'] ) ) {
 
 
 
 
303
  do_action( 'wcj_module_tools_' . sanitize_text_field( wp_unslash( $_GET['section'] ) ) );}
304
  ?>
305
  </td>
2
  /**
3
  * Booster for WooCommerce - Settings Custom Fields
4
  *
5
+ * @version 5.6.2
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/admin
41
  /**
42
  * Output_exchange_rate_settings_button.
43
  *
44
+ * @version 5.6.2
45
  * @param Array $value Get values.
46
  */
47
  public function output_exchange_rate_settings_button( $value ) {
76
  $description = '';
77
  $exchange_rate_server = wcj_get_currency_exchange_rate_server_name( $value['custom_attributes_button']['currency_from'], $value['custom_attributes_button']['currency_to'] );
78
  /* translators: %s: translation added */
79
+ $value_title = sprintf( __( 'Grab raw %1$s rate from %2$s.', 'woocommerce-jetpack' ), $value['value'], $exchange_rate_server ) .
80
  ' ' . __( 'Doesn\'t apply rounding, offset etc.', 'woocommerce-jetpack' );
81
  ?>
82
  <tr valign="top">
156
  /**
157
  * Output_wcj_number_plus_checkbox_start.
158
  *
159
+ * @version 5.6.2
160
  * @since 2.8.0
161
  * @param Array $value Get values.
162
  */
170
  }
171
  // Description handling.
172
  $field_description = WC_Admin_Settings::get_field_description( $value );
173
+ extract( $field_description ); //phpcs:ignore
174
  // Option value.
175
  $option_value = WC_Admin_Settings::get_option( $value['id'], $value['default'] );
176
  // Output.
212
  }
213
  // Description handling.
214
  $field_description = WC_Admin_Settings::get_field_description( $value );
215
+ extract( $field_description ); //phpcs:ignore
216
  // Option value.
217
  $option_value = WC_Admin_Settings::get_option( $value['id'], $value['default'] );
218
  // Output.
249
  /**
250
  * Output_custom_textarea.
251
  *
252
+ * @version 5.6.2
253
  * @since 2.2.6
254
  * @param Array $value Get values.
255
  */
265
  <tr valign="top">
266
  <th scope="row" class="titledesc">
267
  <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
268
+ <?php echo $tooltip_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
269
  </th>
270
  <td class="forminp forminp-<?php echo wp_kses_post( $value['type'] ); ?>">
271
  <?php echo wp_kses_post( $description ); ?>
286
  /**
287
  * Output_module_tools.
288
  *
289
+ * @version 5.6.2
290
  * @since 2.2.3
291
  * @param Array $value Get values.
292
  */
299
  </th>
300
  <td class="forminp forminp-<?php echo wp_kses_post( $value['type'] ); ?>">
301
  <?php
302
+ $wpnonce = true;
303
+ if ( function_exists( 'wp_verify_nonce' ) ) {
304
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
305
+ }
306
+ if ( $wpnonce && isset( $_GET['section'] ) ) {
307
  do_action( 'wcj_module_tools_' . sanitize_text_field( wp_unslash( $_GET['section'] ) ) );}
308
  ?>
309
  </td>
includes/admin/class-wcj-settings-manager.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings Manager - Import / Export / Reset Booster's settings
4
  *
5
- * @version 3.8.0
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/admin
@@ -32,7 +32,7 @@ if ( ! class_exists( 'WCJ_Settings_Manager' ) ) :
32
  /**
33
  * Manage_options.
34
  *
35
- * @version 3.4.0
36
  * @since 2.5.2
37
  */
38
  public function manage_options() {
@@ -40,16 +40,17 @@ if ( ! class_exists( 'WCJ_Settings_Manager' ) ) :
40
  if ( ! function_exists( 'current_user_can' ) || ! current_user_can( 'manage_options' ) ) {
41
  return;
42
  }
43
- if ( isset( $_POST['booster_import_settings'] ) ) {
 
44
  $this->manage_options_import();
45
  }
46
- if ( isset( $_POST['booster_export_settings'] ) ) {
47
  $this->manage_options_export();
48
  }
49
- if ( isset( $_POST['booster_reset_settings'] ) ) {
50
  $this->manage_options_reset();
51
  }
52
- if ( isset( $_POST['booster_reset_settings_meta'] ) ) {
53
  $this->manage_options_reset_meta();
54
  }
55
  }
@@ -58,7 +59,7 @@ if ( ! class_exists( 'WCJ_Settings_Manager' ) ) :
58
  /**
59
  * Manage_options_import.
60
  *
61
- * @version 3.8.0
62
  * @since 2.5.2
63
  */
64
  public function manage_options_import() {
@@ -66,11 +67,13 @@ if ( ! class_exists( 'WCJ_Settings_Manager' ) ) :
66
  if ( ! isset( $_FILES['booster_import_settings_file']['tmp_name'] ) || '' === $_FILES['booster_import_settings_file']['tmp_name'] ) {
67
  $wcj_notice .= __( 'Please upload a file to import!', 'woocommerce-jetpack' );
68
  $import_settings = array();
69
-
70
- unset( $_POST['booster_import_settings'] );
 
 
71
  } else {
72
  $import_counter = 0;
73
- $import_settings = file_get_contents( sanitize_text_field( wp_unslash( $_FILES['booster_import_settings_file']['tmp_name'] ) ) );
74
  $bom = pack( 'H*', 'EFBBBF' );
75
  $import_settings = preg_replace( "/^$bom/", '', $import_settings );
76
  $import_settings = explode( PHP_EOL, preg_replace( '~(*BSR_ANYCRLF)\R~', PHP_EOL, $import_settings ) );
@@ -99,18 +102,19 @@ if ( ! class_exists( 'WCJ_Settings_Manager' ) ) :
99
  /**
100
  * Manage_options_export.
101
  *
102
- * @version 3.8.0
103
  * @since 2.5.2
104
  * @see http://php.net/manual/en/function.header.php
105
  */
106
  public function manage_options_export() {
107
  $export_settings = array();
108
  $export_counter = array();
 
109
  foreach ( w_c_j()->modules as $module ) {
110
  $values = $module->get_settings();
111
  foreach ( $values as $value ) {
112
  if ( isset( $value['default'] ) && isset( $value['id'] ) ) {
113
- if ( isset( $_POST['booster_export_settings'] ) ) {
114
  $export_settings[ $value['id'] ] = wcj_get_option( $value['id'], $value['default'] );
115
  if ( ! isset( $export_counter[ $module->short_desc ] ) ) {
116
  $export_counter[ $module->short_desc ] = 0;
@@ -124,14 +128,14 @@ if ( ! class_exists( 'WCJ_Settings_Manager' ) ) :
124
  $export_settings = 'Booster for WooCommerce v' . wcj_get_option( WCJ_VERSION_OPTION, 'NA' ) . PHP_EOL . $export_settings;
125
  header( 'Content-Type: application/download' );
126
  header( 'Content-Disposition: attachment; filename=booster_settings.txt' );
127
- echo $export_settings;
128
  die();
129
  }
130
 
131
  /**
132
  * Manage_options_reset_meta.
133
  *
134
- * @version 3.4.0
135
  * @since 3.4.0
136
  * @todo order items meta
137
  * @todo `... LIKE 'wcj_%'`
@@ -139,7 +143,7 @@ if ( ! class_exists( 'WCJ_Settings_Manager' ) ) :
139
  public function manage_options_reset_meta() {
140
  global $wpdb, $wcj_notice;
141
  $delete_counter_meta = 0;
142
- $plugin_meta = $wpdb->get_results( "SELECT * FROM $wpdb->postmeta WHERE meta_key LIKE '_wcj_%'" );
143
  foreach ( $plugin_meta as $meta ) {
144
  delete_post_meta( $meta->post_id, $meta->meta_key );
145
  $delete_counter_meta++;
@@ -151,13 +155,13 @@ if ( ! class_exists( 'WCJ_Settings_Manager' ) ) :
151
  /**
152
  * Manage_options_reset.
153
  *
154
- * @version 3.4.0
155
  * @since 2.5.2
156
  */
157
  public function manage_options_reset() {
158
  global $wpdb, $wcj_notice;
159
  $delete_counter_options = 0;
160
- $plugin_options = $wpdb->get_results( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE 'wcj_%'" );
161
  foreach ( $plugin_options as $option ) {
162
  delete_option( $option->option_name );
163
  delete_site_option( $option->option_name );
2
  /**
3
  * Booster for WooCommerce - Settings Manager - Import / Export / Reset Booster's settings
4
  *
5
+ * @version 5.6.2
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/admin
32
  /**
33
  * Manage_options.
34
  *
35
+ * @version 5.6.2
36
  * @since 2.5.2
37
  */
38
  public function manage_options() {
40
  if ( ! function_exists( 'current_user_can' ) || ! current_user_can( 'manage_options' ) ) {
41
  return;
42
  }
43
+ $wpnonce = wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' );
44
+ if ( $wpnonce && isset( $_POST['booster_import_settings'] ) ) {
45
  $this->manage_options_import();
46
  }
47
+ if ( $wpnonce && isset( $_POST['booster_export_settings'] ) ) {
48
  $this->manage_options_export();
49
  }
50
+ if ( $wpnonce && isset( $_POST['booster_reset_settings'] ) ) {
51
  $this->manage_options_reset();
52
  }
53
+ if ( $wpnonce && isset( $_POST['booster_reset_settings_meta'] ) ) {
54
  $this->manage_options_reset_meta();
55
  }
56
  }
59
  /**
60
  * Manage_options_import.
61
  *
62
+ * @version 5.6.2
63
  * @since 2.5.2
64
  */
65
  public function manage_options_import() {
67
  if ( ! isset( $_FILES['booster_import_settings_file']['tmp_name'] ) || '' === $_FILES['booster_import_settings_file']['tmp_name'] ) {
68
  $wcj_notice .= __( 'Please upload a file to import!', 'woocommerce-jetpack' );
69
  $import_settings = array();
70
+ $wpnonce = wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' );
71
+ if ( $wpnonce ) {
72
+ unset( $_POST['booster_import_settings'] );
73
+ }
74
  } else {
75
  $import_counter = 0;
76
+ $import_settings = file_get_contents( sanitize_text_field( wp_unslash( $_FILES['booster_import_settings_file']['tmp_name'] ) ) ); //phpcs:ignore
77
  $bom = pack( 'H*', 'EFBBBF' );
78
  $import_settings = preg_replace( "/^$bom/", '', $import_settings );
79
  $import_settings = explode( PHP_EOL, preg_replace( '~(*BSR_ANYCRLF)\R~', PHP_EOL, $import_settings ) );
102
  /**
103
  * Manage_options_export.
104
  *
105
+ * @version 5.6.2
106
  * @since 2.5.2
107
  * @see http://php.net/manual/en/function.header.php
108
  */
109
  public function manage_options_export() {
110
  $export_settings = array();
111
  $export_counter = array();
112
+ $wpnonce = wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' );
113
  foreach ( w_c_j()->modules as $module ) {
114
  $values = $module->get_settings();
115
  foreach ( $values as $value ) {
116
  if ( isset( $value['default'] ) && isset( $value['id'] ) ) {
117
+ if ( $wpnonce && isset( $_POST['booster_export_settings'] ) ) {
118
  $export_settings[ $value['id'] ] = wcj_get_option( $value['id'], $value['default'] );
119
  if ( ! isset( $export_counter[ $module->short_desc ] ) ) {
120
  $export_counter[ $module->short_desc ] = 0;
128
  $export_settings = 'Booster for WooCommerce v' . wcj_get_option( WCJ_VERSION_OPTION, 'NA' ) . PHP_EOL . $export_settings;
129
  header( 'Content-Type: application/download' );
130
  header( 'Content-Disposition: attachment; filename=booster_settings.txt' );
131
+ echo $export_settings; //phpcs:ignore
132
  die();
133
  }
134
 
135
  /**
136
  * Manage_options_reset_meta.
137
  *
138
+ * @version 5.6.2
139
  * @since 3.4.0
140
  * @todo order items meta
141
  * @todo `... LIKE 'wcj_%'`
143
  public function manage_options_reset_meta() {
144
  global $wpdb, $wcj_notice;
145
  $delete_counter_meta = 0;
146
+ $plugin_meta = $wpdb->get_results( "SELECT * FROM $wpdb->postmeta WHERE meta_key LIKE '_wcj_%'" ); // WPCS: db call ok and cache ok.
147
  foreach ( $plugin_meta as $meta ) {
148
  delete_post_meta( $meta->post_id, $meta->meta_key );
149
  $delete_counter_meta++;
155
  /**
156
  * Manage_options_reset.
157
  *
158
+ * @version 5.6.2
159
  * @since 2.5.2
160
  */
161
  public function manage_options_reset() {
162
  global $wpdb, $wcj_notice;
163
  $delete_counter_options = 0;
164
+ $plugin_options = $wpdb->get_results( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE 'wcj_%'" ); // WPCS: db call ok and cache ok.
165
  foreach ( $plugin_options as $option ) {
166
  delete_option( $option->option_name );
167
  delete_site_option( $option->option_name );
includes/admin/class-wcj-tools.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce Tools
4
  *
5
- * @version 5.5.9
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/admin
8
  */
@@ -32,11 +32,15 @@ if ( ! class_exists( 'WCJ_Tools' ) ) :
32
  /**
33
  * Wcj_new_desing_dashboard_enqueue.
34
  *
35
- * @version 5.5.6
36
  * @since 5.5.6
37
  */
38
  public function wcj_new_desing_dashboard_enqueue() {
39
- $page = ( isset( $_GET['page'] ) ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : '';
 
 
 
 
40
  if ( 'wcj-tools' === $page ) {
41
  wp_enqueue_style( 'wcj-admin-wcj-new_desing', wcj_plugin_url() . '/includes/css/admin-style.css', array(), time() );
42
  wp_enqueue_script( 'wcj-admin-script', wcj_plugin_url() . '/includes/js/admin-script.js', array( 'jquery' ), '5.0.0', true );
@@ -64,12 +68,12 @@ if ( ! class_exists( 'WCJ_Tools' ) ) :
64
  /**
65
  * Create_tools_page.
66
  *
67
- * @version 5.5.9
68
  */
69
  public function create_tools_page() {
70
 
71
  // Tabs.
72
- $tabs = apply_filters(
73
  'wcj_tools_tabs',
74
  array(
75
  array(
@@ -78,8 +82,12 @@ if ( ! class_exists( 'WCJ_Tools' ) ) :
78
  ),
79
  )
80
  );
81
- $html = '<h2 class="nav-tab-wrapper woo-nav-tab-wrapper wcj_tool_tab_part">';
82
- $active_tab = ( isset( $_GET['tab'] ) ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : 'dashboard';
 
 
 
 
83
  foreach ( $tabs as $tab ) {
84
  $is_active = ( $active_tab === $tab['id'] ) ? 'nav-tab-active' : '';
85
  $html .= '<a href="' . esc_url(
2
  /**
3
  * Booster for WooCommerce Tools
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/admin
8
  */
32
  /**
33
  * Wcj_new_desing_dashboard_enqueue.
34
  *
35
+ * @version 5.6.2
36
  * @since 5.5.6
37
  */
38
  public function wcj_new_desing_dashboard_enqueue() {
39
+ $wpnonce = true;
40
+ if ( function_exists( 'wp_verify_nonce' ) ) {
41
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
42
+ }
43
+ $page = ( $wpnonce && isset( $_GET['page'] ) ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : '';
44
  if ( 'wcj-tools' === $page ) {
45
  wp_enqueue_style( 'wcj-admin-wcj-new_desing', wcj_plugin_url() . '/includes/css/admin-style.css', array(), time() );
46
  wp_enqueue_script( 'wcj-admin-script', wcj_plugin_url() . '/includes/js/admin-script.js', array( 'jquery' ), '5.0.0', true );
68
  /**
69
  * Create_tools_page.
70
  *
71
+ * @version 5.6.2
72
  */
73
  public function create_tools_page() {
74
 
75
  // Tabs.
76
+ $tabs = apply_filters(
77
  'wcj_tools_tabs',
78
  array(
79
  array(
82
  ),
83
  )
84
  );
85
+ $html = '<h2 class="nav-tab-wrapper woo-nav-tab-wrapper wcj_tool_tab_part">';
86
+ $wpnonce = true;
87
+ if ( function_exists( 'wp_verify_nonce' ) ) {
88
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
89
+ }
90
+ $active_tab = ( $wpnonce && isset( $_GET['tab'] ) ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : 'dashboard';
91
  foreach ( $tabs as $tab ) {
92
  $is_active = ( $active_tab === $tab['id'] ) ? 'nav-tab-active' : '';
93
  $html .= '<a href="' . esc_url(
includes/admin/class-wcj-welcome.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster getting started
4
  *
5
- * @version 5.6.1
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/admin
8
  */
@@ -22,7 +22,11 @@ if ( ! class_exists( 'WCJ_Welcome' ) ) :
22
  public function __construct() {
23
  if ( is_admin() ) {
24
 
25
- if ( isset( $_GET['page'] ) && 'jetpack-getting-started' === $_GET['page'] ) {
 
 
 
 
26
  add_action(
27
  'in_admin_header',
28
  function () {
@@ -69,11 +73,14 @@ if ( ! class_exists( 'WCJ_Welcome' ) ) :
69
  /**
70
  * Wcj_redirect_to_getting_started.
71
  *
72
- * @version 5.4.1
73
  */
74
  public function wcj_redirect_to_getting_started() {
75
-
76
- if ( ! get_transient( '_wcj_activation_redirect' ) || isset( $_GET['wcj-redirect'] ) ) {
 
 
 
77
  return;
78
  }
79
 
2
  /**
3
  * Booster getting started
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/admin
8
  */
22
  public function __construct() {
23
  if ( is_admin() ) {
24
 
25
+ $wpnonce = true;
26
+ if ( function_exists( 'wp_verify_nonce' ) ) {
27
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
28
+ }
29
+ if ( $wpnonce && isset( $_GET['page'] ) && 'jetpack-getting-started' === $_GET['page'] ) {
30
  add_action(
31
  'in_admin_header',
32
  function () {
73
  /**
74
  * Wcj_redirect_to_getting_started.
75
  *
76
+ * @version 5.6.2
77
  */
78
  public function wcj_redirect_to_getting_started() {
79
+ $wpnonce = true;
80
+ if ( function_exists( 'wp_verify_nonce' ) ) {
81
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
82
+ }
83
+ if ( ! get_transient( '_wcj_activation_redirect' ) || isset( $_GET['wcj-redirect'] ) || ! $wpnonce ) {
84
  return;
85
  }
86
 
includes/admin/wcj-welcome-screen-content.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Welcome Screen Content
4
  *
5
- * @version 5.4.8
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/admin
8
  */
@@ -139,18 +139,22 @@
139
  <input class="subscribe-email-btn" type="button" name="submit_email_to_klaviyo" value="Submit">
140
  </form>
141
  <?php
142
- if ( isset( $_REQUEST['msg'] ) ) {
 
 
 
 
143
  $subscribe_message = '';
144
  $subscribe_message_id = sanitize_text_field( wp_unslash( $_REQUEST['msg'] ) );
145
- if ( 1 === $subscribe_message_id ) {
146
- $subscribe_message = 'Thank you for subscribing your email';
147
- } elseif ( 2 === $subscribe_message_id ) {
148
- $subscribe_message = 'You have already subscribed your email';
149
- } elseif ( 3 === $subscribe_message_id ) {
150
- $subscribe_message = 'Something went wrong with your subscription. Please after some time !';
151
  }
152
  /* translators: %s: translation added */
153
- echo '<p style="color: #f46c5e;">' . wp_kses_post( sprintf( __( '%s', 'woocommerce-jetpack' ), $subscribe_message ) ) . '</p>';
154
  }
155
  ?>
156
  </div>
2
  /**
3
  * Booster for WooCommerce - Welcome Screen Content
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/admin
8
  */
139
  <input class="subscribe-email-btn" type="button" name="submit_email_to_klaviyo" value="Submit">
140
  </form>
141
  <?php
142
+ $wpnonce = true;
143
+ if ( function_exists( 'wp_verify_nonce' ) ) {
144
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
145
+ }
146
+ if ( $wpnonce && isset( $_REQUEST['msg'] ) ) {
147
  $subscribe_message = '';
148
  $subscribe_message_id = sanitize_text_field( wp_unslash( $_REQUEST['msg'] ) );
149
+ if ( '1' === $subscribe_message_id ) {
150
+ $subscribe_message = sprintf( __( 'Thank you for subscribing your email', 'woocommerce-jetpack' ) );
151
+ } elseif ( '2' === $subscribe_message_id ) {
152
+ $subscribe_message = sprintf( __( 'You have already subscribed your email', 'woocommerce-jetpack' ) );
153
+ } elseif ( '3' === $subscribe_message_id ) {
154
+ $subscribe_message = sprintf( __( 'Something went wrong with your subscription. Please after some time !', 'woocommerce-jetpack' ) );
155
  }
156
  /* translators: %s: translation added */
157
+ echo '<p style="color: #f46c5e;">' . wp_kses_post( $subscribe_message ) . '</p>';
158
  }
159
  ?>
160
  </div>
includes/class-wcj-add-to-cart-button-visibility.php CHANGED
File without changes
includes/class-wcj-add-to-cart.php CHANGED
File without changes
includes/class-wcj-address-formats.php CHANGED
File without changes
includes/class-wcj-admin-bar.php CHANGED
File without changes
includes/class-wcj-admin-orders-list.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Admin Orders List
4
  *
5
- * @version 5.5.9
6
  * @since 3.2.4
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -223,14 +223,18 @@ if ( ! class_exists( 'WCJ_Admin_Orders_List' ) ) :
223
  /**
224
  * Filter_shop_order_multiple_statuses_not_completed_link.
225
  *
226
- * @version 3.9.0
227
  * @since 2.5.7
228
  * @param string $query defines the query.
229
  */
230
  public function filter_shop_order_multiple_statuses_not_completed_link( $query ) {
231
- if ( false !== strpos( $_SERVER['REQUEST_URI'], '/wp-admin/edit.php' ) && isset( $_GET['post_type'] ) && 'shop_order' === $_GET['post_type'] ) {
232
  if ( wcj_current_user_can( 'edit_others_pages' ) ) {
233
- if ( isset( $_GET['post_status'] ) && false !== strpos( sanitize_text_field( wp_unslash( $_GET['post_status'] ) ), ',' ) ) {
 
 
 
 
234
  $post_statuses = explode( ',', sanitize_text_field( wp_unslash( $_GET['post_status'] ) ) );
235
  $query->query['post_status'] = $post_statuses;
236
  $query->query_vars['post_status'] = $post_statuses;
@@ -242,12 +246,16 @@ if ( ! class_exists( 'WCJ_Admin_Orders_List' ) ) :
242
  /**
243
  * Multiple_shop_order_statuses.
244
  *
245
- * @version 3.7.0
246
  * @since 2.5.7
247
  * @param string $type defines the type.
248
  */
249
  public function multiple_shop_order_statuses( $type ) {
250
- $checked_post_statuses = isset( $_GET['wcj_admin_filter_statuses'] ) ? $_GET['wcj_admin_filter_statuses'] : array();
 
 
 
 
251
  $html = '';
252
  $html .= ( 'checkboxes' === $type ) ?
253
  '<span id="wcj_admin_filter_shop_order_statuses">' :
@@ -258,7 +266,7 @@ if ( ! class_exists( 'WCJ_Admin_Orders_List' ) ) :
258
  if ( $total_number > 0 ) {
259
  $html .= ( 'checkboxes' === $type ) ?
260
  '<input type="checkbox" name="wcj_admin_filter_statuses[]" style="width:16px;height:16px;" value="' . $status_id . '"' .
261
- checked( in_array( $status_id, $checked_post_statuses ), true, false ) . '>' . $status_title . ' (' . $total_number . ') ' :
262
  '<option value="' . $status_id . '"' . selected( in_array( $status_id, $checked_post_statuses, true ), true, false ) . '>' .
263
  $status_title . ' (' . $total_number . ') </option>';
264
  }
@@ -286,15 +294,19 @@ if ( ! class_exists( 'WCJ_Admin_Orders_List' ) ) :
286
  /**
287
  * Filter_shop_order_multiple_statuses.
288
  *
289
- * @version 3.9.0
290
  * @since 2.5.7
291
  * @param string $query defines the query.
292
  */
293
  public function filter_shop_order_multiple_statuses( $query ) {
294
- if ( isset( $_SERVER['REQUEST_URI'] ) && ( false !== strpos( $_SERVER['REQUEST_URI'], '/wp-admin/edit.php' ) && isset( $_GET['post_type'] ) && 'shop_order' === $_GET['post_type'] ) ) {
295
  if ( wcj_current_user_can( 'edit_others_pages' ) ) {
296
- if ( isset( $_GET['wcj_admin_filter_statuses'] ) ) {
297
- $post_statuses = $_GET['wcj_admin_filter_statuses'];
 
 
 
 
298
  $query->query['post_status'] = $post_statuses;
299
  $query->query_vars['post_status'] = $post_statuses;
300
  }
@@ -305,7 +317,7 @@ if ( ! class_exists( 'WCJ_Admin_Orders_List' ) ) :
305
  /**
306
  * Filter the orders in admin based on options.
307
  *
308
- * @version 2.8.0
309
  * @access public
310
  * @param mixed $query defines the query.
311
  * @return void
@@ -315,16 +327,20 @@ if ( ! class_exists( 'WCJ_Admin_Orders_List' ) ) :
315
  if ( 'shop_order' !== $typenow ) {
316
  return;
317
  }
318
- if ( 'yes' === wcj_get_option( 'wcj_orders_list_custom_columns_country', 'no' ) && isset( $_GET['country'] ) && 'all' !== $_GET['country'] ) {
 
 
 
 
319
  $query->query_vars['meta_query'][] = array(
320
  'key' => '_billing_country',
321
- 'value' => $_GET['country'],
322
  );
323
  }
324
- if ( 'yes' === wcj_get_option( 'wcj_orders_list_custom_columns_currency', 'no' ) && isset( $_GET['currency'] ) && 'all' !== $_GET['currency'] ) {
325
  $query->query_vars['meta_query'][] = array(
326
  'key' => '_order_currency',
327
- 'value' => $_GET['currency'],
328
  );
329
  }
330
  }
@@ -332,12 +348,16 @@ if ( ! class_exists( 'WCJ_Admin_Orders_List' ) ) :
332
  /**
333
  * Filters for post types.
334
  *
335
- * @version 3.9.0
336
  */
337
  public function restrict_manage_posts() {
338
  global $typenow, $wp_query;
339
- if ( in_array( $typenow, wc_get_order_types( 'order-meta-boxes' ) ) ) {
340
- if ( 'yes' === wcj_get_option( 'wcj_orders_list_custom_columns_country', 'no' ) ) {
 
 
 
 
341
  $selected_coutry = isset( $_GET['country'] ) ? sanitize_text_field( wp_unslash( $_GET['country'] ) ) : 'all';
342
  $countries = array_merge( array( 'all' => __( 'All countries', 'woocommerce-jetpack' ) ), wcj_get_countries() );
343
  echo '<select id="country" name="country">';
@@ -346,8 +366,8 @@ if ( ! class_exists( 'WCJ_Admin_Orders_List' ) ) :
346
  }
347
  echo '</select>';
348
  }
349
- if ( 'yes' === wcj_get_option( 'wcj_orders_list_custom_columns_currency', 'no' ) ) {
350
- $selected_currency = isset( $_GET['currency'] ) ? $_GET['currency'] : 'all';
351
  $currencies = array_merge( array( 'all' => __( 'All currencies', 'woocommerce-jetpack' ) ), wcj_get_woocommerce_currencies_and_symbols() );
352
  echo '<select id="currency" name="currency">';
353
  foreach ( $currencies as $code => $name ) {
2
  /**
3
  * Booster for WooCommerce - Module - Admin Orders List
4
  *
5
+ * @version 5.6.2
6
  * @since 3.2.4
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
223
  /**
224
  * Filter_shop_order_multiple_statuses_not_completed_link.
225
  *
226
+ * @version 5.6.2
227
  * @since 2.5.7
228
  * @param string $query defines the query.
229
  */
230
  public function filter_shop_order_multiple_statuses_not_completed_link( $query ) {
231
+ if ( isset( $_SERVER['REQUEST_URI'] ) && false !== strpos( sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ), '/wp-admin/edit.php' ) && isset( $_GET['post_type'] ) && 'shop_order' === $_GET['post_type'] ) {
232
  if ( wcj_current_user_can( 'edit_others_pages' ) ) {
233
+ $wpnonce = true;
234
+ if ( function_exists( 'wp_verify_nonce' ) ) {
235
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
236
+ }
237
+ if ( $wpnonce && isset( $_GET['post_status'] ) && false !== strpos( sanitize_text_field( wp_unslash( $_GET['post_status'] ) ), ',' ) ) {
238
  $post_statuses = explode( ',', sanitize_text_field( wp_unslash( $_GET['post_status'] ) ) );
239
  $query->query['post_status'] = $post_statuses;
240
  $query->query_vars['post_status'] = $post_statuses;
246
  /**
247
  * Multiple_shop_order_statuses.
248
  *
249
+ * @version 5.6.2
250
  * @since 2.5.7
251
  * @param string $type defines the type.
252
  */
253
  public function multiple_shop_order_statuses( $type ) {
254
+ $wpnonce = true;
255
+ if ( function_exists( 'wp_verify_nonce' ) ) {
256
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
257
+ }
258
+ $checked_post_statuses = $wpnonce && isset( $_GET['wcj_admin_filter_statuses'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_GET['wcj_admin_filter_statuses'] ) ) : array();
259
  $html = '';
260
  $html .= ( 'checkboxes' === $type ) ?
261
  '<span id="wcj_admin_filter_shop_order_statuses">' :
266
  if ( $total_number > 0 ) {
267
  $html .= ( 'checkboxes' === $type ) ?
268
  '<input type="checkbox" name="wcj_admin_filter_statuses[]" style="width:16px;height:16px;" value="' . $status_id . '"' .
269
+ checked( in_array( $status_id, $checked_post_statuses, true ), true, false ) . '>' . $status_title . ' (' . $total_number . ') ' :
270
  '<option value="' . $status_id . '"' . selected( in_array( $status_id, $checked_post_statuses, true ), true, false ) . '>' .
271
  $status_title . ' (' . $total_number . ') </option>';
272
  }
294
  /**
295
  * Filter_shop_order_multiple_statuses.
296
  *
297
+ * @version 5.6.2
298
  * @since 2.5.7
299
  * @param string $query defines the query.
300
  */
301
  public function filter_shop_order_multiple_statuses( $query ) {
302
+ if ( isset( $_SERVER['REQUEST_URI'] ) && ( false !== strpos( sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ), '/wp-admin/edit.php' ) && isset( $_GET['post_type'] ) && 'shop_order' === $_GET['post_type'] ) ) {
303
  if ( wcj_current_user_can( 'edit_others_pages' ) ) {
304
+ $wpnonce = true;
305
+ if ( function_exists( 'wp_verify_nonce' ) ) {
306
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
307
+ }
308
+ if ( $wpnonce && isset( $_GET['wcj_admin_filter_statuses'] ) ) {
309
+ $post_statuses = array_map( 'sanitize_text_field', wp_unslash( $_GET['wcj_admin_filter_statuses'] ) );
310
  $query->query['post_status'] = $post_statuses;
311
  $query->query_vars['post_status'] = $post_statuses;
312
  }
317
  /**
318
  * Filter the orders in admin based on options.
319
  *
320
+ * @version 5.6.2
321
  * @access public
322
  * @param mixed $query defines the query.
323
  * @return void
327
  if ( 'shop_order' !== $typenow ) {
328
  return;
329
  }
330
+ $wpnonce = true;
331
+ if ( function_exists( 'wp_verify_nonce' ) ) {
332
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
333
+ }
334
+ if ( $wpnonce && 'yes' === wcj_get_option( 'wcj_orders_list_custom_columns_country', 'no' ) && isset( $_GET['country'] ) && 'all' !== $_GET['country'] ) {
335
  $query->query_vars['meta_query'][] = array(
336
  'key' => '_billing_country',
337
+ 'value' => sanitize_text_field( wp_unslash( $_GET['country'] ) ),
338
  );
339
  }
340
+ if ( $wpnonce && 'yes' === wcj_get_option( 'wcj_orders_list_custom_columns_currency', 'no' ) && isset( $_GET['currency'] ) && 'all' !== $_GET['currency'] ) {
341
  $query->query_vars['meta_query'][] = array(
342
  'key' => '_order_currency',
343
+ 'value' => sanitize_text_field( wp_unslash( $_GET['currency'] ) ),
344
  );
345
  }
346
  }
348
  /**
349
  * Filters for post types.
350
  *
351
+ * @version 5.6.2
352
  */
353
  public function restrict_manage_posts() {
354
  global $typenow, $wp_query;
355
+ if ( in_array( $typenow, wc_get_order_types( 'order-meta-boxes' ), true ) ) {
356
+ $wpnonce = true;
357
+ if ( function_exists( 'wp_verify_nonce' ) ) {
358
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
359
+ }
360
+ if ( $wpnonce && 'yes' === wcj_get_option( 'wcj_orders_list_custom_columns_country', 'no' ) ) {
361
  $selected_coutry = isset( $_GET['country'] ) ? sanitize_text_field( wp_unslash( $_GET['country'] ) ) : 'all';
362
  $countries = array_merge( array( 'all' => __( 'All countries', 'woocommerce-jetpack' ) ), wcj_get_countries() );
363
  echo '<select id="country" name="country">';
366
  }
367
  echo '</select>';
368
  }
369
+ if ( $wpnonce && 'yes' === wcj_get_option( 'wcj_orders_list_custom_columns_currency', 'no' ) ) {
370
+ $selected_currency = isset( $_GET['currency'] ) ? sanitize_text_field( wp_unslash( $_GET['currency'] ) ) : 'all';
371
  $currencies = array_merge( array( 'all' => __( 'All currencies', 'woocommerce-jetpack' ) ), wcj_get_woocommerce_currencies_and_symbols() );
372
  echo '<select id="currency" name="currency">';
373
  foreach ( $currencies as $code => $name ) {
includes/class-wcj-admin-products-list.php CHANGED
File without changes
includes/class-wcj-admin-tools.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Admin Tools
4
  *
5
- * @version 5.5.6
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -212,7 +212,7 @@ if ( ! class_exists( 'WCJ_Admin_Tools' ) ) :
212
  /**
213
  * Create_meta_meta_box.
214
  *
215
- * @version 3.2.1
216
  * @since 2.5.8
217
  * @param string $post defines the post.
218
  */
@@ -223,7 +223,7 @@ if ( ! class_exists( 'WCJ_Admin_Tools' ) ) :
223
  $meta = get_post_meta( $post_id );
224
  $table_data = array();
225
  foreach ( $meta as $meta_key => $meta_values ) {
226
- $table_data[] = array( $meta_key, wp_kses_post( maybe_unserialize( $meta_values[0] ), true ) );
227
  }
228
  $html .= wcj_get_table_html(
229
  $table_data,
@@ -257,7 +257,7 @@ if ( ! class_exists( 'WCJ_Admin_Tools' ) ) :
257
  }
258
  }
259
  // Output.
260
- echo $html;
261
  }
262
 
263
  /**
@@ -330,7 +330,11 @@ if ( ! class_exists( 'WCJ_Admin_Tools' ) ) :
330
  }
331
 
332
  $table_data = array();
333
- if ( isset( $_GET['wcj_attribute'] ) && '' !== $_GET['wcj_attribute'] ) {
 
 
 
 
334
  $table_data[] = array(
335
  __( 'Product', 'woocommerce-jetpack' ),
336
  __( 'Category', 'woocommerce-jetpack' ),
2
  /**
3
  * Booster for WooCommerce - Module - Admin Tools
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
212
  /**
213
  * Create_meta_meta_box.
214
  *
215
+ * @version 5.6.2
216
  * @since 2.5.8
217
  * @param string $post defines the post.
218
  */
223
  $meta = get_post_meta( $post_id );
224
  $table_data = array();
225
  foreach ( $meta as $meta_key => $meta_values ) {
226
+ $table_data[] = array( $meta_key, esc_html( print_r( maybe_unserialize( $meta_values[0] ), true ) ) ); // phpcs:ignore
227
  }
228
  $html .= wcj_get_table_html(
229
  $table_data,
257
  }
258
  }
259
  // Output.
260
+ echo wp_kses_post( $html );
261
  }
262
 
263
  /**
330
  }
331
 
332
  $table_data = array();
333
+ $wpnonce = true;
334
+ if ( function_exists( 'wp_verify_nonce' ) ) {
335
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
336
+ }
337
+ if ( isset( $_GET['wcj_attribute'] ) && '' !== $_GET['wcj_attribute'] && $wpnonce ) {
338
  $table_data[] = array(
339
  __( 'Product', 'woocommerce-jetpack' ),
340
  __( 'Category', 'woocommerce-jetpack' ),
includes/class-wcj-breadcrumbs.php CHANGED
File without changes
includes/class-wcj-call-for-price.php CHANGED
File without changes
includes/class-wcj-cart-customization.php CHANGED
File without changes
includes/class-wcj-cart.php CHANGED
File without changes
includes/class-wcj-checkout-core-fields.php CHANGED
File without changes
includes/class-wcj-checkout-custom-fields.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Checkout Custom Fields
4
  *
5
- * @version 5.6.1
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -45,7 +45,7 @@ if ( ! class_exists( 'WCJ_Checkout_Custom_Fields' ) ) :
45
  '</li>' .
46
  '<li>' . sprintf(
47
  /* translators: %s: search term */
48
- __( '<strong>PHP code:</strong> by using %s function,<br> e.g.: %s', 'woocommerce-jetpack' ),
49
  '<code>do_shortcode()</code>',
50
  '<code>echo&nbsp;do_shortcode(&nbsp;\'[wcj_order_checkout_field meta_key = "billing_wcj_checkout_field_1]\'&nbsp;);</code>'
51
  ) .
@@ -237,7 +237,7 @@ if ( ! class_exists( 'WCJ_Checkout_Custom_Fields' ) ) :
237
  /**
238
  * Update_custom_checkout_fields_order_meta.
239
  *
240
- * @version 5.4.3
241
  *
242
  * @param string $order_id defines the order_id.
243
  */
@@ -252,7 +252,8 @@ if ( ! class_exists( 'WCJ_Checkout_Custom_Fields' ) ) :
252
  $option_name = $the_section . '_wcj_checkout_field_' . $i;
253
  $option_name_label = $the_section . '_wcj_checkout_field_label_' . $i;
254
  $option_name_type = $the_section . '_wcj_checkout_field_type_' . $i;
255
- $post_value = ( isset( $_POST[ $option_name ] ) ? ( sanitize_text_field( wp_unslash( $_POST[ $option_name ] ) ) ) : ! empty( $_POST[ '_' . $option_name ] ) ) ? sanitize_text_field( wp_unslash( $_POST[ '_' . $option_name ] ) ) : get_post_meta( $order_id, '_' . $option_name, true );
 
256
  if ( ! empty( $post_value ) || 'checkbox' === $the_type ) {
257
  update_post_meta( $order_id, '_' . $option_name_type, $the_type );
258
  update_post_meta( $order_id, '_' . $option_name_label, wcj_get_option( 'wcj_checkout_custom_field_label_' . $i ) );
@@ -404,13 +405,17 @@ if ( ! class_exists( 'WCJ_Checkout_Custom_Fields' ) ) :
404
  /**
405
  * Add_woocommerce_admin_fields.
406
  *
407
- * @version 5.5.6
408
  * @todo converting from before version 2.3.0: section?
409
  * @todo add alternative way of displaying fields (e.g. new meta box), so we have more control over displaying fields' values (e.g. line breaks)
410
  * @param string $fields defines the fields.
411
  * @param string $section defines the section.
412
  */
413
  public function add_woocommerce_admin_fields( $fields, $section ) {
 
 
 
 
414
  for ( $i = 1; $i <= $this->wcj_checkout_custom_fields_total_number; $i++ ) {
415
  if ( 'yes' === wcj_get_option( 'wcj_checkout_custom_field_enabled_' . $i ) ) {
416
  $the_section = wcj_get_option( 'wcj_checkout_custom_field_section_' . $i );
@@ -544,7 +549,7 @@ if ( ! class_exists( 'WCJ_Checkout_Custom_Fields' ) ) :
544
  /**
545
  * Is_visible.
546
  *
547
- * @version 4.2.0
548
  * @since 2.6.0
549
  * @todo add "user roles to include/exclude"
550
  * @param string $i defines the i.
@@ -565,7 +570,7 @@ if ( ! class_exists( 'WCJ_Checkout_Custom_Fields' ) ) :
565
  continue;
566
  }
567
  foreach ( $product_categories as $product_category ) {
568
- if ( in_array( $product_category->term_id, $categories_ex, true ) ) {
569
  return false;
570
  }
571
  }
@@ -587,7 +592,7 @@ if ( ! class_exists( 'WCJ_Checkout_Custom_Fields' ) ) :
587
  $products_ex = wcj_get_option( 'wcj_checkout_custom_field_products_ex_' . $i );
588
  if ( ! empty( $products_ex ) ) {
589
  foreach ( WC()->cart->get_cart() as $cart_item_key => $values ) {
590
- if ( in_array( $values['product_id'], $products_ex ) ) {
591
  return false;
592
  }
593
  }
@@ -595,7 +600,7 @@ if ( ! class_exists( 'WCJ_Checkout_Custom_Fields' ) ) :
595
  $products_in = wcj_get_option( 'wcj_checkout_custom_field_products_in_' . $i );
596
  if ( ! empty( $products_in ) ) {
597
  foreach ( WC()->cart->get_cart() as $cart_item_key => $values ) {
598
- if ( in_array( $values['product_id'], $products_in ) ) {
599
  return true;
600
  }
601
  }
2
  /**
3
  * Booster for WooCommerce - Module - Checkout Custom Fields
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
45
  '</li>' .
46
  '<li>' . sprintf(
47
  /* translators: %s: search term */
48
+ __( '<strong>PHP code:</strong> by using %1$s function,<br> e.g.: %2$s', 'woocommerce-jetpack' ),
49
  '<code>do_shortcode()</code>',
50
  '<code>echo&nbsp;do_shortcode(&nbsp;\'[wcj_order_checkout_field meta_key = "billing_wcj_checkout_field_1]\'&nbsp;);</code>'
51
  ) .
237
  /**
238
  * Update_custom_checkout_fields_order_meta.
239
  *
240
+ * @version 5.6.2
241
  *
242
  * @param string $order_id defines the order_id.
243
  */
252
  $option_name = $the_section . '_wcj_checkout_field_' . $i;
253
  $option_name_label = $the_section . '_wcj_checkout_field_label_' . $i;
254
  $option_name_type = $the_section . '_wcj_checkout_field_type_' . $i;
255
+
256
+ $post_value = isset( $_POST[ $option_name ] ) ? ( sanitize_text_field( wp_unslash( $_POST[ $option_name ] ) ) ) : ( isset( $_POST[ '_' . $option_name ] ) ? ( sanitize_text_field( wp_unslash( $_POST[ '_' . $option_name ] ) ) ) : get_post_meta( $order_id, '_' . $option_name, true ) ); // phpcs:ignore WordPress.Security.NonceVerification
257
  if ( ! empty( $post_value ) || 'checkbox' === $the_type ) {
258
  update_post_meta( $order_id, '_' . $option_name_type, $the_type );
259
  update_post_meta( $order_id, '_' . $option_name_label, wcj_get_option( 'wcj_checkout_custom_field_label_' . $i ) );
405
  /**
406
  * Add_woocommerce_admin_fields.
407
  *
408
+ * @version 5.6.2
409
  * @todo converting from before version 2.3.0: section?
410
  * @todo add alternative way of displaying fields (e.g. new meta box), so we have more control over displaying fields' values (e.g. line breaks)
411
  * @param string $fields defines the fields.
412
  * @param string $section defines the section.
413
  */
414
  public function add_woocommerce_admin_fields( $fields, $section ) {
415
+ $wpnonce = true;
416
+ if ( function_exists( 'wp_verify_nonce' ) ) {
417
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), '' ) : true;
418
+ }
419
  for ( $i = 1; $i <= $this->wcj_checkout_custom_fields_total_number; $i++ ) {
420
  if ( 'yes' === wcj_get_option( 'wcj_checkout_custom_field_enabled_' . $i ) ) {
421
  $the_section = wcj_get_option( 'wcj_checkout_custom_field_section_' . $i );
549
  /**
550
  * Is_visible.
551
  *
552
+ * @version 5.6.2
553
  * @since 2.6.0
554
  * @todo add "user roles to include/exclude"
555
  * @param string $i defines the i.
570
  continue;
571
  }
572
  foreach ( $product_categories as $product_category ) {
573
+ if ( in_array( (string) $product_category->term_id, $categories_ex, true ) ) {
574
  return false;
575
  }
576
  }
592
  $products_ex = wcj_get_option( 'wcj_checkout_custom_field_products_ex_' . $i );
593
  if ( ! empty( $products_ex ) ) {
594
  foreach ( WC()->cart->get_cart() as $cart_item_key => $values ) {
595
+ if ( in_array( (string) $values['product_id'], $products_ex, true ) ) {
596
  return false;
597
  }
598
  }
600
  $products_in = wcj_get_option( 'wcj_checkout_custom_field_products_in_' . $i );
601
  if ( ! empty( $products_in ) ) {
602
  foreach ( WC()->cart->get_cart() as $cart_item_key => $values ) {
603
+ if ( in_array( (string) $values['product_id'], $products_in, true ) ) {
604
  return true;
605
  }
606
  }
includes/class-wcj-checkout-custom-info.php CHANGED
File without changes
includes/class-wcj-checkout-customization.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Checkout Customization
4
  *
5
- * @version 5.2.0
6
  * @since 2.7.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -238,7 +238,7 @@ if ( ! class_exists( 'WCJ_Checkout_Customization' ) ) :
238
  /**
239
  * Maybe_add_description.
240
  *
241
- * @version 3.8.0
242
  * @since 2.9.0
243
  * @param string $field defines the field.
244
  * @param string | int $key defines the key.
@@ -255,7 +255,7 @@ if ( ! class_exists( 'WCJ_Checkout_Customization' ) ) :
255
  $fields_to_disable_custom_d = array_map( 'trim', explode( ',', apply_filters( 'booster_option', '', wcj_get_option( 'wcj_checkout_customization_disable_fields_for_logged_custom_d', '' ) ) ) );
256
  $fields_to_disable = array_merge( $fields_to_disable, $fields_to_disable_custom_r, $fields_to_disable_custom_d );
257
  if ( ! empty( $fields_to_disable ) ) {
258
- if ( in_array( $key, $fields_to_disable ) ) {
259
  $desc = wcj_get_option(
260
  'wcj_checkout_customization_disable_fields_for_logged_message',
261
  '<em>' . __( 'This field can not be changed', 'woocommerce-jetpack' ) . '</em>'
@@ -272,7 +272,7 @@ if ( ! class_exists( 'WCJ_Checkout_Customization' ) ) :
272
  /**
273
  * Maybe_disable_fields.
274
  *
275
- * @version 3.8.0
276
  * @since 2.9.0
277
  * @see woocommerce_form_field
278
  * @todo (maybe) add single option (probably checkbox) to disable all fields
@@ -301,7 +301,7 @@ if ( ! class_exists( 'WCJ_Checkout_Customization' ) ) :
301
  if ( ! isset( $checkout_fields[ $section ][ $field_to_disable ]['custom_attributes'] ) ) {
302
  $checkout_fields[ $section ][ $field_to_disable ]['custom_attributes'] = array();
303
  }
304
- $custom_attributes = ( in_array( $field_to_disable, $disable_type_fields ) ? array( 'disabled' => 'disabled' ) : array( 'readonly' => 'readonly' ) );
305
  $checkout_fields[ $section ][ $field_to_disable ]['custom_attributes'] = array_merge(
306
  $checkout_fields[ $section ][ $field_to_disable ]['custom_attributes'],
307
  $custom_attributes
2
  /**
3
  * Booster for WooCommerce - Module - Checkout Customization
4
  *
5
+ * @version 5.6.2
6
  * @since 2.7.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
238
  /**
239
  * Maybe_add_description.
240
  *
241
+ * @version 5.6.2
242
  * @since 2.9.0
243
  * @param string $field defines the field.
244
  * @param string | int $key defines the key.
255
  $fields_to_disable_custom_d = array_map( 'trim', explode( ',', apply_filters( 'booster_option', '', wcj_get_option( 'wcj_checkout_customization_disable_fields_for_logged_custom_d', '' ) ) ) );
256
  $fields_to_disable = array_merge( $fields_to_disable, $fields_to_disable_custom_r, $fields_to_disable_custom_d );
257
  if ( ! empty( $fields_to_disable ) ) {
258
+ if ( in_array( $key, $fields_to_disable, true ) ) {
259
  $desc = wcj_get_option(
260
  'wcj_checkout_customization_disable_fields_for_logged_message',
261
  '<em>' . __( 'This field can not be changed', 'woocommerce-jetpack' ) . '</em>'
272
  /**
273
  * Maybe_disable_fields.
274
  *
275
+ * @version 5.6.2
276
  * @since 2.9.0
277
  * @see woocommerce_form_field
278
  * @todo (maybe) add single option (probably checkbox) to disable all fields
301
  if ( ! isset( $checkout_fields[ $section ][ $field_to_disable ]['custom_attributes'] ) ) {
302
  $checkout_fields[ $section ][ $field_to_disable ]['custom_attributes'] = array();
303
  }
304
+ $custom_attributes = ( in_array( $field_to_disable, $disable_type_fields, true ) ? array( 'disabled' => 'disabled' ) : array( 'readonly' => 'readonly' ) );
305
  $checkout_fields[ $section ][ $field_to_disable ]['custom_attributes'] = array_merge(
306
  $checkout_fields[ $section ][ $field_to_disable ]['custom_attributes'],
307
  $custom_attributes
includes/class-wcj-checkout-fees.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Checkout Fees
4
  *
5
- * @version 5.2.0
6
  * @since 3.7.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -70,7 +70,7 @@ if ( ! class_exists( 'WCJ_Checkout_Fees' ) ) :
70
  /**
71
  * Validate fee without considering overlapping.
72
  *
73
- * @version 4.6.1
74
  * @since 4.5.0
75
  *
76
  * @param int $fee_id defines the fee_id.
@@ -109,11 +109,20 @@ if ( ! class_exists( 'WCJ_Checkout_Fees' ) ) :
109
  }
110
 
111
  // Check checkout fields.
112
- if ( ! empty( $this->checkout_fields[ $fee_id ] ) ) {
 
 
 
 
 
113
  if ( isset( $post_data ) || isset( $_REQUEST['post_data'] ) ) {
114
  if ( ! isset( $post_data ) ) {
115
  $post_data = array();
116
- parse_str( $_REQUEST['post_data'], $post_data );
 
 
 
 
117
  }
118
  if ( empty( $post_data[ $this->checkout_fields[ $fee_id ] ] ) ) {
119
  return false;
2
  /**
3
  * Booster for WooCommerce - Module - Checkout Fees
4
  *
5
+ * @version 5.6.2
6
  * @since 3.7.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
70
  /**
71
  * Validate fee without considering overlapping.
72
  *
73
+ * @version 5.6.2
74
  * @since 4.5.0
75
  *
76
  * @param int $fee_id defines the fee_id.
109
  }
110
 
111
  // Check checkout fields.
112
+ $wpnonce = true;
113
+ if ( function_exists( 'wp_verify_nonce' ) ) {
114
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
115
+ }
116
+
117
+ if ( ! empty( $this->checkout_fields[ $fee_id ] ) && $wpnonce ) {
118
  if ( isset( $post_data ) || isset( $_REQUEST['post_data'] ) ) {
119
  if ( ! isset( $post_data ) ) {
120
  $post_data = array();
121
+ parse_str(
122
+ array_map( 'sanitize_text_field', wp_unslash( $_REQUEST['post_data'] ) ),
123
+ $post_data
124
+ );
125
+
126
  }
127
  if ( empty( $post_data[ $this->checkout_fields[ $fee_id ] ] ) ) {
128
  return false;
includes/class-wcj-checkout-files-upload.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Checkout Files Upload
4
  *
5
- * @version 5.6.1
6
  * @since 2.4.5
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -23,7 +23,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
23
  /**
24
  * Constructor.
25
  *
26
- * @version 5.2.0
27
  * @since 2.4.5
28
  * @todo styling options
29
  */
@@ -46,7 +46,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
46
  $total_number = apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_checkout_files_upload_total_number', 1 ) );
47
  for ( $i = 1; $i <= $total_number; $i++ ) {
48
  $the_hook = wcj_get_option( 'wcj_checkout_files_upload_hook_' . $i, 'woocommerce_before_checkout_form' );
49
- if ( 'disable' != ( $the_hook ) ) {
50
  add_action( $the_hook, array( $this, 'add_files_upload_form_to_checkout_frontend' ), wcj_get_option( 'wcj_checkout_files_upload_hook_priority_' . $i, 10 ) );
51
  }
52
  if ( 'yes' === wcj_get_option( 'wcj_checkout_files_upload_add_to_thankyou_' . $i, 'no' ) ) {
@@ -123,7 +123,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
123
  /**
124
  * Add_files_to_order_display.
125
  *
126
- * @version 5.5.9
127
  * @since 2.4.7
128
  * @todo (maybe) somehow add `%image%` to emails also
129
  * @param string | int $order defines the order.
@@ -148,11 +148,11 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
148
  }
149
  for ( $i = 1; $i <= $total_files; $i++ ) {
150
  $real_file_name = get_post_meta( $order_id, '_wcj_checkout_files_upload_real_name_' . $i, true );
151
- if ( '' != $real_file_name ) {
152
  $img = '';
153
  if ( $do_add_img ) {
154
  $order_file_name = wcj_get_wcj_uploads_dir( 'checkout_files_upload' ) . '/' . get_post_meta( $order_id, '_wcj_checkout_files_upload_' . $i, true );
155
- if ( @is_array( getimagesize( $order_file_name ) ) ) {
156
  $link = add_query_arg(
157
  array(
158
  'wcj_download_checkout_file' => $i,
@@ -172,8 +172,8 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
172
  );
173
  }
174
  }
175
- if ( '' != $html ) {
176
- echo $template_before . $html . $template_after;
177
  }
178
  }
179
 
@@ -196,7 +196,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
196
  /**
197
  * Validate_on_checkout.
198
  *
199
- * @version 3.9.0
200
  * @since 2.4.5
201
  * @param string $posted defines the posted.
202
  */
@@ -206,7 +206,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
206
  if (
207
  'yes' === wcj_get_option( 'wcj_checkout_files_upload_enabled_' . $i, 'yes' ) &&
208
  $this->is_visible( $i ) &&
209
- 'disable' != wcj_get_option( 'wcj_checkout_files_upload_hook_' . $i, 'woocommerce_before_checkout_form' )
210
  ) {
211
  if ( 'yes' === wcj_get_option( 'wcj_checkout_files_upload_required_' . $i, 'no' ) && null === wcj_session_get( 'wcj_checkout_files_upload_' . $i ) ) {
212
  // Is required.
@@ -219,11 +219,11 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
219
  $file_name = $file_name['name'];
220
  $file_type = '.' . pathinfo( $file_name, PATHINFO_EXTENSION );
221
  $file_accept = wcj_get_option( 'wcj_checkout_files_upload_file_accept_' . $i, '' );
222
- if ( '' != ( $file_accept ) ) {
223
  // Validate file type.
224
  $file_accept = explode( ',', $file_accept );
225
  if ( is_array( $file_accept ) && ! empty( $file_accept ) ) {
226
- if ( ! in_array( $file_type, $file_accept ) ) {
227
  $this->add_notice(
228
  sprintf(
229
  wcj_get_option(
@@ -278,7 +278,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
278
  /**
279
  * Create_file_admin_order_meta_box.
280
  *
281
- * @version 5.5.9
282
  * @since 2.4.5
283
  */
284
  public function create_file_admin_order_meta_box() {
@@ -289,7 +289,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
289
  for ( $i = 1; $i <= $total_files; $i++ ) {
290
  $order_file_name = get_post_meta( $order_id, '_wcj_checkout_files_upload_' . $i, true );
291
  $real_file_name = get_post_meta( $order_id, '_wcj_checkout_files_upload_real_name_' . $i, true );
292
- if ( '' != $order_file_name ) {
293
  $files_exists = true;
294
  $html .= '<p><a href="' . add_query_arg(
295
  array(
@@ -305,13 +305,13 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
305
  $html .= '<p><a style="color:#a00;" href="' . add_query_arg( 'wcj_download_checkout_file_admin_delete_all', $order_id ) . '"' . wcj_get_js_confirmation() . '>' .
306
  __( 'Delete all files', 'woocommerce-jetpack' ) . '</a></p>';
307
  }
308
- echo $html;
309
  }
310
 
311
  /**
312
  * Is_extension_blocked.
313
  *
314
- * @version 3.2.3
315
  * @since 3.2.3
316
  * @param string $ext defines the ext.
317
  */
@@ -328,13 +328,13 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
328
  'bat|exe|cmd|sh|php|php0|php1|php2|php3|php4|php5|php6|php7|php8|php9|ph|ph0|ph1|ph2|ph3|ph4|ph5|ph6|ph7|ph8|ph9|pl|cgi|386|dll|com|torrent|js|app|jar|pif|vb|vbscript|wsf|asp|cer|csr|jsp|drv|sys|ade|adp|bas|chm|cpl|crt|csh|fxp|hlp|hta|inf|ins|isp|jse|htaccess|htpasswd|ksh|lnk|mdb|mde|mdt|mdw|msc|msi|msp|mst|ops|pcd|prg|reg|scr|sct|shb|shs|url|vbe|vbs|wsc|wsf|wsh|html|htm'
329
  );
330
  $blocked_file_exts = explode( '|', $blocked_file_exts );
331
- return in_array( $ext, $blocked_file_exts );
332
  }
333
 
334
  /**
335
  * Add_files_to_order.
336
  *
337
- * @version 3.4.0
338
  * @since 2.4.5
339
  * @param int $order_id defines the order_id.
340
  * @param string $posted defines the posted.
@@ -353,9 +353,9 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
353
  $download_file_name = $order_id . '_' . $i . '.' . $ext;
354
  $file_path = $upload_dir . '/' . $download_file_name;
355
  $tmp_file_name = $session_data['tmp_name'];
356
- $file_data = file_get_contents( $tmp_file_name );
357
  if ( ! $this->is_extension_blocked( $ext ) ) { // should already be validated earlier, but just in case...
358
- file_put_contents( $file_path, $file_data );
359
  }
360
  unlink( $tmp_file_name );
361
  wcj_session_set( 'wcj_checkout_files_upload_' . $i, null );
@@ -369,7 +369,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
369
  /**
370
  * Remove_files_on_empty_cart.
371
  *
372
- * @version 3.9.0
373
  * @since 3.6.0
374
  * @param string $cart_item_key defines the cart_item_key.
375
  * @param string | array $cart defines the cart.
@@ -381,7 +381,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
381
  $wcj_checkout_files_upload_total_number = apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_checkout_files_upload_total_number', 1 ) );
382
  for ( $i = 1; $i <= $wcj_checkout_files_upload_total_number; $i++ ) {
383
  $session_data = wcj_session_get( 'wcj_checkout_files_upload_' . $i );
384
- if ( null != ( $session_data ) ) {
385
  $any_files_removed = true;
386
  if ( isset( $session_data['tmp_name'] ) ) {
387
  unlink( $session_data['tmp_name'] );
@@ -411,7 +411,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
411
  /**
412
  * Process_checkout_files_upload.
413
  *
414
- * @version 5.6.1
415
  * @since 2.4.5
416
  * @todo add option for admin to delete files one by one (i.e. not all at once)
417
  * @todo `$this->additional_admin_emails_settings` - more customization options, e.g.: admin email, subject, content, from
@@ -421,7 +421,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
421
  $admin_email = wcj_get_option( 'admin_email' );
422
  $admin_email_subject = __( 'Booster for WooCommerce: Checkout Files Upload: %action%', 'woocommerce-jetpack' );
423
  /* translators: %s: search term */
424
- $admin_email_content = __( 'Order ID: %order_id%; File name: %file_name%', 'woocommerce-jetpack' );
425
  $total_number = apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_checkout_files_upload_total_number', 1 ) );
426
  // Remove file.
427
  for ( $i = 1; $i <= $total_number; $i++ ) {
@@ -429,7 +429,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
429
  if ( isset( $_POST[ 'wcj_checkout_files_upload_order_id_' . $i ] ) ) {
430
  $order_id = sanitize_text_field( wp_unslash( $_POST[ 'wcj_checkout_files_upload_order_id_' . $i ] ) );
431
  $order_file_name = get_post_meta( $order_id, '_wcj_checkout_files_upload_' . $i, true );
432
- if ( '' != $order_file_name ) {
433
  $file_path = wcj_get_wcj_uploads_dir( 'checkout_files_upload' ) . '/' . $order_file_name;
434
  unlink( $file_path );
435
  $file_name = get_post_meta( $order_id, '_wcj_checkout_files_upload_real_name_' . $i, true );
@@ -445,7 +445,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
445
  );
446
  delete_post_meta( $order_id, '_wcj_checkout_files_upload_' . $i );
447
  delete_post_meta( $order_id, '_wcj_checkout_files_upload_real_name_' . $i );
448
- if ( in_array( 'remove_file', $this->additional_admin_emails_settings['actions'] ) ) {
449
  wp_mail(
450
  $admin_email,
451
  wcj_handle_replacements(
@@ -487,18 +487,19 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
487
  // Upload file.
488
  for ( $i = 1; $i <= $total_number; $i++ ) {
489
  if ( isset( $_POST[ 'wcj_upload_checkout_file_' . $i ] ) ) {
490
- $file_name = 'wcj_checkout_files_upload_' . $i;
491
- if ( isset( $_FILES[ $file_name ] ) && '' != $_FILES[ $file_name ]['tmp_name'] ) {
 
492
  // Validate.
493
  $is_valid = true;
494
- $real_file_name = $_FILES[ $file_name ]['name'];
495
  $file_type = '.' . pathinfo( $real_file_name, PATHINFO_EXTENSION );
496
  $file_accept = wcj_get_option( 'wcj_checkout_files_upload_file_accept_' . $i, '' );
497
- if ( '' != ( $file_accept ) ) {
498
  // Validate file type.
499
  $file_accept = explode( ',', $file_accept );
500
  if ( is_array( $file_accept ) && ! empty( $file_accept ) ) {
501
- if ( ! in_array( $file_type, $file_accept ) ) {
502
  $this->add_notice(
503
  sprintf(
504
  wcj_get_option(
@@ -531,8 +532,8 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
531
  if ( $is_valid ) {
532
  // To session.
533
  $tmp_dest_file = tempnam( sys_get_temp_dir(), 'wcj' );
534
- move_uploaded_file( $_FILES[ $file_name ]['tmp_name'], $tmp_dest_file );
535
- $session_data = $_FILES[ $file_name ];
536
  $session_data['tmp_name'] = $tmp_dest_file;
537
  wcj_session_set( $file_name, $session_data );
538
  $this->add_notice(
@@ -542,13 +543,13 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
542
  /* translators: %s: search term */
543
  __( 'File "%s" was successfully uploaded.', 'woocommerce-jetpack' )
544
  ),
545
- $_FILES[ $file_name ]['name']
546
  )
547
  );
548
  // To order.
549
  if ( isset( $_POST[ 'wcj_checkout_files_upload_order_id_' . $i ] ) ) {
550
  $this->add_files_to_order( sanitize_text_field( wp_unslash( $_POST[ 'wcj_checkout_files_upload_order_id_' . $i ] ) ), null );
551
- if ( in_array( 'upload_file', $this->additional_admin_emails_settings['actions'] ) ) {
552
  $attachments = ( 'no' === $this->additional_admin_emails_settings['do_attach'] ?
553
  array() : array( $this->get_order_full_file_name( sanitize_text_field( wp_unslash( $_POST[ 'wcj_checkout_files_upload_order_id_' . $i ] ) ), $i ) ) );
554
  wp_mail(
@@ -562,7 +563,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
562
  wcj_handle_replacements(
563
  array(
564
  '%order_id%' => sanitize_text_field( wp_unslash( $_POST[ 'wcj_checkout_files_upload_order_id_' . $i ] ) ),
565
- '%file_name%' => $_FILES[ $file_name ]['name'],
566
  ),
567
  $admin_email_content
568
  ),
@@ -575,8 +576,8 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
575
  do_action(
576
  'wcj_checkout_files_upload',
577
  'upload_file',
578
- ( isset( $_POST[ 'wcj_checkout_files_upload_order_id_' . $i ] ) ? $_POST[ 'wcj_checkout_files_upload_order_id_' . $i ] : false ),
579
- $_FILES[ $file_name ]['name']
580
  );
581
  }
582
  } else {
@@ -593,16 +594,18 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
593
  // Admin file download.
594
  if ( isset( $_GET['wcj_download_checkout_file_admin'] ) ) {
595
  $tmp_file_name = wcj_get_wcj_uploads_dir( 'checkout_files_upload' ) . '/' . sanitize_text_field( wp_unslash( $_GET['wcj_download_checkout_file_admin'] ) );
596
- $file_name = get_post_meta( $_GET['post'], '_' . 'wcj_checkout_files_upload_real_name_' . sanitize_text_field( wp_unslash( $_GET['wcj_checkout_file_number'] ) ), true );
597
- if ( wcj_is_user_role( 'administrator' ) || is_shop_manager() ) {
598
- header( 'Expires: 0' );
599
- header( 'Cache-Control: must-revalidate, post-check=0, pre-check=0' );
600
- header( 'Cache-Control: private', false );
601
- header( 'Content-disposition: attachment; filename=' . $file_name );
602
- header( 'Content-Transfer-Encoding: binary' );
603
- header( 'Content-Length: ' . filesize( $tmp_file_name ) );
604
- readfile( $tmp_file_name );
605
- exit();
 
 
606
  }
607
  }
608
  // Admin all files delete.
@@ -610,7 +613,8 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
610
  $order_id = sanitize_text_field( wp_unslash( $_GET['wcj_download_checkout_file_admin_delete_all'] ) );
611
  $total_files = get_post_meta( $order_id, '_wcj_checkout_files_total_files', true );
612
  for ( $i = 1; $i <= $total_files; $i++ ) {
613
- if ( '' != ( $order_file_name = get_post_meta( $order_id, '_' . 'wcj_checkout_files_upload_' . $i, true ) ) ) {
 
614
  unlink( wcj_get_wcj_uploads_dir( 'checkout_files_upload' ) . '/' . $order_file_name );
615
  }
616
  delete_post_meta( $order_id, '_wcj_checkout_files_upload_' . $i );
@@ -625,7 +629,8 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
625
  $i = sanitize_text_field( wp_unslash( $_GET['wcj_download_checkout_file'] ) );
626
  if ( ! empty( $_GET['wcj_download_checkout_file_order_id'] ) ) {
627
  $order_id = sanitize_text_field( wp_unslash( $_GET['wcj_download_checkout_file_order_id'] ) );
628
- if ( ! ( $order = wc_get_order( $order_id ) ) ) {
 
629
  return;
630
  }
631
  if ( isset( $_GET['key'] ) ) {
@@ -635,7 +640,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
635
  }
636
  } else {
637
  // My Account.
638
- if ( ! wcj_is_user_logged_in() || $order->get_customer_id() != wcj_get_current_user_id() ) {
639
  return;
640
  }
641
  }
@@ -653,7 +658,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
653
  header( 'Content-disposition: attachment; filename=' . $file_name );
654
  header( 'Content-Transfer-Encoding: binary' );
655
  header( 'Content-Length: ' . filesize( $tmp_file_name ) );
656
- readfile( $tmp_file_name );
657
  exit();
658
  }
659
  }
@@ -661,27 +666,27 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
661
  /**
662
  * Is_visible.
663
  *
664
- * @version 3.6.0
665
  * @since 2.4.7
666
  * @param int $i defines the value of i.
667
  * @param int $order_id defines the order_id.
668
  */
669
  public function is_visible( $i, $order_id = 0 ) {
670
 
671
- if ( apply_filters( 'wcj_checkout_files_always_visible_on_empty_cart', false ) && 0 == $order_id && WC()->cart->is_empty() ) {
672
  // Added for "One Page Checkout" plugin compatibility.
673
  return true;
674
  }
675
 
676
  // Include by user role.
677
  $user_roles = wcj_get_option( 'wcj_checkout_files_upload_show_user_roles_' . $i, '' );
678
- if ( ! empty( $user_roles ) && ! in_array( wcj_get_current_user_first_role(), $user_roles ) ) {
679
  return false;
680
  }
681
 
682
  // Exclude by user role.
683
  $user_roles = wcj_get_option( 'wcj_checkout_files_upload_hide_user_roles_' . $i, '' );
684
- if ( ! empty( $user_roles ) && in_array( wcj_get_current_user_first_role(), $user_roles ) ) {
685
  return false;
686
  }
687
 
@@ -689,14 +694,14 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
689
  $products_in = wcj_get_option( 'wcj_checkout_files_upload_show_products_in_' . $i );
690
  if ( ! empty( $products_in ) ) {
691
  $do_skip_by_products = true;
692
- if ( 0 != $order_id ) {
693
  $the_order = wc_get_order( $order_id );
694
  $the_items = $the_order->get_items();
695
  } else {
696
  $the_items = WC()->cart->get_cart();
697
  }
698
  foreach ( $the_items as $cart_item_key => $values ) {
699
- if ( in_array( $values['product_id'], $products_in ) ) {
700
  $do_skip_by_products = false;
701
  break;
702
  }
@@ -709,14 +714,14 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
709
  // Exclude by product id.
710
  $products_in = wcj_get_option( 'wcj_checkout_files_upload_hide_products_in_' . $i );
711
  if ( ! empty( $products_in ) ) {
712
- if ( 0 != $order_id ) {
713
  $the_order = wc_get_order( $order_id );
714
  $the_items = $the_order->get_items();
715
  } else {
716
  $the_items = WC()->cart->get_cart();
717
  }
718
  foreach ( $the_items as $cart_item_key => $values ) {
719
- if ( in_array( $values['product_id'], $products_in ) ) {
720
  return false;
721
  }
722
  }
@@ -726,7 +731,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
726
  $categories_in = wcj_get_option( 'wcj_checkout_files_upload_show_cats_in_' . $i );
727
  if ( ! empty( $categories_in ) ) {
728
  $do_skip_by_cats = true;
729
- if ( 0 != $order_id ) {
730
  $the_order = wc_get_order( $order_id );
731
  $the_items = $the_order->get_items();
732
  } else {
@@ -738,7 +743,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
738
  continue;
739
  }
740
  foreach ( $product_categories as $product_category ) {
741
- if ( in_array( $product_category->term_id, $categories_in ) ) {
742
  $do_skip_by_cats = false;
743
  break;
744
  }
@@ -755,7 +760,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
755
  // Exclude by product category.
756
  $categories_in = wcj_get_option( 'wcj_checkout_files_upload_hide_cats_in_' . $i );
757
  if ( ! empty( $categories_in ) ) {
758
- if ( 0 != $order_id ) {
759
  $the_order = wc_get_order( $order_id );
760
  $the_items = $the_order->get_items();
761
  } else {
@@ -767,18 +772,18 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
767
  continue;
768
  }
769
  foreach ( $product_categories as $product_category ) {
770
- if ( in_array( $product_category->term_id, $categories_in ) ) {
771
  return false;
772
  }
773
  }
774
  }
775
  }
776
 
777
- // Include by product tag
778
  $tags_in = wcj_get_option( 'wcj_checkout_files_upload_show_tags_in_' . $i );
779
  if ( ! empty( $tags_in ) ) {
780
  $do_skip_by_tags = true;
781
- if ( 0 != $order_id ) {
782
  $the_order = wc_get_order( $order_id );
783
  $the_items = $the_order->get_items();
784
  } else {
@@ -790,7 +795,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
790
  continue;
791
  }
792
  foreach ( $product_tags as $product_tag ) {
793
- if ( in_array( $product_tag->term_id, $tags_in ) ) {
794
  $do_skip_by_tags = false;
795
  break;
796
  }
@@ -807,7 +812,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
807
  // Exclude by product tag.
808
  $tags_in = wcj_get_option( 'wcj_checkout_files_upload_hide_tags_in_' . $i );
809
  if ( ! empty( $tags_in ) ) {
810
- if ( 0 != $order_id ) {
811
  $the_order = wc_get_order( $order_id );
812
  $the_items = $the_order->get_items();
813
  } else {
@@ -819,7 +824,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
819
  continue;
820
  }
821
  foreach ( $product_tags as $product_tag ) {
822
- if ( in_array( $product_tag->term_id, $tags_in ) ) {
823
  return false;
824
  }
825
  }
@@ -832,7 +837,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
832
  /**
833
  * Maybe_get_image.
834
  *
835
- * @version 3.7.0
836
  * @since 3.7.0
837
  * @param string $link defines the link.
838
  * @param int $i defines the value of i.
@@ -841,14 +846,14 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
841
  public function maybe_get_image( $link, $i, $order_id = 0 ) {
842
  if ( 'yes' === wcj_get_option( 'wcj_checkout_files_upload_form_template_field_show_images', 'no' ) ) {
843
  $order = wc_get_order( $order_id );
844
- if ( 0 != $order_id && isset( $_GET['key'] ) && ( $order ) && $order->key_is_valid( sanitize_text_field( wp_unslash( $_GET['key'] ) ) ) ) {
845
  $order_file_name = get_post_meta( $order_id, '_wcj_checkout_files_upload_' . $i, true );
846
  $tmp_file_name = wcj_get_wcj_uploads_dir( 'checkout_files_upload' ) . '/' . $order_file_name;
847
  } else {
848
  $session_data = wcj_session_get( 'wcj_checkout_files_upload_' . $i );
849
  $tmp_file_name = $session_data['tmp_name'];
850
  }
851
- if ( @is_array( getimagesize( $tmp_file_name ) ) ) {
852
  return '<img style="' . wcj_get_option( 'wcj_checkout_files_upload_form_template_field_image_style', 'width:64px;' ) . '" src="' . $link . '"> ';
853
  }
854
  }
@@ -858,7 +863,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
858
  /**
859
  * Get_the_form.
860
  *
861
- * @version 5.5.9
862
  * @since 2.5.0
863
  * @param int $i defines the value of i.
864
  * @param string $file_name defines the file_name.
@@ -869,7 +874,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
869
  $html .= '<form enctype="multipart/form-data" action="" method="POST">';
870
  $html .= wcj_get_option( 'wcj_checkout_files_upload_form_template_before', '<table>' );
871
  $the_label = wcj_get_option( 'wcj_checkout_files_upload_label_' . $i, '' );
872
- if ( '' != ( $the_label ) ) {
873
  $template = wcj_get_option(
874
  'wcj_checkout_files_upload_form_template_label',
875
  '<tr><td colspan="2"><label for="%field_id%">%field_label%</label>%required_html%</td></tr>'
@@ -882,7 +887,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
882
  $template
883
  );
884
  }
885
- if ( '' == $file_name ) {
886
  $field_html = '<input type="file" name="wcj_checkout_files_upload_' . $i . '" id="wcj_checkout_files_upload_' . $i .
887
  '" accept="' . wcj_get_option( 'wcj_checkout_files_upload_file_accept_' . $i, '' ) . '">';
888
  $button_html = '<input type="submit"' .
@@ -919,7 +924,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
919
  $template
920
  );
921
  $html .= wcj_get_option( 'wcj_checkout_files_upload_form_template_after', '</table>' );
922
- if ( 0 != $order_id ) {
923
  $html .= '<input type="hidden" name="wcj_checkout_files_upload_order_id_' . $i . '" value="' . $order_id . '">';
924
  }
925
  $html .= '</form>';
@@ -929,7 +934,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
929
  /**
930
  * Add_files_upload_form_to_thankyou_and_myaccount_page.
931
  *
932
- * @version 2.5.6
933
  * @since 2.5.0
934
  * @param int $order_id defines the order_id.
935
  */
@@ -948,7 +953,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
948
  }
949
  }
950
  }
951
- echo $html;
952
  }
953
 
954
  /**
@@ -965,7 +970,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
965
  /**
966
  * Add_files_upload_form_to_checkout_frontend_all.
967
  *
968
- * @version 3.4.0
969
  * @since 2.5.2
970
  * @param bool $is_direct_call check the is_direct_call.
971
  */
@@ -978,8 +983,8 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
978
  }
979
  for ( $i = 1; $i <= $total_number; $i++ ) {
980
  $is_filter_ok = ( $is_direct_call ) ? true : (
981
- wcj_get_option( 'wcj_checkout_files_upload_hook_' . $i, 'woocommerce_before_checkout_form' ) === $current_filter &&
982
- wcj_get_option( 'wcj_checkout_files_upload_hook_priority_' . $i, 10 ) == $current_filter_priority
983
  );
984
  if ( 'yes' === wcj_get_option( 'wcj_checkout_files_upload_enabled_' . $i, 'yes' ) && $is_filter_ok && $this->is_visible( $i ) ) {
985
  $session_data = wcj_session_get( 'wcj_checkout_files_upload_' . $i );
@@ -987,7 +992,7 @@ if ( ! class_exists( 'WCJ_Checkout_Files_Upload' ) ) :
987
  $html .= $this->get_the_form( $i, $file_name );
988
  }
989
  }
990
- echo $html;
991
  }
992
 
993
  }
2
  /**
3
  * Booster for WooCommerce - Module - Checkout Files Upload
4
  *
5
+ * @version 5.6.2
6
  * @since 2.4.5
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
23
  /**
24
  * Constructor.
25
  *
26
+ * @version 5.6.2
27
  * @since 2.4.5
28
  * @todo styling options
29
  */
46
  $total_number = apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_checkout_files_upload_total_number', 1 ) );
47
  for ( $i = 1; $i <= $total_number; $i++ ) {
48
  $the_hook = wcj_get_option( 'wcj_checkout_files_upload_hook_' . $i, 'woocommerce_before_checkout_form' );
49
+ if ( 'disable' !== ( $the_hook ) ) {
50
  add_action( $the_hook, array( $this, 'add_files_upload_form_to_checkout_frontend' ), wcj_get_option( 'wcj_checkout_files_upload_hook_priority_' . $i, 10 ) );
51
  }
52
  if ( 'yes' === wcj_get_option( 'wcj_checkout_files_upload_add_to_thankyou_' . $i, 'no' ) ) {
123
  /**
124
  * Add_files_to_order_display.
125
  *
126
+ * @version 5.6.2
127
  * @since 2.4.7
128
  * @todo (maybe) somehow add `%image%` to emails also
129
  * @param string | int $order defines the order.
148
  }
149
  for ( $i = 1; $i <= $total_files; $i++ ) {
150
  $real_file_name = get_post_meta( $order_id, '_wcj_checkout_files_upload_real_name_' . $i, true );
151
+ if ( '' !== $real_file_name ) {
152
  $img = '';
153
  if ( $do_add_img ) {
154
  $order_file_name = wcj_get_wcj_uploads_dir( 'checkout_files_upload' ) . '/' . get_post_meta( $order_id, '_wcj_checkout_files_upload_' . $i, true );
155
+ if ( is_array( getimagesize( $order_file_name ) ) ) {
156
  $link = add_query_arg(
157
  array(
158
  'wcj_download_checkout_file' => $i,
172
  );
173
  }
174
  }
175
+ if ( '' !== $html ) {
176
+ echo $template_before . $html . $template_after; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
177
  }
178
  }
179
 
196
  /**
197
  * Validate_on_checkout.
198
  *
199
+ * @version 5.6.2
200
  * @since 2.4.5
201
  * @param string $posted defines the posted.
202
  */
206
  if (
207
  'yes' === wcj_get_option( 'wcj_checkout_files_upload_enabled_' . $i, 'yes' ) &&
208
  $this->is_visible( $i ) &&
209
+ 'disable' !== wcj_get_option( 'wcj_checkout_files_upload_hook_' . $i, 'woocommerce_before_checkout_form' )
210
  ) {
211
  if ( 'yes' === wcj_get_option( 'wcj_checkout_files_upload_required_' . $i, 'no' ) && null === wcj_session_get( 'wcj_checkout_files_upload_' . $i ) ) {
212
  // Is required.
219
  $file_name = $file_name['name'];
220
  $file_type = '.' . pathinfo( $file_name, PATHINFO_EXTENSION );
221
  $file_accept = wcj_get_option( 'wcj_checkout_files_upload_file_accept_' . $i, '' );
222
+ if ( '' !== $file_accept && null !== $file_accept ) {
223
  // Validate file type.
224
  $file_accept = explode( ',', $file_accept );
225
  if ( is_array( $file_accept ) && ! empty( $file_accept ) ) {
226
+ if ( ! in_array( $file_type, $file_accept, true ) ) {
227
  $this->add_notice(
228
  sprintf(
229
  wcj_get_option(
278
  /**
279
  * Create_file_admin_order_meta_box.
280
  *
281
+ * @version 5.6.2
282
  * @since 2.4.5
283
  */
284
  public function create_file_admin_order_meta_box() {
289
  for ( $i = 1; $i <= $total_files; $i++ ) {
290
  $order_file_name = get_post_meta( $order_id, '_wcj_checkout_files_upload_' . $i, true );
291
  $real_file_name = get_post_meta( $order_id, '_wcj_checkout_files_upload_real_name_' . $i, true );
292
+ if ( '' !== $order_file_name && null !== $order_file_name ) {
293
  $files_exists = true;
294
  $html .= '<p><a href="' . add_query_arg(
295
  array(
305
  $html .= '<p><a style="color:#a00;" href="' . add_query_arg( 'wcj_download_checkout_file_admin_delete_all', $order_id ) . '"' . wcj_get_js_confirmation() . '>' .
306
  __( 'Delete all files', 'woocommerce-jetpack' ) . '</a></p>';
307
  }
308
+ echo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
309
  }
310
 
311
  /**
312
  * Is_extension_blocked.
313
  *
314
+ * @version 5.6.2
315
  * @since 3.2.3
316
  * @param string $ext defines the ext.
317
  */
328
  'bat|exe|cmd|sh|php|php0|php1|php2|php3|php4|php5|php6|php7|php8|php9|ph|ph0|ph1|ph2|ph3|ph4|ph5|ph6|ph7|ph8|ph9|pl|cgi|386|dll|com|torrent|js|app|jar|pif|vb|vbscript|wsf|asp|cer|csr|jsp|drv|sys|ade|adp|bas|chm|cpl|crt|csh|fxp|hlp|hta|inf|ins|isp|jse|htaccess|htpasswd|ksh|lnk|mdb|mde|mdt|mdw|msc|msi|msp|mst|ops|pcd|prg|reg|scr|sct|shb|shs|url|vbe|vbs|wsc|wsf|wsh|html|htm'
329
  );
330
  $blocked_file_exts = explode( '|', $blocked_file_exts );
331
+ return in_array( $ext, $blocked_file_exts, true );
332
  }
333
 
334
  /**
335
  * Add_files_to_order.
336
  *
337
+ * @version 5.6.2
338
  * @since 2.4.5
339
  * @param int $order_id defines the order_id.
340
  * @param string $posted defines the posted.
353
  $download_file_name = $order_id . '_' . $i . '.' . $ext;
354
  $file_path = $upload_dir . '/' . $download_file_name;
355
  $tmp_file_name = $session_data['tmp_name'];
356
+ $file_data = file_get_contents( $tmp_file_name ); // phpcs:ignore
357
  if ( ! $this->is_extension_blocked( $ext ) ) { // should already be validated earlier, but just in case...
358
+ file_put_contents( $file_path, $file_data ); // phpcs:ignore
359
  }
360
  unlink( $tmp_file_name );
361
  wcj_session_set( 'wcj_checkout_files_upload_' . $i, null );
369
  /**
370
  * Remove_files_on_empty_cart.
371
  *
372
+ * @version 5.6.2
373
  * @since 3.6.0
374
  * @param string $cart_item_key defines the cart_item_key.
375
  * @param string | array $cart defines the cart.
381
  $wcj_checkout_files_upload_total_number = apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_checkout_files_upload_total_number', 1 ) );
382
  for ( $i = 1; $i <= $wcj_checkout_files_upload_total_number; $i++ ) {
383
  $session_data = wcj_session_get( 'wcj_checkout_files_upload_' . $i );
384
+ if ( null !== $session_data && '' !== $session_data ) {
385
  $any_files_removed = true;
386
  if ( isset( $session_data['tmp_name'] ) ) {
387
  unlink( $session_data['tmp_name'] );
411
  /**
412
  * Process_checkout_files_upload.
413
  *
414
+ * @version 5.6.2
415
  * @since 2.4.5
416
  * @todo add option for admin to delete files one by one (i.e. not all at once)
417
  * @todo `$this->additional_admin_emails_settings` - more customization options, e.g.: admin email, subject, content, from
421
  $admin_email = wcj_get_option( 'admin_email' );
422
  $admin_email_subject = __( 'Booster for WooCommerce: Checkout Files Upload: %action%', 'woocommerce-jetpack' );
423
  /* translators: %s: search term */
424
+ $admin_email_content = __( 'Order ID: %order_id%; File name: %file_name%', 'woocommerce-jetpack' ); // phpcs:ignore
425
  $total_number = apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_checkout_files_upload_total_number', 1 ) );
426
  // Remove file.
427
  for ( $i = 1; $i <= $total_number; $i++ ) {
429
  if ( isset( $_POST[ 'wcj_checkout_files_upload_order_id_' . $i ] ) ) {
430
  $order_id = sanitize_text_field( wp_unslash( $_POST[ 'wcj_checkout_files_upload_order_id_' . $i ] ) );
431
  $order_file_name = get_post_meta( $order_id, '_wcj_checkout_files_upload_' . $i, true );
432
+ if ( '' !== $order_file_name && null !== $order_file_name ) {
433
  $file_path = wcj_get_wcj_uploads_dir( 'checkout_files_upload' ) . '/' . $order_file_name;
434
  unlink( $file_path );
435
  $file_name = get_post_meta( $order_id, '_wcj_checkout_files_upload_real_name_' . $i, true );
445
  );
446
  delete_post_meta( $order_id, '_wcj_checkout_files_upload_' . $i );
447
  delete_post_meta( $order_id, '_wcj_checkout_files_upload_real_name_' . $i );
448
+ if ( in_array( 'remove_file', $this->additional_admin_emails_settings['actions'], true ) ) {
449
  wp_mail(
450
  $admin_email,
451
  wcj_handle_replacements(
487
  // Upload file.
488
  for ( $i = 1; $i <= $total_number; $i++ ) {
489
  if ( isset( $_POST[ 'wcj_upload_checkout_file_' . $i ] ) ) {
490
+ $file_name = 'wcj_checkout_files_upload_' . $i;
491
+ $temp_file_name = isset( $_FILES[ $file_name ]['tmp_name'] ) ? sanitize_text_field( wp_unslash( $_FILES[ $file_name ]['tmp_name'] ) ) : '';
492
+ if ( isset( $_FILES[ $file_name ] ) && '' !== $temp_file_name && null !== $temp_file_name ) {
493
  // Validate.
494
  $is_valid = true;
495
+ $real_file_name = isset( $_FILES[ $file_name ]['name'] ) ? sanitize_text_field( wp_unslash( $_FILES[ $file_name ]['name'] ) ) : '';
496
  $file_type = '.' . pathinfo( $real_file_name, PATHINFO_EXTENSION );
497
  $file_accept = wcj_get_option( 'wcj_checkout_files_upload_file_accept_' . $i, '' );
498
+ if ( '' !== ( $file_accept ) ) {
499
  // Validate file type.
500
  $file_accept = explode( ',', $file_accept );
501
  if ( is_array( $file_accept ) && ! empty( $file_accept ) ) {
502
+ if ( ! in_array( $file_type, $file_accept, true ) ) {
503
  $this->add_notice(
504
  sprintf(
505
  wcj_get_option(
532
  if ( $is_valid ) {
533
  // To session.
534
  $tmp_dest_file = tempnam( sys_get_temp_dir(), 'wcj' );
535
+ move_uploaded_file( $temp_file_name, $tmp_dest_file );
536
+ $session_data = array_map( 'sanitize_text_field', wp_unslash( $_FILES[ $file_name ] ) );
537
  $session_data['tmp_name'] = $tmp_dest_file;
538
  wcj_session_set( $file_name, $session_data );
539
  $this->add_notice(
543
  /* translators: %s: search term */
544
  __( 'File "%s" was successfully uploaded.', 'woocommerce-jetpack' )
545
  ),
546
+ $real_file_name
547
  )
548
  );
549
  // To order.
550
  if ( isset( $_POST[ 'wcj_checkout_files_upload_order_id_' . $i ] ) ) {
551
  $this->add_files_to_order( sanitize_text_field( wp_unslash( $_POST[ 'wcj_checkout_files_upload_order_id_' . $i ] ) ), null );
552
+ if ( in_array( 'upload_file', $this->additional_admin_emails_settings['actions'], true ) ) {
553
  $attachments = ( 'no' === $this->additional_admin_emails_settings['do_attach'] ?
554
  array() : array( $this->get_order_full_file_name( sanitize_text_field( wp_unslash( $_POST[ 'wcj_checkout_files_upload_order_id_' . $i ] ) ), $i ) ) );
555
  wp_mail(
563
  wcj_handle_replacements(
564
  array(
565
  '%order_id%' => sanitize_text_field( wp_unslash( $_POST[ 'wcj_checkout_files_upload_order_id_' . $i ] ) ),
566
+ '%file_name%' => $real_file_name,
567
  ),
568
  $admin_email_content
569
  ),
576
  do_action(
577
  'wcj_checkout_files_upload',
578
  'upload_file',
579
+ ( isset( $_POST[ 'wcj_checkout_files_upload_order_id_' . $i ] ) ? sanitize_text_field( wp_unslash( $_POST[ 'wcj_checkout_files_upload_order_id_' . $i ] ) ) : false ),
580
+ $real_file_name
581
  );
582
  }
583
  } else {
594
  // Admin file download.
595
  if ( isset( $_GET['wcj_download_checkout_file_admin'] ) ) {
596
  $tmp_file_name = wcj_get_wcj_uploads_dir( 'checkout_files_upload' ) . '/' . sanitize_text_field( wp_unslash( $_GET['wcj_download_checkout_file_admin'] ) );
597
+ if ( isset( $_GET['post'] ) && isset( $_GET['wcj_checkout_file_number'] ) ) {
598
+ $file_name = get_post_meta( sanitize_text_field( wp_unslash( $_GET['post'] ) ), '_wcj_checkout_files_upload_real_name_' . sanitize_text_field( wp_unslash( $_GET['wcj_checkout_file_number'] ) ), true );
599
+ if ( wcj_is_user_role( 'administrator' ) || is_shop_manager() ) {
600
+ header( 'Expires: 0' );
601
+ header( 'Cache-Control: must-revalidate, post-check=0, pre-check=0' );
602
+ header( 'Cache-Control: private', false );
603
+ header( 'Content-disposition: attachment; filename=' . $file_name );
604
+ header( 'Content-Transfer-Encoding: binary' );
605
+ header( 'Content-Length: ' . filesize( $tmp_file_name ) );
606
+ readfile( $tmp_file_name ); // phpcs:ignore
607
+ exit();
608
+ }
609
  }
610
  }
611
  // Admin all files delete.
613
  $order_id = sanitize_text_field( wp_unslash( $_GET['wcj_download_checkout_file_admin_delete_all'] ) );
614
  $total_files = get_post_meta( $order_id, '_wcj_checkout_files_total_files', true );
615
  for ( $i = 1; $i <= $total_files; $i++ ) {
616
+ $order_file_name = get_post_meta( $order_id, '_wcj_checkout_files_upload_' . $i, true );
617
+ if ( '' !== $order_file_name ) {
618
  unlink( wcj_get_wcj_uploads_dir( 'checkout_files_upload' ) . '/' . $order_file_name );
619
  }
620
  delete_post_meta( $order_id, '_wcj_checkout_files_upload_' . $i );
629
  $i = sanitize_text_field( wp_unslash( $_GET['wcj_download_checkout_file'] ) );
630
  if ( ! empty( $_GET['wcj_download_checkout_file_order_id'] ) ) {
631
  $order_id = sanitize_text_field( wp_unslash( $_GET['wcj_download_checkout_file_order_id'] ) );
632
+ $order = wc_get_order( $order_id );
633
+ if ( ! $order ) {
634
  return;
635
  }
636
  if ( isset( $_GET['key'] ) ) {
640
  }
641
  } else {
642
  // My Account.
643
+ if ( ! wcj_is_user_logged_in() || $order->get_customer_id() !== wcj_get_current_user_id() ) {
644
  return;
645
  }
646
  }
658
  header( 'Content-disposition: attachment; filename=' . $file_name );
659
  header( 'Content-Transfer-Encoding: binary' );
660
  header( 'Content-Length: ' . filesize( $tmp_file_name ) );
661
+ readfile( $tmp_file_name );// phpcs:ignore
662
  exit();
663
  }
664
  }
666
  /**
667
  * Is_visible.
668
  *
669
+ * @version 5.6.2
670
  * @since 2.4.7
671
  * @param int $i defines the value of i.
672
  * @param int $order_id defines the order_id.
673
  */
674
  public function is_visible( $i, $order_id = 0 ) {
675
 
676
+ if ( apply_filters( 'wcj_checkout_files_always_visible_on_empty_cart', false ) && '0' === (string) $order_id && WC()->cart->is_empty() ) {
677
  // Added for "One Page Checkout" plugin compatibility.
678
  return true;
679
  }
680
 
681
  // Include by user role.
682
  $user_roles = wcj_get_option( 'wcj_checkout_files_upload_show_user_roles_' . $i, '' );
683
+ if ( ! empty( $user_roles ) && ! in_array( wcj_get_current_user_first_role(), $user_roles, true ) ) {
684
  return false;
685
  }
686
 
687
  // Exclude by user role.
688
  $user_roles = wcj_get_option( 'wcj_checkout_files_upload_hide_user_roles_' . $i, '' );
689
+ if ( ! empty( $user_roles ) && in_array( wcj_get_current_user_first_role(), $user_roles, true ) ) {
690
  return false;
691
  }
692
 
694
  $products_in = wcj_get_option( 'wcj_checkout_files_upload_show_products_in_' . $i );
695
  if ( ! empty( $products_in ) ) {
696
  $do_skip_by_products = true;
697
+ if ( 0 > $order_id ) {
698
  $the_order = wc_get_order( $order_id );
699
  $the_items = $the_order->get_items();
700
  } else {
701
  $the_items = WC()->cart->get_cart();
702
  }
703
  foreach ( $the_items as $cart_item_key => $values ) {
704
+ if ( in_array( (string) $values['product_id'], $products_in, true ) ) {
705
  $do_skip_by_products = false;
706
  break;
707
  }
714
  // Exclude by product id.
715
  $products_in = wcj_get_option( 'wcj_checkout_files_upload_hide_products_in_' . $i );
716
  if ( ! empty( $products_in ) ) {
717
+ if ( 0 > $order_id ) {
718
  $the_order = wc_get_order( $order_id );
719
  $the_items = $the_order->get_items();
720
  } else {
721
  $the_items = WC()->cart->get_cart();
722
  }
723
  foreach ( $the_items as $cart_item_key => $values ) {
724
+ if ( in_array( (string) $values['product_id'], $products_in, true ) ) {
725
  return false;
726
  }
727
  }
731
  $categories_in = wcj_get_option( 'wcj_checkout_files_upload_show_cats_in_' . $i );
732
  if ( ! empty( $categories_in ) ) {
733
  $do_skip_by_cats = true;
734
+ if ( 0 > $order_id ) {
735
  $the_order = wc_get_order( $order_id );
736
  $the_items = $the_order->get_items();
737
  } else {
743
  continue;
744
  }
745
  foreach ( $product_categories as $product_category ) {
746
+ if ( in_array( (string) $product_category->term_id, $categories_in, true ) ) {
747
  $do_skip_by_cats = false;
748
  break;
749
  }
760
  // Exclude by product category.
761
  $categories_in = wcj_get_option( 'wcj_checkout_files_upload_hide_cats_in_' . $i );
762
  if ( ! empty( $categories_in ) ) {
763
+ if ( 0 > $order_id ) {
764
  $the_order = wc_get_order( $order_id );
765
  $the_items = $the_order->get_items();
766
  } else {
772
  continue;
773
  }
774
  foreach ( $product_categories as $product_category ) {
775
+ if ( in_array( (string) $product_category->term_id, $categories_in, true ) ) {
776
  return false;
777
  }
778
  }
779
  }
780
  }
781
 
782
+ // Include by product tag.
783
  $tags_in = wcj_get_option( 'wcj_checkout_files_upload_show_tags_in_' . $i );
784
  if ( ! empty( $tags_in ) ) {
785
  $do_skip_by_tags = true;
786
+ if ( 0 > $order_id ) {
787
  $the_order = wc_get_order( $order_id );
788
  $the_items = $the_order->get_items();
789
  } else {
795
  continue;
796
  }
797
  foreach ( $product_tags as $product_tag ) {
798
+ if ( in_array( (string) $product_tag->term_id, $tags_in, true ) ) {
799
  $do_skip_by_tags = false;
800
  break;
801
  }
812
  // Exclude by product tag.
813
  $tags_in = wcj_get_option( 'wcj_checkout_files_upload_hide_tags_in_' . $i );
814
  if ( ! empty( $tags_in ) ) {
815
+ if ( 0 > $order_id ) {
816
  $the_order = wc_get_order( $order_id );
817
  $the_items = $the_order->get_items();
818
  } else {
824
  continue;
825
  }
826
  foreach ( $product_tags as $product_tag ) {
827
+ if ( in_array( (string) $product_tag->term_id, $tags_in, true ) ) {
828
  return false;
829
  }
830
  }
837
  /**
838
  * Maybe_get_image.
839
  *
840
+ * @version 5.6.2
841
  * @since 3.7.0
842
  * @param string $link defines the link.
843
  * @param int $i defines the value of i.
846
  public function maybe_get_image( $link, $i, $order_id = 0 ) {
847
  if ( 'yes' === wcj_get_option( 'wcj_checkout_files_upload_form_template_field_show_images', 'no' ) ) {
848
  $order = wc_get_order( $order_id );
849
+ if ( 0 > $order_id && isset( $_GET['key'] ) && ( $order ) && $order->key_is_valid( sanitize_text_field( wp_unslash( $_GET['key'] ) ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification
850
  $order_file_name = get_post_meta( $order_id, '_wcj_checkout_files_upload_' . $i, true );
851
  $tmp_file_name = wcj_get_wcj_uploads_dir( 'checkout_files_upload' ) . '/' . $order_file_name;
852
  } else {
853
  $session_data = wcj_session_get( 'wcj_checkout_files_upload_' . $i );
854
  $tmp_file_name = $session_data['tmp_name'];
855
  }
856
+ if ( @is_array( getimagesize( $tmp_file_name ) ) ) {// phpcs:ignore
857
  return '<img style="' . wcj_get_option( 'wcj_checkout_files_upload_form_template_field_image_style', 'width:64px;' ) . '" src="' . $link . '"> ';
858
  }
859
  }
863
  /**
864
  * Get_the_form.
865
  *
866
+ * @version 5.6.2
867
  * @since 2.5.0
868
  * @param int $i defines the value of i.
869
  * @param string $file_name defines the file_name.
874
  $html .= '<form enctype="multipart/form-data" action="" method="POST">';
875
  $html .= wcj_get_option( 'wcj_checkout_files_upload_form_template_before', '<table>' );
876
  $the_label = wcj_get_option( 'wcj_checkout_files_upload_label_' . $i, '' );
877
+ if ( '' !== $the_label && null !== $the_label ) {
878
  $template = wcj_get_option(
879
  'wcj_checkout_files_upload_form_template_label',
880
  '<tr><td colspan="2"><label for="%field_id%">%field_label%</label>%required_html%</td></tr>'
887
  $template
888
  );
889
  }
890
+ if ( '' === $file_name ) {
891
  $field_html = '<input type="file" name="wcj_checkout_files_upload_' . $i . '" id="wcj_checkout_files_upload_' . $i .
892
  '" accept="' . wcj_get_option( 'wcj_checkout_files_upload_file_accept_' . $i, '' ) . '">';
893
  $button_html = '<input type="submit"' .
924
  $template
925
  );
926
  $html .= wcj_get_option( 'wcj_checkout_files_upload_form_template_after', '</table>' );
927
+ if ( 0 > $order_id ) {
928
  $html .= '<input type="hidden" name="wcj_checkout_files_upload_order_id_' . $i . '" value="' . $order_id . '">';
929
  }
930
  $html .= '</form>';
934
  /**
935
  * Add_files_upload_form_to_thankyou_and_myaccount_page.
936
  *
937
+ * @version 5.6.2
938
  * @since 2.5.0
939
  * @param int $order_id defines the order_id.
940
  */
953
  }
954
  }
955
  }
956
+ echo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
957
  }
958
 
959
  /**
970
  /**
971
  * Add_files_upload_form_to_checkout_frontend_all.
972
  *
973
+ * @version 5.6.2
974
  * @since 2.5.2
975
  * @param bool $is_direct_call check the is_direct_call.
976
  */
983
  }
984
  for ( $i = 1; $i <= $total_number; $i++ ) {
985
  $is_filter_ok = ( $is_direct_call ) ? true : (
986
+ wcj_get_option( 'wcj_checkout_files_upload_hook_' . $i, 'woocommerce_before_checkout_form' ) === $current_filter &&
987
+ (string) wcj_get_option( 'wcj_checkout_files_upload_hook_priority_' . $i, 10 ) === (string) $current_filter_priority
988
  );
989
  if ( 'yes' === wcj_get_option( 'wcj_checkout_files_upload_enabled_' . $i, 'yes' ) && $is_filter_ok && $this->is_visible( $i ) ) {
990
  $session_data = wcj_session_get( 'wcj_checkout_files_upload_' . $i );
992
  $html .= $this->get_the_form( $i, $file_name );
993
  }
994
  }
995
+ echo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
996
  }
997
 
998
  }
includes/class-wcj-coupon-by-user-role.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Coupon by User Role
4
  *
5
- * @version 5.2.0
6
  * @since 3.6.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -53,13 +53,13 @@ if ( ! class_exists( 'WCJ_Coupon_By_User_Role' ) ) :
53
  /**
54
  * Coupons_enabled.
55
  *
56
- * @version 3.6.0
57
  * @since 3.6.0
58
  * @param string | bool $is_enabled check the coupons enabled.
59
  */
60
  public function coupons_enabled( $is_enabled ) {
61
  $disabled_user_roles = wcj_get_option( 'wcj_coupon_by_user_role_disabled', '' );
62
- if ( ! empty( $disabled_user_roles ) && in_array( wcj_get_current_user_first_role(), $disabled_user_roles ) ) {
63
  return false;
64
  }
65
  return $is_enabled;
@@ -96,7 +96,7 @@ if ( ! class_exists( 'WCJ_Coupon_By_User_Role' ) ) :
96
  ),
97
  10000
98
  );
99
- return false;
100
  }
101
  return $valid;
102
  }
2
  /**
3
  * Booster for WooCommerce - Module - Coupon by User Role
4
  *
5
+ * @version 5.6.2
6
  * @since 3.6.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
53
  /**
54
  * Coupons_enabled.
55
  *
56
+ * @version 5.6.2
57
  * @since 3.6.0
58
  * @param string | bool $is_enabled check the coupons enabled.
59
  */
60
  public function coupons_enabled( $is_enabled ) {
61
  $disabled_user_roles = wcj_get_option( 'wcj_coupon_by_user_role_disabled', '' );
62
+ if ( ! empty( $disabled_user_roles ) && in_array( wcj_get_current_user_first_role(), $disabled_user_roles, true ) ) {
63
  return false;
64
  }
65
  return $is_enabled;
96
  ),
97
  10000
98
  );
99
+ return false; // phpcs:ignore
100
  }
101
  return $valid;
102
  }
includes/class-wcj-coupon-code-generator.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Coupon Code Generator
4
  *
5
- * @version 5.2.0
6
  * @since 3.2.3
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -47,13 +47,17 @@ if ( ! class_exists( 'WCJ_Coupon_Code_Generator' ) ) :
47
  /**
48
  * Enqueue_generate_coupon_code_script.
49
  *
50
- * @version 3.1.3
51
  * @since 3.1.3
52
  */
53
  public function enqueue_generate_coupon_code_script() {
54
  global $pagenow;
55
 
56
- if ( 'post-new.php' === $pagenow && isset( $_GET['post_type'] ) && 'shop_coupon' === $_GET['post_type'] ) {
 
 
 
 
57
  wp_enqueue_script( 'wcj-coupons-code-generator', wcj_plugin_url() . '/includes/js/wcj-coupons-code-generator.js', array( 'jquery' ), w_c_j()->version, true );
58
  wp_localize_script( 'wcj-coupons-code-generator', 'ajax_object', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
59
  }
2
  /**
3
  * Booster for WooCommerce - Module - Coupon Code Generator
4
  *
5
+ * @version 5.6.2
6
  * @since 3.2.3
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
47
  /**
48
  * Enqueue_generate_coupon_code_script.
49
  *
50
+ * @version 5.6.2
51
  * @since 3.1.3
52
  */
53
  public function enqueue_generate_coupon_code_script() {
54
  global $pagenow;
55
 
56
+ $wpnonce = true;
57
+ if ( function_exists( 'wp_verify_nonce' ) ) {
58
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
59
+ }
60
+ if ( 'post-new.php' === $pagenow && isset( $_GET['post_type'] ) && 'shop_coupon' === $_GET['post_type'] && $wpnonce ) {
61
  wp_enqueue_script( 'wcj-coupons-code-generator', wcj_plugin_url() . '/includes/js/wcj-coupons-code-generator.js', array( 'jquery' ), w_c_j()->version, true );
62
  wp_localize_script( 'wcj-coupons-code-generator', 'ajax_object', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
63
  }
includes/class-wcj-cross-sells.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Cross-sells
4
  *
5
- * @version 5.5.9
6
  * @since 3.5.3
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -75,7 +75,7 @@ if ( ! class_exists( 'WCJ_Cross_Sells' ) ) :
75
  /**
76
  * Replace_with_cross_sells_to_url.
77
  *
78
- * @version 5.5.9
79
  * @since 3.9.0
80
  * @todo [dev] re-check variable products
81
  * @param string $url defines the url.
@@ -89,7 +89,7 @@ if ( ! class_exists( 'WCJ_Cross_Sells' ) ) :
89
  foreach ( $_cart->get_cart() as $cart_item_key => $values ) {
90
  $_product = wc_get_product( $values['product_id'] );
91
  $cross_sell_ids = $_product->get_cross_sell_ids();
92
- if ( in_array( $product_id, $cross_sell_ids ) ) {
93
  $product_ids_to_remove[] = $values['product_id'];
94
  }
95
  }
@@ -103,17 +103,22 @@ if ( ! class_exists( 'WCJ_Cross_Sells' ) ) :
103
  /**
104
  * Remove_from_cart_by_product_id.
105
  *
106
- * @version 3.9.0
107
  * @since 3.9.0
108
  * @todo [dev] AJAX
109
  */
110
  public function remove_from_cart_by_product_id() {
111
- $_cart = WC()->cart;
112
- if ( isset( $_GET['wcj-remove-from-cart'] ) ) {
 
 
 
 
 
113
  if ( isset( $_cart ) ) {
114
- $product_ids_to_remove = explode( ',', $_GET['wcj-remove-from-cart'] );
115
  foreach ( $_cart->get_cart() as $cart_item_key => $values ) {
116
- if ( in_array( $values['product_id'], $product_ids_to_remove ) ) {
117
  $_cart->remove_cart_item( $cart_item_key );
118
  }
119
  }
2
  /**
3
  * Booster for WooCommerce - Module - Cross-sells
4
  *
5
+ * @version 5.6.2
6
  * @since 3.5.3
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
75
  /**
76
  * Replace_with_cross_sells_to_url.
77
  *
78
+ * @version 5.6.2
79
  * @since 3.9.0
80
  * @todo [dev] re-check variable products
81
  * @param string $url defines the url.
89
  foreach ( $_cart->get_cart() as $cart_item_key => $values ) {
90
  $_product = wc_get_product( $values['product_id'] );
91
  $cross_sell_ids = $_product->get_cross_sell_ids();
92
+ if ( in_array( $product_id, $cross_sell_ids, true ) ) {
93
  $product_ids_to_remove[] = $values['product_id'];
94
  }
95
  }
103
  /**
104
  * Remove_from_cart_by_product_id.
105
  *
106
+ * @version 5.6.2
107
  * @since 3.9.0
108
  * @todo [dev] AJAX
109
  */
110
  public function remove_from_cart_by_product_id() {
111
+ $_cart = WC()->cart;
112
+ $wpnonce = true;
113
+ if ( function_exists( 'wp_verify_nonce' ) ) {
114
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
115
+ }
116
+
117
+ if ( isset( $_GET['wcj-remove-from-cart'] ) && $wpnonce ) {
118
  if ( isset( $_cart ) ) {
119
+ $product_ids_to_remove = explode( ',', sanitize_text_field( wp_unslash( $_GET['wcj-remove-from-cart'] ) ) );
120
  foreach ( $_cart->get_cart() as $cart_item_key => $values ) {
121
+ if ( in_array( $values['product_id'], $product_ids_to_remove, true ) ) {
122
  $_cart->remove_cart_item( $cart_item_key );
123
  }
124
  }
includes/class-wcj-crowdfunding.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Crowdfunding
4
  *
5
- * @version 5.4.0
6
  * @since 2.2.6
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -75,7 +75,7 @@ if ( ! class_exists( 'WCJ_Crowdfunding' ) ) :
75
  /**
76
  * Check_dates.
77
  *
78
- * @version 2.7.0
79
  * @since 2.2.6
80
  * @param bool $purchasable defines the purchasable.
81
  * @param string | array $_product defines the _product.
@@ -86,12 +86,12 @@ if ( ! class_exists( 'WCJ_Crowdfunding' ) ) :
86
  if ( 0 !== $goal ) {
87
  $start_date_str = get_post_meta( $_product_id, '_wcj_crowdfunding_startdate', true );
88
  $end_date_str = get_post_meta( $_product_id, '_wcj_crowdfunding_deadline', true );
89
- $start_date = ( '' != $start_date_str ) ? strtotime( $start_date_str ) : 0;
90
- $end_date = ( '' != $end_date_str ) ? strtotime( $end_date_str ) : 0;
91
- if ( $start_date > 0 && ( $start_date - current_time( 'timestamp' ) ) > 0 ) {
92
  $purchasable = false;
93
  }
94
- if ( $end_date > 0 && ( $end_date - current_time( 'timestamp' ) ) < 0 ) {
95
  $purchasable = false;
96
  }
97
  }
2
  /**
3
  * Booster for WooCommerce - Module - Crowdfunding
4
  *
5
+ * @version 5.6.2
6
  * @since 2.2.6
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
75
  /**
76
  * Check_dates.
77
  *
78
+ * @version 5.6.2
79
  * @since 2.2.6
80
  * @param bool $purchasable defines the purchasable.
81
  * @param string | array $_product defines the _product.
86
  if ( 0 !== $goal ) {
87
  $start_date_str = get_post_meta( $_product_id, '_wcj_crowdfunding_startdate', true );
88
  $end_date_str = get_post_meta( $_product_id, '_wcj_crowdfunding_deadline', true );
89
+ $start_date = ( '' !== $start_date_str ) ? strtotime( $start_date_str ) : 0;
90
+ $end_date = ( '' !== $end_date_str ) ? strtotime( $end_date_str ) : 0;
91
+ if ( $start_date > 0 && ( $start_date - (int) gmdate( 'U' ) ) > 0 ) {
92
  $purchasable = false;
93
  }
94
+ if ( $end_date > 0 && ( $end_date - (int) gmdate( 'U' ) ) < 0 ) {
95
  $purchasable = false;
96
  }
97
  }
includes/{class-wcj-currency.php → class-wcj-currencies.php} RENAMED
File without changes
includes/class-wcj-currency-exchange-rates.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Currency Exchange Rates
4
  *
5
- * @version 5.4.0
6
  * @since 2.3.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -64,11 +64,11 @@ if ( ! class_exists( 'WCJ_Currency_Exchange_Rates' ) ) :
64
  /**
65
  * Maybe_update_all_rates.
66
  *
67
- * @version 3.4.5
68
  * @since 3.4.5
69
  */
70
  public function maybe_update_all_rates() {
71
- if ( isset( $_GET['wcj_currency_exchange_rates_update_now'] ) ) {
72
  do_action( 'auto_update_exchange_rates_hook' );
73
  wp_safe_redirect( remove_query_arg( 'wcj_currency_exchange_rates_update_now' ) );
74
  }
@@ -77,12 +77,14 @@ if ( ! class_exists( 'WCJ_Currency_Exchange_Rates' ) ) :
77
  /**
78
  * Wcj_ajax_get_exchange_rates.
79
  *
80
- * @version 2.7.0
81
  * @since 2.6.0
82
  * @todo (maybe) move this to `class-wcj-exchange-rates.php`
83
  */
84
  public function wcj_ajax_get_exchange_rates() {
85
- echo wcj_get_exchange_rate( sanitize_text_field( wp_unslash( $_POST['wcj_currency_from'] ) ), sanitize_text_field( wp_unslash( $_POST['wcj_currency_to'] ) ) );
 
 
86
  die();
87
  }
88
 
2
  /**
3
  * Booster for WooCommerce - Module - Currency Exchange Rates
4
  *
5
+ * @version 5.6.2
6
  * @since 2.3.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
64
  /**
65
  * Maybe_update_all_rates.
66
  *
67
+ * @version 5.6.2
68
  * @since 3.4.5
69
  */
70
  public function maybe_update_all_rates() {
71
+ if ( isset( $_GET['wcj_currency_exchange_rates_update_now'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
72
  do_action( 'auto_update_exchange_rates_hook' );
73
  wp_safe_redirect( remove_query_arg( 'wcj_currency_exchange_rates_update_now' ) );
74
  }
77
  /**
78
  * Wcj_ajax_get_exchange_rates.
79
  *
80
+ * @version 5.6.2
81
  * @since 2.6.0
82
  * @todo (maybe) move this to `class-wcj-exchange-rates.php`
83
  */
84
  public function wcj_ajax_get_exchange_rates() {
85
+ $wcj_currency_from = isset( $_POST['wcj_currency_from'] ) ? sanitize_text_field( wp_unslash( $_POST['wcj_currency_from'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
86
+ $wcj_currency_to = isset( $_POST['wcj_currency_to'] ) ? sanitize_text_field( wp_unslash( $_POST['wcj_currency_to'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
87
+ echo wcj_get_exchange_rate( $wcj_currency_from, $wcj_currency_to ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
88
  die();
89
  }
90
 
includes/class-wcj-currency-per-product.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Currency per Product
4
  *
5
- * @version 5.4.9
6
  * @since 2.5.2
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -107,13 +107,14 @@ if ( ! class_exists( 'WCJ_Currency_Per_Product' ) ) :
107
  /**
108
  * Get_product_currency.
109
  *
110
- * @version 5.4.9
111
  * @since 2.9.0
112
  * @todo (maybe) return empty string or false, if it's shop default currency: `return ( get_option( 'woocommerce_currency' ) != ( $return = get_post_meta( $product_id, '_' . 'wcj_currency_per_product_currency', true ) ) ? $return : false );`.
113
  * @param int $product_id defines the product_id.
114
  */
115
- function get_product_currency( $product_id ) {
116
- // By users or user roles
 
117
  $do_check_by_users = ( 'yes' === get_option( 'wcj_currency_per_product_by_users_enabled', 'no' ) );
118
  $do_check_by_user_roles = ( 'yes' === get_option( 'wcj_currency_per_product_by_user_roles_enabled', 'no' ) );
119
  $do_check_by_product_cats = ( 'yes' === get_option( 'wcj_currency_per_product_by_product_cats_enabled', 'no' ) );
@@ -132,7 +133,8 @@ if ( ! class_exists( 'WCJ_Currency_Per_Product' ) ) :
132
  for ( $i = 1; $i <= $total_number; $i++ ) {
133
  if ( $do_check_by_users ) {
134
  $users = get_option( 'wcj_currency_per_product_users_' . $i, '' );
135
- if ( ! empty( $users ) && in_array( $product_author_id, $users ) ) {
 
136
  return get_option( 'wcj_currency_per_product_currency_' . $i );
137
  }
138
  }
@@ -162,7 +164,7 @@ if ( ! class_exists( 'WCJ_Currency_Per_Product' ) ) :
162
  }
163
  }
164
  }
165
- // By product meta
166
  return ( $this->is_currency_per_product_by_product_enabled ? get_post_meta( $product_id, '_wcj_currency_per_product_currency', true ) : false );
167
  }
168
 
@@ -422,22 +424,27 @@ if ( ! class_exists( 'WCJ_Currency_Per_Product' ) ) :
422
  /**
423
  * Get_current_product_id_and_currency.
424
  *
425
- * @version 2.9.0
426
  * @since 2.7.0
427
  */
428
  public function get_current_product_id_and_currency() {
 
 
 
 
429
  // Get ID.
430
  $the_id = false;
431
  global $product;
432
- if ( $product ) {
433
  $the_id = wcj_get_product_id_or_variation_parent_id( $product );
434
  }
435
  if ( ! $the_id && isset( $_REQUEST['product_id'] ) ) {
436
- $the_id = $_REQUEST['product_id'];
437
  }
438
  if ( ! $the_id && isset( $_POST['form'] ) ) { // WooCommerce Bookings plugin.
439
- $posted = array();
440
- parse_str( $_POST['form'], $posted );
 
441
  $the_id = isset( $posted['add-to-cart'] ) ? $posted['add-to-cart'] : 0;
442
  }
443
  $eventon_wc_product_id = get_post_meta( get_the_ID(), 'tx_woocommerce_product_id', true );
2
  /**
3
  * Booster for WooCommerce - Module - Currency per Product
4
  *
5
+ * @version 5.6.2
6
  * @since 2.5.2
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
107
  /**
108
  * Get_product_currency.
109
  *
110
+ * @version 5.6.2
111
  * @since 2.9.0
112
  * @todo (maybe) return empty string or false, if it's shop default currency: `return ( get_option( 'woocommerce_currency' ) != ( $return = get_post_meta( $product_id, '_' . 'wcj_currency_per_product_currency', true ) ) ? $return : false );`.
113
  * @param int $product_id defines the product_id.
114
  */
115
+ public function get_product_currency( $product_id ) {
116
+
117
+ // By users or user roles.
118
  $do_check_by_users = ( 'yes' === get_option( 'wcj_currency_per_product_by_users_enabled', 'no' ) );
119
  $do_check_by_user_roles = ( 'yes' === get_option( 'wcj_currency_per_product_by_user_roles_enabled', 'no' ) );
120
  $do_check_by_product_cats = ( 'yes' === get_option( 'wcj_currency_per_product_by_product_cats_enabled', 'no' ) );
133
  for ( $i = 1; $i <= $total_number; $i++ ) {
134
  if ( $do_check_by_users ) {
135
  $users = get_option( 'wcj_currency_per_product_users_' . $i, '' );
136
+
137
+ if ( ! empty( $users ) && in_array( $product_author_id, $users, true ) ) {
138
  return get_option( 'wcj_currency_per_product_currency_' . $i );
139
  }
140
  }
164
  }
165
  }
166
  }
167
+ // By product meta.
168
  return ( $this->is_currency_per_product_by_product_enabled ? get_post_meta( $product_id, '_wcj_currency_per_product_currency', true ) : false );
169
  }
170
 
424
  /**
425
  * Get_current_product_id_and_currency.
426
  *
427
+ * @version 5.6.2
428
  * @since 2.7.0
429
  */
430
  public function get_current_product_id_and_currency() {
431
+ $wpnonce = true;
432
+ if ( function_exists( 'wp_verify_nonce' ) ) {
433
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
434
+ }
435
  // Get ID.
436
  $the_id = false;
437
  global $product;
438
+ if ( $product && $wpnonce ) {
439
  $the_id = wcj_get_product_id_or_variation_parent_id( $product );
440
  }
441
  if ( ! $the_id && isset( $_REQUEST['product_id'] ) ) {
442
+ $the_id = isset( $_REQUEST['product_id'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['product_id'] ) ) : '';
443
  }
444
  if ( ! $the_id && isset( $_POST['form'] ) ) { // WooCommerce Bookings plugin.
445
+ $posted = array();
446
+ $post_form = isset( $_POST['form'] ) ? sanitize_text_field( wp_unslash( $_POST['form'] ) ) : '';
447
+ parse_str( $post_form, $posted );
448
  $the_id = isset( $posted['add-to-cart'] ) ? $posted['add-to-cart'] : 0;
449
  }
450
  $eventon_wc_product_id = get_post_meta( get_the_ID(), 'tx_woocommerce_product_id', true );
includes/class-wcj-custom-php.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Custom PHP
4
  *
5
- * @version 5.6.1
6
  * @since 4.0.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -21,7 +21,7 @@ if ( ! class_exists( 'WCJ_Custom_PHP' ) ) :
21
  /**
22
  * Constructor.
23
  *
24
- * @version 5.6.1
25
  * @since 4.0.0
26
  * @todo [dev] maybe remove `wcj_disable_custom_php` from URL on settings save
27
  * @todo [dev] allow tab in content (i.e. settings (textarea))
@@ -33,7 +33,7 @@ if ( ! class_exists( 'WCJ_Custom_PHP' ) ) :
33
  $this->desc = __( 'Custom PHP tool.', 'woocommerce-jetpack' );
34
  $this->extra_desc = sprintf(
35
  /* translators: %s: translation added */
36
- __( 'Please note that if you enable the module and enter non-valid PHP code here, your site will become unavailable. To fix this you will have to add %s attribute to the URL (you must be logged as shop manager or admin (for this reason custom PHP code is not executed on %s page)).', 'woocommerce-jetpack' ),
37
  '<code>wcj_disable_custom_php</code>',
38
  '<strong>wp-login.php</strong>'
39
  ) . ' ' .
@@ -49,7 +49,12 @@ if ( ! class_exists( 'WCJ_Custom_PHP' ) ) :
49
  add_action( 'woojetpack_after_settings_save', array( $this, 'create_php_file' ), PHP_INT_MAX, 2 );
50
 
51
  if ( $this->is_enabled() ) {
52
- if ( isset( $_GET['wcj_disable_custom_php'] ) ) {
 
 
 
 
 
53
  if ( wcj_current_user_can( 'manage_woocommerce' ) ) {
54
  // Stop custom PHP execution.
55
  return;
@@ -74,7 +79,7 @@ if ( ! class_exists( 'WCJ_Custom_PHP' ) ) :
74
  /**
75
  * Create_php_file.
76
  *
77
- * @version 4.0.0
78
  * @since 4.0.0
79
  * @todo [dev] `unlink` and `rmdir` on settings reset
80
  * @todo [dev] on empty content - delete dir also (`rmdir`).
@@ -86,7 +91,7 @@ if ( ! class_exists( 'WCJ_Custom_PHP' ) ) :
86
  $file_content = wcj_get_option( 'wcj_custom_php', '' );
87
  if ( '' !== $file_content ) {
88
  $file_path = wcj_get_wcj_uploads_dir( 'custom_php' ) . DIRECTORY_SEPARATOR . 'booster.php';
89
- file_put_contents( $file_path, '<?php' . PHP_EOL . $file_content );
90
  } else {
91
  $file_path = wcj_get_wcj_uploads_dir( 'custom_php', false ) . DIRECTORY_SEPARATOR . 'booster.php';
92
  if ( file_exists( $file_path ) ) {
2
  /**
3
  * Booster for WooCommerce - Module - Custom PHP
4
  *
5
+ * @version 5.6.2
6
  * @since 4.0.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
21
  /**
22
  * Constructor.
23
  *
24
+ * @version 5.6.2
25
  * @since 4.0.0
26
  * @todo [dev] maybe remove `wcj_disable_custom_php` from URL on settings save
27
  * @todo [dev] allow tab in content (i.e. settings (textarea))
33
  $this->desc = __( 'Custom PHP tool.', 'woocommerce-jetpack' );
34
  $this->extra_desc = sprintf(
35
  /* translators: %s: translation added */
36
+ __( 'Please note that if you enable the module and enter non-valid PHP code here, your site will become unavailable. To fix this you will have to add %1$s attribute to the URL (you must be logged as shop manager or admin (for this reason custom PHP code is not executed on %2$s page)).', 'woocommerce-jetpack' ),
37
  '<code>wcj_disable_custom_php</code>',
38
  '<strong>wp-login.php</strong>'
39
  ) . ' ' .
49
  add_action( 'woojetpack_after_settings_save', array( $this, 'create_php_file' ), PHP_INT_MAX, 2 );
50
 
51
  if ( $this->is_enabled() ) {
52
+ $wpnonce = true;
53
+ if ( function_exists( 'wp_verify_nonce' ) ) {
54
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
55
+ }
56
+
57
+ if ( isset( $_GET['wcj_disable_custom_php'] ) && $wpnonce ) {
58
  if ( wcj_current_user_can( 'manage_woocommerce' ) ) {
59
  // Stop custom PHP execution.
60
  return;
79
  /**
80
  * Create_php_file.
81
  *
82
+ * @version 5.6.2
83
  * @since 4.0.0
84
  * @todo [dev] `unlink` and `rmdir` on settings reset
85
  * @todo [dev] on empty content - delete dir also (`rmdir`).
91
  $file_content = wcj_get_option( 'wcj_custom_php', '' );
92
  if ( '' !== $file_content ) {
93
  $file_path = wcj_get_wcj_uploads_dir( 'custom_php' ) . DIRECTORY_SEPARATOR . 'booster.php';
94
+ file_put_contents( $file_path, '<?php' . PHP_EOL . $file_content ); // phpcs:ignore
95
  } else {
96
  $file_path = wcj_get_wcj_uploads_dir( 'custom_php', false ) . DIRECTORY_SEPARATOR . 'booster.php';
97
  if ( file_exists( $file_path ) ) {
includes/class-wcj-debug-tools.php CHANGED
@@ -2,8 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Debug Tools
4
  *
5
- * @version 5.5.9
6
- * @version 4.1.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
9
  */
@@ -46,11 +45,15 @@ if ( ! class_exists( 'WCJ_Debug_Tools' ) ) :
46
  /**
47
  * Create_debug_tools_tool.
48
  *
49
- * @version 5.5.9
50
  */
51
  public function create_debug_tools_tool() {
52
  // Delete log.
53
- if ( isset( $_GET['wcj_delete_log'] ) && wcj_is_user_role( 'administrator' ) ) {
 
 
 
 
54
  update_option( 'wcj_log', '' );
55
  if ( wp_safe_redirect( esc_url( remove_query_arg( 'wcj_delete_log' ) ) ) ) {
56
  exit;
@@ -84,7 +87,7 @@ if ( ! class_exists( 'WCJ_Debug_Tools' ) ) :
84
  /**
85
  * Get_system_info_table_array.
86
  *
87
- * @version 4.1.0
88
  * @since 2.5.7
89
  * @todo [feature] (maybe) 'DB_NAME', 'DB_USER', 'DB_PASSWORD', 'DB_HOST', 'DB_CHARSET', 'DB_COLLATE'
90
  */
@@ -103,7 +106,11 @@ if ( ! class_exists( 'WCJ_Debug_Tools' ) ) :
103
  foreach ( $constants_array as $the_constant ) {
104
  $system_info[] = array( $the_constant, ( defined( $the_constant ) ? constant( $the_constant ) : __( 'NOT DEFINED', 'woocommerce-jetpack' ) ) );
105
  }
106
- if ( isset( $_GET['wcj_debug'] ) ) {
 
 
 
 
107
  foreach ( $_SERVER as $server_var_id => $server_var_value ) {
108
  $system_info[] = array( $server_var_id, esc_html( $server_var_value ) );
109
  }
2
  /**
3
  * Booster for WooCommerce - Module - Debug Tools
4
  *
5
+ * @version 5.6.2
 
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
45
  /**
46
  * Create_debug_tools_tool.
47
  *
48
+ * @version 5.6.2
49
  */
50
  public function create_debug_tools_tool() {
51
  // Delete log.
52
+ $wpnonce = true;
53
+ if ( function_exists( 'wp_verify_nonce' ) ) {
54
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
55
+ }
56
+ if ( $wpnonce && isset( $_GET['wcj_delete_log'] ) && wcj_is_user_role( 'administrator' ) ) {
57
  update_option( 'wcj_log', '' );
58
  if ( wp_safe_redirect( esc_url( remove_query_arg( 'wcj_delete_log' ) ) ) ) {
59
  exit;
87
  /**
88
  * Get_system_info_table_array.
89
  *
90
+ * @version 5.6.2
91
  * @since 2.5.7
92
  * @todo [feature] (maybe) 'DB_NAME', 'DB_USER', 'DB_PASSWORD', 'DB_HOST', 'DB_CHARSET', 'DB_COLLATE'
93
  */
106
  foreach ( $constants_array as $the_constant ) {
107
  $system_info[] = array( $the_constant, ( defined( $the_constant ) ? constant( $the_constant ) : __( 'NOT DEFINED', 'woocommerce-jetpack' ) ) );
108
  }
109
+ $wpnonce = true;
110
+ if ( function_exists( 'wp_verify_nonce' ) ) {
111
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
112
+ }
113
+ if ( isset( $_GET['wcj_debug'] ) && $wpnonce ) {
114
  foreach ( $_SERVER as $server_var_id => $server_var_value ) {
115
  $system_info[] = array( $server_var_id, esc_html( $server_var_value ) );
116
  }
includes/class-wcj-emails-verification.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  /**
3
  * Booster for WooCommerce - Module - Email Verification
4
  *
5
- * @version 5.5.9
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -191,7 +191,7 @@ if ( ! class_exists( 'WCJ_Email_Verification' ) ) :
191
  /**
192
  * Reset_and_mail_activation_link.
193
  *
194
- * @version 5.5.9
195
  * @since 2.8.0
196
  * @todo %site_name% etc. in `wcj_emails_verification_email_subject`
197
  * @param int $user_id defines the user_id.
@@ -202,7 +202,7 @@ if ( ! class_exists( 'WCJ_Email_Verification' ) ) :
202
  $url = wp_nonce_url(
203
  add_query_arg(
204
  'wcj_verify_email',
205
- base64_encode(
206
  wp_json_encode(
207
  array(
208
  'id' => $user_id,
@@ -248,13 +248,13 @@ if ( ! class_exists( 'WCJ_Email_Verification' ) ) :
248
  /**
249
  * Process_email_verification.
250
  *
251
- * @version 5.5.9
252
  * @since 2.8.0
253
  */
254
  public function process_email_verification() {
255
- if ( isset( $_GET['wcj_verified_email'] ) ) {
256
  if ( function_exists( 'wc_add_notice' ) ) {
257
- $data = json_decode( base64_decode( $_GET['wcj_verified_email'] ), true );
258
  if ( ! empty( $data['id'] ) && ! empty( $data['code'] ) && get_user_meta( $data['id'], 'wcj_activation_code', true ) === $data['code'] ) {
259
  wc_add_notice(
260
  do_shortcode(
@@ -266,8 +266,8 @@ if ( ! class_exists( 'WCJ_Email_Verification' ) ) :
266
  );
267
  }
268
  }
269
- } elseif ( isset( $_GET['wcj_verify_email'] ) ) {
270
- $data = json_decode( base64_decode( sanitize_text_field( wp_unslash( $_GET['wcj_verify_email'] ) ) ), true );
271
  if ( ! empty( $data['id'] ) && ! empty( $data['code'] ) && get_user_meta( $data['id'], 'wcj_activation_code', true ) === $data['code'] ) {
272
  update_user_meta( $data['id'], 'wcj_is_activated', '1' );
273
  if ( 'yes' === wcj_get_option( 'wcj_emails_verification_redirect_on_success', 'yes' ) ) {
@@ -276,7 +276,7 @@ if ( ! class_exists( 'WCJ_Email_Verification' ) ) :
276
  }
277
  $custom_url = wcj_get_option( 'wcj_emails_verification_redirect_on_success_custom_url', '' );
278
  $url = ( '' !== ( $custom_url ) ? $custom_url : wc_get_page_permalink( 'myaccount' ) );
279
- wp_safe_redirect( add_query_arg( 'wcj_verified_email', sanitize_text_field( wp_unslash( $_GET['wcj_verify_email'] ) ), $url ) );
280
  exit;
281
  } elseif ( ! empty( $data['id'] ) ) {
282
  $_notice = do_shortcode(
@@ -294,7 +294,7 @@ if ( ! class_exists( 'WCJ_Email_Verification' ) ) :
294
  );
295
  wc_add_notice( $_notice, 'error' );
296
  }
297
- } elseif ( isset( $_GET['wcj_activate_account_message'] ) ) {
298
  wc_add_notice(
299
  do_shortcode(
300
  wcj_get_option(
@@ -303,8 +303,8 @@ if ( ! class_exists( 'WCJ_Email_Verification' ) ) :
303
  )
304
  )
305
  );
306
- } elseif ( isset( $_GET['wcj_user_id'] ) ) {
307
- $this->reset_and_mail_activation_link( $_GET['wcj_user_id'] );
308
  wc_add_notice(
309
  do_shortcode(
310
  wcj_get_option(
1
+ <?php //phpcs:ignore
2
  /**
3
  * Booster for WooCommerce - Module - Email Verification
4
  *
5
+ * @version 5.6.2
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
191
  /**
192
  * Reset_and_mail_activation_link.
193
  *
194
+ * @version 5.6.2
195
  * @since 2.8.0
196
  * @todo %site_name% etc. in `wcj_emails_verification_email_subject`
197
  * @param int $user_id defines the user_id.
202
  $url = wp_nonce_url(
203
  add_query_arg(
204
  'wcj_verify_email',
205
+ base64_encode( // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
206
  wp_json_encode(
207
  array(
208
  'id' => $user_id,
248
  /**
249
  * Process_email_verification.
250
  *
251
+ * @version 5.6.2
252
  * @since 2.8.0
253
  */
254
  public function process_email_verification() {
255
+ if ( isset( $_GET['wcj_verified_email'] ) ) { // phpcs:ignore
256
  if ( function_exists( 'wc_add_notice' ) ) {
257
+ $data = json_decode( base64_decode( $_GET['wcj_verified_email'] ), true ); // phpcs:ignore
258
  if ( ! empty( $data['id'] ) && ! empty( $data['code'] ) && get_user_meta( $data['id'], 'wcj_activation_code', true ) === $data['code'] ) {
259
  wc_add_notice(
260
  do_shortcode(
266
  );
267
  }
268
  }
269
+ } elseif ( isset( $_GET['wcj_verify_email'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
270
+ $data = json_decode( base64_decode( sanitize_text_field( wp_unslash( $_GET['wcj_verify_email'] ) ) ), true ); // phpcs:ignore
271
  if ( ! empty( $data['id'] ) && ! empty( $data['code'] ) && get_user_meta( $data['id'], 'wcj_activation_code', true ) === $data['code'] ) {
272
  update_user_meta( $data['id'], 'wcj_is_activated', '1' );
273
  if ( 'yes' === wcj_get_option( 'wcj_emails_verification_redirect_on_success', 'yes' ) ) {
276
  }
277
  $custom_url = wcj_get_option( 'wcj_emails_verification_redirect_on_success_custom_url', '' );
278
  $url = ( '' !== ( $custom_url ) ? $custom_url : wc_get_page_permalink( 'myaccount' ) );
279
+ wp_safe_redirect( add_query_arg( 'wcj_verified_email', sanitize_text_field( wp_unslash( $_GET['wcj_verify_email'] ) ), $url ) ); // phpcs:ignore
280
  exit;
281
  } elseif ( ! empty( $data['id'] ) ) {
282
  $_notice = do_shortcode(
294
  );
295
  wc_add_notice( $_notice, 'error' );
296
  }
297
+ } elseif ( isset( $_GET['wcj_activate_account_message'] ) ) {// phpcs:ignore WordPress.Security.NonceVerification
298
  wc_add_notice(
299
  do_shortcode(
300
  wcj_get_option(
303
  )
304
  )
305
  );
306
+ } elseif ( isset( $_GET['wcj_user_id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
307
+ $this->reset_and_mail_activation_link( sanitize_text_field( wp_unslash( $_GET['wcj_user_id'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification
308
  wc_add_notice(
309
  do_shortcode(
310
  wcj_get_option(
includes/class-wcj-empty-cart-button.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Empty Cart Button
4
  *
5
- * @version 5.2.0
6
  * @since 2.2.1
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -79,8 +79,12 @@ if ( ! class_exists( 'WCJ_Empty_Cart_Button' ) ) :
79
  * @version 2.8.0
80
  */
81
  public function maybe_empty_cart() {
 
 
 
 
82
 
83
- if ( isset( $_POST['wcj_empty_cart'] ) && isset( WC()->cart ) ) {
84
  WC()->cart->empty_cart();
85
  }
86
  }
2
  /**
3
  * Booster for WooCommerce - Module - Empty Cart Button
4
  *
5
+ * @version 5.6.2
6
  * @since 2.2.1
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
79
  * @version 2.8.0
80
  */
81
  public function maybe_empty_cart() {
82
+ $wpnonce = true;
83
+ if ( function_exists( 'wp_verify_nonce' ) ) {
84
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
85
+ }
86
 
87
+ if ( isset( $_POST['wcj_empty_cart'] ) && isset( WC()->cart ) && $wpnonce ) {
88
  WC()->cart->empty_cart();
89
  }
90
  }
includes/class-wcj-eu-vat-number.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - EU VAT Number
4
  *
5
- * @version 5.5.9
6
  * @since 2.3.9
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -119,12 +119,16 @@ if ( ! class_exists( 'WCJ_EU_VAT_Number' ) ) :
119
  /**
120
  * Admin_validate_vat_and_maybe_remove_taxes.
121
  *
122
- * @version 3.3.0
123
  * @since 3.3.0
124
  */
125
  public function admin_validate_vat_and_maybe_remove_taxes() {
126
- if ( isset( $_GET['validate_vat_and_maybe_remove_taxes'] ) ) {
127
- $order_id = $_GET['validate_vat_and_maybe_remove_taxes'];
 
 
 
 
128
  $order = wc_get_order( $order_id );
129
  if ( $order ) {
130
  $vat_id = get_post_meta( $order_id, '_billing_eu_vat_number', true );
@@ -380,16 +384,20 @@ if ( ! class_exists( 'WCJ_EU_VAT_Number' ) ) :
380
  /**
381
  * Start_session.
382
  *
383
- * @version 4.9.0
384
  */
385
  public function start_session() {
386
  if ( is_admin() ) {
387
  return;
388
  }
389
  wcj_session_maybe_start();
390
- $args = array();
391
- if ( isset( $_POST['post_data'] ) ) {
392
- parse_str( $_POST['post_data'], $args );
 
 
 
 
393
  if ( isset( $args['billing_eu_vat_number'] ) && wcj_session_get( 'wcj_eu_vat_number_to_check' ) !== $args['billing_eu_vat_number'] ) {
394
  wcj_session_set( 'wcj_is_eu_vat_number_valid', null );
395
  wcj_session_set( 'wcj_eu_vat_number_to_check', null );
@@ -451,7 +459,7 @@ if ( ! class_exists( 'WCJ_EU_VAT_Number' ) ) :
451
  /**
452
  * Wcj_validate_eu_vat_number.
453
  *
454
- * @version 4.6.1
455
  * @param array $param defines the param.
456
  */
457
  public function wcj_validate_eu_vat_number( $param ) {
@@ -462,8 +470,8 @@ if ( ! class_exists( 'WCJ_EU_VAT_Number' ) ) :
462
  'echo' => true,
463
  )
464
  );
465
- $eu_vat_number = isset( $param['wcj_eu_vat_number_to_check'] ) && '' != $param['wcj_eu_vat_number_to_check'] ? $param['wcj_eu_vat_number_to_check'] : '';
466
- $eu_vat_number = empty( $eu_vat_number ) && isset( $_POST['wcj_eu_vat_number_to_check'] ) && '' != $_POST['wcj_eu_vat_number_to_check'] ? $_POST['wcj_eu_vat_number_to_check'] : $eu_vat_number;
467
  if ( ! empty( $eu_vat_number ) ) {
468
  $eu_vat_number_to_check = substr( $eu_vat_number, 2 );
469
  $eu_vat_number_country_to_check = substr( $eu_vat_number, 0, 2 );
@@ -501,7 +509,7 @@ if ( ! class_exists( 'WCJ_EU_VAT_Number' ) ) :
501
  /**
502
  * Need_to_exclude_vat.
503
  *
504
- * @version 4.7.1
505
  * @since 4.6.0
506
  *
507
  * @return bool
@@ -519,7 +527,7 @@ if ( ! class_exists( 'WCJ_EU_VAT_Number' ) ) :
519
  'yes' === wcj_get_option( 'wcj_eu_vat_number_disable_for_valid', 'yes' ) &&
520
  (
521
  ( true === wcj_session_get( 'wcj_is_eu_vat_number_valid' ) && null !== ( $eu_vat_number ) ) ||
522
- ( 'yes' === wcj_get_option( 'wcj_eu_vat_number_disable_for_valid_by_user_vat', 'no' ) && is_user_logged_in() && ! empty( $eu_vat_number = get_user_meta( get_current_user_id(), 'billing_eu_vat_number', true ) ) && '1' === $this->wcj_validate_eu_vat_number(
523
  array(
524
  'wcj_eu_vat_number_to_check' => $eu_vat_number,
525
  'echo' => false,
2
  /**
3
  * Booster for WooCommerce - Module - EU VAT Number
4
  *
5
+ * @version 5.6.2
6
  * @since 2.3.9
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
119
  /**
120
  * Admin_validate_vat_and_maybe_remove_taxes.
121
  *
122
+ * @version 5.6.2
123
  * @since 3.3.0
124
  */
125
  public function admin_validate_vat_and_maybe_remove_taxes() {
126
+ $wpnonce = true;
127
+ if ( function_exists( 'wp_verify_nonce' ) ) {
128
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
129
+ }
130
+ if ( $wpnonce && isset( $_GET['validate_vat_and_maybe_remove_taxes'] ) ) {
131
+ $order_id = sanitize_text_field( wp_unslash( $_GET['validate_vat_and_maybe_remove_taxes'] ) );
132
  $order = wc_get_order( $order_id );
133
  if ( $order ) {
134
  $vat_id = get_post_meta( $order_id, '_billing_eu_vat_number', true );
384
  /**
385
  * Start_session.
386
  *
387
+ * @version 5.6.2
388
  */
389
  public function start_session() {
390
  if ( is_admin() ) {
391
  return;
392
  }
393
  wcj_session_maybe_start();
394
+ $args = array();
395
+ $wpnonce = true;
396
+ if ( function_exists( 'wp_verify_nonce' ) ) {
397
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
398
+ }
399
+ if ( $wpnonce && isset( $_POST['post_data'] ) ) {
400
+ parse_str( $_POST['post_data'], $args ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
401
  if ( isset( $args['billing_eu_vat_number'] ) && wcj_session_get( 'wcj_eu_vat_number_to_check' ) !== $args['billing_eu_vat_number'] ) {
402
  wcj_session_set( 'wcj_is_eu_vat_number_valid', null );
403
  wcj_session_set( 'wcj_eu_vat_number_to_check', null );
459
  /**
460
  * Wcj_validate_eu_vat_number.
461
  *
462
+ * @version 5.6.2
463
  * @param array $param defines the param.
464
  */
465
  public function wcj_validate_eu_vat_number( $param ) {
470
  'echo' => true,
471
  )
472
  );
473
+ $eu_vat_number = isset( $param['wcj_eu_vat_number_to_check'] ) && '' !== $param['wcj_eu_vat_number_to_check'] && null !== $param['wcj_eu_vat_number_to_check'] ? sanitize_text_field( wp_unslash( $param['wcj_eu_vat_number_to_check'] ) ) : '';
474
+ $eu_vat_number = empty( $eu_vat_number ) && isset( $_POST['wcj_eu_vat_number_to_check'] ) && '' !== $_POST['wcj_eu_vat_number_to_check'] && null !== $_POST['wcj_eu_vat_number_to_check'] ? sanitize_text_field( wp_unslash( $_POST['wcj_eu_vat_number_to_check'] ) ) : $eu_vat_number; // phpcs:ignore WordPress.Security.NonceVerification
475
  if ( ! empty( $eu_vat_number ) ) {
476
  $eu_vat_number_to_check = substr( $eu_vat_number, 2 );
477
  $eu_vat_number_country_to_check = substr( $eu_vat_number, 0, 2 );
509
  /**
510
  * Need_to_exclude_vat.
511
  *
512
+ * @version 5.6.2
513
  * @since 4.6.0
514
  *
515
  * @return bool
527
  'yes' === wcj_get_option( 'wcj_eu_vat_number_disable_for_valid', 'yes' ) &&
528
  (
529
  ( true === wcj_session_get( 'wcj_is_eu_vat_number_valid' ) && null !== ( $eu_vat_number ) ) ||
530
+ ( 'yes' === wcj_get_option( 'wcj_eu_vat_number_disable_for_valid_by_user_vat', 'no' ) && is_user_logged_in() && ! empty( $eu_vat_number = get_user_meta( get_current_user_id(), 'billing_eu_vat_number', true ) ) && '1' === $this->wcj_validate_eu_vat_number(// phpcs:ignore
531
  array(
532
  'wcj_eu_vat_number_to_check' => $eu_vat_number,
533
  'echo' => false,
includes/class-wcj-export-import.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Export
4
  *
5
- * @version 5.5.9
6
  * @since 2.5.4
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -72,7 +72,7 @@ if ( ! class_exists( 'WCJ_Export_Import' ) ) :
72
  /**
73
  * Export.
74
  *
75
- * @version 2.5.9
76
  * @since 2.4.8
77
  * @todo [dev] when filtering now using `strpos`, but other options would be `stripos` (case-insensitive) or strict equality
78
  * @todo [dev] (maybe) do filtering directly in WP_Query
@@ -102,7 +102,11 @@ if ( ! class_exists( 'WCJ_Export_Import' ) ) :
102
  $data = $exporter->export_products( $this->fields_helper );
103
  break;
104
  }
105
- if ( isset( $_POST['wcj_export_filter_all_columns'] ) && '' !== $_POST['wcj_export_filter_all_columns'] ) {
 
 
 
 
106
  foreach ( $data as $row_id => $row ) {
107
  if ( 0 === $row_id ) {
108
  continue;
@@ -125,13 +129,17 @@ if ( ! class_exists( 'WCJ_Export_Import' ) ) :
125
  /**
126
  * Export_xml.
127
  *
128
- * @version 2.5.9
129
  * @since 2.5.9
130
  * @todo [dev] templates for xml_start, xml_end, xml_item.
131
  * @todo [dev] `strip_tags`
132
  */
133
  public function export_xml() {
134
- if ( isset( $_POST['wcj_export_xml'] ) ) {
 
 
 
 
135
  $data = $this->export( sanitize_text_field( wp_unslash( $_POST['wcj_export_xml'] ) ) );
136
  if ( is_array( $data ) ) {
137
  $xml = '';
@@ -154,7 +162,7 @@ if ( ! class_exists( 'WCJ_Export_Import' ) ) :
154
  header( 'Content-Type: Content-Type: text/html; charset=utf-8' );
155
  header( 'Content-Description: File Transfer' );
156
  header( 'Content-Length: ' . strlen( $xml ) );
157
- echo wp_kses_post( $xml );
158
  die();
159
  }
160
  }
@@ -165,7 +173,7 @@ if ( ! class_exists( 'WCJ_Export_Import' ) ) :
165
  *
166
  * @see https://stackoverflow.com/a/4617967/1193038
167
  *
168
- * @version 5.1.0
169
  * @since 5.1.0
170
  *
171
  * @param array $row defines the row.
@@ -195,11 +203,15 @@ if ( ! class_exists( 'WCJ_Export_Import' ) ) :
195
  /**
196
  * Export_csv.
197
  *
198
- * @version 5.1.0
199
  * @since 2.4.8
200
  */
201
  public function export_csv() {
202
- if ( isset( $_POST['wcj_export'] ) ) {
 
 
 
 
203
  $data = $this->export( sanitize_text_field( wp_unslash( $_POST['wcj_export'] ) ) );
204
  if ( is_array( $data ) ) {
205
  $csv = '';
@@ -223,13 +235,17 @@ if ( ! class_exists( 'WCJ_Export_Import' ) ) :
223
  /**
224
  * Export_filter_fields.
225
  *
226
- * @version 2.5.9
227
  * @since 2.5.5
228
  * @todo [dev] filter each field separately
229
  * @param int $tool_id defines the tool_id.
230
  */
231
  public function export_filter_fields( $tool_id ) {
232
- $fields = array();
 
 
 
 
233
  switch ( $tool_id ) {
234
  case 'orders':
235
  $fields = array(
@@ -246,7 +262,7 @@ if ( ! class_exists( 'WCJ_Export_Import' ) ) :
246
  if ( ! empty( $fields ) ) {
247
  $data = array();
248
  foreach ( $fields as $field_id => $field_desc ) {
249
- $field_value = ( isset( $_POST[ $field_id ] ) ) ? sanitize_text_field( wp_unslash( $_POST[ $field_id ] ) ) : '';
250
  $data[] = array(
251
  '<label for="' . $field_id . '">' . $field_desc . '</label>',
252
  '<input name="' . $field_id . '" id="' . $field_id . '" type="text" value="' . $field_value . '">',
@@ -270,15 +286,19 @@ if ( ! class_exists( 'WCJ_Export_Import' ) ) :
270
  /**
271
  * Export_date_fields.
272
  *
273
- * @version 5.5.9
274
  * @since 3.0.0
275
  * @todo [dev] maybe make `$dateformat` optional
276
  * @todo [dev] mark current (i.e. active) link (if exists)
277
  * @param int $tool_id defines the tool_id.
278
  */
279
  public function export_date_fields( $tool_id ) {
280
- $current_start_date = ( isset( $_GET['start_date'] ) ? sanitize_text_field( wp_unslash( $_GET['start_date'] ) ) : '' );
281
- $current_end_date = ( isset( $_GET['end_date'] ) ? sanitize_text_field( wp_unslash( $_GET['end_date'] ) ) : '' );
 
 
 
 
282
  $predefined_ranges = array();
283
  $predefined_ranges[] = '<a href="' . esc_url( add_query_arg( 'range', 'all_time', remove_query_arg( array( 'start_date', 'end_date' ) ) ) ) . '">' .
284
  __( 'All time', 'woocommerce-jetpack' ) . '</a>';
@@ -313,15 +333,19 @@ if ( ! class_exists( 'WCJ_Export_Import' ) ) :
313
  /**
314
  * Create_export_tool.
315
  *
316
- * @version 5.5.6
317
  * @since 2.4.8
318
  * @param int $tool_id defines the tool_id.
319
  */
320
  public function create_export_tool( $tool_id ) {
 
 
 
 
321
  echo '<div class="wcj-setting-jetpack-body wcj_tools_cnt_main">';
322
  echo wp_kses_post( $this->get_tool_header_html( 'export_' . $tool_id ) );
323
  echo '<p>' . wp_kses_post( $this->export_date_fields( $tool_id ) ) . '</p>';
324
- if ( ! isset( $_GET['range'] ) ) {
325
  echo '</div>';
326
  return;
327
  }
@@ -339,7 +363,7 @@ if ( ! class_exists( 'WCJ_Export_Import' ) ) :
339
  echo '</p>';
340
  echo '</form>';
341
  $data = $this->export( $tool_id );
342
- echo is_array( $data ) ? wcj_get_table_html( $data, array( 'table_class' => 'widefat striped' ) ) : ( $data );
343
  echo '</div>';
344
  }
345
 
2
  /**
3
  * Booster for WooCommerce - Module - Export
4
  *
5
+ * @version 5.6.2
6
  * @since 2.5.4
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
72
  /**
73
  * Export.
74
  *
75
+ * @version 5.6.2
76
  * @since 2.4.8
77
  * @todo [dev] when filtering now using `strpos`, but other options would be `stripos` (case-insensitive) or strict equality
78
  * @todo [dev] (maybe) do filtering directly in WP_Query
102
  $data = $exporter->export_products( $this->fields_helper );
103
  break;
104
  }
105
+ $wpnonce = true;
106
+ if ( function_exists( 'wp_verify_nonce' ) ) {
107
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
108
+ }
109
+ if ( $wpnonce && isset( $_POST['wcj_export_filter_all_columns'] ) && '' !== $_POST['wcj_export_filter_all_columns'] ) {
110
  foreach ( $data as $row_id => $row ) {
111
  if ( 0 === $row_id ) {
112
  continue;
129
  /**
130
  * Export_xml.
131
  *
132
+ * @version 5.6.2
133
  * @since 2.5.9
134
  * @todo [dev] templates for xml_start, xml_end, xml_item.
135
  * @todo [dev] `strip_tags`
136
  */
137
  public function export_xml() {
138
+ $wpnonce = true;
139
+ if ( function_exists( 'wp_verify_nonce' ) ) {
140
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
141
+ }
142
+ if ( $wpnonce && isset( $_POST['wcj_export_xml'] ) ) {
143
  $data = $this->export( sanitize_text_field( wp_unslash( $_POST['wcj_export_xml'] ) ) );
144
  if ( is_array( $data ) ) {
145
  $xml = '';
162
  header( 'Content-Type: Content-Type: text/html; charset=utf-8' );
163
  header( 'Content-Description: File Transfer' );
164
  header( 'Content-Length: ' . strlen( $xml ) );
165
+ echo $xml; // phpcs:ignore WordPress.Security.EscapeOutput
166
  die();
167
  }
168
  }
173
  *
174
  * @see https://stackoverflow.com/a/4617967/1193038
175
  *
176
+ * @version 5.6.2
177
  * @since 5.1.0
178
  *
179
  * @param array $row defines the row.
203
  /**
204
  * Export_csv.
205
  *
206
+ * @version 5.6.2
207
  * @since 2.4.8
208
  */
209
  public function export_csv() {
210
+ $wpnonce = true;
211
+ if ( function_exists( 'wp_verify_nonce' ) ) {
212
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
213
+ }
214
+ if ( $wpnonce && isset( $_POST['wcj_export'] ) ) {
215
  $data = $this->export( sanitize_text_field( wp_unslash( $_POST['wcj_export'] ) ) );
216
  if ( is_array( $data ) ) {
217
  $csv = '';
235
  /**
236
  * Export_filter_fields.
237
  *
238
+ * @version 5.6.2
239
  * @since 2.5.5
240
  * @todo [dev] filter each field separately
241
  * @param int $tool_id defines the tool_id.
242
  */
243
  public function export_filter_fields( $tool_id ) {
244
+ $fields = array();
245
+ $wpnonce = true;
246
+ if ( function_exists( 'wp_verify_nonce' ) ) {
247
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
248
+ }
249
  switch ( $tool_id ) {
250
  case 'orders':
251
  $fields = array(
262
  if ( ! empty( $fields ) ) {
263
  $data = array();
264
  foreach ( $fields as $field_id => $field_desc ) {
265
+ $field_value = ( $wpnonce && isset( $_POST[ $field_id ] ) ) ? sanitize_text_field( wp_unslash( $_POST[ $field_id ] ) ) : '';
266
  $data[] = array(
267
  '<label for="' . $field_id . '">' . $field_desc . '</label>',
268
  '<input name="' . $field_id . '" id="' . $field_id . '" type="text" value="' . $field_value . '">',
286
  /**
287
  * Export_date_fields.
288
  *
289
+ * @version 5.6.2
290
  * @since 3.0.0
291
  * @todo [dev] maybe make `$dateformat` optional
292
  * @todo [dev] mark current (i.e. active) link (if exists)
293
  * @param int $tool_id defines the tool_id.
294
  */
295
  public function export_date_fields( $tool_id ) {
296
+ $wpnonce = true;
297
+ if ( function_exists( 'wp_verify_nonce' ) ) {
298
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
299
+ }
300
+ $current_start_date = ( $wpnonce && isset( $_GET['start_date'] ) ? sanitize_text_field( wp_unslash( $_GET['start_date'] ) ) : '' );
301
+ $current_end_date = ( $wpnonce && isset( $_GET['end_date'] ) ? sanitize_text_field( wp_unslash( $_GET['end_date'] ) ) : '' );
302
  $predefined_ranges = array();
303
  $predefined_ranges[] = '<a href="' . esc_url( add_query_arg( 'range', 'all_time', remove_query_arg( array( 'start_date', 'end_date' ) ) ) ) . '">' .
304
  __( 'All time', 'woocommerce-jetpack' ) . '</a>';
333
  /**
334
  * Create_export_tool.
335
  *
336
+ * @version 5.6.2
337
  * @since 2.4.8
338
  * @param int $tool_id defines the tool_id.
339
  */
340
  public function create_export_tool( $tool_id ) {
341
+ $wpnonce = true;
342
+ if ( function_exists( 'wp_verify_nonce' ) ) {
343
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
344
+ }
345
  echo '<div class="wcj-setting-jetpack-body wcj_tools_cnt_main">';
346
  echo wp_kses_post( $this->get_tool_header_html( 'export_' . $tool_id ) );
347
  echo '<p>' . wp_kses_post( $this->export_date_fields( $tool_id ) ) . '</p>';
348
+ if ( $wpnonce && ! isset( $_GET['range'] ) ) {
349
  echo '</div>';
350
  return;
351
  }
363
  echo '</p>';
364
  echo '</form>';
365
  $data = $this->export( $tool_id );
366
+ echo is_array( $data ) ? wcj_get_table_html( $data, array( 'table_class' => 'widefat striped' ) ) : ( $data ); // phpcs:ignore WordPress.Security.EscapeOutput
367
  echo '</div>';
368
  }
369
 
includes/class-wcj-general.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - General
4
  *
5
- * @version 5.5.9
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -20,7 +20,7 @@ if ( ! class_exists( 'WCJ_General' ) ) :
20
  /**
21
  * Constructor.
22
  *
23
- * @version 4.5.0
24
  * @todo [dev] maybe expand `$this->desc` (e.g.: Custom roles tool, shortcodes in WordPress text widgets etc.)
25
  */
26
  public function __construct() {
@@ -49,7 +49,7 @@ if ( ! class_exists( 'WCJ_General' ) ) :
49
  $php_time_limit = wcj_get_option( 'wcj_admin_tools_php_time_limit', '0' );
50
  // PHP Memory Limit.
51
  if ( '0' !== ( $php_memory_limit ) ) {
52
- ini_set( 'memory_limit', $php_memory_limit . 'M' );
53
  }
54
  /* translators: %s: translation added */
55
  $this->current_php_memory_limit = sprintf( ' ' . __( 'Current PHP memory limit: %s.', 'woocommerce-jetpack' ), ini_get( 'memory_limit' ) );
@@ -102,11 +102,15 @@ if ( ! class_exists( 'WCJ_General' ) ) :
102
  /**
103
  * Change_user_role_meta.
104
  *
105
- * @version 2.9.0
106
  * @since 2.9.0
107
  * @todo [dev] (maybe) optionally via cookies
108
  */
109
  public function change_user_role_meta() {
 
 
 
 
110
  if ( isset( $_GET['wcj_booster_user_role'] ) ) {
111
  $current_user_id = get_current_user_id();
112
  update_user_meta( $current_user_id, '_wcj_booster_user_role', sanitize_text_field( wp_unslash( $_GET['wcj_booster_user_role'] ) ) );
@@ -189,11 +193,15 @@ if ( ! class_exists( 'WCJ_General' ) ) :
189
  /**
190
  * Create_custom_roles_tool.
191
  *
192
- * @version 5.5.9
193
  * @since 2.5.3
194
  */
195
  public function create_custom_roles_tool() {
196
- if ( isset( $_POST['wcj_add_new_role'] ) ) {
 
 
 
 
197
  if ( empty( $_POST['wcj_custom_role_id'] ) || empty( $_POST['wcj_custom_role_name'] ) || empty( $_POST['wcj_custom_role_caps'] ) ) {
198
  echo '<p style="color:red;font-weight:bold;">' . wp_kses_post( 'All fields are required!', 'woocommerce-jetpack' ) . '</p>';
199
  } else {
@@ -238,7 +246,7 @@ if ( ! class_exists( 'WCJ_General' ) ) :
238
  $default_wp_wc_roles = array( 'guest', 'administrator', 'editor', 'author', 'contributor', 'subscriber', 'customer', 'shop_manager' );
239
  $custom_roles = wcj_get_option( 'wcj_custom_roles', array() );
240
  foreach ( $existing_roles as $role_key => $role_data ) {
241
- $delete_html = ( in_array( $role_key, $default_wp_wc_roles ) )
242
  ? ''
243
  : '<a href="' . esc_url( add_query_arg( 'wcj_delete_role', $role_key ) ) . '"' . wcj_get_js_confirmation() . '>' . __( 'Delete', 'woocommerce-jetpack' ) . '</a>';
244
  $caps = ( ! empty( $custom_roles[ $role_key ]['caps_role'] ) ? $custom_roles[ $role_key ]['caps_role'] : $role_key );
2
  /**
3
  * Booster for WooCommerce - Module - General
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
20
  /**
21
  * Constructor.
22
  *
23
+ * @version 5.6.2
24
  * @todo [dev] maybe expand `$this->desc` (e.g.: Custom roles tool, shortcodes in WordPress text widgets etc.)
25
  */
26
  public function __construct() {
49
  $php_time_limit = wcj_get_option( 'wcj_admin_tools_php_time_limit', '0' );
50
  // PHP Memory Limit.
51
  if ( '0' !== ( $php_memory_limit ) ) {
52
+ ini_set( 'memory_limit', $php_memory_limit . 'M' ); //phpcs:ignore
53
  }
54
  /* translators: %s: translation added */
55
  $this->current_php_memory_limit = sprintf( ' ' . __( 'Current PHP memory limit: %s.', 'woocommerce-jetpack' ), ini_get( 'memory_limit' ) );
102
  /**
103
  * Change_user_role_meta.
104
  *
105
+ * @version 5.6.2
106
  * @since 2.9.0
107
  * @todo [dev] (maybe) optionally via cookies
108
  */
109
  public function change_user_role_meta() {
110
+ $wpnonce = true;
111
+ if ( function_exists( 'wp_verify_nonce' ) ) {
112
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
113
+ }
114
  if ( isset( $_GET['wcj_booster_user_role'] ) ) {
115
  $current_user_id = get_current_user_id();
116
  update_user_meta( $current_user_id, '_wcj_booster_user_role', sanitize_text_field( wp_unslash( $_GET['wcj_booster_user_role'] ) ) );
193
  /**
194
  * Create_custom_roles_tool.
195
  *
196
+ * @version 5.6.2
197
  * @since 2.5.3
198
  */
199
  public function create_custom_roles_tool() {
200
+ $wpnonce = true;
201
+ if ( function_exists( 'wp_verify_nonce' ) ) {
202
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
203
+ }
204
+ if ( $wpnonce && isset( $_POST['wcj_add_new_role'] ) ) {
205
  if ( empty( $_POST['wcj_custom_role_id'] ) || empty( $_POST['wcj_custom_role_name'] ) || empty( $_POST['wcj_custom_role_caps'] ) ) {
206
  echo '<p style="color:red;font-weight:bold;">' . wp_kses_post( 'All fields are required!', 'woocommerce-jetpack' ) . '</p>';
207
  } else {
246
  $default_wp_wc_roles = array( 'guest', 'administrator', 'editor', 'author', 'contributor', 'subscriber', 'customer', 'shop_manager' );
247
  $custom_roles = wcj_get_option( 'wcj_custom_roles', array() );
248
  foreach ( $existing_roles as $role_key => $role_data ) {
249
+ $delete_html = ( in_array( $role_key, $default_wp_wc_roles, true ) )
250
  ? ''
251
  : '<a href="' . esc_url( add_query_arg( 'wcj_delete_role', $role_key ) ) . '"' . wcj_get_js_confirmation() . '>' . __( 'Delete', 'woocommerce-jetpack' ) . '</a>';
252
  $caps = ( ! empty( $custom_roles[ $role_key ]['caps_role'] ) ? $custom_roles[ $role_key ]['caps_role'] : $role_key );
includes/class-wcj-global-discount.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Global Discount
4
  *
5
- * @version 5.6.1
6
  * @since 2.5.7
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -56,7 +56,7 @@ if ( ! class_exists( 'WCJ_Global_Discount' ) ) :
56
  /**
57
  * Add_wcj_sale_ids_to_products_shortcode.
58
  *
59
- * @version 5.6.1
60
  * @since 4.8.0
61
  *
62
  * @param array $args defines the args.
@@ -67,8 +67,8 @@ if ( ! class_exists( 'WCJ_Global_Discount' ) ) :
67
  */
68
  public function add_wcj_sale_ids_to_products_shortcode( $args, $atts, $type ) {
69
  if (
70
- 'sale_products' != $type ||
71
- 'yes' != wcj_get_option( 'wcj_global_discount_products_shortcode_compatibility', 'no' )
72
  ) {
73
  return $args;
74
  }
@@ -81,12 +81,17 @@ if ( ! class_exists( 'WCJ_Global_Discount' ) ) :
81
  /**
82
  * Regenerate_wcj_sale_products_in_cache.
83
  *
84
- * @version 5.6.1
85
  * @since 4.8.0
86
  */
87
  public function regenerate_wcj_sale_products_in_cache() {
 
 
 
 
88
  if (
89
- 'yes' != wcj_get_option( 'wcj_global_discount_products_shortcode_compatibility', 'no' ) ||
 
90
  ! isset( $_REQUEST['page'] ) || 'wc-settings' !== $_REQUEST['page'] ||
91
  ! isset( $_REQUEST['tab'] ) || 'jetpack' !== $_REQUEST['tab'] ||
92
  ! isset( $_REQUEST['wcj-cat'] ) || 'prices_and_currencies' !== $_REQUEST['wcj-cat'] ||
@@ -102,7 +107,7 @@ if ( ! class_exists( 'WCJ_Global_Discount' ) ) :
102
  /**
103
  * Get_wcj_sale_products.
104
  *
105
- * @version 5.6.1
106
  * @since 4.8.0
107
  *
108
  * @return array|mixed
@@ -177,7 +182,7 @@ if ( ! class_exists( 'WCJ_Global_Discount' ) ) :
177
 
178
  // Tax Query.
179
  if ( ! empty( $cats ) || ! empty( $tags ) ) {
180
- $args['tax_query'] = array(
181
  'relation' => 'AND',
182
  );
183
  if ( ! empty( $cats ) ) {
@@ -202,14 +207,14 @@ if ( ! class_exists( 'WCJ_Global_Discount' ) ) :
202
 
203
  // Scope.
204
  $scope = wcj_get_option( 'wcj_global_discount_sale_product_scope_' . $i, 'all' );
205
- if ( 'all' != $scope ) {
206
  $wc_sale_products = wc_get_product_ids_on_sale();
207
- if ( 'only_on_sale' == $scope ) {
208
  $args['post__in'] = $wc_sale_products;
209
  if ( empty( $wc_sale_products ) ) {
210
  $args['post_type'] = 'do_not_search';
211
  }
212
- } elseif ( 'only_not_on_sale' == $scope ) {
213
  $args['post__not_in'] = $wc_sale_products;
214
  }
215
  }
@@ -240,7 +245,7 @@ if ( ! class_exists( 'WCJ_Global_Discount' ) ) :
240
  /**
241
  * Change_price.
242
  *
243
- * @version 5.3.8
244
  * @since 3.1.0
245
  * @todo `WCJ_PRODUCT_GET_REGULAR_PRICE_FILTER, 'woocommerce_variation_prices_regular_price', 'woocommerce_product_variation_get_regular_price'`
246
  * @param int $price defines the price.
@@ -248,13 +253,13 @@ if ( ! class_exists( 'WCJ_Global_Discount' ) ) :
248
  */
249
  public function change_price( $price, $_product ) {
250
  $_current_filter = current_filter();
251
- if ( in_array( $_current_filter, array( WCJ_PRODUCT_GET_PRICE_FILTER, 'woocommerce_variation_prices_price', 'woocommerce_product_variation_get_price' ) ) ) {
252
  if ( isset( $_product->wcj_wholesale_price ) ) {
253
 
254
  return $_product->wcj_wholesale_price;
255
  }
256
  return $this->add_global_discount( $price, $_product, 'price' );
257
- } elseif ( in_array( $_current_filter, array( WCJ_PRODUCT_GET_SALE_PRICE_FILTER, 'woocommerce_variation_prices_sale_price', 'woocommerce_product_variation_get_sale_price' ) ) ) {
258
  return $this->add_global_discount( $price, $_product, 'sale_price' );
259
  } else {
260
  return $price;
@@ -264,7 +269,7 @@ if ( ! class_exists( 'WCJ_Global_Discount' ) ) :
264
  /**
265
  * Change_price_grouped.
266
  *
267
- * @version 5.6.1
268
  * @since 2.5.7
269
  * @param int $price defines the price.
270
  * @param int $qty defines the qty.
@@ -276,7 +281,7 @@ if ( ! class_exists( 'WCJ_Global_Discount' ) ) :
276
  $the_price = get_post_meta( $child_id, '_price', true );
277
  $the_product = wc_get_product( $child_id );
278
  $the_price = wcj_get_product_display_price( $the_product, $the_price, 1 );
279
- if ( $the_price == $price ) {
280
  return $this->add_global_discount( $price, $the_product, 'price' );
281
  }
282
  }
@@ -287,7 +292,7 @@ if ( ! class_exists( 'WCJ_Global_Discount' ) ) :
287
  /**
288
  * Calculate_price.
289
  *
290
- * @version 5.6.1
291
  * @since 2.5.7
292
  * @param int $price defines the price.
293
  * @param int $coefficient defines the coefficient.
@@ -302,7 +307,7 @@ if ( ! class_exists( 'WCJ_Global_Discount' ) ) :
302
  ( $price + $coefficient );
303
  $return_price = ( $return_price >= 0 ? $return_price : 0 );
304
  $final_correction_function = wcj_get_option( 'wcj_global_discount_sale_final_correction_func_' . $group, 'none' );
305
- if ( 'none' != ( $final_correction_function ) ) {
306
  $final_correction_coef = wcj_get_option( 'wcj_global_discount_sale_final_correction_coef_' . $group, 1 );
307
  $return_price = $final_correction_function( $return_price / $final_correction_coef ) * $final_correction_coef;
308
  }
@@ -348,7 +353,7 @@ if ( ! class_exists( 'WCJ_Global_Discount' ) ) :
348
  /**
349
  * Check_if_applicable_by_product_scope.
350
  *
351
- * @version 5.6.1
352
  * @since 3.1.0
353
  * @param string | array $_product defines the _product.
354
  * @param int $price defines the price.
@@ -358,7 +363,7 @@ if ( ! class_exists( 'WCJ_Global_Discount' ) ) :
358
  public function check_if_applicable_by_product_scope( $_product, $price, $price_type, $scope ) {
359
  $return = true;
360
  if ( 'sale_price' === $price_type ) {
361
- if ( 0 == $price ) {
362
  // The product is currently not on sale.
363
  if ( 'only_on_sale' === $scope ) {
364
  $return = false;
@@ -371,9 +376,9 @@ if ( ! class_exists( 'WCJ_Global_Discount' ) ) :
371
  }
372
  } else {
373
  wcj_remove_change_price_hooks( $this, $this->price_hooks_priority, false );
374
- if ( 'only_on_sale' === $scope && 0 == $_product->get_sale_price() ) {
375
  $return = false;
376
- } elseif ( 'only_not_on_sale' === $scope && 0 != $_product->get_sale_price() ) {
377
  $return = false;
378
  }
379
  wcj_add_change_price_hooks( $this, $this->price_hooks_priority, false );
@@ -384,7 +389,7 @@ if ( ! class_exists( 'WCJ_Global_Discount' ) ) :
384
  /**
385
  * Add_global_discount.
386
  *
387
- * @version 5.6.1
388
  * @since 2.5.7
389
  * @param int $price defines the price.
390
  * @param string | array $_product defines the _product.
@@ -401,11 +406,11 @@ if ( ! class_exists( 'WCJ_Global_Discount' ) ) :
401
  continue; // no changes by current discount group.
402
  }
403
  $coefficient = wcj_get_option( 'wcj_global_discount_sale_coefficient_' . $i, 0 );
404
- if ( 0 != $coefficient ) {
405
  if ( ! $this->check_if_applicable_by_product_scope( $_product, $price, $price_type, wcj_get_option( 'wcj_global_discount_sale_product_scope_' . $i, 'all' ) ) ) {
406
  continue; // no changes by current discount group.
407
  }
408
- if ( 'sale_price' === $price_type && 0 == (int) $price ) {
409
  $price = $_product->get_regular_price();
410
  }
411
  return $this->calculate_price( $price, $coefficient, $i ); // discount applied.
2
  /**
3
  * Booster for WooCommerce - Module - Global Discount
4
  *
5
+ * @version 5.6.2
6
  * @since 2.5.7
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
56
  /**
57
  * Add_wcj_sale_ids_to_products_shortcode.
58
  *
59
+ * @version 5.6.2
60
  * @since 4.8.0
61
  *
62
  * @param array $args defines the args.
67
  */
68
  public function add_wcj_sale_ids_to_products_shortcode( $args, $atts, $type ) {
69
  if (
70
+ 'sale_products' !== $type ||
71
+ 'yes' !== wcj_get_option( 'wcj_global_discount_products_shortcode_compatibility', 'no' )
72
  ) {
73
  return $args;
74
  }
81
  /**
82
  * Regenerate_wcj_sale_products_in_cache.
83
  *
84
+ * @version 5.6.2
85
  * @since 4.8.0
86
  */
87
  public function regenerate_wcj_sale_products_in_cache() {
88
+ $wpnonce = true;
89
+ if ( function_exists( 'wp_verify_nonce' ) ) {
90
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : 'woocommerce-settings' ) ) : true;
91
+ }
92
  if (
93
+ ! $wpnonce ||
94
+ 'yes' !== wcj_get_option( 'wcj_global_discount_products_shortcode_compatibility', 'no' ) ||
95
  ! isset( $_REQUEST['page'] ) || 'wc-settings' !== $_REQUEST['page'] ||
96
  ! isset( $_REQUEST['tab'] ) || 'jetpack' !== $_REQUEST['tab'] ||
97
  ! isset( $_REQUEST['wcj-cat'] ) || 'prices_and_currencies' !== $_REQUEST['wcj-cat'] ||
107
  /**
108
  * Get_wcj_sale_products.
109
  *
110
+ * @version 5.6.2
111
  * @since 4.8.0
112
  *
113
  * @return array|mixed
182
 
183
  // Tax Query.
184
  if ( ! empty( $cats ) || ! empty( $tags ) ) {
185
+ $args['tax_query'] = array(// phpcs:ignore
186
  'relation' => 'AND',
187
  );
188
  if ( ! empty( $cats ) ) {
207
 
208
  // Scope.
209
  $scope = wcj_get_option( 'wcj_global_discount_sale_product_scope_' . $i, 'all' );
210
+ if ( 'all' !== $scope ) {
211
  $wc_sale_products = wc_get_product_ids_on_sale();
212
+ if ( 'only_on_sale' === $scope ) {
213
  $args['post__in'] = $wc_sale_products;
214
  if ( empty( $wc_sale_products ) ) {
215
  $args['post_type'] = 'do_not_search';
216
  }
217
+ } elseif ( 'only_not_on_sale' === $scope ) {
218
  $args['post__not_in'] = $wc_sale_products;
219
  }
220
  }
245
  /**
246
  * Change_price.
247
  *
248
+ * @version 5.6.2
249
  * @since 3.1.0
250
  * @todo `WCJ_PRODUCT_GET_REGULAR_PRICE_FILTER, 'woocommerce_variation_prices_regular_price', 'woocommerce_product_variation_get_regular_price'`
251
  * @param int $price defines the price.
253
  */
254
  public function change_price( $price, $_product ) {
255
  $_current_filter = current_filter();
256
+ if ( in_array( $_current_filter, array( WCJ_PRODUCT_GET_PRICE_FILTER, 'woocommerce_variation_prices_price', 'woocommerce_product_variation_get_price' ), true ) ) {
257
  if ( isset( $_product->wcj_wholesale_price ) ) {
258
 
259
  return $_product->wcj_wholesale_price;
260
  }
261
  return $this->add_global_discount( $price, $_product, 'price' );
262
+ } elseif ( in_array( $_current_filter, array( WCJ_PRODUCT_GET_SALE_PRICE_FILTER, 'woocommerce_variation_prices_sale_price', 'woocommerce_product_variation_get_sale_price' ), true ) ) {
263
  return $this->add_global_discount( $price, $_product, 'sale_price' );
264
  } else {
265
  return $price;
269
  /**
270
  * Change_price_grouped.
271
  *
272
+ * @version 5.6.2
273
  * @since 2.5.7
274
  * @param int $price defines the price.
275
  * @param int $qty defines the qty.
281
  $the_price = get_post_meta( $child_id, '_price', true );
282
  $the_product = wc_get_product( $child_id );
283
  $the_price = wcj_get_product_display_price( $the_product, $the_price, 1 );
284
+ if ( $the_price === $price ) {
285
  return $this->add_global_discount( $price, $the_product, 'price' );
286
  }
287
  }
292
  /**
293
  * Calculate_price.
294
  *
295
+ * @version 5.6.2
296
  * @since 2.5.7
297
  * @param int $price defines the price.
298
  * @param int $coefficient defines the coefficient.
307
  ( $price + $coefficient );
308
  $return_price = ( $return_price >= 0 ? $return_price : 0 );
309
  $final_correction_function = wcj_get_option( 'wcj_global_discount_sale_final_correction_func_' . $group, 'none' );
310
+ if ( 'none' !== ( $final_correction_function ) ) {
311
  $final_correction_coef = wcj_get_option( 'wcj_global_discount_sale_final_correction_coef_' . $group, 1 );
312
  $return_price = $final_correction_function( $return_price / $final_correction_coef ) * $final_correction_coef;
313
  }
353
  /**
354
  * Check_if_applicable_by_product_scope.
355
  *
356
+ * @version 5.6.2
357
  * @since 3.1.0
358
  * @param string | array $_product defines the _product.
359
  * @param int $price defines the price.
363
  public function check_if_applicable_by_product_scope( $_product, $price, $price_type, $scope ) {
364
  $return = true;
365
  if ( 'sale_price' === $price_type ) {
366
+ if ( '0' === (string) $price ) {
367
  // The product is currently not on sale.
368
  if ( 'only_on_sale' === $scope ) {
369
  $return = false;
376
  }
377
  } else {
378
  wcj_remove_change_price_hooks( $this, $this->price_hooks_priority, false );
379
+ if ( 'only_on_sale' === $scope && '0' === (string) $_product->get_sale_price() ) {
380
  $return = false;
381
+ } elseif ( 'only_not_on_sale' === $scope && '0' !== (string) $_product->get_sale_price() ) {
382
  $return = false;
383
  }
384
  wcj_add_change_price_hooks( $this, $this->price_hooks_priority, false );
389
  /**
390
  * Add_global_discount.
391
  *
392
+ * @version 5.6.2
393
  * @since 2.5.7
394
  * @param int $price defines the price.
395
  * @param string | array $_product defines the _product.
406
  continue; // no changes by current discount group.
407
  }
408
  $coefficient = wcj_get_option( 'wcj_global_discount_sale_coefficient_' . $i, 0 );
409
+ if ( 0 !== $coefficient ) {
410
  if ( ! $this->check_if_applicable_by_product_scope( $_product, $price, $price_type, wcj_get_option( 'wcj_global_discount_sale_product_scope_' . $i, 'all' ) ) ) {
411
  continue; // no changes by current discount group.
412
  }
413
+ if ( 'sale_price' === $price_type && 0 === (int) $price ) {
414
  $price = $_product->get_regular_price();
415
  }
416
  return $this->calculate_price( $price, $coefficient, $i ); // discount applied.
includes/class-wcj-max-products-per-user.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Max Products per User
4
  *
5
- * @version 5.5.9
6
  * @since 3.5.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -12,11 +12,11 @@ if ( ! defined( 'ABSPATH' ) ) {
12
  exit; // Exit if accessed directly.
13
  }
14
 
15
- if ( ! class_exists( 'WCJ_Max_products_Per_User' ) ) :
16
  /**
17
  * WCJ_Max_products_Per_User.
18
  */
19
- class WCJ_Max_products_Per_User extends WCJ_Module {
20
 
21
  /**
22
  * Constructor.
@@ -62,12 +62,25 @@ if ( ! class_exists( 'WCJ_Max_products_Per_User' ) ) :
62
  $status = substr( $status, 3 );
63
  add_action( 'woocommerce_order_status_' . $status, array( $this, 'save_quantities' ), PHP_INT_MAX );
64
  }
 
65
  add_action( 'add_meta_boxes', array( $this, 'add_report_meta_box' ) );
66
  add_action( 'admin_init', array( $this, 'calculate_data' ) );
67
  add_action( 'admin_notices', array( $this, 'calculate_data_notice' ) );
68
  }
69
  }
70
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  /**
72
  * Validate_on_add_to_cart.
73
  *
@@ -136,15 +149,15 @@ if ( ! class_exists( 'WCJ_Max_products_Per_User' ) ) :
136
  /**
137
  * Calculate_data_notice.
138
  *
139
- * @version 3.5.0
140
  * @since 3.5.0
141
  */
142
  public function calculate_data_notice() {
143
- if ( isset( $_GET['wcj_max_products_per_user_calculate_data_finished'] ) ) {
144
  $class = 'notice notice-info';
145
  $message = __( 'Data re-calculated.', 'woocommerce-jetpack' ) . ' ' .
146
  /* translators: %s: translation added */
147
- sprintf( __( '%s order(s) processed.', 'woocommerce-jetpack' ), $_GET['wcj_max_products_per_user_calculate_data_finished'] );
148
  printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );
149
  }
150
  }
@@ -152,12 +165,12 @@ if ( ! class_exists( 'WCJ_Max_products_Per_User' ) ) :
152
  /**
153
  * Calculate_data.
154
  *
155
- * @version 5.5.9
156
  * @since 3.5.0
157
  * @todo reset `wcj_max_products_per_user_report` and `wcj_max_products_per_user_saved` meta
158
  */
159
  public function calculate_data() {
160
- if ( isset( $_GET['wcj_max_products_per_user_calculate_data'] ) ) {
161
  $offset = 0;
162
  $block_size = 512;
163
  $total_orders = 0;
@@ -185,7 +198,7 @@ if ( ! class_exists( 'WCJ_Max_products_Per_User' ) ) :
185
  add_query_arg(
186
  'wcj_max_products_per_user_calculate_data_finished',
187
  $total_orders,
188
- esc_url( remove_query_arg( 'wcj_max_products_per_user_calculate_data' ) )
189
  )
190
  );
191
  exit;
@@ -389,4 +402,4 @@ if ( ! class_exists( 'WCJ_Max_products_Per_User' ) ) :
389
 
390
  endif;
391
 
392
- return new WCJ_Max_products_Per_User();
2
  /**
3
  * Booster for WooCommerce - Module - Max Products per User
4
  *
5
+ * @version 5.6.2
6
  * @since 3.5.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
12
  exit; // Exit if accessed directly.
13
  }
14
 
15
+ if ( ! class_exists( 'WCJ_Max_Products_Per_User' ) ) :
16
  /**
17
  * WCJ_Max_products_Per_User.
18
  */
19
+ class WCJ_Max_Products_Per_User extends WCJ_Module {
20
 
21
  /**
22
  * Constructor.
62
  $status = substr( $status, 3 );
63
  add_action( 'woocommerce_order_status_' . $status, array( $this, 'save_quantities' ), PHP_INT_MAX );
64
  }
65
+ add_filter( 'woocommerce_duplicate_product_exclude_meta', array( $this, 'wcj_filter_woocommerce_duplicate_product_exclude_meta' ), 10, 1 );
66
  add_action( 'add_meta_boxes', array( $this, 'add_report_meta_box' ) );
67
  add_action( 'admin_init', array( $this, 'calculate_data' ) );
68
  add_action( 'admin_notices', array( $this, 'calculate_data_notice' ) );
69
  }
70
  }
71
 
72
+ /**
73
+ *
74
+ * Wcj_filter_woocommerce_duplicate_product_exclude_meta.
75
+ *
76
+ * @version 5.6.2
77
+ * @since 5.6.2
78
+ * @param int $meta_data defines the meta data of the product.
79
+ */
80
+ public function wcj_filter_woocommerce_duplicate_product_exclude_meta( $meta_data ) {
81
+ return array_merge( $meta_data, array( '_wcj_max_products_per_user_report' ) );
82
+ }
83
+
84
  /**
85
  * Validate_on_add_to_cart.
86
  *
149
  /**
150
  * Calculate_data_notice.
151
  *
152
+ * @version 5.6.2
153
  * @since 3.5.0
154
  */
155
  public function calculate_data_notice() {
156
+ if ( isset( $_GET['wcj_max_products_per_user_calculate_data_finished'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
157
  $class = 'notice notice-info';
158
  $message = __( 'Data re-calculated.', 'woocommerce-jetpack' ) . ' ' .
159
  /* translators: %s: translation added */
160
+ sprintf( __( '%s order(s) processed.', 'woocommerce-jetpack' ), sanitize_text_field( wp_unslash( $_GET['wcj_max_products_per_user_calculate_data_finished'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification
161
  printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );
162
  }
163
  }
165
  /**
166
  * Calculate_data.
167
  *
168
+ * @version 5.6.2
169
  * @since 3.5.0
170
  * @todo reset `wcj_max_products_per_user_report` and `wcj_max_products_per_user_saved` meta
171
  */
172
  public function calculate_data() {
173
+ if ( isset( $_GET['wcj_max_products_per_user_calculate_data'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
174
  $offset = 0;
175
  $block_size = 512;
176
  $total_orders = 0;
198
  add_query_arg(
199
  'wcj_max_products_per_user_calculate_data_finished',
200
  $total_orders,
201
+ remove_query_arg( 'wcj_max_products_per_user_calculate_data' )
202
  )
203
  );
204
  exit;
402
 
403
  endif;
404
 
405
+ return new WCJ_Max_Products_Per_User();
includes/class-wcj-multicurrency-product-base-price.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  /**
3
  * Booster for WooCommerce - Module - Multicurrency Product Base Price
4
  *
5
- * @version 5.2.0
6
  * @since 2.4.8
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -110,7 +110,7 @@ if ( ! class_exists( 'WCJ_Multicurrency_Base_Price' ) ) :
110
  /**
111
  * Modify_default_price_filter_hook.
112
  *
113
- * @version 4.8.0
114
  * @since 4.8.0
115
  *
116
  * @param string $query defines the query.
@@ -120,8 +120,8 @@ if ( ! class_exists( 'WCJ_Multicurrency_Base_Price' ) ) :
120
  public function modify_default_price_filter_hook( $query ) {
121
  if (
122
  'no' === wcj_get_option( 'wcj_multicurrency_base_price_advanced_price_filter_comp', 'no' ) ||
123
- ! isset( $_GET['min_price'] ) ||
124
- ! isset( $_GET['max_price'] )
125
  ) {
126
  return $query;
127
  }
@@ -153,7 +153,7 @@ if ( ! class_exists( 'WCJ_Multicurrency_Base_Price' ) ) :
153
  /**
154
  * Price_filter_post_clauses.
155
  *
156
- * @version 4.8.0
157
  * @since 4.8.0
158
  *
159
  * @see WC_Query::price_filter_post_clauses
@@ -165,11 +165,11 @@ if ( ! class_exists( 'WCJ_Multicurrency_Base_Price' ) ) :
165
  */
166
  public function price_filter_post_clauses( $args, $wp_query ) {
167
  global $wpdb;
168
- if ( ! $wp_query->is_main_query() || ( ! isset( $_GET['max_price'] ) && ! isset( $_GET['min_price'] ) ) ) {
169
  return $args;
170
  }
171
- $current_min_price = isset( $_GET['min_price'] ) ? floatval( wp_unslash( $_GET['min_price'] ) ) : 0;
172
- $current_max_price = isset( $_GET['max_price'] ) ? floatval( wp_unslash( $_GET['max_price'] ) ) : PHP_INT_MAX;
173
  if ( wc_tax_enabled() && 'incl' === wcj_get_option( 'woocommerce_tax_display_shop' ) && ! wc_prices_include_tax() ) {
174
  $tax_class = apply_filters( 'woocommerce_price_filter_widget_tax_class', '' ); // Uses standard tax class.
175
  $tax_rates = WC_Tax::get_rates( $tax_class );
@@ -408,7 +408,7 @@ if ( ! class_exists( 'WCJ_Multicurrency_Base_Price' ) ) :
408
  'update_post_meta_cache' => false,
409
  'update_post_term_cache' => false,
410
  'fields' => 'ids',
411
- 'meta_query' => array(
412
  array(
413
  'key' => '_wcj_multicurrency_base_price_currency',
414
  'value' => $currency,
1
+ <?php //phpcs:ignore
2
  /**
3
  * Booster for WooCommerce - Module - Multicurrency Product Base Price
4
  *
5
+ * @version 5.6.2
6
  * @since 2.4.8
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
110
  /**
111
  * Modify_default_price_filter_hook.
112
  *
113
+ * @version 5.6.2
114
  * @since 4.8.0
115
  *
116
  * @param string $query defines the query.
120
  public function modify_default_price_filter_hook( $query ) {
121
  if (
122
  'no' === wcj_get_option( 'wcj_multicurrency_base_price_advanced_price_filter_comp', 'no' ) ||
123
+ ! isset( $_GET['min_price'] ) || // phpcs:ignore WordPress.Security.NonceVerification
124
+ ! isset( $_GET['max_price'] ) // phpcs:ignore WordPress.Security.NonceVerification
125
  ) {
126
  return $query;
127
  }
153
  /**
154
  * Price_filter_post_clauses.
155
  *
156
+ * @version 5.6.2
157
  * @since 4.8.0
158
  *
159
  * @see WC_Query::price_filter_post_clauses
165
  */
166
  public function price_filter_post_clauses( $args, $wp_query ) {
167
  global $wpdb;
168
+ if ( ! $wp_query->is_main_query() || ( ! isset( $_GET['max_price'] ) && ! isset( $_GET['min_price'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification
169
  return $args;
170
  }
171
+ $current_min_price = isset( $_GET['min_price'] ) ? floatval( wp_unslash( $_GET['min_price'] ) ) : 0; // phpcs:ignore WordPress.Security.NonceVerification
172
+ $current_max_price = isset( $_GET['max_price'] ) ? floatval( wp_unslash( $_GET['max_price'] ) ) : PHP_INT_MAX; // phpcs:ignore WordPress.Security.NonceVerification
173
  if ( wc_tax_enabled() && 'incl' === wcj_get_option( 'woocommerce_tax_display_shop' ) && ! wc_prices_include_tax() ) {
174
  $tax_class = apply_filters( 'woocommerce_price_filter_widget_tax_class', '' ); // Uses standard tax class.
175
  $tax_rates = WC_Tax::get_rates( $tax_class );
408
  'update_post_meta_cache' => false,
409
  'update_post_term_cache' => false,
410
  'fields' => 'ids',
411
+ 'meta_query' => array( //phpcs:ignore
412
  array(
413
  'key' => '_wcj_multicurrency_base_price_currency',
414
  'value' => $currency,
includes/class-wcj-multicurrency.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Multicurrency (Currency Switcher)
4
  *
5
- * @version 5.6.1
6
  * @since 2.4.3
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -28,7 +28,7 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
28
  /**
29
  * Constructor.
30
  *
31
- * @version 5.6.1
32
  * @todo check if we can just always execute `init()` on `init` hook
33
  */
34
  public function __construct() {
@@ -56,7 +56,7 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
56
  '</li>' .
57
  '<li>' . sprintf(
58
  /* translators: %s: translation added */
59
- __( '<strong>PHP code:</strong> by using %s function, e.g.: %s', 'woocommerce-jetpack' ),
60
  '<code>do_shortcode()</code>',
61
  '<code>echo&nbsp;do_shortcode(&nbsp;\'[wcj_currency_select_drop_down_list]\'&nbsp;);</code>'
62
  ) .
@@ -218,7 +218,7 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
218
  /**
219
  * Product_addons_price_raw.
220
  *
221
- * @version 5.6.1
222
  * @since 5.1.1
223
  *
224
  * @param int $price defines the price.
@@ -229,7 +229,7 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
229
  public function product_addons_price_raw( $price, $addon ) {
230
  if (
231
  'no' === wcj_get_option( 'wcj_multicurrency_compatibility_product_addons', 'no' )
232
- || ( 'quantity_based' != $addon['price_type'] && 'flat_fee' != $addon['price_type'] )
233
  ) {
234
  return $price;
235
  }
@@ -315,7 +315,7 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
315
  /**
316
  * Get_wc_tree_table_rate_settings.
317
  *
318
- * @version 5.6.1
319
  * @since 4.9.0
320
  * @param array $option defines the option.
321
  *
@@ -336,7 +336,7 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
336
  'exchange_rate' => $this->get_currency_exchange_rate( $this->get_current_currency_code() ),
337
  )
338
  );
339
- set_transient( $transition_name, json_encode( $modified_rule ), 5 * MINUTE_IN_SECONDS );
340
  }
341
  $option['rule'] = $modified_rule_result;
342
  remove_filter( current_filter(), array( $this, 'convert_wc_tree_table_rate_settings' ) );
@@ -346,7 +346,7 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
346
  /**
347
  * Recursively_convert_wc_tree_settings.
348
  *
349
- * @version 5.6.1
350
  * @since 4.9.0
351
  *
352
  * @param array $array defines the array.
@@ -365,11 +365,11 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
365
  $change_keys = $args['change_keys'];
366
  $exchange_rate = $args['exchange_rate'];
367
  foreach ( $array as $key => $value ) {
368
- if ( in_array( $key, $change_keys ) ) {
369
  if (
370
  is_array( $array ) &&
371
  isset( $array['condition'] ) &&
372
- 'price' == $array['condition'] &&
373
  ! empty( $value ) &&
374
  is_numeric( $value )
375
  ) {
@@ -392,15 +392,17 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
392
  }
393
 
394
  /**
395
- * @version 4.9.0
 
 
396
  * @since 4.9.0
397
  *
398
- * @param string $valid defines the valid.
399
- * @param string $coupon defines the $coupon.
400
- * @param string $wc_discounts defines the wc_discounts.
401
  *
402
  * @return bool
403
- * @throws Exception
404
  */
405
  public function check_woocommerce_coupon_min_max_amount( $valid, WC_Coupon $coupon, WC_Discounts $wc_discounts ) {
406
  if ( 'yes' !== wcj_get_option( 'wcj_multicurrency_compatibility_wc_coupons', 'no' ) ) {
@@ -425,7 +427,7 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
425
  /**
426
  * Fix_wc_coupon_discount_amount.
427
  *
428
- * @version 5.2.0
429
  * @since 5.2.0
430
  *
431
  * @param bool $false defines the false.
@@ -440,7 +442,7 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
440
  'yes' !== wcj_get_option( 'wcj_multicurrency_compatibility_wc_coupons', 'no' ) ||
441
  is_admin() ||
442
  empty( $coupon_id ) ||
443
- 'fixed_cart' != get_post_meta( $coupon_id, 'discount_type', true )
444
  ) {
445
  return $false;
446
  }
@@ -532,7 +534,7 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
532
  * First it removes products witch `_wcj_multicurrency_per_product_regular_price_{$current_currency_code}` meta don't match min and max.
533
  * Then it adds products witch `_wcj_multicurrency_per_product_regular_price_{$current_currency_code}` meta match min and max.
534
  *
535
- * @version 4.6.0
536
  * @since 4.5.0
537
  *
538
  * @see WC_Query::price_filter_post_clauses()
@@ -547,7 +549,7 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
547
  is_admin() ||
548
  'no' === wcj_get_option( 'wcj_multicurrency_per_product_enabled', 'no' ) ||
549
  get_option( 'woocommerce_currency' ) === $this->get_current_currency_code() ||
550
- 1 === $this->get_currency_exchange_rate( $this->get_current_currency_code() ) ||
551
  ! isset( $args['where'] ) ||
552
  (
553
  false === strpos( $args['where'], 'wc_product_meta_lookup.min_price >=' ) &&
@@ -558,10 +560,14 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
558
  }
559
 
560
  global $wpdb;
 
 
 
 
561
  $current_currency_code = $this->get_current_currency_code();
562
  $exchange_rate = $this->get_currency_exchange_rate( $current_currency_code );
563
- $min_price = ( isset( $_GET['min_price'] ) ) ? floatval( wp_unslash( $_GET['min_price'] ) ) : 0;
564
- $max_price = ( isset( $_GET['max_price'] ) ) ? floatval( wp_unslash( $_GET['max_price'] ) ) : PHP_INT_MAX;
565
  $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!='')";
566
  if ( false === strpos( $args['join'], $min_max_join ) ) {
567
  $args['join'] .= " {$min_max_join} ";
@@ -690,7 +696,7 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
690
  *
691
  * @see price-slider.js, init_price_filter()
692
  *
693
- * @version 5.6.1
694
  * @since 4.3.0
695
  */
696
  public function add_compatibility_with_price_filter_widget() {
@@ -700,7 +706,7 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
700
  ?>
701
  <?php
702
  $exchange_rate = $this->get_currency_exchange_rate( $this->get_current_currency_code() );
703
- if ( 1 == $exchange_rate ) {
704
  return;
705
  }
706
  ?>
@@ -913,7 +919,7 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
913
  /**
914
  * Gets all products, or products with variations containing meta '_wcj_multicurrency_per_product_regular_price_{currency}' or '_wcj_multicurrency_per_product_sale_price_{currency}'.
915
  *
916
- * @version 4.6.0
917
  * @since 4.5.0
918
  *
919
  * @param int | string $currency defines the currency.
@@ -927,16 +933,18 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
927
 
928
  global $wpdb;
929
  $product_ids = $wpdb->get_col(
930
- "
931
- SELECT p.ID
932
- FROM {$wpdb->posts} AS p
933
- LEFT JOIN {$wpdb->posts} AS p2 ON p.ID = p2.ID OR (p2.post_parent = p.ID AND p2.post_type='product_variation')
934
- 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!='')
935
- WHERE p.post_status = 'publish' AND p.post_type IN ('product')
936
- AND pm.meta_value != 'null'
937
- GROUP BY p.ID
938
- "
939
- );
 
 
940
 
941
  return $product_ids;
942
  }
@@ -944,13 +952,14 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
944
  /**
945
  * Updates min and max prices.
946
  *
947
- * @version 4.5.0
948
  * @since 4.5.0
949
  *
950
  * @param int $post_id defines the post_id.
951
  * @param int | string $currency_code_param defines the currency_code_param.
952
  */
953
  public function save_min_max_prices_per_product( $post_id, $currency_code_param = '' ) {
 
954
  $product = wc_get_product( $post_id );
955
  $products = array();
956
  if ( $product->is_type( 'variable' ) ) {
@@ -974,15 +983,15 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
974
  foreach ( $products as $product_id => $original_price ) {
975
  // Regular Price.
976
 
977
- if ( isset( $_POST[ "wcj_multicurrency_per_product_regular_price_{$currency_code}_{$product_id}" ] ) ) {
978
- $regular_price = $_POST[ "wcj_multicurrency_per_product_regular_price_{$currency_code}_{$product_id}" ];
979
  } else {
980
  $regular_price = get_post_meta( $product_id, '_wcj_multicurrency_per_product_regular_price_' . $currency_code, true );
981
  }
982
 
983
  // Sale Price.
984
- if ( isset( $_POST[ "wcj_multicurrency_per_product_sale_price_{$currency_code}_{$product_id}" ] ) ) {
985
- $sale_price = $_POST[ "wcj_multicurrency_per_product_sale_price_{$currency_code}_{$product_id}" ];
986
  } else {
987
  $sale_price = get_post_meta( $product_id, '_wcj_multicurrency_per_product_sale_price_' . $currency_code, true );
988
  }
@@ -1022,22 +1031,26 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
1022
  /**
1023
  * Init.
1024
  *
1025
- * @version 5.3.4
1026
  * @since 3.4.5
1027
  */
1028
  public function init() {
1029
  wcj_session_maybe_start();
 
 
 
 
1030
  $session_value = wcj_session_get( 'wcj-currency' );
1031
  if ( null === ( $session_value ) ) {
1032
  $currency = $this->get_default_currency();
1033
  }
1034
- if ( isset( $_REQUEST['wcj-currency'] ) ) {
1035
  $currency = sanitize_text_field( wp_unslash( $_REQUEST['wcj-currency'] ) );
1036
  }
1037
  if ( 'yes' === wcj_get_option( 'wcj_multicurrency_default_currency_force', 'no' ) ) {
1038
  $currency = $this->get_default_currency();
1039
  }
1040
- if ( isset( $currency ) ) {
1041
  wcj_session_set( 'wcj-currency', $currency );
1042
  }
1043
  }
@@ -1078,7 +1091,7 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
1078
  /**
1079
  * Finds old add-ons fields on cart and replace by correct price.
1080
  *
1081
- * @version 5.6.1
1082
  * @since 4.3.0
1083
  *
1084
  * @param array $other_data defines the other_data.
@@ -1096,9 +1109,9 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
1096
  $name_old = $addon['name'];
1097
 
1098
  // Get old field name (with wrong currency price).
1099
- if ( 0 == $addon['price'] ) {
1100
  $name_old .= '';
1101
- } elseif ( 'percentage_based' === $addon['price_type'] && 0 == $price ) {
1102
  $name_old .= '';
1103
  } elseif ( 'percentage_based' !== $addon['price_type'] && $addon['price'] && apply_filters( 'woocommerce_addons_add_price_to_name', '__return_true' ) ) {
1104
  $name_old .= ' (' . wc_price( \WC_Product_Addons_Helper::get_product_addon_price_for_display( $addon['price'], $cart_item['data'], true ) ) . ')';
@@ -1111,9 +1124,9 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
1111
  // Get new field name (with correct currency price).
1112
  $name_new = $addon['name'];
1113
  $addon['price'] = $this->change_price( $addon['price'], null );
1114
- if ( 0 == $addon['price'] ) {
1115
  $name_new .= '';
1116
- } elseif ( 'percentage_based' === $addon['price_type'] && 0 == $price ) {
1117
  $name_new .= '';
1118
  } elseif ( 'percentage_based' !== $addon['price_type'] && $addon['price'] && apply_filters( 'woocommerce_addons_add_price_to_name', '__return_true' ) ) {
1119
  $name_new .= ' (' . wc_price( \WC_Product_Addons_Helper::get_product_addon_price_for_display( $addon['price'], $cart_item['data'], true ) ) . ')';
@@ -1125,7 +1138,7 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
1125
 
1126
  // Find old field on cart and replace by correct price.
1127
  foreach ( $other_data as $key => $data ) {
1128
- if ( $data['name'] == $name_old ) {
1129
  $other_data[ $key ]['name'] = $name_new;
1130
  }
1131
  }
@@ -1260,7 +1273,7 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
1260
  /**
1261
  * Change_price.
1262
  *
1263
- * @version 5.3.3
1264
  * @param int $price defines the price.
1265
  * @param array $_product defines the _product.
1266
  * @param null $args defines the args.
@@ -1294,7 +1307,7 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
1294
  $_product_id = wcj_get_product_id( $_product );
1295
  $do_save = $args['do_save'];
1296
  $_current_filter = current_filter();
1297
- if ( '' == $_current_filter ) {
1298
  $_current_filter = 'wcj_filter__none';
1299
  }
1300
  if ( $do_save && isset( w_c_j()->modules['multicurrency']->calculated_products_prices[ $_product_id ][ $_current_filter ] ) ) {
@@ -1311,27 +1324,27 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
1311
  $price = '';
1312
  $this->save_price( $price, $_product_id, $_current_filter );
1313
  return $price;
1314
- } elseif ( '' != ( $regular_price_per_product ) ) {
1315
- if ( 'woocommerce_get_price_including_tax' == $_current_filter || 'woocommerce_get_price_excluding_tax' == $_current_filter ) {
1316
  $price = wcj_get_product_display_price( $_product );
1317
  $this->save_price( $price, $_product_id, $_current_filter );
1318
  return $price;
1319
- } elseif ( WCJ_PRODUCT_GET_PRICE_FILTER == $_current_filter || 'woocommerce_variation_prices_price' == $_current_filter || 'woocommerce_product_variation_get_price' == $_current_filter || in_array( $_current_filter, $this->additional_price_filters ) ) {
1320
  if ( $_product->is_on_sale() ) {
1321
  $sale_price_per_product = get_post_meta( $_product_id, '_wcj_multicurrency_per_product_sale_price_' . $this->get_current_currency_code(), true );
1322
- $price = ( '' != $sale_price_per_product && $sale_price_per_product < $regular_price_per_product ) ? $sale_price_per_product : $regular_price_per_product;
1323
  } else {
1324
  $price = $regular_price_per_product;
1325
  }
1326
  $this->save_price( $price, $_product_id, $_current_filter );
1327
  return $price;
1328
- } elseif ( WCJ_PRODUCT_GET_REGULAR_PRICE_FILTER == $_current_filter || 'woocommerce_variation_prices_regular_price' == $_current_filter || 'woocommerce_product_variation_get_regular_price' == $_current_filter ) {
1329
  $price = $regular_price_per_product;
1330
  $this->save_price( $price, $_product_id, $_current_filter );
1331
  return $price;
1332
- } elseif ( WCJ_PRODUCT_GET_SALE_PRICE_FILTER == $_current_filter || 'woocommerce_variation_prices_sale_price' == $_current_filter || 'woocommerce_product_variation_get_sale_price' == $_current_filter ) {
1333
  $sale_price_per_product = get_post_meta( $_product_id, '_wcj_multicurrency_per_product_sale_price_' . $this->get_current_currency_code(), true );
1334
- $price = ( '' != $sale_price_per_product ) ? $sale_price_per_product : $price;
1335
  $this->save_price( $price, $_product_id, $_current_filter );
1336
  return $price;
1337
  }
@@ -1340,7 +1353,7 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
1340
 
1341
  // Global.
1342
  $currency_exchange_rate = $this->get_currency_exchange_rate( $this->get_current_currency_code() );
1343
- if ( 1 != ( $currency_exchange_rate ) ) {
1344
  $price = (float) $price * (float) $currency_exchange_rate;
1345
  switch ( wcj_get_option( 'wcj_multicurrency_rounding', 'no_round' ) ) {
1346
  case 'round':
@@ -1365,7 +1378,7 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
1365
  /**
1366
  * Get_current_currency_code.
1367
  *
1368
- * @version 3.4.0
1369
  * @param string $default_currency defines the default_currency.
1370
  */
1371
  public function get_current_currency_code( $default_currency = '' ) {
@@ -1376,9 +1389,9 @@ if ( ! class_exists( 'WCJ_Multicurrency' ) ) :
1376
  $module_roles = wcj_get_option( 'wcj_multicurrency_role_defaults_roles', '' );
1377
  if ( ! empty( $module_roles ) ) {
1378
  $current_user_role = wcj_get_current_user_first_role();
1379
- if ( in_array( $current_user_role, $module_roles ) ) {
1380
  $roles_default_currency = wcj_get_option( 'wcj_multicurrency_role_defaults_' . $current_user_role, '' );
1381
- if ( '' != $roles_default_currency ) {
1382
  return $roles_default_currency;
1383
  }
1384
  }
2
  /**
3
  * Booster for WooCommerce - Module - Multicurrency (Currency Switcher)
4
  *
5
+ * @version 5.6.2
6
  * @since 2.4.3
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
28
  /**
29
  * Constructor.
30
  *
31
+ * @version 5.6.2
32
  * @todo check if we can just always execute `init()` on `init` hook
33
  */
34
  public function __construct() {
56
  '</li>' .
57
  '<li>' . sprintf(
58
  /* translators: %s: translation added */
59
+ __( '<strong>PHP code:</strong> by using %1$s function, e.g.: %2$s', 'woocommerce-jetpack' ),
60
  '<code>do_shortcode()</code>',
61
  '<code>echo&nbsp;do_shortcode(&nbsp;\'[wcj_currency_select_drop_down_list]\'&nbsp;);</code>'
62
  ) .
218
  /**
219
  * Product_addons_price_raw.
220
  *
221
+ * @version 5.6.2
222
  * @since 5.1.1
223
  *
224
  * @param int $price defines the price.
229
  public function product_addons_price_raw( $price, $addon ) {
230
  if (
231
  'no' === wcj_get_option( 'wcj_multicurrency_compatibility_product_addons', 'no' )
232
+ || ( 'quantity_based' !== $addon['price_type'] && 'flat_fee' !== $addon['price_type'] )
233
  ) {
234
  return $price;
235
  }
315
  /**
316
  * Get_wc_tree_table_rate_settings.
317
  *
318
+ * @version 5.6.2
319
  * @since 4.9.0
320
  * @param array $option defines the option.
321
  *
336
  'exchange_rate' => $this->get_currency_exchange_rate( $this->get_current_currency_code() ),
337
  )
338
  );
339
+ set_transient( $transition_name, wp_json_encode( $modified_rule ), 5 * MINUTE_IN_SECONDS );
340
  }
341
  $option['rule'] = $modified_rule_result;
342
  remove_filter( current_filter(), array( $this, 'convert_wc_tree_table_rate_settings' ) );
346
  /**
347
  * Recursively_convert_wc_tree_settings.
348
  *
349
+ * @version 5.6.2
350
  * @since 4.9.0
351
  *
352
  * @param array $array defines the array.
365
  $change_keys = $args['change_keys'];
366
  $exchange_rate = $args['exchange_rate'];
367
  foreach ( $array as $key => $value ) {
368
+ if ( in_array( $key, $change_keys, true ) ) {
369
  if (
370
  is_array( $array ) &&
371
  isset( $array['condition'] ) &&
372
+ 'price' === $array['condition'] &&
373
  ! empty( $value ) &&
374
  is_numeric( $value )
375
  ) {
392
  }
393
 
394
  /**
395
+ * Check_woocommerce_coupon_min_max_amount
396
+ *
397
+ * @version 5.6.2
398
  * @since 4.9.0
399
  *
400
+ * @param string $valid defines the valid.
401
+ * @param WC_Coupon $coupon defines the $coupon.
402
+ * @param WC_Discounts $wc_discounts defines the wc_discounts.
403
  *
404
  * @return bool
405
+ * @throws Exception Throws error.
406
  */
407
  public function check_woocommerce_coupon_min_max_amount( $valid, WC_Coupon $coupon, WC_Discounts $wc_discounts ) {
408
  if ( 'yes' !== wcj_get_option( 'wcj_multicurrency_compatibility_wc_coupons', 'no' ) ) {
427
  /**
428
  * Fix_wc_coupon_discount_amount.
429
  *
430
+ * @version 5.6.2
431
  * @since 5.2.0
432
  *
433
  * @param bool $false defines the false.
442
  'yes' !== wcj_get_option( 'wcj_multicurrency_compatibility_wc_coupons', 'no' ) ||
443
  is_admin() ||
444
  empty( $coupon_id ) ||
445
+ 'fixed_cart' !== get_post_meta( $coupon_id, 'discount_type', true )
446
  ) {
447
  return $false;
448
  }
534
  * First it removes products witch `_wcj_multicurrency_per_product_regular_price_{$current_currency_code}` meta don't match min and max.
535
  * Then it adds products witch `_wcj_multicurrency_per_product_regular_price_{$current_currency_code}` meta match min and max.
536
  *
537
+ * @version 5.6.2
538
  * @since 4.5.0
539
  *
540
  * @see WC_Query::price_filter_post_clauses()
549
  is_admin() ||
550
  'no' === wcj_get_option( 'wcj_multicurrency_per_product_enabled', 'no' ) ||
551
  get_option( 'woocommerce_currency' ) === $this->get_current_currency_code() ||
552
+ 1 === (int) $this->get_currency_exchange_rate( $this->get_current_currency_code() ) ||
553
  ! isset( $args['where'] ) ||
554
  (
555
  false === strpos( $args['where'], 'wc_product_meta_lookup.min_price >=' ) &&
560
  }
561
 
562
  global $wpdb;
563
+ $wpnonce = true;
564
+ if ( function_exists( 'wp_verify_nonce' ) ) {
565
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
566
+ }
567
  $current_currency_code = $this->get_current_currency_code();
568
  $exchange_rate = $this->get_currency_exchange_rate( $current_currency_code );
569
+ $min_price = ( $wpnonce && isset( $_GET['min_price'] ) ) ? floatval( wp_unslash( $_GET['min_price'] ) ) : 0;
570
+ $max_price = ( $wpnonce && isset( $_GET['max_price'] ) ) ? floatval( wp_unslash( $_GET['max_price'] ) ) : PHP_INT_MAX;
571
  $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!='')";
572
  if ( false === strpos( $args['join'], $min_max_join ) ) {
573
  $args['join'] .= " {$min_max_join} ";
696
  *
697
  * @see price-slider.js, init_price_filter()
698
  *
699
+ * @version 5.6.2
700
  * @since 4.3.0
701
  */
702
  public function add_compatibility_with_price_filter_widget() {
706
  ?>
707
  <?php
708
  $exchange_rate = $this->get_currency_exchange_rate( $this->get_current_currency_code() );
709
+ if ( '1' === (string) $exchange_rate ) {
710
  return;
711
  }
712
  ?>
919
  /**
920
  * Gets all products, or products with variations containing meta '_wcj_multicurrency_per_product_regular_price_{currency}' or '_wcj_multicurrency_per_product_sale_price_{currency}'.
921
  *
922
+ * @version 5.6.2
923
  * @since 4.5.0
924
  *
925
  * @param int | string $currency defines the currency.
933
 
934
  global $wpdb;
935
  $product_ids = $wpdb->get_col(
936
+ $wpdb->prepare(
937
+ "SELECT p.ID
938
+ FROM {$wpdb->posts} AS p
939
+ LEFT JOIN {$wpdb->posts} AS p2 ON p.ID = p2.ID OR (p2.post_parent = p.ID AND p2.post_type='product_variation')
940
+ LEFT JOIN {$wpdb->postmeta} AS pm ON (p2.ID = pm.post_id) AND (pm.meta_key IN (%s,%s) AND pm.meta_value!='')
941
+ WHERE p.post_status = 'publish' AND p.post_type IN ('product')
942
+ AND pm.meta_value != 'null'
943
+ GROUP BY p.ID",
944
+ '_wcj_multicurrency_per_product_regular_price_' . esc_html( $currency ),
945
+ '_wcj_multicurrency_per_product_sale_price_' . esc_html( $currency )
946
+ )
947
+ ); // WPCS: db call ok and cache ok.
948
 
949
  return $product_ids;
950
  }
952
  /**
953
  * Updates min and max prices.
954
  *
955
+ * @version 5.6.2
956
  * @since 4.5.0
957
  *
958
  * @param int $post_id defines the post_id.
959
  * @param int | string $currency_code_param defines the currency_code_param.
960
  */
961
  public function save_min_max_prices_per_product( $post_id, $currency_code_param = '' ) {
962
+ $wpnonce = wp_verify_nonce( wp_unslash( isset( $_POST['woocommerce_meta_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['woocommerce_meta_nonce'] ) ) : '' ), 'woocommerce_save_data' );
963
  $product = wc_get_product( $post_id );
964
  $products = array();
965
  if ( $product->is_type( 'variable' ) ) {
983
  foreach ( $products as $product_id => $original_price ) {
984
  // Regular Price.
985
 
986
+ if ( $wpnonce && isset( $_POST[ "wcj_multicurrency_per_product_regular_price_{$currency_code}_{$product_id}" ] ) ) {
987
+ $regular_price = sanitize_text_field( wp_unslash( $_POST[ "wcj_multicurrency_per_product_regular_price_{$currency_code}_{$product_id}" ] ) );
988
  } else {
989
  $regular_price = get_post_meta( $product_id, '_wcj_multicurrency_per_product_regular_price_' . $currency_code, true );
990
  }
991
 
992
  // Sale Price.
993
+ if ( $wpnonce && isset( $_POST[ "wcj_multicurrency_per_product_sale_price_{$currency_code}_{$product_id}" ] ) ) {
994
+ $sale_price = sanitize_text_field( wp_unslash( $_POST[ "wcj_multicurrency_per_product_sale_price_{$currency_code}_{$product_id}" ] ) );
995
  } else {
996
  $sale_price = get_post_meta( $product_id, '_wcj_multicurrency_per_product_sale_price_' . $currency_code, true );
997
  }
1031
  /**
1032
  * Init.
1033
  *
1034
+ * @version 5.6.2
1035
  * @since 3.4.5
1036
  */
1037
  public function init() {
1038
  wcj_session_maybe_start();
1039
+ $wpnonce = true;
1040
+ if ( function_exists( 'wp_verify_nonce' ) ) {
1041
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
1042
+ }
1043
  $session_value = wcj_session_get( 'wcj-currency' );
1044
  if ( null === ( $session_value ) ) {
1045
  $currency = $this->get_default_currency();
1046
  }
1047
+ if ( $wpnonce && isset( $_REQUEST['wcj-currency'] ) ) {
1048
  $currency = sanitize_text_field( wp_unslash( $_REQUEST['wcj-currency'] ) );
1049
  }
1050
  if ( 'yes' === wcj_get_option( 'wcj_multicurrency_default_currency_force', 'no' ) ) {
1051
  $currency = $this->get_default_currency();
1052
  }
1053
+ if ( $wpnonce && isset( $currency ) ) {
1054
  wcj_session_set( 'wcj-currency', $currency );
1055
  }
1056
  }
1091
  /**
1092
  * Finds old add-ons fields on cart and replace by correct price.
1093
  *
1094
+ * @version 5.6.2
1095
  * @since 4.3.0
1096
  *
1097
  * @param array $other_data defines the other_data.
1109
  $name_old = $addon['name'];
1110
 
1111
  // Get old field name (with wrong currency price).
1112
+ if ( 0 === (int) $addon['price'] ) {
1113
  $name_old .= '';
1114
+ } elseif ( 'percentage_based' === $addon['price_type'] && 0 === (int) $price ) {
1115
  $name_old .= '';
1116
  } elseif ( 'percentage_based' !== $addon['price_type'] && $addon['price'] && apply_filters( 'woocommerce_addons_add_price_to_name', '__return_true' ) ) {
1117
  $name_old .= ' (' . wc_price( \WC_Product_Addons_Helper::get_product_addon_price_for_display( $addon['price'], $cart_item['data'], true ) ) . ')';
1124
  // Get new field name (with correct currency price).
1125
  $name_new = $addon['name'];
1126
  $addon['price'] = $this->change_price( $addon['price'], null );
1127
+ if ( 0 === (int) $addon['price'] ) {
1128
  $name_new .= '';
1129
+ } elseif ( 'percentage_based' === $addon['price_type'] && 0 === (int) $price ) {
1130
  $name_new .= '';
1131
  } elseif ( 'percentage_based' !== $addon['price_type'] && $addon['price'] && apply_filters( 'woocommerce_addons_add_price_to_name', '__return_true' ) ) {
1132
  $name_new .= ' (' . wc_price( \WC_Product_Addons_Helper::get_product_addon_price_for_display( $addon['price'], $cart_item['data'], true ) ) . ')';
1138
 
1139
  // Find old field on cart and replace by correct price.
1140
  foreach ( $other_data as $key => $data ) {
1141
+ if ( $data['name'] === $name_old ) {
1142
  $other_data[ $key ]['name'] = $name_new;
1143
  }
1144
  }
1273
  /**
1274
  * Change_price.
1275
  *
1276
+ * @version 5.6.2
1277
  * @param int $price defines the price.
1278
  * @param array $_product defines the _product.
1279
  * @param null $args defines the args.
1307
  $_product_id = wcj_get_product_id( $_product );
1308
  $do_save = $args['do_save'];
1309
  $_current_filter = current_filter();
1310
+ if ( '' === $_current_filter || null === $_current_filter ) {
1311
  $_current_filter = 'wcj_filter__none';
1312
  }
1313
  if ( $do_save && isset( w_c_j()->modules['multicurrency']->calculated_products_prices[ $_product_id ][ $_current_filter ] ) ) {
1324
  $price = '';
1325
  $this->save_price( $price, $_product_id, $_current_filter );
1326
  return $price;
1327
+ } elseif ( '' !== $regular_price_per_product && null !== $regular_price_per_product ) {
1328
+ if ( 'woocommerce_get_price_including_tax' === $_current_filter || 'woocommerce_get_price_excluding_tax' === $_current_filter ) {
1329
  $price = wcj_get_product_display_price( $_product );
1330
  $this->save_price( $price, $_product_id, $_current_filter );
1331
  return $price;
1332
+ } elseif ( WCJ_PRODUCT_GET_PRICE_FILTER === $_current_filter || 'woocommerce_variation_prices_price' === $_current_filter || 'woocommerce_product_variation_get_price' === $_current_filter || in_array( $_current_filter, $this->additional_price_filters, true ) ) {
1333
  if ( $_product->is_on_sale() ) {
1334
  $sale_price_per_product = get_post_meta( $_product_id, '_wcj_multicurrency_per_product_sale_price_' . $this->get_current_currency_code(), true );
1335
+ $price = ( null !== $sale_price_per_product && '' !== $sale_price_per_product && $sale_price_per_product < $regular_price_per_product ) ? $sale_price_per_product : $regular_price_per_product;
1336
  } else {
1337
  $price = $regular_price_per_product;
1338
  }
1339
  $this->save_price( $price, $_product_id, $_current_filter );
1340
  return $price;
1341
+ } elseif ( WCJ_PRODUCT_GET_REGULAR_PRICE_FILTER === $_current_filter || 'woocommerce_variation_prices_regular_price' === $_current_filter || 'woocommerce_product_variation_get_regular_price' === $_current_filter ) {
1342
  $price = $regular_price_per_product;
1343
  $this->save_price( $price, $_product_id, $_current_filter );
1344
  return $price;
1345
+ } elseif ( WCJ_PRODUCT_GET_SALE_PRICE_FILTER === $_current_filter || 'woocommerce_variation_prices_sale_price' === $_current_filter || 'woocommerce_product_variation_get_sale_price' === $_current_filter ) {
1346
  $sale_price_per_product = get_post_meta( $_product_id, '_wcj_multicurrency_per_product_sale_price_' . $this->get_current_currency_code(), true );
1347
+ $price = ( '' !== $sale_price_per_product && null !== $sale_price_per_product ) ? $sale_price_per_product : $price;
1348
  $this->save_price( $price, $_product_id, $_current_filter );
1349
  return $price;
1350
  }
1353
 
1354
  // Global.
1355
  $currency_exchange_rate = $this->get_currency_exchange_rate( $this->get_current_currency_code() );
1356
+ if ( 1 !== (int) $currency_exchange_rate ) {
1357
  $price = (float) $price * (float) $currency_exchange_rate;
1358
  switch ( wcj_get_option( 'wcj_multicurrency_rounding', 'no_round' ) ) {
1359
  case 'round':
1378
  /**
1379
  * Get_current_currency_code.
1380
  *
1381
+ * @version 5.6.2
1382
  * @param string $default_currency defines the default_currency.
1383
  */
1384
  public function get_current_currency_code( $default_currency = '' ) {
1389
  $module_roles = wcj_get_option( 'wcj_multicurrency_role_defaults_roles', '' );
1390
  if ( ! empty( $module_roles ) ) {
1391
  $current_user_role = wcj_get_current_user_first_role();
1392
+ if ( in_array( $current_user_role, $module_roles, true ) ) {
1393
  $roles_default_currency = wcj_get_option( 'wcj_multicurrency_role_defaults_' . $current_user_role, '' );
1394
+ if ( '' !== $roles_default_currency && null !== $roles_default_currency ) {
1395
  return $roles_default_currency;
1396
  }
1397
  }
includes/class-wcj-my-account.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - My Account
4
  *
5
- * @version 5.6.1
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -169,26 +169,30 @@ if ( ! class_exists( 'WCJ_My_Account' ) ) :
169
  /**
170
  * Set_custom_page_title.
171
  *
172
- * @version 4.5.0
173
  * @since 4.3.0
174
  * @param string $title defines the title.
175
  */
176
  public function set_custom_page_title( $title ) {
 
 
 
 
177
  if (
 
178
  ! isset( $_GET['section'] ) ||
179
  is_admin() ||
180
  ! in_the_loop() ||
181
  ! is_account_page()
 
182
  ) {
183
  return $title;
184
  }
185
  if ( ! isset( $this->custom_pages ) ) {
186
  $this->get_custom_pages();
187
  }
188
- $endpoint = $_GET['section'];
189
  return ( isset( $this->custom_pages[ $endpoint ] ) ? $this->custom_pages[ $endpoint ]['title'] : $title );
190
-
191
- return $title;
192
  }
193
 
194
  /**
@@ -282,7 +286,7 @@ if ( ! class_exists( 'WCJ_My_Account' ) ) :
282
  /**
283
  * Customize_dashboard.
284
  *
285
- * @version 5.6.1
286
  * @since 3.8.0
287
  * @see woocommerce/templates/myaccount/dashboard.php
288
  * @param string | array $value defines the value.
@@ -298,7 +302,9 @@ if ( ! class_exists( 'WCJ_My_Account' ) ) :
298
  if ( false !== $endpoint ) {
299
  $endpoint_tab = wp_list_filter( $this->custom_pages, array( 'endpoint' => $endpoint ) );
300
  }
301
- $page_id = sanitize_text_field( wp_unslash( ( $_GET['section'] ) ) ) ? sanitize_text_field( wp_unslash( ( $_GET['section'] ) ) ) : ( false !== $endpoint ? array_keys( wp_list_pluck( $endpoint_tab, 'endpoint' ) )[0] : '' );
 
 
302
  if ( isset( $this->custom_pages[ $page_id ] ) ) {
303
  echo do_shortcode( $this->custom_pages[ $page_id ]['content'] );
304
  return;
@@ -324,9 +330,9 @@ if ( ! class_exists( 'WCJ_My_Account' ) ) :
324
 
325
  if ( 'no' === wcj_get_option( 'wcj_my_account_custom_dashboard_hide_hello', 'no' ) ) {
326
  echo '<p>';
327
- /* translators: 1: user display name 2: logout url */
328
  printf(
329
- __( 'Hello %1$s (not %1$s? <a href="%2$s">Log out</a>)', 'woocommerce' ),
 
330
  '<strong>' . esc_html( $current_user->display_name ) . '</strong>',
331
  esc_url( wc_logout_url( wc_get_page_permalink( 'myaccount' ) ) )
332
  );
@@ -336,7 +342,8 @@ if ( ! class_exists( 'WCJ_My_Account' ) ) :
336
  if ( 'no' === wcj_get_option( 'wcj_my_account_custom_dashboard_hide_info', 'no' ) ) {
337
  echo '<p>';
338
  printf(
339
- __( 'From your account dashboard you can view your <a href="%1$s">recent orders</a>, manage your <a href="%2$s">shipping and billing addresses</a>, and <a href="%3$s">edit your password and account details</a>.', 'woocommerce' ),
 
340
  esc_url( wc_get_endpoint_url( 'orders' ) ),
341
  esc_url( wc_get_endpoint_url( 'edit-address' ) ),
342
  esc_url( wc_get_endpoint_url( 'edit-account' ) )
@@ -390,7 +397,7 @@ if ( ! class_exists( 'WCJ_My_Account' ) ) :
390
  /**
391
  * Customize_menu.
392
  *
393
- * @version 5.1.1
394
  * @since 3.8.0
395
  * @todo (maybe) option to disable menu
396
  * @param array $items defines the items.
@@ -417,7 +424,7 @@ if ( ! class_exists( 'WCJ_My_Account' ) ) :
417
  $menu_order = array_filter(
418
  $menu_order,
419
  function ( $item ) use ( $items ) {
420
- return in_array( $item, array_keys( $items ) );
421
  }
422
  );
423
  $items = array_merge( array_flip( $menu_order ), $items );
@@ -428,7 +435,7 @@ if ( ! class_exists( 'WCJ_My_Account' ) ) :
428
  /**
429
  * Add_registration_extra_fields.
430
  *
431
- * @version 3.6.0
432
  * @since 3.6.0
433
  * @todo (maybe) more fields to choose from (i.e. not only "user role" field)
434
  * @todo (maybe) customizable position (check for other hooks or at least customizable priority on `woocommerce_register_form`)
@@ -436,7 +443,8 @@ if ( ! class_exists( 'WCJ_My_Account' ) ) :
436
  */
437
  public function add_registration_extra_fields() {
438
  $user_roles_options_html = '';
439
- $current_user_role_input = ( ! empty( $_POST['wcj_user_role'] ) ) ? sanitize_text_field( wp_unslash( $_POST['wcj_user_role'] ) ) :
 
440
  get_option( 'wcj_my_account_registration_extra_fields_user_role_default', 'customer' );
441
  $user_roles_options = wcj_get_option( 'wcj_my_account_registration_extra_fields_user_role_options', array( 'customer' ) );
442
  $all_user_roles = wcj_get_user_roles_options();
@@ -454,7 +462,7 @@ if ( ! class_exists( 'WCJ_My_Account' ) ) :
454
  /**
455
  * Process_registration_extra_fields.
456
  *
457
- * @version 3.6.0
458
  * @since 3.6.0
459
  * @todo (maybe) optional admin confirmation for some user roles (probably will need to create additional `...-pending` user roles)
460
  * @param id $customer_id defines the customer_id.
@@ -462,9 +470,10 @@ if ( ! class_exists( 'WCJ_My_Account' ) ) :
462
  * @param string $password_generated defines the password_generated.
463
  */
464
  public function process_registration_extra_fields( $customer_id, $new_customer_data, $password_generated ) {
465
- if ( isset( $_POST['wcj_user_role'] ) && '' !== $_POST['wcj_user_role'] ) {
 
466
  $user_roles_options = wcj_get_option( 'wcj_my_account_registration_extra_fields_user_role_options', array( 'customer' ) );
467
- if ( ! empty( $user_roles_options ) && in_array( $_POST['wcj_user_role'], $user_roles_options ) ) {
468
  wp_update_user(
469
  array(
470
  'ID' => $customer_id,
@@ -478,7 +487,7 @@ if ( ! class_exists( 'WCJ_My_Account' ) ) :
478
  /**
479
  * Add_my_account_custom_info.
480
  *
481
- * @version 5.6.1
482
  * @since 3.4.0
483
  */
484
  public function add_my_account_custom_info() {
@@ -489,7 +498,7 @@ if ( ! class_exists( 'WCJ_My_Account' ) ) :
489
  if (
490
  '' !== wcj_get_option( 'wcj_my_account_custom_info_content_' . $i ) &&
491
  wcj_get_option( 'wcj_my_account_custom_info_hook_' . $i, 'woocommerce_account_dashboard' ) === $current_filter &&
492
- wcj_get_option( 'wcj_my_account_custom_info_priority_' . $i, '10' ) === (string)$current_filter_priority
493
  ) {
494
  echo do_shortcode( wcj_get_option( 'wcj_my_account_custom_info_content_' . $i ) );
495
  }
@@ -551,7 +560,7 @@ if ( ! class_exists( 'WCJ_My_Account' ) ) :
551
  /**
552
  * Process_woocommerce_mark_order_status.
553
  *
554
- * @version 2.9.0
555
  * @since 2.9.0
556
  */
557
  public function process_woocommerce_mark_order_status() {
@@ -561,10 +570,10 @@ if ( ! class_exists( 'WCJ_My_Account' ) ) :
561
  isset( $_GET['order_id'] ) &&
562
  isset( $_GET['_wpnonce'] )
563
  ) {
564
- if ( wp_verify_nonce( $_GET['_wpnonce'], 'wcj-woocommerce-mark-order-status' ) ) {
565
- $_order = wc_get_order( $_GET['order_id'] );
566
  if ( $_order->get_customer_id() === get_current_user_id() ) {
567
- $_order->update_status( $_GET['status'] );
568
  wp_safe_redirect( remove_query_arg( array( 'wcj_action', 'status', 'order_id', '_wpnonce' ) ) );
569
  exit;
570
  }
2
  /**
3
  * Booster for WooCommerce - Module - My Account
4
  *
5
+ * @version 5.6.2
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
169
  /**
170
  * Set_custom_page_title.
171
  *
172
+ * @version 5.6.2
173
  * @since 4.3.0
174
  * @param string $title defines the title.
175
  */
176
  public function set_custom_page_title( $title ) {
177
+ $wpnonce = true;
178
+ if ( function_exists( 'wp_verify_nonce' ) ) {
179
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
180
+ }
181
  if (
182
+ $wpnonce && (
183
  ! isset( $_GET['section'] ) ||
184
  is_admin() ||
185
  ! in_the_loop() ||
186
  ! is_account_page()
187
+ )
188
  ) {
189
  return $title;
190
  }
191
  if ( ! isset( $this->custom_pages ) ) {
192
  $this->get_custom_pages();
193
  }
194
+ $endpoint = sanitize_text_field( wp_unslash( $_GET['section'] ) );
195
  return ( isset( $this->custom_pages[ $endpoint ] ) ? $this->custom_pages[ $endpoint ]['title'] : $title );
 
 
196
  }
197
 
198
  /**
286
  /**
287
  * Customize_dashboard.
288
  *
289
+ * @version 5.6.2
290
  * @since 3.8.0
291
  * @see woocommerce/templates/myaccount/dashboard.php
292
  * @param string | array $value defines the value.
302
  if ( false !== $endpoint ) {
303
  $endpoint_tab = wp_list_filter( $this->custom_pages, array( 'endpoint' => $endpoint ) );
304
  }
305
+ $wpnonce = true;
306
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
307
+ $page_id = $wpnonce && sanitize_text_field( wp_unslash( ( $_GET['section'] ) ) ) ? sanitize_text_field( wp_unslash( ( $_GET['section'] ) ) ) : ( false !== $endpoint ? array_keys( wp_list_pluck( $endpoint_tab, 'endpoint' ) )[0] : '' );
308
  if ( isset( $this->custom_pages[ $page_id ] ) ) {
309
  echo do_shortcode( $this->custom_pages[ $page_id ]['content'] );
310
  return;
330
 
331
  if ( 'no' === wcj_get_option( 'wcj_my_account_custom_dashboard_hide_hello', 'no' ) ) {
332
  echo '<p>';
 
333
  printf(
334
+ /* translators: 1: user display name 2: logout url */
335
+ wp_kses_post( __( 'Hello %1$s (not %1$s? <a href="%2$s">Log out</a>)', 'woocommerce' ) ),
336
  '<strong>' . esc_html( $current_user->display_name ) . '</strong>',
337
  esc_url( wc_logout_url( wc_get_page_permalink( 'myaccount' ) ) )
338
  );
342
  if ( 'no' === wcj_get_option( 'wcj_my_account_custom_dashboard_hide_info', 'no' ) ) {
343
  echo '<p>';
344
  printf(
345
+ /* translators: 1: user display name 2: logout url */
346
+ wp_kses_post( __( 'From your account dashboard you can view your <a href="%1$s">recent orders</a>, manage your <a href="%2$s">shipping and billing addresses</a>, and <a href="%3$s">edit your password and account details</a>.', 'woocommerce' ) ),
347
  esc_url( wc_get_endpoint_url( 'orders' ) ),
348
  esc_url( wc_get_endpoint_url( 'edit-address' ) ),
349
  esc_url( wc_get_endpoint_url( 'edit-account' ) )
397
  /**
398
  * Customize_menu.
399
  *
400
+ * @version 5.6.2
401
  * @since 3.8.0
402
  * @todo (maybe) option to disable menu
403
  * @param array $items defines the items.
424
  $menu_order = array_filter(
425
  $menu_order,
426
  function ( $item ) use ( $items ) {
427
+ return in_array( $item, array_keys( $items ), true );
428
  }
429
  );
430
  $items = array_merge( array_flip( $menu_order ), $items );
435
  /**
436
  * Add_registration_extra_fields.
437
  *
438
+ * @version 5.6.2
439
  * @since 3.6.0
440
  * @todo (maybe) more fields to choose from (i.e. not only "user role" field)
441
  * @todo (maybe) customizable position (check for other hooks or at least customizable priority on `woocommerce_register_form`)
443
  */
444
  public function add_registration_extra_fields() {
445
  $user_roles_options_html = '';
446
+ $wpnonce = isset( $_REQUEST['woocommerce-register-nonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['woocommerce-register-nonce'] ) ? $_REQUEST['woocommerce-register-nonce'] : '' ), 'woocommerce-register' ) : true;
447
+ $current_user_role_input = ( $wpnonce && ! empty( $_POST['wcj_user_role'] ) ) ? sanitize_text_field( wp_unslash( $_POST['wcj_user_role'] ) ) :
448
  get_option( 'wcj_my_account_registration_extra_fields_user_role_default', 'customer' );
449
  $user_roles_options = wcj_get_option( 'wcj_my_account_registration_extra_fields_user_role_options', array( 'customer' ) );
450
  $all_user_roles = wcj_get_user_roles_options();
462
  /**
463
  * Process_registration_extra_fields.
464
  *
465
+ * @version 5.6.2
466
  * @since 3.6.0
467
  * @todo (maybe) optional admin confirmation for some user roles (probably will need to create additional `...-pending` user roles)
468
  * @param id $customer_id defines the customer_id.
470
  * @param string $password_generated defines the password_generated.
471
  */
472
  public function process_registration_extra_fields( $customer_id, $new_customer_data, $password_generated ) {
473
+ $wpnonce = isset( $_REQUEST['woocommerce-register-nonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['woocommerce-register-nonce'] ) ? $_REQUEST['woocommerce-register-nonce'] : '' ), 'woocommerce-register' ) : true;
474
+ if ( $wpnonce && isset( $_POST['wcj_user_role'] ) && '' !== $_POST['wcj_user_role'] ) {
475
  $user_roles_options = wcj_get_option( 'wcj_my_account_registration_extra_fields_user_role_options', array( 'customer' ) );
476
+ if ( ! empty( $user_roles_options ) && in_array( $_POST['wcj_user_role'], $user_roles_options, true ) ) {
477
  wp_update_user(
478
  array(
479
  'ID' => $customer_id,
487
  /**
488
  * Add_my_account_custom_info.
489
  *
490
+ * @version 5.6.2
491
  * @since 3.4.0
492
  */
493
  public function add_my_account_custom_info() {
498
  if (
499
  '' !== wcj_get_option( 'wcj_my_account_custom_info_content_' . $i ) &&
500
  wcj_get_option( 'wcj_my_account_custom_info_hook_' . $i, 'woocommerce_account_dashboard' ) === $current_filter &&
501
+ wcj_get_option( 'wcj_my_account_custom_info_priority_' . $i, '10' ) === (string) $current_filter_priority
502
  ) {
503
  echo do_shortcode( wcj_get_option( 'wcj_my_account_custom_info_content_' . $i ) );
504
  }
560
  /**
561
  * Process_woocommerce_mark_order_status.
562
  *
563
+ * @version 5.6.2
564
  * @since 2.9.0
565
  */
566
  public function process_woocommerce_mark_order_status() {
570
  isset( $_GET['order_id'] ) &&
571
  isset( $_GET['_wpnonce'] )
572
  ) {
573
+ if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ), 'wcj-woocommerce-mark-order-status' ) ) {
574
+ $_order = wc_get_order( sanitize_text_field( wp_unslash( $_GET['order_id'] ) ) );
575
  if ( $_order->get_customer_id() === get_current_user_id() ) {
576
+ $_order->update_status( sanitize_text_field( wp_unslash( $_GET['status'] ) ) );
577
  wp_safe_redirect( remove_query_arg( array( 'wcj_action', 'status', 'order_id', '_wpnonce' ) ) );
578
  exit;
579
  }
includes/class-wcj-offer-price.php CHANGED
@@ -92,7 +92,7 @@ if ( ! class_exists( 'WCJ_Offer_Price' ) ) :
92
  /**
93
  * Add_styling.
94
  *
95
- * @version 3.7.0
96
  * @since 3.7.0
97
  */
98
  public function add_styling() {
@@ -109,7 +109,7 @@ if ( ! class_exists( 'WCJ_Offer_Price' ) ) :
109
  $styling_options[ $option ] = $default;
110
  }
111
  }
112
- echo "<style type=\"text/css\">
113
  .wcj-offer-price-modal-content {
114
  width: {$styling_options['form_content_width']};
115
  }
@@ -127,20 +127,22 @@ if ( ! class_exists( 'WCJ_Offer_Price' ) ) :
127
  .wcj-offer-price-modal-footer h1, .wcj-offer-price-modal-footer h2, .wcj-offer-price-modal-footer h3, .wcj-offer-price-modal-footer h4, .wcj-offer-price-modal-footer h5, .wcj-offer-price-modal-footer h6 {
128
  color: {$styling_options['form_footer_text_color']};
129
  }
130
- </style>";
 
131
  }
132
 
133
  /**
134
  * Delete_offer_price_product_history.
135
  *
136
- * @version 2.9.0
137
  * @since 2.9.0
138
  * @todo (maybe) add successful deletion notice
139
  * @param int $post_id defines the post_id.
140
  * @param string | array $post defines the post.
141
  */
142
  public function delete_offer_price_product_history( $post_id, $post ) {
143
- if ( isset( $_POST['wcj_offer_price_delete_history'] ) ) {
 
144
  delete_post_meta( $post_id, '_wcj_price_offers' );
145
  add_action( 'admin_notices', array( $this, 'notice_delete_offer_price_product_history' ) );
146
  }
@@ -254,9 +256,10 @@ if ( ! class_exists( 'WCJ_Offer_Price' ) ) :
254
  echo wp_kses_post( wcj_get_table_html( $table_data, array( 'table_class' => 'widefat striped' ) ) );
255
  foreach ( $average_offers as $average_offer_currency_code => $average_offer_data ) {
256
  echo '<p>' . sprintf(
257
- __( 'Average offer: %s (from %s offer(s))', 'woocommerce-jetpack' ),
258
- wc_price( ( $average_offer_data['offers_sum'] / $average_offer_data['total_offers'] ), array( 'currency' => $average_offer_currency_code ) ),
259
- $average_offer_data['total_offers']
 
260
  ) . '</p>';
261
  }
262
  echo '<p>' .
@@ -366,7 +369,7 @@ if ( ! class_exists( 'WCJ_Offer_Price' ) ) :
366
  /**
367
  * Add_offer_price_form.
368
  *
369
- * @version 2.9.0
370
  * @since 2.9.0
371
  * @todo (maybe) fix when empty header
372
  * @todo (maybe) style options for input fields (class, style)
@@ -435,6 +438,7 @@ if ( ! class_exists( 'WCJ_Offer_Price' ) ) :
435
  '<p>' . $offer_form_content_copy . '</p>' .
436
  '<input type="hidden" id="wcj-offer-price-product-id" name="wcj-offer-price-product-id">' .
437
  '<input type="hidden" name="wcj-offer-price-customer-id" value="' . $customer_id . '">' .
 
438
  '</form>' .
439
  '</div>';
440
  // Final form.
@@ -468,7 +472,7 @@ if ( ! class_exists( 'WCJ_Offer_Price' ) ) :
468
  /**
469
  * Add_offer_price_button.
470
  *
471
- * @version 4.4.0
472
  * @since 2.9.0
473
  */
474
  public function add_offer_price_button() {
@@ -485,12 +489,12 @@ if ( ! class_exists( 'WCJ_Offer_Price' ) ) :
485
  echo '<p>' .
486
  '<button type="submit"' .
487
  ' name="wcj-offer-price-button"' .
488
- ' class="wcj-offer-price-button' . $additional_class . '"' .
489
- ' value="' . $product_id . '"' .
490
- ' style="' . wcj_get_option( 'wcj_offer_price_button_style', '' ) . '"' .
491
  ' wcj_data=\'' . wp_json_encode( $this->get_wcj_data_array( $product_id ) ) . '\'' .
492
  '>' .
493
- get_option( 'wcj_offer_price_button_label', __( 'Make an offer', 'woocommerce-jetpack' ) ) .
494
  '</button>' .
495
  '</p>';
496
  }
@@ -498,7 +502,7 @@ if ( ! class_exists( 'WCJ_Offer_Price' ) ) :
498
  /**
499
  * Offer_price.
500
  *
501
- * @version 5.1.0
502
  * @since 2.9.0
503
  * @todo (maybe) separate customer copy email template and subject
504
  * @todo (maybe) redirect (no notice though)
@@ -509,7 +513,8 @@ if ( ! class_exists( 'WCJ_Offer_Price' ) ) :
509
  */
510
  public function offer_price() {
511
  if ( isset( $_POST['wcj-offer-price-submit'] ) ) {
512
- $product_id = $_POST['wcj-offer-price-product-id'];
 
513
  $_product = wc_get_product( $product_id );
514
  if ( ! is_a( $_product, 'WC_Product' ) ) {
515
  return;
@@ -535,18 +540,18 @@ if ( ! class_exists( 'WCJ_Offer_Price' ) ) :
535
  }
536
  // Price offer array.
537
  $price_offer = array(
538
- 'offer_timestamp' => current_time( 'timestamp' ),
539
  'product_title' => $_product->get_title(),
540
  'product_edit_link' => get_edit_post_link( $_product->get_id() ),
541
- 'offered_price' => $_POST['wcj-offer-price-price'],
542
  'currency_code' => get_woocommerce_currency(),
543
- 'customer_message' => $_POST['wcj-offer-price-message'],
544
- 'customer_name' => $_POST['wcj-offer-price-customer-name'],
545
- 'customer_email' => $_POST['wcj-offer-price-customer-email'],
546
- 'customer_id' => $_POST['wcj-offer-price-customer-id'],
547
- 'user_ip' => $_SERVER['REMOTE_ADDR'],
548
- 'user_agent' => $_SERVER['HTTP_USER_AGENT'],
549
- 'copy_to_customer' => ( isset( $_POST['wcj-offer-price-customer-copy'] ) ? $_POST['wcj-offer-price-customer-copy'] : 'no' ),
550
  'sent_to' => $email_address,
551
  );
552
  // Email content.
92
  /**
93
  * Add_styling.
94
  *
95
+ * @version 5.6.2
96
  * @since 3.7.0
97
  */
98
  public function add_styling() {
109
  $styling_options[ $option ] = $default;
110
  }
111
  }
112
+ $css = "<style type=\"text/css\">
113
  .wcj-offer-price-modal-content {
114
  width: {$styling_options['form_content_width']};
115
  }
127
  .wcj-offer-price-modal-footer h1, .wcj-offer-price-modal-footer h2, .wcj-offer-price-modal-footer h3, .wcj-offer-price-modal-footer h4, .wcj-offer-price-modal-footer h5, .wcj-offer-price-modal-footer h6 {
128
  color: {$styling_options['form_footer_text_color']};
129
  }
130
+ </style>";
131
+ echo $css; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
132
  }
133
 
134
  /**
135
  * Delete_offer_price_product_history.
136
  *
137
+ * @version 5.6.2
138
  * @since 2.9.0
139
  * @todo (maybe) add successful deletion notice
140
  * @param int $post_id defines the post_id.
141
  * @param string | array $post defines the post.
142
  */
143
  public function delete_offer_price_product_history( $post_id, $post ) {
144
+ $wpnonce = wp_verify_nonce( wp_unslash( isset( $_POST['woocommerce_meta_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['woocommerce_meta_nonce'] ) ) : '' ), 'woocommerce_save_data' );
145
+ if ( $wpnonce && isset( $_POST['wcj_offer_price_delete_history'] ) ) {
146
  delete_post_meta( $post_id, '_wcj_price_offers' );
147
  add_action( 'admin_notices', array( $this, 'notice_delete_offer_price_product_history' ) );
148
  }
256
  echo wp_kses_post( wcj_get_table_html( $table_data, array( 'table_class' => 'widefat striped' ) ) );
257
  foreach ( $average_offers as $average_offer_currency_code => $average_offer_data ) {
258
  echo '<p>' . sprintf(
259
+ /* translators: %s: search term */
260
+ esc_html__( 'Average offer: %1$s (from %2$s offer(s))', 'woocommerce-jetpack' ),
261
+ wc_price( ( $average_offer_data['offers_sum'] / $average_offer_data['total_offers'] ), array( 'currency' => $average_offer_currency_code ) ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
262
+ $average_offer_data['total_offers'] // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
263
  ) . '</p>';
264
  }
265
  echo '<p>' .
369
  /**
370
  * Add_offer_price_form.
371
  *
372
+ * @version 5.6.2
373
  * @since 2.9.0
374
  * @todo (maybe) fix when empty header
375
  * @todo (maybe) style options for input fields (class, style)
438
  '<p>' . $offer_form_content_copy . '</p>' .
439
  '<input type="hidden" id="wcj-offer-price-product-id" name="wcj-offer-price-product-id">' .
440
  '<input type="hidden" name="wcj-offer-price-customer-id" value="' . $customer_id . '">' .
441
+ '<input type="hidden" name="wcj_offer_price_nonce" value="' . wp_create_nonce( 'wcj-offer-price-modal' ) . '">' .
442
  '</form>' .
443
  '</div>';
444
  // Final form.
472
  /**
473
  * Add_offer_price_button.
474
  *
475
+ * @version 5.6.2
476
  * @since 2.9.0
477
  */
478
  public function add_offer_price_button() {
489
  echo '<p>' .
490
  '<button type="submit"' .
491
  ' name="wcj-offer-price-button"' .
492
+ ' class="wcj-offer-price-button' . $additional_class . '"' . // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
493
+ ' value="' . esc_html( $product_id ) . '"' .
494
+ ' style="' . wcj_get_option( 'wcj_offer_price_button_style', '' ) . '"' . // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
495
  ' wcj_data=\'' . wp_json_encode( $this->get_wcj_data_array( $product_id ) ) . '\'' .
496
  '>' .
497
+ get_option( 'wcj_offer_price_button_label', __( 'Make an offer', 'woocommerce-jetpack' ) ) . // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
498
  '</button>' .
499
  '</p>';
500
  }
502
  /**
503
  * Offer_price.
504
  *
505
+ * @version 5.6.2
506
  * @since 2.9.0
507
  * @todo (maybe) separate customer copy email template and subject
508
  * @todo (maybe) redirect (no notice though)
513
  */
514
  public function offer_price() {
515
  if ( isset( $_POST['wcj-offer-price-submit'] ) ) {
516
+ $wpnonce = wp_verify_nonce( isset( $_REQUEST['wcj_offer_price_nonce'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['wcj_offer_price_nonce'] ) ) : '', 'wcj-offer-price-modal' );
517
+ $product_id = $wpnonce && isset( $_POST['wcj-offer-price-product-id'] ) ? sanitize_text_field( wp_unslash( $_POST['wcj-offer-price-product-id'] ) ) : '';
518
  $_product = wc_get_product( $product_id );
519
  if ( ! is_a( $_product, 'WC_Product' ) ) {
520
  return;
540
  }
541
  // Price offer array.
542
  $price_offer = array(
543
+ 'offer_timestamp' => gmdate( 'U' ),
544
  'product_title' => $_product->get_title(),
545
  'product_edit_link' => get_edit_post_link( $_product->get_id() ),
546
+ 'offered_price' => isset( $_POST['wcj-offer-price-price'] ) ? sanitize_text_field( wp_unslash( $_POST['wcj-offer-price-price'] ) ) : '',
547
  'currency_code' => get_woocommerce_currency(),
548
+ 'customer_message' => isset( $_POST['wcj-offer-price-message'] ) ? sanitize_text_field( wp_unslash( $_POST['wcj-offer-price-message'] ) ) : '',
549
+ 'customer_name' => isset( $_POST['wcj-offer-price-customer-name'] ) ? sanitize_text_field( wp_unslash( $_POST['wcj-offer-price-customer-name'] ) ) : '',
550
+ 'customer_email' => isset( $_POST['wcj-offer-price-customer-email'] ) ? sanitize_text_field( wp_unslash( $_POST['wcj-offer-price-customer-email'] ) ) : '',
551
+ 'customer_id' => isset( $_POST['wcj-offer-price-customer-id'] ) ? sanitize_text_field( wp_unslash( $_POST['wcj-offer-price-customer-id'] ) ) : '',
552
+ 'user_ip' => isset( $_SERVER['REMOTE_ADDR'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : '',
553
+ 'user_agent' => isset( $_SERVER['HTTP_USER_AGENT'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) : '',
554
+ 'copy_to_customer' => ( isset( $_POST['wcj-offer-price-customer-copy'] ) ? sanitize_text_field( wp_unslash( $_POST['wcj-offer-price-customer-copy'] ) ) : 'no' ),
555
  'sent_to' => $email_address,
556
  );
557
  // Email content.
includes/class-wcj-old-slugs.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Old Slugs
4
  *
5
- * @version 5.5.6
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -43,12 +43,13 @@ if ( ! class_exists( 'WCJ_Old_Slugs' ) ) :
43
  /**
44
  * Create_old_slugs_tool.
45
  *
46
- * @version 2.8.0
47
  */
48
  public function create_old_slugs_tool() {
 
49
  global $wpdb;
50
  $wp_postmeta_table = $wpdb->prefix . 'postmeta';
51
- $all_old_slugs = $wpdb->get_results( "SELECT * FROM $wp_postmeta_table WHERE meta_key = '_wp_old_slug' ORDER BY post_id" );
52
  $num_old_slugs = count( $all_old_slugs );
53
  $remove_result_html = '';
54
  $headings = array(
@@ -82,10 +83,16 @@ if ( ! class_exists( 'WCJ_Old_Slugs' ) ) :
82
  $posts_ids[ $type ][] = $old_slug_object->post_id;
83
  }
84
  // Actions.
85
- if ( isset( $_POST['remove_old_products_slugs'] ) || isset( $_POST['remove_old_non_products_slugs'] ) ) {
 
 
 
 
 
 
86
  $post_ids_to_delete = join( ',', ( isset( $_POST['remove_old_products_slugs'] ) ? $posts_ids['products'] : $posts_ids['non_products'] ) );
87
- $delete_result = $wpdb->get_results( "DELETE FROM $wp_postmeta_table WHERE meta_key = '_wp_old_slug' AND post_id IN ($post_ids_to_delete)" );
88
- $recheck_result = $wpdb->get_results( "SELECT * FROM $wp_postmeta_table WHERE meta_key = '_wp_old_slug'" );
89
  $recheck_result_count = count( $recheck_result );
90
  $remove_result_html = '<div class="updated"><p>' .
91
  sprintf(
2
  /**
3
  * Booster for WooCommerce - Module - Old Slugs
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
43
  /**
44
  * Create_old_slugs_tool.
45
  *
46
+ * @version 5.6.2
47
  */
48
  public function create_old_slugs_tool() {
49
+
50
  global $wpdb;
51
  $wp_postmeta_table = $wpdb->prefix . 'postmeta';
52
+ $all_old_slugs = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}postmeta WHERE meta_key = '_wp_old_slug' ORDER BY post_id" ); // WPCS: db call ok and cache ok.
53
  $num_old_slugs = count( $all_old_slugs );
54
  $remove_result_html = '';
55
  $headings = array(
83
  $posts_ids[ $type ][] = $old_slug_object->post_id;
84
  }
85
  // Actions.
86
+
87
+ $wpnonce = true;
88
+ if ( function_exists( 'wp_verify_nonce' ) ) {
89
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
90
+ }
91
+
92
+ if ( isset( $_POST['remove_old_products_slugs'] ) || isset( $_POST['remove_old_non_products_slugs'] ) && $wpnonce ) {
93
  $post_ids_to_delete = join( ',', ( isset( $_POST['remove_old_products_slugs'] ) ? $posts_ids['products'] : $posts_ids['non_products'] ) );
94
+ $delete_result = $wpdb->get_results( "DELETE FROM WHERE meta_key = '_wp_old_slug' AND post_id IN ($post_ids_to_delete)" ); //phpcs:ignore
95
+ $recheck_result = $wpdb->get_results( "SELECT * FROM WHERE meta_key = '_wp_old_slug'" ); //phpcs:ignore
96
  $recheck_result_count = count( $recheck_result );
97
  $remove_result_html = '<div class="updated"><p>' .
98
  sprintf(
includes/class-wcj-order-custom-statuses.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Order Custom Statuses
4
  *
5
- * @version 5.3.3
6
  * @since 2.2.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -318,11 +318,11 @@ if ( ! class_exists( 'WCJ_Order_Custom_Statuses' ) ) :
318
  /**
319
  * Add_custom_order_statuses_to_reports.
320
  *
321
- * @version 3.2.2
322
  * @param array | string $order_statuses defines the order_statuses.
323
  */
324
  public function add_custom_order_statuses_to_reports( $order_statuses ) {
325
- if ( is_array( $order_statuses ) && in_array( 'completed', $order_statuses ) ) {
326
  return array_merge( $order_statuses, array_keys( $this->get_custom_order_statuses( true ) ) );
327
  } else {
328
  return $order_statuses;
@@ -358,7 +358,7 @@ if ( ! class_exists( 'WCJ_Order_Custom_Statuses' ) ) :
358
  /**
359
  * Register_custom_post_statuses.
360
  *
361
- * @version 4.8.0
362
  */
363
  public function register_custom_post_statuses() {
364
  $custom_statuses = $this->get_custom_order_statuses( $this->cut_prefix() );
@@ -372,7 +372,7 @@ if ( ! class_exists( 'WCJ_Order_Custom_Statuses' ) ) :
372
  'show_in_admin_all_list' => true,
373
  'show_in_admin_status_list' => true,
374
  /* translators: %s: translation added */
375
- 'label_count' => _n_noop( $label . ' <span class="count">(%s)</span>', $label . ' <span class="count">(%s)</span>' ),
376
  )
377
  );
378
  }
@@ -463,7 +463,7 @@ if ( ! class_exists( 'WCJ_Order_Custom_Statuses' ) ) :
463
  *
464
  * Using Javascript until WordPress core fixes: http://core.trac.wordpress.org/ticket/16031
465
  *
466
- * @version 3.2.2
467
  * @since 2.2.7
468
  */
469
  public function bulk_admin_footer() {
@@ -472,7 +472,7 @@ if ( ! class_exists( 'WCJ_Order_Custom_Statuses' ) ) :
472
  ?><script type="text/javascript">
473
  <?php
474
  foreach ( wcj_get_order_statuses() as $key => $order_status ) {
475
- if ( in_array( $key, array( 'processing', 'on-hold', 'completed' ) ) ) {
476
  continue;
477
  }
478
  ?>
2
  /**
3
  * Booster for WooCommerce - Module - Order Custom Statuses
4
  *
5
+ * @version 5.6.2
6
  * @since 2.2.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
318
  /**
319
  * Add_custom_order_statuses_to_reports.
320
  *
321
+ * @version 5.6.2
322
  * @param array | string $order_statuses defines the order_statuses.
323
  */
324
  public function add_custom_order_statuses_to_reports( $order_statuses ) {
325
+ if ( is_array( $order_statuses ) && in_array( 'completed', $order_statuses, true ) ) {
326
  return array_merge( $order_statuses, array_keys( $this->get_custom_order_statuses( true ) ) );
327
  } else {
328
  return $order_statuses;
358
  /**
359
  * Register_custom_post_statuses.
360
  *
361
+ * @version 5.6.2
362
  */
363
  public function register_custom_post_statuses() {
364
  $custom_statuses = $this->get_custom_order_statuses( $this->cut_prefix() );
372
  'show_in_admin_all_list' => true,
373
  'show_in_admin_status_list' => true,
374
  /* translators: %s: translation added */
375
+ 'label_count' => _n_noop( $label . ' <span class="count">(%s)</span>', $label . ' <span class="count">(%s)</span>' ), //phpcs:ignore
376
  )
377
  );
378
  }
463
  *
464
  * Using Javascript until WordPress core fixes: http://core.trac.wordpress.org/ticket/16031
465
  *
466
+ * @version 5.6.2
467
  * @since 2.2.7
468
  */
469
  public function bulk_admin_footer() {
472
  ?><script type="text/javascript">
473
  <?php
474
  foreach ( wcj_get_order_statuses() as $key => $order_status ) {
475
+ if ( in_array( $key, array( 'processing', 'on-hold', 'completed' ), true ) ) {
476
  continue;
477
  }
478
  ?>
includes/class-wcj-order-numbers.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Order Numbers
4
  *
5
- * @version 5.5.6
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -192,7 +192,7 @@ if ( ! class_exists( 'WCJ_Order_Numbers' ) ) :
192
  /**
193
  * Search_by_custom_number.
194
  *
195
- * @version 4.2.0
196
  * @since 2.6.0
197
  * @todo `_wcj_order_number` is used for `sequential` and `hash` only
198
  * @param array | string $query defines the query.
@@ -202,11 +202,12 @@ if ( ! class_exists( 'WCJ_Order_Numbers' ) ) :
202
  ! is_admin() ||
203
  ! property_exists( $query, 'query' ) ||
204
  ! isset( $query->query['s'] ) ||
205
- empty( $search = trim( $query->query['s'] ) ) ||
206
  'shop_order' !== $query->query['post_type']
207
  ) {
208
  return;
209
  }
 
210
  remove_action( 'pre_get_posts', array( $this, 'search_by_custom_number' ) );
211
 
212
  // Get prefix and suffix options.
@@ -229,7 +230,11 @@ if ( ! class_exists( 'WCJ_Order_Numbers' ) ) :
229
  }
230
  }
231
  // Post Status.
232
- $post_status = ( isset( $_GET['post_status'] ) ) ? $_GET['post_status'] : 'any';
 
 
 
 
233
 
234
  // Try to search post by '_wcj_order_number' meta key.
235
  $meta_query_args = array(
@@ -246,12 +251,12 @@ if ( ! class_exists( 'WCJ_Order_Numbers' ) ) :
246
  'update_post_term_cache' => false,
247
  'post_status' => $post_status,
248
  'post_type' => 'shop_order',
249
- 'meta_query' => $meta_query_args,
250
  )
251
  );
252
 
253
  // If found, create the query by meta_key.
254
- if ( 1 == $search_query->found_posts ) {
255
  $query->set( 'post_status', $post_status );
256
  $query->set( 's', '' );
257
  $query->set( 'post__in', array() );
@@ -337,13 +342,17 @@ if ( ! class_exists( 'WCJ_Order_Numbers' ) ) :
337
  /**
338
  * Add Renumerate Orders tool to WooCommerce menu (the content).
339
  *
340
- * @version 5.5.6
341
  * @todo restyle
342
  * @todo add more result info (e.g. number of regenerated orders etc.)
343
  */
344
  public function create_renumerate_orders_tool() {
345
  $result_message = '';
346
- if ( isset( $_POST['renumerate_orders'] ) ) {
 
 
 
 
347
  $this->renumerate_orders();
348
  $result_message = '<p><div class="updated"><p><strong>' . __( 'Orders successfully renumerated!', 'woocommerce-jetpack' ) . '</strong></p></div></p>';
349
  } else {
@@ -435,7 +444,7 @@ if ( ! class_exists( 'WCJ_Order_Numbers' ) ) :
435
  /**
436
  * Add/update order_number meta to order.
437
  *
438
- * @version 5.4.6
439
  * @todo (maybe) save order ID instead of `$current_order_number = ''` (if `'no' === wcj_get_option( 'wcj_order_number_sequential_enabled', 'yes' )`)
440
  * @param int $order_id defines the order_id.
441
  * @param bool $do_overwrite defines the do_overwrite.
@@ -451,6 +460,7 @@ if ( ! class_exists( 'WCJ_Order_Numbers' ) ) :
451
  }
452
  if ( 'yes' === wcj_get_option( 'wcj_order_number_sequential_enabled', 'yes' ) && 'yes' === wcj_get_option( 'wcj_order_number_use_mysql_transaction_enabled', 'yes' ) ) {
453
  global $wpdb;
 
454
  $wpdb->query( 'START TRANSACTION' );
455
  $wp_options_table = $wpdb->prefix . 'options';
456
  $result_select = $wpdb->get_row( "SELECT * FROM $wp_options_table WHERE option_name = 'wcj_order_number_counter'" );
@@ -466,6 +476,7 @@ if ( ! class_exists( 'WCJ_Order_Numbers' ) ) :
466
  } else {
467
  $wpdb->query( 'ROLLBACK' ); // something went wrong, Rollback.
468
  }
 
469
  } else {
470
  if ( 'hash_crc32' === wcj_get_option( 'wcj_order_number_sequential_enabled', 'yes' ) ) {
471
  $current_order_number = sprintf( '%u', crc32( $order_id ) );
2
  /**
3
  * Booster for WooCommerce - Module - Order Numbers
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
192
  /**
193
  * Search_by_custom_number.
194
  *
195
+ * @version 5.6.2
196
  * @since 2.6.0
197
  * @todo `_wcj_order_number` is used for `sequential` and `hash` only
198
  * @param array | string $query defines the query.
202
  ! is_admin() ||
203
  ! property_exists( $query, 'query' ) ||
204
  ! isset( $query->query['s'] ) ||
205
+ empty( trim( $query->query['s'] ) ) ||
206
  'shop_order' !== $query->query['post_type']
207
  ) {
208
  return;
209
  }
210
+ $search = trim( $query->query['s'] );
211
  remove_action( 'pre_get_posts', array( $this, 'search_by_custom_number' ) );
212
 
213
  // Get prefix and suffix options.
230
  }
231
  }
232
  // Post Status.
233
+ $wpnonce = true;
234
+ if ( function_exists( 'wp_verify_nonce' ) ) {
235
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
236
+ }
237
+ $post_status = ( $wpnonce && isset( $_GET['post_status'] ) ) ? sanitize_text_field( wp_unslash( $_GET['post_status'] ) ) : 'any';
238
 
239
  // Try to search post by '_wcj_order_number' meta key.
240
  $meta_query_args = array(
251
  'update_post_term_cache' => false,
252
  'post_status' => $post_status,
253
  'post_type' => 'shop_order',
254
+ 'meta_query' => $meta_query_args, //phpcs:ignore
255
  )
256
  );
257
 
258
  // If found, create the query by meta_key.
259
+ if ( 1 === $search_query->found_posts ) {
260
  $query->set( 'post_status', $post_status );
261
  $query->set( 's', '' );
262
  $query->set( 'post__in', array() );
342
  /**
343
  * Add Renumerate Orders tool to WooCommerce menu (the content).
344
  *
345
+ * @version 5.6.2
346
  * @todo restyle
347
  * @todo add more result info (e.g. number of regenerated orders etc.)
348
  */
349
  public function create_renumerate_orders_tool() {
350
  $result_message = '';
351
+ $wpnonce = true;
352
+ if ( function_exists( 'wp_verify_nonce' ) ) {
353
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
354
+ }
355
+ if ( $wpnonce && isset( $_POST['renumerate_orders'] ) ) {
356
  $this->renumerate_orders();
357
  $result_message = '<p><div class="updated"><p><strong>' . __( 'Orders successfully renumerated!', 'woocommerce-jetpack' ) . '</strong></p></div></p>';
358
  } else {
444
  /**
445
  * Add/update order_number meta to order.
446
  *
447
+ * @version 5.6.2
448
  * @todo (maybe) save order ID instead of `$current_order_number = ''` (if `'no' === wcj_get_option( 'wcj_order_number_sequential_enabled', 'yes' )`)
449
  * @param int $order_id defines the order_id.
450
  * @param bool $do_overwrite defines the do_overwrite.
460
  }
461
  if ( 'yes' === wcj_get_option( 'wcj_order_number_sequential_enabled', 'yes' ) && 'yes' === wcj_get_option( 'wcj_order_number_use_mysql_transaction_enabled', 'yes' ) ) {
462
  global $wpdb;
463
+ // phpcs:disable
464
  $wpdb->query( 'START TRANSACTION' );
465
  $wp_options_table = $wpdb->prefix . 'options';
466
  $result_select = $wpdb->get_row( "SELECT * FROM $wp_options_table WHERE option_name = 'wcj_order_number_counter'" );
476
  } else {
477
  $wpdb->query( 'ROLLBACK' ); // something went wrong, Rollback.
478
  }
479
+ // phpcs:enable
480
  } else {
481
  if ( 'hash_crc32' === wcj_get_option( 'wcj_order_number_sequential_enabled', 'yes' ) ) {
482
  $current_order_number = sprintf( '%u', crc32( $order_id ) );
includes/class-wcj-order-quantities.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Order Min/Max Quantities
4
  *
5
- * @version 5.4.3
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -105,15 +105,19 @@ if ( ! class_exists( 'WCJ_Order_Quantities' ) ) :
105
  /**
106
  * Prevents outdated min/max Quantity options.
107
  *
108
- * @version 4.4.0
109
  * @since 4.4.0
110
  * @param int $product_id defines the product_id.
111
  */
112
  public function prevent_outdated_min_max( $product_id ) {
113
  $product = wc_get_product( $product_id );
 
 
 
 
114
  if (
115
  ! $product->is_type( 'variable' ) ||
116
- isset( $_POST['_wcj_order_quantities_min'] )
117
  ) {
118
  return;
119
  }
2
  /**
3
  * Booster for WooCommerce - Module - Order Min/Max Quantities
4
  *
5
+ * @version 5.6.2
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
105
  /**
106
  * Prevents outdated min/max Quantity options.
107
  *
108
+ * @version 5.6.2
109
  * @since 4.4.0
110
  * @param int $product_id defines the product_id.
111
  */
112
  public function prevent_outdated_min_max( $product_id ) {
113
  $product = wc_get_product( $product_id );
114
+ $wpnonce = true;
115
+ if ( function_exists( 'wp_verify_nonce' ) ) {
116
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
117
+ }
118
  if (
119
  ! $product->is_type( 'variable' ) ||
120
+ isset( $_POST['_wcj_order_quantities_min'] ) && $wpnonce
121
  ) {
122
  return;
123
  }
includes/class-wcj-orders.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Orders
4
  *
5
- * @version 5.5.9
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -20,7 +20,7 @@ if ( ! class_exists( 'WCJ_Orders' ) ) :
20
  /**
21
  * Constructor.
22
  *
23
- * @version 5.2.0
24
  * @todo Bulk Regenerate Download Permissions - copy "cron" to plugin
25
  * @todo Bulk Regenerate Download Permissions - maybe move "bulk actions" to free
26
  * @todo Bulk Regenerate Download Permissions - maybe as new module
@@ -68,7 +68,7 @@ if ( ! class_exists( 'WCJ_Orders' ) ) :
68
  if ( 'disabled' !== apply_filters( 'booster_option', 'disabled', wcj_get_option( 'wcj_order_bulk_regenerate_download_permissions_all_orders_cron', 'disabled' ) ) ) {
69
  add_action( 'init', array( $this, 'schedule_bulk_regenerate_download_permissions_all_orders_cron' ) );
70
  add_action( 'admin_init', array( $this, 'schedule_bulk_regenerate_download_permissions_all_orders_cron' ) );
71
- add_filter( 'cron_schedules', 'wcj_crons_add_custom_intervals' );
72
  add_action( 'wcj_bulk_regenerate_download_permissions_all_orders_cron', array( $this, 'bulk_regenerate_download_permissions_all_orders' ) );
73
  }
74
  }
@@ -94,24 +94,26 @@ if ( ! class_exists( 'WCJ_Orders' ) ) :
94
  /**
95
  * Editable_status.
96
  *
97
- * @version 4.0.0
98
  * @since 4.0.0
99
  * @param string | bool $is_editable defines the is_editable.
100
  * @param string | array $order defines the order.
101
  */
102
  public function editable_status( $is_editable, $order ) {
103
- return in_array( $order->get_status(), wcj_get_option( 'wcj_orders_editable_status', array( 'pending', 'on-hold', 'auto-draft' ) ) );
104
  }
105
 
106
  /**
107
  * Handle_orders_navigation.
108
  *
109
- * @version 3.4.0
110
  * @since 3.4.0
111
  */
112
  public function handle_orders_navigation() {
113
  if ( isset( $_GET['wcj_orders_navigation'] ) ) {
114
- $url = ( ! isset( $_GET['post'] ) || false === ( $adjacent_order_id = wcj_get_adjacent_order_id( $_GET['post'], $_GET['wcj_orders_navigation'] ) ) ?
 
 
115
  remove_query_arg( 'wcj_orders_navigation' ) :
116
  admin_url( 'post.php?post=' . $adjacent_order_id . '&action=edit' ) );
117
  wp_safe_redirect( $url );
@@ -139,13 +141,21 @@ if ( ! class_exists( 'WCJ_Orders' ) ) :
139
  /**
140
  * Create_orders_navigation_meta_box.
141
  *
142
- * @version 5.5.9
143
  * @since 3.4.0
144
  * @todo this will output the link, even if there no prev/next orders available
145
  */
146
  public function create_orders_navigation_meta_box() {
147
- echo '<a href="' . add_query_arg( 'wcj_orders_navigation', 'prev' ) . '">' . '&lt;&lt; ' . __( 'Previous order', 'woocommerce-jetpack' ) . '</a>' .
148
- '<a href="' . add_query_arg( 'wcj_orders_navigation', 'next' ) . '" style="float:right;">' . __( 'Next order', 'woocommerce-jetpack' ) . ' &gt;&gt;' . '</a>';
 
 
 
 
 
 
 
 
149
  }
150
 
151
  /**
@@ -243,10 +253,14 @@ if ( ! class_exists( 'WCJ_Orders' ) ) :
243
  /**
244
  * Admin_notice_regenerate_download_permissions.
245
  *
246
- * @version 3.2.0
247
  * @since 3.2.0
248
  */
249
  public function admin_notice_regenerate_download_permissions() {
 
 
 
 
250
  if ( ! empty( $_REQUEST['wcj_bulk_regenerated_download_permissions'] ) ) {
251
  $orders_count = intval( $_REQUEST['wcj_bulk_regenerated_download_permissions'] );
252
  $message = sprintf(
@@ -325,7 +339,7 @@ if ( ! class_exists( 'WCJ_Orders' ) ) :
325
  /**
326
  * Auto Complete all WooCommerce orders.
327
  *
328
- * @version 3.7.0
329
  * @todo (maybe) at first check if status is not `completed` already (however `WC_Order::set_status()` checks that anyway)
330
  * @param int $order_id defines the order_id.
331
  */
@@ -335,7 +349,7 @@ if ( ! class_exists( 'WCJ_Orders' ) ) :
335
  }
336
  $order = wc_get_order( $order_id );
337
  $payment_methods = apply_filters( 'booster_option', '', wcj_get_option( 'wcj_order_auto_complete_payment_methods', array() ) );
338
- if ( ! empty( $payment_methods ) && ! in_array( $order->get_payment_method(), $payment_methods ) ) {
339
  return;
340
  }
341
  $order->update_status( 'completed' );
2
  /**
3
  * Booster for WooCommerce - Module - Orders
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
20
  /**
21
  * Constructor.
22
  *
23
+ * @version 5.6.2
24
  * @todo Bulk Regenerate Download Permissions - copy "cron" to plugin
25
  * @todo Bulk Regenerate Download Permissions - maybe move "bulk actions" to free
26
  * @todo Bulk Regenerate Download Permissions - maybe as new module
68
  if ( 'disabled' !== apply_filters( 'booster_option', 'disabled', wcj_get_option( 'wcj_order_bulk_regenerate_download_permissions_all_orders_cron', 'disabled' ) ) ) {
69
  add_action( 'init', array( $this, 'schedule_bulk_regenerate_download_permissions_all_orders_cron' ) );
70
  add_action( 'admin_init', array( $this, 'schedule_bulk_regenerate_download_permissions_all_orders_cron' ) );
71
+ add_filter( 'cron_schedules', 'wcj_crons_add_custom_intervals' ); //phpcs:ignore
72
  add_action( 'wcj_bulk_regenerate_download_permissions_all_orders_cron', array( $this, 'bulk_regenerate_download_permissions_all_orders' ) );
73
  }
74
  }
94
  /**
95
  * Editable_status.
96
  *
97
+ * @version 5.6.2
98
  * @since 4.0.0
99
  * @param string | bool $is_editable defines the is_editable.
100
  * @param string | array $order defines the order.
101
  */
102
  public function editable_status( $is_editable, $order ) {
103
+ return in_array( $order->get_status(), wcj_get_option( 'wcj_orders_editable_status', array( 'pending', 'on-hold', 'auto-draft' ) ), true );
104
  }
105
 
106
  /**
107
  * Handle_orders_navigation.
108
  *
109
+ * @version 5.6.2
110
  * @since 3.4.0
111
  */
112
  public function handle_orders_navigation() {
113
  if ( isset( $_GET['wcj_orders_navigation'] ) ) {
114
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'wcj-order-meta-nonce' ) : true;
115
+ $adjacent_order_id = $wpnonce && isset( $_GET['post'] ) && isset( $_GET['wcj_orders_navigation'] ) ? wcj_get_adjacent_order_id( sanitize_text_field( wp_unslash( $_GET['post'] ) ), sanitize_text_field( wp_unslash( $_GET['wcj_orders_navigation'] ) ) ) : false;
116
+ $url = ( ! isset( $_GET['post'] ) || false === ( $adjacent_order_id ) ?
117
  remove_query_arg( 'wcj_orders_navigation' ) :
118
  admin_url( 'post.php?post=' . $adjacent_order_id . '&action=edit' ) );
119
  wp_safe_redirect( $url );
141
  /**
142
  * Create_orders_navigation_meta_box.
143
  *
144
+ * @version 5.6.2
145
  * @since 3.4.0
146
  * @todo this will output the link, even if there no prev/next orders available
147
  */
148
  public function create_orders_navigation_meta_box() {
149
+ $query_arg_prev = array(
150
+ 'wcj_orders_navigation' => 'prev',
151
+ '_wpnonce' => wp_create_nonce( 'wcj-order-meta-nonce' ),
152
+ );
153
+ $query_arg_next = array(
154
+ 'wcj_orders_navigation' => 'next',
155
+ '_wpnonce' => wp_create_nonce( 'wcj-order-meta-nonce' ),
156
+ );
157
+ echo '<a href="' . esc_url( add_query_arg( $query_arg_prev ) ) . '">&lt;&lt; ' . esc_html__( 'Previous order', 'woocommerce-jetpack' ) . '</a>' .
158
+ '<a href="' . esc_url( add_query_arg( $query_arg_next ) ) . '" style="float:right;">' . esc_html__( 'Next order', 'woocommerce-jetpack' ) . ' &gt;&gt;</a>';
159
  }
160
 
161
  /**
253
  /**
254
  * Admin_notice_regenerate_download_permissions.
255
  *
256
+ * @version 5.6.2
257
  * @since 3.2.0
258
  */
259
  public function admin_notice_regenerate_download_permissions() {
260
+ $wpnonce = true;
261
+ if ( function_exists( 'wp_verify_nonce' ) ) {
262
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
263
+ }
264
  if ( ! empty( $_REQUEST['wcj_bulk_regenerated_download_permissions'] ) ) {
265
  $orders_count = intval( $_REQUEST['wcj_bulk_regenerated_download_permissions'] );
266
  $message = sprintf(
339
  /**
340
  * Auto Complete all WooCommerce orders.
341
  *
342
+ * @version 5.6.2
343
  * @todo (maybe) at first check if status is not `completed` already (however `WC_Order::set_status()` checks that anyway)
344
  * @param int $order_id defines the order_id.
345
  */
349
  }
350
  $order = wc_get_order( $order_id );
351
  $payment_methods = apply_filters( 'booster_option', '', wcj_get_option( 'wcj_order_auto_complete_payment_methods', array() ) );
352
+ if ( ! empty( $payment_methods ) && ! in_array( $order->get_payment_method(), $payment_methods, true ) ) {
353
  return;
354
  }
355
  $order->update_status( 'completed' );
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.5.0
6
  * @since 2.4.1
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -39,7 +39,7 @@ if ( ! class_exists( 'WCJ_Payment_Gateways_By_Country' ) ) :
39
  /**
40
  * Get_location.
41
  *
42
- * @version 4.5.0
43
  * @since 3.4.0
44
  * @todo on `WCJ_IS_WC_VERSION_BELOW_3` recheck if `get_shipping_country()` and `get_shipping_state()` work correctly
45
  * @param string $type defines the type.
@@ -53,25 +53,25 @@ if ( ! class_exists( 'WCJ_Payment_Gateways_By_Country' ) ) :
53
  case 'by_ip':
54
  return wcj_get_country_by_ip();
55
  case 'shipping':
56
- return ( ( ! empty( $_REQUEST['s_country'] ) ) ? sanitize_text_field( wp_unslash( $_REQUEST['s_country'] ) ) : ( isset( WC()->customer ) ? WC()->customer->get_shipping_country() : '' ) );
57
  default: // 'billing'
58
- return ( ! empty( $_REQUEST['country'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['country'] ) ) : ( isset( WC()->customer ) ? wcj_customer_get_country() : '' ) );
59
  }
60
  case 'state':
61
  $state_type = wcj_get_option( 'wcj_gateways_by_location_state_type', 'billing' );
62
  switch ( $state_type ) {
63
  case 'shipping':
64
- return ( ! empty( $_REQUEST['s_state'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['s_state'] ) ) : ( isset( WC()->customer ) ? WC()->customer->get_shipping_state() : '' ) );
65
  default: // 'billing'
66
- return ( ! empty( $_REQUEST['state'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['state'] ) ) : ( isset( WC()->customer ) ? wcj_customer_get_country_state() : '' ) );
67
  }
68
  case 'postcode':
69
  $postcodes_type = wcj_get_option( 'wcj_gateways_by_location_postcodes_type', 'billing' );
70
  switch ( $postcodes_type ) {
71
  case 'shipping':
72
- return ( ! empty( $_REQUEST['s_postcode'] ) ? strtoupper( sanitize_text_field( wp_unslash( $_REQUEST['s_postcode'] ) ) ) : ( ! empty( $_REQUEST['shipping_postcode'] ) ? strtoupper( sanitize_text_field( wp_unslash( $_REQUEST['shipping_postcode'] ) ) ) : strtoupper( WC()->countries->get_base_postcode() ) ) );
73
  default: // 'billing'
74
- return ( ! empty( $_REQUEST['postcode'] ) ? strtoupper( sanitize_text_field( wp_unslash( $_REQUEST['postcode'] ) ) ) : ( ! empty( $_REQUEST['billing_postcode'] ) ? strtoupper( sanitize_text_field( wp_unslash( $_REQUEST['billing_postcode'] ) ) ) : strtoupper( WC()->countries->get_base_postcode() ) ) );
75
  }
76
  }
77
  }
@@ -79,7 +79,7 @@ if ( ! class_exists( 'WCJ_Payment_Gateways_By_Country' ) ) :
79
  /**
80
  * Available_payment_gateways.
81
  *
82
- * @version 4.0.0
83
  * @todo (maybe) rename module to "Payment Gateways by (Customer's) Location"
84
  * @todo (maybe) check naming, should be `wcj_gateways_by_location_` (however it's too long...)
85
  * @todo (maybe) code refactoring
@@ -94,24 +94,24 @@ if ( ! class_exists( 'WCJ_Payment_Gateways_By_Country' ) ) :
94
  foreach ( $_available_gateways as $key => $gateway ) {
95
  if ( '' !== $customer_country ) {
96
  $include_countries = wcj_maybe_add_european_union_countries( wcj_get_option( 'wcj_gateways_countries_include_' . $key, '' ) );
97
- if ( ! empty( $include_countries ) && ! in_array( $customer_country, $include_countries ) ) {
98
  unset( $_available_gateways[ $key ] );
99
  continue;
100
  }
101
  $exclude_countries = wcj_get_option( 'wcj_gateways_countries_exclude_' . $key, '' );
102
- if ( ! empty( $exclude_countries ) && in_array( $customer_country, $exclude_countries ) ) {
103
  unset( $_available_gateways[ $key ] );
104
  continue;
105
  }
106
  }
107
  if ( '' !== $customer_state ) {
108
  $include_states = wcj_get_option( 'wcj_gateways_states_include_' . $key, '' );
109
- if ( ! empty( $include_states ) && ! in_array( $customer_state, $include_states ) ) {
110
  unset( $_available_gateways[ $key ] );
111
  continue;
112
  }
113
  $exclude_states = wcj_get_option( 'wcj_gateways_states_exclude_' . $key, '' );
114
- if ( ! empty( $exclude_states ) && in_array( $customer_state, $exclude_states ) ) {
115
  unset( $_available_gateways[ $key ] );
116
  continue;
117
  }
2
  /**
3
  * Booster for WooCommerce - Module - Payment Gateways by Country
4
  *
5
+ * @version 5.6.2
6
  * @since 2.4.1
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
39
  /**
40
  * Get_location.
41
  *
42
+ * @version 5.6.2
43
  * @since 3.4.0
44
  * @todo on `WCJ_IS_WC_VERSION_BELOW_3` recheck if `get_shipping_country()` and `get_shipping_state()` work correctly
45
  * @param string $type defines the type.
53
  case 'by_ip':
54
  return wcj_get_country_by_ip();
55
  case 'shipping':
56
+ return ( ( ! empty( $_REQUEST['s_country'] ) ) ? sanitize_text_field( wp_unslash( $_REQUEST['s_country'] ) ) : ( isset( WC()->customer ) ? WC()->customer->get_shipping_country() : '' ) ); // phpcs:ignore WordPress.Security.NonceVerification
57
  default: // 'billing'
58
+ return ( ! empty( $_REQUEST['country'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['country'] ) ) : ( isset( WC()->customer ) ? wcj_customer_get_country() : '' ) ); // phpcs:ignore WordPress.Security.NonceVerification
59
  }
60
  case 'state':
61
  $state_type = wcj_get_option( 'wcj_gateways_by_location_state_type', 'billing' );
62
  switch ( $state_type ) {
63
  case 'shipping':
64
+ return ( ! empty( $_REQUEST['s_state'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['s_state'] ) ) : ( isset( WC()->customer ) ? WC()->customer->get_shipping_state() : '' ) ); // phpcs:ignore WordPress.Security.NonceVerification
65
  default: // 'billing'
66
+ return ( ! empty( $_REQUEST['state'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['state'] ) ) : ( isset( WC()->customer ) ? wcj_customer_get_country_state() : '' ) ); // phpcs:ignore WordPress.Security.NonceVerification
67
  }
68
  case 'postcode':
69
  $postcodes_type = wcj_get_option( 'wcj_gateways_by_location_postcodes_type', 'billing' );
70
  switch ( $postcodes_type ) {
71
  case 'shipping':
72
+ return ( ! empty( $_REQUEST['s_postcode'] ) ? strtoupper( sanitize_text_field( wp_unslash( $_REQUEST['s_postcode'] ) ) ) : ( ! empty( $_REQUEST['shipping_postcode'] ) ? strtoupper( sanitize_text_field( wp_unslash( $_REQUEST['shipping_postcode'] ) ) ) : strtoupper( WC()->countries->get_base_postcode() ) ) ); // phpcs:ignore WordPress.Security.NonceVerification
73
  default: // 'billing'
74
+ return ( ! empty( $_REQUEST['postcode'] ) ? strtoupper( sanitize_text_field( wp_unslash( $_REQUEST['postcode'] ) ) ) : ( ! empty( $_REQUEST['billing_postcode'] ) ? strtoupper( sanitize_text_field( wp_unslash( $_REQUEST['billing_postcode'] ) ) ) : strtoupper( WC()->countries->get_base_postcode() ) ) ); // phpcs:ignore WordPress.Security.NonceVerification
75
  }
76
  }
77
  }
79
  /**
80
  * Available_payment_gateways.
81
  *
82
+ * @version 5.6.2
83
  * @todo (maybe) rename module to "Payment Gateways by (Customer's) Location"
84
  * @todo (maybe) check naming, should be `wcj_gateways_by_location_` (however it's too long...)
85
  * @todo (maybe) code refactoring
94
  foreach ( $_available_gateways as $key => $gateway ) {
95
  if ( '' !== $customer_country ) {
96
  $include_countries = wcj_maybe_add_european_union_countries( wcj_get_option( 'wcj_gateways_countries_include_' . $key, '' ) );
97
+ if ( ! empty( $include_countries ) && ! in_array( $customer_country, $include_countries, true ) ) {
98
  unset( $_available_gateways[ $key ] );
99
  continue;
100
  }
101
  $exclude_countries = wcj_get_option( 'wcj_gateways_countries_exclude_' . $key, '' );
102
+ if ( ! empty( $exclude_countries ) && in_array( $customer_country, $exclude_countries, true ) ) {
103
  unset( $_available_gateways[ $key ] );
104
  continue;
105
  }
106
  }
107
  if ( '' !== $customer_state ) {
108
  $include_states = wcj_get_option( 'wcj_gateways_states_include_' . $key, '' );
109
+ if ( ! empty( $include_states ) && ! in_array( $customer_state, $include_states, true ) ) {
110
  unset( $_available_gateways[ $key ] );
111
  continue;
112
  }
113
  $exclude_states = wcj_get_option( 'wcj_gateways_states_exclude_' . $key, '' );
114
+ if ( ! empty( $exclude_states ) && in_array( $customer_state, $exclude_states, true ) ) {
115
  unset( $_available_gateways[ $key ] );
116
  continue;
117
  }
includes/class-wcj-payment-gateways-currency.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Gateways Currency Converter
4
  *
5
- * @version 5.3.8
6
  * @since 2.3.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -68,15 +68,21 @@ if ( ! class_exists( 'WCJ_Payment_Gateways_Currency' ) ) :
68
  /**
69
  * Fix_chosen_payment_method.
70
  *
71
- * @version 3.9.0
72
  * @since 3.9.0
73
  * @param string | array $post_data defines the post_data.
74
  */
75
  public function fix_chosen_payment_method( $post_data ) {
76
- $payment_gateway = ( empty( $_POST['payment_method'] ) ? '' : $_POST['payment_method'] );
 
 
 
 
 
77
  $available_payment_gateways = array_keys( WC()->payment_gateways->get_available_payment_gateways() );
78
- if ( ! empty( $available_payment_gateways ) ) {
79
- if ( ! in_array( $payment_gateway, $available_payment_gateways ) ) {
 
80
  $_POST['payment_method'] = $available_payment_gateways[0];
81
  }
82
  } else {
@@ -144,7 +150,7 @@ if ( ! class_exists( 'WCJ_Payment_Gateways_Currency' ) ) :
144
  /**
145
  * Change_price_by_gateway.
146
  *
147
- * @version 5.3.8
148
  * @since 2.3.0
149
  * @param string $price defines the price.
150
  * @param string | array $product defines the product.
@@ -152,7 +158,8 @@ if ( ! class_exists( 'WCJ_Payment_Gateways_Currency' ) ) :
152
  public function change_price_by_gateway( $price, $product ) {
153
  if ( $this->is_cart_or_checkout() ) {
154
  $current_gateway = $this->get_chosen_payment_method();
155
- if ( '' != $current_gateway ) {
 
156
  $gateway_currency_exchange_rate = wcj_get_option( 'wcj_gateways_currency_exchange_rate_' . $current_gateway );
157
  $gateway_currency_exchange_rate = str_replace( ',', '.', $gateway_currency_exchange_rate );
158
  if ( is_numeric( $price ) ) {
2
  /**
3
  * Booster for WooCommerce - Module - Gateways Currency Converter
4
  *
5
+ * @version 5.6.2
6
  * @since 2.3.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
68
  /**
69
  * Fix_chosen_payment_method.
70
  *
71
+ * @version 5.6.2
72
  * @since 3.9.0
73
  * @param string | array $post_data defines the post_data.
74
  */
75
  public function fix_chosen_payment_method( $post_data ) {
76
+ $wpnonce = true;
77
+ if ( function_exists( 'wp_verify_nonce' ) ) {
78
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
79
+ }
80
+
81
+ $payment_gateway = ( empty( $_POST['payment_method'] ) ? '' : sanitize_text_field( wp_unslash( $_POST['payment_method'] ) ) );
82
  $available_payment_gateways = array_keys( WC()->payment_gateways->get_available_payment_gateways() );
83
+ if ( ! empty( $available_payment_gateways ) && $wpnonce ) {
84
+
85
+ if ( ! in_array( $payment_gateway, $available_payment_gateways, true ) ) {
86
  $_POST['payment_method'] = $available_payment_gateways[0];
87
  }
88
  } else {
150
  /**
151
  * Change_price_by_gateway.
152
  *
153
+ * @version 5.6.2
154
  * @since 2.3.0
155
  * @param string $price defines the price.
156
  * @param string | array $product defines the product.
158
  public function change_price_by_gateway( $price, $product ) {
159
  if ( $this->is_cart_or_checkout() ) {
160
  $current_gateway = $this->get_chosen_payment_method();
161
+
162
+ if ( '' !== $current_gateway ) {
163
  $gateway_currency_exchange_rate = wcj_get_option( 'wcj_gateways_currency_exchange_rate_' . $current_gateway );
164
  $gateway_currency_exchange_rate = str_replace( ',', '.', $gateway_currency_exchange_rate );
165
  if ( is_numeric( $price ) ) {
includes/class-wcj-payment-gateways-fees.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Gateways Fees and Discounts
4
  *
5
- * @version 5.6.0
6
  * @since 2.2.2
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -143,17 +143,16 @@ if ( ! class_exists( 'WCJ_Payment_Gateways_Fees' ) ) :
143
  /**
144
  * Get_current_gateway.
145
  *
146
- * @version 4.8.0
147
  * @since 3.3.0
148
  */
149
  public function get_current_gateway() {
150
  $gateway = '';
151
-
152
- if ( isset( $_GET['wc-api'] ) && 'WC_Gateway_PayPal_Express_AngellEYE' === $_GET['wc-api'] ) {
153
  $gateway = 'paypal_express'; // PayPal for WooCommerce (By Angell EYE).
154
  } elseif (
155
- ( isset( $_GET['wc-ajax'] ) && 'wc_ppec_generate_cart' === $_GET['wc-ajax'] ) ||
156
- ( isset( $_GET['startcheckout'] ) && 'true' === $_GET['startcheckout'] )
157
  ) {
158
  $gateway = 'ppec_paypal'; // WooCommerce PayPal Express Checkout Payment Gateway (By WooCommerce).
159
  } else {
@@ -267,7 +266,7 @@ if ( ! class_exists( 'WCJ_Payment_Gateways_Fees' ) ) :
267
  $final_fee_to_add = $fee_value;
268
  break;
269
  case 'percent':
270
- $final_fee_to_add = ($fee_value / 100) * $total_in_cart;
271
  if ( 'yes' === $this->wcj_get_option( 'round', $current_gateway ) ) {
272
  $final_fee_to_add = round( $final_fee_to_add, $this->wcj_get_option( 'round_precision', $current_gateway ) );
273
  }
2
  /**
3
  * Booster for WooCommerce - Module - Gateways Fees and Discounts
4
  *
5
+ * @version 5.6.2
6
  * @since 2.2.2
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
143
  /**
144
  * Get_current_gateway.
145
  *
146
+ * @version 5.6.2
147
  * @since 3.3.0
148
  */
149
  public function get_current_gateway() {
150
  $gateway = '';
151
+ if ( isset( $_GET['wc-api'] ) && 'WC_Gateway_PayPal_Express_AngellEYE' === $_GET['wc-api'] ) { // phpcs:ignore WordPress.Security.NonceVerification
 
152
  $gateway = 'paypal_express'; // PayPal for WooCommerce (By Angell EYE).
153
  } elseif (
154
+ ( isset( $_GET['wc-ajax'] ) && 'wc_ppec_generate_cart' === $_GET['wc-ajax'] ) || // phpcs:ignore WordPress.Security.NonceVerification
155
+ ( isset( $_GET['startcheckout'] ) && 'true' === $_GET['startcheckout'] ) // phpcs:ignore WordPress.Security.NonceVerification
156
  ) {
157
  $gateway = 'ppec_paypal'; // WooCommerce PayPal Express Checkout Payment Gateway (By WooCommerce).
158
  } else {
266
  $final_fee_to_add = $fee_value;
267
  break;
268
  case 'percent':
269
+ $final_fee_to_add = ( $fee_value / 100 ) * $total_in_cart;
270
  if ( 'yes' === $this->wcj_get_option( 'round', $current_gateway ) ) {
271
  $final_fee_to_add = round( $final_fee_to_add, $this->wcj_get_option( 'round_precision', $current_gateway ) );
272
  }
includes/class-wcj-payment-gateways-min-max.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Gateways Min/Max Amounts
4
  *
5
- * @version 5.2.0
6
  * @since 2.4.1
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -77,7 +77,7 @@ if ( ! class_exists( 'WCJ_Payment_Gateways_Min_Max' ) ) :
77
  /**
78
  * Remove_payment_gateways.
79
  *
80
- * @version 4.7.0
81
  * @since 4.7.0
82
  *
83
  * @param array $_available_gateways defines the _available_gateways.
@@ -112,12 +112,12 @@ if ( ! class_exists( 'WCJ_Payment_Gateways_Min_Max' ) ) :
112
  }
113
  }
114
 
115
- if ( 0 != $min && $total_in_cart < $min ) {
116
  $notices[] = str_replace( array( '%gateway_title%', '%min_amount%' ), array( $gateway->title, wc_price( $min ) ), $notices_template_min );
117
  unset( $_available_gateways[ $key ] );
118
  continue;
119
  }
120
- if ( 0 != $max && $total_in_cart > $max ) {
121
  $notices[] = str_replace( array( '%gateway_title%', '%max_amount%' ), array( $gateway->title, wc_price( $max ) ), $notices_template_max );
122
  unset( $_available_gateways[ $key ] );
123
  continue;
2
  /**
3
  * Booster for WooCommerce - Module - Gateways Min/Max Amounts
4
  *
5
+ * @version 5.6.2
6
  * @since 2.4.1
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
77
  /**
78
  * Remove_payment_gateways.
79
  *
80
+ * @version 5.6.2
81
  * @since 4.7.0
82
  *
83
  * @param array $_available_gateways defines the _available_gateways.
112
  }
113
  }
114
 
115
+ if ( 0 !== $min && $total_in_cart < $min ) {
116
  $notices[] = str_replace( array( '%gateway_title%', '%min_amount%' ), array( $gateway->title, wc_price( $min ) ), $notices_template_min );
117
  unset( $_available_gateways[ $key ] );
118
  continue;
119
  }
120
+ if ( 0 !== $max && $total_in_cart > $max ) {
121
  $notices[] = str_replace( array( '%gateway_title%', '%max_amount%' ), array( $gateway->title, wc_price( $max ) ), $notices_template_max );
122
  unset( $_available_gateways[ $key ] );
123
  continue;
includes/class-wcj-payment-gateways-per-category.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Gateways per Product or Category
4
  *
5
- * @version 4.6.0
6
  * @since 2.2.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -43,7 +43,7 @@ if ( ! class_exists( 'WCJ_Payment_Gateways_Per_Category' ) ) :
43
  /**
44
  * Is_gateway_allowed.
45
  *
46
- * @version 4.6.0
47
  * @since 4.6.0
48
  *
49
  * @param string | int $gateway_id defines the gateway_id.
@@ -62,7 +62,8 @@ if ( ! class_exists( 'WCJ_Payment_Gateways_Per_Category' ) ) :
62
  continue; // ... to next product.
63
  }
64
  foreach ( $product_categories as $product_category ) {
65
- if ( in_array( $product_category->term_id, $categories_in ) ) {
 
66
  $current_check = true;
67
  break;
68
  }
@@ -83,7 +84,8 @@ if ( ! class_exists( 'WCJ_Payment_Gateways_Per_Category' ) ) :
83
  continue; // ... to next product.
84
  }
85
  foreach ( $product_categories as $product_category ) {
86
- if ( in_array( $product_category->term_id, $categories_excl ) ) {
 
87
  $current_check = false;
88
  break;
89
  }
@@ -99,7 +101,7 @@ if ( ! class_exists( 'WCJ_Payment_Gateways_Per_Category' ) ) :
99
  if ( ! empty( $products_in ) ) {
100
  $current_check = false;
101
  foreach ( $products as $product_id ) {
102
- if ( in_array( $product_id, $products_in ) ) {
103
  // Current gateway is OK.
104
  $current_check = true;
105
  break;
@@ -115,7 +117,7 @@ if ( ! class_exists( 'WCJ_Payment_Gateways_Per_Category' ) ) :
115
  if ( ! empty( $products_excl ) ) {
116
  $current_check = true;
117
  foreach ( $products as $product_id ) {
118
- if ( in_array( $product_id, $products_excl ) ) {
119
  $current_check = false;
120
  break;
121
  }
@@ -131,7 +133,7 @@ if ( ! class_exists( 'WCJ_Payment_Gateways_Per_Category' ) ) :
131
  /**
132
  * Filter_available_payment_gateways_per_category.
133
  *
134
- * @version 4.6.0
135
  * @todo [dev] (maybe) `if ( ! is_checkout() ) { return $available_gateways; }`
136
  * @param array $available_gateways defines the available_gateways.
137
  */
@@ -148,9 +150,10 @@ if ( ! class_exists( 'WCJ_Payment_Gateways_Per_Category' ) ) :
148
 
149
  // Check if it is on checkout/order-pay/xxx page.
150
  } elseif ( is_wc_endpoint_url( 'order-pay' ) ) {
151
- $url_arr = preg_split( '/[\/\?]/', $_SERVER['REQUEST_URI'] );
152
- if ( in_array( 'order-pay', $url_arr ) ) {
153
- $order_pay_index = array_search( 'order-pay', $url_arr );
 
154
  $order_id = intval( $url_arr[ $order_pay_index + 1 ] );
155
  $order = wc_get_order( $order_id );
156
  foreach ( $order->get_items() as $item_id => $values ) {
2
  /**
3
  * Booster for WooCommerce - Module - Gateways per Product or Category
4
  *
5
+ * @version 5.6.2
6
  * @since 2.2.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
43
  /**
44
  * Is_gateway_allowed.
45
  *
46
+ * @version 5.6.2
47
  * @since 4.6.0
48
  *
49
  * @param string | int $gateway_id defines the gateway_id.
62
  continue; // ... to next product.
63
  }
64
  foreach ( $product_categories as $product_category ) {
65
+
66
+ if ( in_array( (string) $product_category->term_id, $categories_in, true ) ) {
67
  $current_check = true;
68
  break;
69
  }
84
  continue; // ... to next product.
85
  }
86
  foreach ( $product_categories as $product_category ) {
87
+
88
+ if ( in_array( (string) $product_category->term_id, $categories_excl, true ) ) {
89
  $current_check = false;
90
  break;
91
  }
101
  if ( ! empty( $products_in ) ) {
102
  $current_check = false;
103
  foreach ( $products as $product_id ) {
104
+ if ( in_array( (string) $product_id, $products_in, true ) ) {
105
  // Current gateway is OK.
106
  $current_check = true;
107
  break;
117
  if ( ! empty( $products_excl ) ) {
118
  $current_check = true;
119
  foreach ( $products as $product_id ) {
120
+ if ( in_array( (string) $product_id, $products_excl, true ) ) {
121
  $current_check = false;
122
  break;
123
  }
133
  /**
134
  * Filter_available_payment_gateways_per_category.
135
  *
136
+ * @version 5.6.2
137
  * @todo [dev] (maybe) `if ( ! is_checkout() ) { return $available_gateways; }`
138
  * @param array $available_gateways defines the available_gateways.
139
  */
150
 
151
  // Check if it is on checkout/order-pay/xxx page.
152
  } elseif ( is_wc_endpoint_url( 'order-pay' ) ) {
153
+ $url_arr = preg_split( '/[\/\?]/', ( isset( $_SERVER['REQUEST_URI'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '' ) );
154
+
155
+ if ( in_array( 'order-pay', $url_arr, true ) ) {
156
+ $order_pay_index = array_search( 'order-pay', $url_arr, true );
157
  $order_id = intval( $url_arr[ $order_pay_index + 1 ] );
158
  $order = wc_get_order( $order_id );
159
  foreach ( $order->get_items() as $item_id => $values ) {
includes/class-wcj-payment-gateways.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Custom Gateways
4
  *
5
- * @version 5.5.9
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -20,7 +20,7 @@ if ( ! class_exists( 'WCJ_Payment_Gateways' ) ) :
20
  /**
21
  * Constructor.
22
  *
23
- * @version 5.2.0
24
  */
25
  public function __construct() {
26
 
@@ -43,12 +43,12 @@ if ( ! class_exists( 'WCJ_Payment_Gateways' ) ) :
43
  /**
44
  * Maybe_delete_payment_gateway_input_fields.
45
  *
46
- * @version 3.3.0
47
  * @since 3.3.0
48
  */
49
  public function maybe_delete_payment_gateway_input_fields() {
50
- if ( isset( $_GET['wcj_delete_payment_gateway_input_fields'] ) ) {
51
- $order_id = $_GET['wcj_delete_payment_gateway_input_fields'];
52
  delete_post_meta( $order_id, '_wcj_custom_payment_gateway_input_fields' );
53
  wp_safe_redirect( esc_url( remove_query_arg( 'wcj_delete_payment_gateway_input_fields' ) ) );
54
  exit;
@@ -58,7 +58,7 @@ if ( ! class_exists( 'WCJ_Payment_Gateways' ) ) :
58
  /**
59
  * Check_required_wcj_input_fields.
60
  *
61
- * @version 3.0.1
62
  * @since 3.0.1
63
  * @param array $data defines the data.
64
  * @param string | array $errors defines the errors.
@@ -66,12 +66,13 @@ if ( ! class_exists( 'WCJ_Payment_Gateways' ) ) :
66
  public function check_required_wcj_input_fields( $data, $errors ) {
67
  $payment_method = $data['payment_method'];
68
  if ( 'jetpack_custom_gateway' === substr( $payment_method, 0, 22 ) ) {
 
69
  foreach ( $_POST as $key => $value ) {
70
  if ( 'wcj_input_field_' === substr( $key, 0, 16 ) ) {
71
- if ( isset( $_POST[ 'for_' . $key ] ) && $payment_method === $_POST[ 'for_' . $key ] ) {
72
  $is_required_set = ( isset( $_POST[ $key . '_required' ] ) && 'yes' === $_POST[ $key . '_required' ] );
73
  if ( $is_required_set && '' === $value ) {
74
- $label = ( isset( $_POST[ 'label_for_' . $key ] ) ? $_POST[ 'label_for_' . $key ] : substr( $key, 16 ) );
75
  /* translators: %s: translation added */
76
  $errors->add( 'booster', sprintf( __( '<strong>%s</strong> is a required field.', 'woocommerce-jetpack' ), $label ) );
77
  }
@@ -138,7 +139,7 @@ if ( ! class_exists( 'WCJ_Payment_Gateways' ) ) :
138
  /**
139
  * Update_custom_payment_gateways_fields_order_meta.
140
  *
141
- * @version 4.7.0
142
  * @since 2.5.2
143
  * @param int $order_id defines the order_id.
144
  * @param string $posted defines the posted.
@@ -147,12 +148,13 @@ if ( ! class_exists( 'WCJ_Payment_Gateways' ) ) :
147
  $payment_method = get_post_meta( $order_id, '_payment_method', true );
148
  if ( 'jetpack_custom_gateway' === substr( $payment_method, 0, 22 ) ) {
149
  $input_fields = array();
 
150
  foreach ( $_POST as $key => $value ) {
151
  if ( 'wcj_input_field_' === substr( $key, 0, 16 ) ) {
152
  if ( ! is_array( $value ) ) {
153
- if ( isset( $_POST[ 'for_' . $key ] ) && $payment_method === $_POST[ 'for_' . $key ] ) {
154
  if ( isset( $_POST[ 'label_for_' . $key ] ) ) {
155
- $input_fields[ $_POST[ 'label_for_' . $key ] ] = $value;
156
  } else {
157
  $input_fields[ substr( $key, 16 ) ] = $value;
158
  }
2
  /**
3
  * Booster for WooCommerce - Module - Custom Gateways
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
20
  /**
21
  * Constructor.
22
  *
23
+ * @version 5.6.2
24
  */
25
  public function __construct() {
26
 
43
  /**
44
  * Maybe_delete_payment_gateway_input_fields.
45
  *
46
+ * @version 5.6.2
47
  * @since 3.3.0
48
  */
49
  public function maybe_delete_payment_gateway_input_fields() {
50
+ if ( isset( $_GET['wcj_delete_payment_gateway_input_fields'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
51
+ $order_id = sanitize_text_field( wp_unslash( $_GET['wcj_delete_payment_gateway_input_fields'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
52
  delete_post_meta( $order_id, '_wcj_custom_payment_gateway_input_fields' );
53
  wp_safe_redirect( esc_url( remove_query_arg( 'wcj_delete_payment_gateway_input_fields' ) ) );
54
  exit;
58
  /**
59
  * Check_required_wcj_input_fields.
60
  *
61
+ * @version 5.6.2
62
  * @since 3.0.1
63
  * @param array $data defines the data.
64
  * @param string | array $errors defines the errors.
66
  public function check_required_wcj_input_fields( $data, $errors ) {
67
  $payment_method = $data['payment_method'];
68
  if ( 'jetpack_custom_gateway' === substr( $payment_method, 0, 22 ) ) {
69
+ $wpnonce = isset( $_REQUEST['woocommerce-process-checkout-nonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['woocommerce-process-checkout-nonce'] ) ? $_REQUEST['woocommerce-process-checkout-nonce'] : '' ), 'woocommerce-process_checkout' ) : false;
70
  foreach ( $_POST as $key => $value ) {
71
  if ( 'wcj_input_field_' === substr( $key, 0, 16 ) ) {
72
+ if ( $wpnonce && isset( $_POST[ 'for_' . $key ] ) && $payment_method === $_POST[ 'for_' . $key ] ) {
73
  $is_required_set = ( isset( $_POST[ $key . '_required' ] ) && 'yes' === $_POST[ $key . '_required' ] );
74
  if ( $is_required_set && '' === $value ) {
75
+ $label = ( isset( $_POST[ 'label_for_' . $key ] ) ? sanitize_text_field( wp_unslash( $_POST[ 'label_for_' . $key ] ) ) : substr( $key, 16 ) );
76
  /* translators: %s: translation added */
77
  $errors->add( 'booster', sprintf( __( '<strong>%s</strong> is a required field.', 'woocommerce-jetpack' ), $label ) );
78
  }
139
  /**
140
  * Update_custom_payment_gateways_fields_order_meta.
141
  *
142
+ * @version 5.6.2
143
  * @since 2.5.2
144
  * @param int $order_id defines the order_id.
145
  * @param string $posted defines the posted.
148
  $payment_method = get_post_meta( $order_id, '_payment_method', true );
149
  if ( 'jetpack_custom_gateway' === substr( $payment_method, 0, 22 ) ) {
150
  $input_fields = array();
151
+ $wpnonce = isset( $_REQUEST['woocommerce-process-checkout-nonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['woocommerce-process-checkout-nonce'] ) ? $_REQUEST['woocommerce-process-checkout-nonce'] : '' ), 'woocommerce-process_checkout' ) : false;
152
  foreach ( $_POST as $key => $value ) {
153
  if ( 'wcj_input_field_' === substr( $key, 0, 16 ) ) {
154
  if ( ! is_array( $value ) ) {
155
+ if ( $wpnonce && isset( $_POST[ 'for_' . $key ] ) && $payment_method === $_POST[ 'for_' . $key ] ) {
156
  if ( isset( $_POST[ 'label_for_' . $key ] ) ) {
157
+ $input_fields[ sanitize_text_field( wp_unslash( $_POST[ 'label_for_' . $key ] ) ) ] = $value;
158
  } else {
159
  $input_fields[ substr( $key, 16 ) ] = $value;
160
  }
includes/class-wcj-pdf-invoicing.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - PDF Invoicing
4
  *
5
- * @version 5.6.1
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -114,13 +114,14 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing' ) ) :
114
  /**
115
  * Bulk_actions_pdfs_notices.
116
  *
117
- * @version 5.4.9
118
  * @since 2.5.7
119
  */
120
  public function bulk_actions_pdfs_notices() {
121
  global $post_type, $pagenow;
122
  if ( 'edit.php' === $pagenow && 'shop_order' === $post_type ) {
123
- if ( isset( $_REQUEST['generated'] ) && (int) $_REQUEST['generated'] ) {
 
124
  /* translators: %s: translation added */
125
  $message = sprintf( wp_kses_post( 'Document generated.', '%s documents generated.', sanitize_text_field( wp_unslash( $_REQUEST['generated'] ) ) ), number_format_i18n( sanitize_text_field( wp_unslash( $_REQUEST['generated'] ) ) ) );
126
 
@@ -154,7 +155,8 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing' ) ) :
154
  break;
155
  default:
156
  echo '<div class="notice notice-error"><p>' .
157
- sprintf( wp_kses_post( 'Booster: %s.', 'woocommerce-jetpack' ), '<code>' . wp_kses_post( $_GET['wcj_notice'] ) . '</code>' ) .
 
158
  '</p></div>';
159
  break;
160
  }
@@ -165,7 +167,7 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing' ) ) :
165
  /**
166
  * Processes the PDF bulk actions.
167
  *
168
- * @version 5.5.9
169
  * @since 2.5.7
170
  * @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.' ) ); }`
171
  *
@@ -211,7 +213,7 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing' ) ) :
211
  'generated_type' => $the_type,
212
  'generated_' . $the_type => 1,
213
  'ids' => join( ',', $invoice_num ),
214
- 'post_status' => $_GET['post_status'],
215
  ),
216
  $redirect_to
217
  )
@@ -231,7 +233,7 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing' ) ) :
231
  'generated_type' => $the_type,
232
  'generated_' . $the_type => 1,
233
  'ids' => join( ',', $post_ids ),
234
- 'post_status' => $_GET['post_status'],
235
  ),
236
  $redirect_to
237
  )
@@ -244,7 +246,7 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing' ) ) :
244
  $redirect_to = esc_url(
245
  add_query_arg(
246
  array(
247
- 'post_status' => $_GET['post_status'],
248
  'wcj_notice' => $result,
249
  ),
250
  $redirect_to
@@ -266,7 +268,7 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing' ) ) :
266
  $redirect_to = esc_url(
267
  add_query_arg(
268
  array(
269
- 'post_status' => $_GET['post_status'],
270
  'wcj_notice' => $result,
271
  ),
272
  $redirect_to
@@ -445,18 +447,22 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing' ) ) :
445
  /**
446
  * Catch_args.
447
  *
448
- * @version 3.4.0
449
  */
450
  public function catch_args() {
451
- $this->order_id = ( isset( $_GET['order_id'] ) ) ? sanitize_text_field( wp_unslash( $_GET['order_id'] ) ) : 0;
452
- $this->invoice_type_id = ( isset( $_GET['invoice_type_id'] ) ) ? sanitize_text_field( wp_unslash( $_GET['invoice_type_id'] ) ) : '';
453
- $this->save_as_pdf = ( isset( $_GET['save_pdf_invoice'] ) && '1' == $_GET['save_pdf_invoice'] );
454
- $this->get_invoice = ( isset( $_GET['get_invoice'] ) && '1' == $_GET['get_invoice'] );
 
 
 
 
455
 
456
- if ( isset( $_GET['create_invoice_for_order_id'] ) && $this->check_user_roles( false ) ) {
457
  $this->create_document( sanitize_text_field( wp_unslash( $_GET['create_invoice_for_order_id'] ) ), $this->invoice_type_id );
458
  }
459
- if ( isset( $_GET['delete_invoice_for_order_id'] ) && $this->check_user_roles( false ) ) {
460
  $this->delete_document( sanitize_text_field( wp_unslash( $_GET['delete_invoice_for_order_id'] ) ), $this->invoice_type_id );
461
  }
462
  }
2
  /**
3
  * Booster for WooCommerce - Module - PDF Invoicing
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
114
  /**
115
  * Bulk_actions_pdfs_notices.
116
  *
117
+ * @version 5.6.2
118
  * @since 2.5.7
119
  */
120
  public function bulk_actions_pdfs_notices() {
121
  global $post_type, $pagenow;
122
  if ( 'edit.php' === $pagenow && 'shop_order' === $post_type ) {
123
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
124
+ if ( $wpnonce && isset( $_REQUEST['generated'] ) && (int) $_REQUEST['generated'] ) {
125
  /* translators: %s: translation added */
126
  $message = sprintf( wp_kses_post( 'Document generated.', '%s documents generated.', sanitize_text_field( wp_unslash( $_REQUEST['generated'] ) ) ), number_format_i18n( sanitize_text_field( wp_unslash( $_REQUEST['generated'] ) ) ) );
127
 
155
  break;
156
  default:
157
  echo '<div class="notice notice-error"><p>' .
158
+ /* translators: %s: translation added */
159
+ sprintf( wp_kses_post( __( 'Booster: %s.', 'woocommerce-jetpack' ), '<code>' . sanitize_text_field( wp_unslash( $_GET['wcj_notice'] ) ) . '</code>' ) ) .
160
  '</p></div>';
161
  break;
162
  }
167
  /**
168
  * Processes the PDF bulk actions.
169
  *
170
+ * @version 5.6.2
171
  * @since 2.5.7
172
  * @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.' ) ); }`
173
  *
213
  'generated_type' => $the_type,
214
  'generated_' . $the_type => 1,
215
  'ids' => join( ',', $invoice_num ),
216
+ 'post_status' => isset( $_GET['post_status'] ) ? sanitize_text_field( wp_unslash( $_GET['post_status'] ) ) : '',
217
  ),
218
  $redirect_to
219
  )
233
  'generated_type' => $the_type,
234
  'generated_' . $the_type => 1,
235
  'ids' => join( ',', $post_ids ),
236
+ 'post_status' => isset( $_GET['post_status'] ) ? sanitize_text_field( wp_unslash( $_GET['post_status'] ) ) : '',
237
  ),
238
  $redirect_to
239
  )
246
  $redirect_to = esc_url(
247
  add_query_arg(
248
  array(
249
+ 'post_status' => isset( $_GET['post_status'] ) ? sanitize_text_field( wp_unslash( $_GET['post_status'] ) ) : '',
250
  'wcj_notice' => $result,
251
  ),
252
  $redirect_to
268
  $redirect_to = esc_url(
269
  add_query_arg(
270
  array(
271
+ 'post_status' => isset( $_GET['post_status'] ) ? sanitize_text_field( wp_unslash( $_GET['post_status'] ) ) : '',
272
  'wcj_notice' => $result,
273
  ),
274
  $redirect_to
447
  /**
448
  * Catch_args.
449
  *
450
+ * @version 5.6.2
451
  */
452
  public function catch_args() {
453
+ $wpnonce = true;
454
+ if ( function_exists( 'wp_verify_nonce' ) ) {
455
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
456
+ }
457
+ $this->order_id = ( $wpnonce && isset( $_GET['order_id'] ) ) ? sanitize_text_field( wp_unslash( $_GET['order_id'] ) ) : 0;
458
+ $this->invoice_type_id = ( $wpnonce && isset( $_GET['invoice_type_id'] ) ) ? sanitize_text_field( wp_unslash( $_GET['invoice_type_id'] ) ) : '';
459
+ $this->save_as_pdf = ( $wpnonce && isset( $_GET['save_pdf_invoice'] ) && '1' === $_GET['save_pdf_invoice'] );
460
+ $this->get_invoice = ( $wpnonce && isset( $_GET['get_invoice'] ) && '1' === $_GET['get_invoice'] );
461
 
462
+ if ( $wpnonce && isset( $_GET['create_invoice_for_order_id'] ) && $this->check_user_roles( false ) ) {
463
  $this->create_document( sanitize_text_field( wp_unslash( $_GET['create_invoice_for_order_id'] ) ), $this->invoice_type_id );
464
  }
465
+ if ( $wpnonce && isset( $_GET['delete_invoice_for_order_id'] ) && $this->check_user_roles( false ) ) {
466
  $this->delete_document( sanitize_text_field( wp_unslash( $_GET['delete_invoice_for_order_id'] ) ), $this->invoice_type_id );
467
  }
468
  }
includes/class-wcj-price-by-country.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Prices and Currencies by Country
4
  *
5
- * @version 5.6.1
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -18,9 +18,9 @@ if ( ! class_exists( 'WCJ_Price_By_Country' ) ) :
18
  class WCJ_Price_By_Country extends WCJ_Module {
19
 
20
  /**
21
- * WCJ_Price_by_Country_Core
22
  *
23
- * @var WCJ_Price_by_Country_Core
24
  *
25
  * @since 4.1.0
26
  */
@@ -36,7 +36,7 @@ if ( ! class_exists( 'WCJ_Price_By_Country' ) ) :
36
  /**
37
  * Constructor.
38
  *
39
- * @version 5.2.0
40
  */
41
  public function __construct() {
42
 
@@ -54,7 +54,8 @@ if ( ! class_exists( 'WCJ_Price_By_Country' ) ) :
54
 
55
  if ( wcj_is_frontend() ) {
56
  $do_load_core = true;
57
- if ( ! defined( 'DOING_AJAX' ) && '/wc-api/WC_Gateway_Paypal/' === $_SERVER['REQUEST_URI'] ) {
 
58
  // "Wrong currency in emails" bug fix.
59
  $do_load_core = false;
60
  }
@@ -152,11 +153,15 @@ if ( ! class_exists( 'WCJ_Price_By_Country' ) ) :
152
  /**
153
  * Recalculate_price_filter_products_prices.
154
  *
155
- * @version 2.5.6
156
  * @since 2.5.6
157
  */
158
  public function recalculate_price_filter_products_prices() {
159
- if ( isset( $_GET['recalculate_price_filter_products_prices'] ) && ( wcj_is_user_role( 'administrator' ) || is_shop_manager() ) ) {
 
 
 
 
160
  wcj_update_products_price_by_country();
161
  global $wcj_notice;
162
  $wcj_notice = __( 'Price filter widget product prices recalculated.', 'woocommerce-jetpack' );
2
  /**
3
  * Booster for WooCommerce - Module - Prices and Currencies by Country
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
18
  class WCJ_Price_By_Country extends WCJ_Module {
19
 
20
  /**
21
+ * WCJ_Price_By_Country_Core
22
  *
23
+ * @var WCJ_Price_By_Country_Core
24
  *
25
  * @since 4.1.0
26
  */
36
  /**
37
  * Constructor.
38
  *
39
+ * @version 5.6.2
40
  */
41
  public function __construct() {
42
 
54
 
55
  if ( wcj_is_frontend() ) {
56
  $do_load_core = true;
57
+ $request_uri = isset( $_SERVER['REQUEST_URI'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '/';
58
+ if ( ! defined( 'DOING_AJAX' ) && '/wc-api/WC_Gateway_Paypal/' === $request_uri ) {
59
  // "Wrong currency in emails" bug fix.
60
  $do_load_core = false;
61
  }
153
  /**
154
  * Recalculate_price_filter_products_prices.
155
  *
156
+ * @version 5.6.2
157
  * @since 2.5.6
158
  */
159
  public function recalculate_price_filter_products_prices() {
160
+ $wpnonce = true;
161
+ if ( function_exists( 'wp_verify_nonce' ) ) {
162
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
163
+ }
164
+ if ( $wpnonce && isset( $_GET['recalculate_price_filter_products_prices'] ) && ( wcj_is_user_role( 'administrator' ) || is_shop_manager() ) ) {
165
  wcj_update_products_price_by_country();
166
  global $wcj_notice;
167
  $wcj_notice = __( 'Price filter widget product prices recalculated.', 'woocommerce-jetpack' );
includes/class-wcj-price-by-user-role.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Price based on User Role
4
  *
5
- * @version 5.6.1
6
  * @since 2.5.0
7
  * @author Pluggabl LLC.
8
  * @todo Fix "Make Empty Price" option for variable products
@@ -212,8 +212,8 @@ if ( ! class_exists( 'WCJ_Price_By_User_Role' ) ) :
212
  'post_type' => 'product',
213
  'post_status' => 'any',
214
  'posts_per_page' => 1,
215
- 'meta_key' => '_wcj_price_by_user_role_per_product_settings_enabled',
216
- 'meta_value' => 'yes',
217
  'post__not_in' => array( get_the_ID() ),
218
  );
219
  $loop = new WP_Query( $args );
@@ -225,7 +225,6 @@ if ( ! class_exists( 'WCJ_Price_By_User_Role' ) ) :
225
  }
226
  return $option_value;
227
  }
228
-
229
  /**
230
  * Add_notice_query_var.
231
  *
@@ -235,23 +234,27 @@ if ( ! class_exists( 'WCJ_Price_By_User_Role' ) ) :
235
  */
236
  public function add_notice_query_var( $location ) {
237
  remove_filter( 'redirect_post_location', array( $this, 'add_notice_query_var' ), 99 );
238
- return esc_url( add_query_arg( array( 'wcj_product_price_by_user_role_admin_notice' => true ), $location ) );
239
  }
240
 
241
  /**
242
  * Admin_notices.
243
  *
244
- * @version 2.5.0
245
  * @since 2.5.0
246
  */
247
  public function admin_notices() {
248
- if ( ! isset( $_GET['wcj_product_price_by_user_role_admin_notice'] ) ) {
 
 
 
 
249
  return;
250
  }
251
  ?><div class="error"><p>
252
  <?php
253
  echo '<div class="message">'
254
- . __( 'Booster: Free plugin\'s version is limited to only one price by user role per products settings product enabled at a time. You will need to get <a href="https://booster.io/plus/" target="_blank">Booster Plus</a> to add unlimited number of price by user role per product settings products.', 'woocommerce-jetpack' )
255
  . '</div>';
256
  ?>
257
  </p></div>
@@ -305,7 +308,7 @@ if ( ! class_exists( 'WCJ_Price_By_User_Role' ) ) :
305
  /**
306
  * Change_price.
307
  *
308
- * @version 5.6.1
309
  * @since 2.5.0
310
  * @todo (maybe) add "enable compound multipliers" option
311
  * @todo (maybe) check for `( '' === $price )` only once, at the beginning of the function (instead of comparing before each `return`)
@@ -313,7 +316,7 @@ if ( ! class_exists( 'WCJ_Price_By_User_Role' ) ) :
313
  * @param int $price defines the price.
314
  * @param array $_product defines the _product.
315
  */
316
- function change_price( $price, $_product ) {
317
 
318
  $current_user_role = wcj_get_current_user_first_role();
319
  $_current_filter = current_filter();
@@ -329,35 +332,39 @@ if ( ! class_exists( 'WCJ_Price_By_User_Role' ) ) :
329
  }
330
  }
331
 
332
- // Per product
333
  if ( 'yes' === wcj_get_option( 'wcj_price_by_user_role_per_product_enabled', 'yes' ) ) {
334
- if ( 'yes' === get_post_meta( wcj_maybe_get_product_id_wpml( wcj_get_product_id_or_variation_parent_id( $_product ) ), '_' . 'wcj_price_by_user_role_per_product_settings_enabled', true ) ) {
335
  $_product_id = wcj_maybe_get_product_id_wpml( wcj_get_product_id( $_product ) );
336
- if ( 'yes' === get_post_meta( $_product_id, '_' . 'wcj_price_by_user_role_empty_price_' . $current_user_role, true ) ) {
337
  return '';
338
  }
 
339
  if ( 'multiplier' === wcj_get_option( 'wcj_price_by_user_role_per_product_type', 'fixed' ) ) {
340
- if ( '' !== ( $multiplier_per_product = get_post_meta( $_product_id, '_' . 'wcj_price_by_user_role_multiplier_' . $current_user_role, true ) ) ) {
341
- // Maybe disable for regular price hooks
 
342
  if ( $this->disable_for_regular_price && in_array(
343
  $_current_filter,
344
  array(
345
  WCJ_PRODUCT_GET_REGULAR_PRICE_FILTER,
346
  'woocommerce_variation_prices_regular_price',
347
  'woocommerce_product_variation_get_regular_price',
348
- )
 
349
  ) ) {
350
  return $price;
351
  }
352
  return ( '' === $price ) ? $price : $price * $multiplier_per_product;
353
  }
354
- } elseif ( '' != ( $regular_price_per_product = get_post_meta( $_product_id, '_' . 'wcj_price_by_user_role_regular_price_' . $current_user_role, true ) ) ) {
355
  if ( in_array(
356
  $_current_filter,
357
  array(
358
  'woocommerce_get_price_including_tax',
359
  'woocommerce_get_price_excluding_tax',
360
- )
 
361
  ) ) {
362
  return wcj_get_product_display_price( $_product );
363
  } elseif ( in_array(
@@ -366,9 +373,10 @@ if ( ! class_exists( 'WCJ_Price_By_User_Role' ) ) :
366
  WCJ_PRODUCT_GET_PRICE_FILTER,
367
  'woocommerce_variation_prices_price',
368
  'woocommerce_product_variation_get_price',
369
- )
 
370
  ) ) {
371
- $sale_price_per_product = get_post_meta( $_product_id, '_' . 'wcj_price_by_user_role_sale_price_' . $current_user_role, true );
372
  $return = ( '' !== $sale_price_per_product && $sale_price_per_product < $regular_price_per_product ) ? $sale_price_per_product : $regular_price_per_product;
373
  return apply_filters( 'wcj_price_by_user_role_get_price', $return, $_product );
374
  } elseif ( in_array(
@@ -377,7 +385,8 @@ if ( ! class_exists( 'WCJ_Price_By_User_Role' ) ) :
377
  WCJ_PRODUCT_GET_REGULAR_PRICE_FILTER,
378
  'woocommerce_variation_prices_regular_price',
379
  'woocommerce_product_variation_get_regular_price',
380
- )
 
381
  ) ) {
382
  return $regular_price_per_product;
383
  } elseif ( in_array(
@@ -386,9 +395,10 @@ if ( ! class_exists( 'WCJ_Price_By_User_Role' ) ) :
386
  WCJ_PRODUCT_GET_SALE_PRICE_FILTER,
387
  'woocommerce_variation_prices_sale_price',
388
  'woocommerce_product_variation_get_sale_price',
389
- )
 
390
  ) ) {
391
- $sale_price_per_product = get_post_meta( $_product_id, '_' . 'wcj_price_by_user_role_sale_price_' . $current_user_role, true );
392
  return ( '' !== $sale_price_per_product ) ? $sale_price_per_product : $price;
393
  }
394
  }
@@ -413,7 +423,8 @@ if ( ! class_exists( 'WCJ_Price_By_User_Role' ) ) :
413
  WCJ_PRODUCT_GET_REGULAR_PRICE_FILTER,
414
  'woocommerce_variation_prices_regular_price',
415
  'woocommerce_product_variation_get_regular_price',
416
- )
 
417
  ) ) {
418
  return $price;
419
  }
2
  /**
3
  * Booster for WooCommerce - Module - Price based on User Role
4
  *
5
+ * @version 5.6.2
6
  * @since 2.5.0
7
  * @author Pluggabl LLC.
8
  * @todo Fix "Make Empty Price" option for variable products
212
  'post_type' => 'product',
213
  'post_status' => 'any',
214
  'posts_per_page' => 1,
215
+ 'meta_key' => '_wcj_price_by_user_role_per_product_settings_enabled', // phpcs:ignore
216
+ 'meta_value' => 'yes', // phpcs:ignore
217
  'post__not_in' => array( get_the_ID() ),
218
  );
219
  $loop = new WP_Query( $args );
225
  }
226
  return $option_value;
227
  }
 
228
  /**
229
  * Add_notice_query_var.
230
  *
234
  */
235
  public function add_notice_query_var( $location ) {
236
  remove_filter( 'redirect_post_location', array( $this, 'add_notice_query_var' ), 99 );
237
+ return add_query_arg( array( 'wcj_product_price_by_user_role_admin_notice' => true ), $location );
238
  }
239
 
240
  /**
241
  * Admin_notices.
242
  *
243
+ * @version 5.6.2
244
  * @since 2.5.0
245
  */
246
  public function admin_notices() {
247
+ $wpnonce = true;
248
+ if ( function_exists( 'wp_verify_nonce' ) ) {
249
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
250
+ }
251
+ if ( ! $wpnonce || ! isset( $_GET['wcj_product_price_by_user_role_admin_notice'] ) ) {
252
  return;
253
  }
254
  ?><div class="error"><p>
255
  <?php
256
  echo '<div class="message">'
257
+ . wp_kses_post( __( 'Booster: Free plugin\'s version is limited to only one price by user role per products settings product enabled at a time. You will need to get <a href="https://booster.io/plus/" target="_blank">Booster Plus</a> to add unlimited number of price by user role per product settings products.', 'woocommerce-jetpack' ) )
258
  . '</div>';
259
  ?>
260
  </p></div>
308
  /**
309
  * Change_price.
310
  *
311
+ * @version 5.6.2
312
  * @since 2.5.0
313
  * @todo (maybe) add "enable compound multipliers" option
314
  * @todo (maybe) check for `( '' === $price )` only once, at the beginning of the function (instead of comparing before each `return`)
316
  * @param int $price defines the price.
317
  * @param array $_product defines the _product.
318
  */
319
+ public function change_price( $price, $_product ) {
320
 
321
  $current_user_role = wcj_get_current_user_first_role();
322
  $_current_filter = current_filter();
332
  }
333
  }
334
 
335
+ // Per product.
336
  if ( 'yes' === wcj_get_option( 'wcj_price_by_user_role_per_product_enabled', 'yes' ) ) {
337
+ if ( 'yes' === get_post_meta( wcj_maybe_get_product_id_wpml( wcj_get_product_id_or_variation_parent_id( $_product ) ), '_wcj_price_by_user_role_per_product_settings_enabled', true ) ) {
338
  $_product_id = wcj_maybe_get_product_id_wpml( wcj_get_product_id( $_product ) );
339
+ if ( 'yes' === get_post_meta( $_product_id, '_wcj_price_by_user_role_empty_price_' . $current_user_role, true ) ) {
340
  return '';
341
  }
342
+ $regular_price_per_product = get_post_meta( $_product_id, '_wcj_price_by_user_role_regular_price_' . $current_user_role, true );
343
  if ( 'multiplier' === wcj_get_option( 'wcj_price_by_user_role_per_product_type', 'fixed' ) ) {
344
+ $multiplier_per_product = get_post_meta( $_product_id, '_wcj_price_by_user_role_multiplier_' . $current_user_role, true );
345
+ if ( '' !== $multiplier_per_product ) {
346
+ // Maybe disable for regular price hooks.
347
  if ( $this->disable_for_regular_price && in_array(
348
  $_current_filter,
349
  array(
350
  WCJ_PRODUCT_GET_REGULAR_PRICE_FILTER,
351
  'woocommerce_variation_prices_regular_price',
352
  'woocommerce_product_variation_get_regular_price',
353
+ ),
354
+ true
355
  ) ) {
356
  return $price;
357
  }
358
  return ( '' === $price ) ? $price : $price * $multiplier_per_product;
359
  }
360
+ } elseif ( '' !== $regular_price_per_product ) {
361
  if ( in_array(
362
  $_current_filter,
363
  array(
364
  'woocommerce_get_price_including_tax',
365
  'woocommerce_get_price_excluding_tax',
366
+ ),
367
+ true
368
  ) ) {
369
  return wcj_get_product_display_price( $_product );
370
  } elseif ( in_array(
373
  WCJ_PRODUCT_GET_PRICE_FILTER,
374
  'woocommerce_variation_prices_price',
375
  'woocommerce_product_variation_get_price',
376
+ ),
377
+ true
378
  ) ) {
379
+ $sale_price_per_product = get_post_meta( $_product_id, '_wcj_price_by_user_role_sale_price_' . $current_user_role, true );
380
  $return = ( '' !== $sale_price_per_product && $sale_price_per_product < $regular_price_per_product ) ? $sale_price_per_product : $regular_price_per_product;
381
  return apply_filters( 'wcj_price_by_user_role_get_price', $return, $_product );
382
  } elseif ( in_array(
385
  WCJ_PRODUCT_GET_REGULAR_PRICE_FILTER,
386
  'woocommerce_variation_prices_regular_price',
387
  'woocommerce_product_variation_get_regular_price',
388
+ ),
389
+ true
390
  ) ) {
391
  return $regular_price_per_product;
392
  } elseif ( in_array(
395
  WCJ_PRODUCT_GET_SALE_PRICE_FILTER,
396
  'woocommerce_variation_prices_sale_price',
397
  'woocommerce_product_variation_get_sale_price',
398
+ ),
399
+ true
400
  ) ) {
401
+ $sale_price_per_product = get_post_meta( $_product_id, '_wcj_price_by_user_role_sale_price_' . $current_user_role, true );
402
  return ( '' !== $sale_price_per_product ) ? $sale_price_per_product : $price;
403
  }
404
  }
423
  WCJ_PRODUCT_GET_REGULAR_PRICE_FILTER,
424
  'woocommerce_variation_prices_regular_price',
425
  'woocommerce_product_variation_get_regular_price',
426
+ ),
427
+ true
428
  ) ) {
429
  return $price;
430
  }
includes/class-wcj-price-labels.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Custom Price Labels
4
  *
5
- * @version 5.2.0
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -107,11 +107,13 @@ if ( ! class_exists( 'WCJ_Price_Labels' ) ) :
107
  /**
108
  * Save_custom_price_labels.
109
  *
 
110
  * @param int $post_id defines the post_id.
111
  * @param string | array $post defines the post.
112
  */
113
  public function save_custom_price_labels( $post_id, $post ) {
114
- if ( ! isset( $_POST['woojetpack_price_labels_save_post'] ) ) {
 
115
  return;
116
  }
117
  foreach ( $this->custom_tab_sections as $custom_tab_section ) {
@@ -239,7 +241,7 @@ if ( ! class_exists( 'WCJ_Price_Labels' ) ) :
239
  /**
240
  * Custom_price - front end.
241
  *
242
- * @version 3.9.0
243
  * @todo rewrite this with less filters (e.g. `woocommerce_get_price_html` only) - at least for `! WCJ_IS_WC_VERSION_BELOW_3`
244
  * @param int $price defines the price.
245
  * @param string | array $product defines the product.
@@ -286,11 +288,11 @@ if ( ! class_exists( 'WCJ_Price_Labels' ) ) :
286
  $do_apply_global = true;
287
  $products_incl = wcj_get_option( 'wcj_global_price_labels_products_incl', array() );
288
  if ( ! empty( $products_incl ) ) {
289
- $do_apply_global = ( in_array( $_product_id, $products_incl ) );
290
  }
291
  $products_excl = wcj_get_option( 'wcj_global_price_labels_products_excl', array() );
292
  if ( ! empty( $products_excl ) ) {
293
- $do_apply_global = ( ! in_array( $_product_id, $products_excl ) );
294
  }
295
  $product_categories = get_the_terms( $_product_id, 'product_cat' );
296
  $product_categories_incl = wcj_get_option( 'wcj_global_price_labels_product_cats_incl', array() );
@@ -298,7 +300,7 @@ if ( ! class_exists( 'WCJ_Price_Labels' ) ) :
298
  $do_apply_global = false;
299
  if ( ! empty( $product_categories ) ) {
300
  foreach ( $product_categories as $product_category ) {
301
- if ( in_array( $product_category->term_id, $product_categories_incl ) ) {
302
  $do_apply_global = true;
303
  break;
304
  }
@@ -310,7 +312,7 @@ if ( ! class_exists( 'WCJ_Price_Labels' ) ) :
310
  $do_apply_global = true;
311
  if ( ! empty( $product_categories ) ) {
312
  foreach ( $product_categories as $product_category ) {
313
- if ( in_array( $product_category->term_id, $product_categories_excl ) ) {
314
  $do_apply_global = false;
315
  break;
316
  }
2
  /**
3
  * Booster for WooCommerce - Module - Custom Price Labels
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
107
  /**
108
  * Save_custom_price_labels.
109
  *
110
+ * @version 5.6.2
111
  * @param int $post_id defines the post_id.
112
  * @param string | array $post defines the post.
113
  */
114
  public function save_custom_price_labels( $post_id, $post ) {
115
+ $nonce = wp_verify_nonce( wp_unslash( isset( $_POST['woocommerce_meta_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['woocommerce_meta_nonce'] ) ) : '' ), 'woocommerce_save_data' );
116
+ if ( ! isset( $_POST['woojetpack_price_labels_save_post'] ) && $nonce ) {
117
  return;
118
  }
119
  foreach ( $this->custom_tab_sections as $custom_tab_section ) {
241
  /**
242
  * Custom_price - front end.
243
  *
244
+ * @version 5.6.2
245
  * @todo rewrite this with less filters (e.g. `woocommerce_get_price_html` only) - at least for `! WCJ_IS_WC_VERSION_BELOW_3`
246
  * @param int $price defines the price.
247
  * @param string | array $product defines the product.
288
  $do_apply_global = true;
289
  $products_incl = wcj_get_option( 'wcj_global_price_labels_products_incl', array() );
290
  if ( ! empty( $products_incl ) ) {
291
+ $do_apply_global = ( in_array( (string) $_product_id, $products_incl, true ) );
292
  }
293
  $products_excl = wcj_get_option( 'wcj_global_price_labels_products_excl', array() );
294
  if ( ! empty( $products_excl ) ) {
295
+ $do_apply_global = ( ! in_array( (string) $_product_id, $products_excl, true ) );
296
  }
297
  $product_categories = get_the_terms( $_product_id, 'product_cat' );
298
  $product_categories_incl = wcj_get_option( 'wcj_global_price_labels_product_cats_incl', array() );
300
  $do_apply_global = false;
301
  if ( ! empty( $product_categories ) ) {
302
  foreach ( $product_categories as $product_category ) {
303
+ if ( in_array( (string) $product_category->term_id, $product_categories_incl, true ) ) {
304
  $do_apply_global = true;
305
  break;
306
  }
312
  $do_apply_global = true;
313
  if ( ! empty( $product_categories ) ) {
314
  foreach ( $product_categories as $product_category ) {
315
+ if ( in_array( (string) $product_category->term_id, $product_categories_excl, true ) ) {
316
  $do_apply_global = false;
317
  break;
318
  }
includes/class-wcj-product-add-to-cart.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Product Add To Cart
4
  *
5
- * @version 5.6.1
6
  * @since 2.2.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -75,7 +75,7 @@ if ( ! class_exists( 'WCJ_Product_Add_To_Cart' ) ) :
75
  }
76
 
77
  // Add to Cart on Visit.
78
- if ( 'no' != wcj_get_option( 'wcj_add_to_cart_on_visit_enabled', 'no' ) ) {
79
  add_action( 'wp', array( $this, 'add_to_cart_on_visit' ), 98 );
80
  }
81
 
@@ -253,7 +253,7 @@ if ( ! class_exists( 'WCJ_Product_Add_To_Cart' ) ) :
253
  /**
254
  * Replace_external_with_custom_add_to_cart_on_single_end.
255
  *
256
- * @version 3.8.0
257
  * @since 2.5.3
258
  */
259
  public function replace_external_with_custom_add_to_cart_on_single_end() {
@@ -261,8 +261,10 @@ if ( ! class_exists( 'WCJ_Product_Add_To_Cart' ) ) :
261
  if ( $product->is_type( 'external' ) ) {
262
  $button_html = ob_get_contents();
263
  ob_end_clean();
264
- echo ( WCJ_IS_WC_VERSION_BELOW_3_4_0 ?
265
- str_replace( '<a href=', '<a target="_blank" href=', $button_html ) : str_replace( '<form ', '<form target="_blank" ', $button_html ) );
 
 
266
  }
267
  }
268
 
@@ -305,14 +307,15 @@ if ( ! class_exists( 'WCJ_Product_Add_To_Cart' ) ) :
305
  /**
306
  * Custom_add_to_cart_loop_url.
307
  *
308
- * @version 2.5.6
309
  * @since 2.5.6
310
  * @param string $url defines the url.
311
  * @param array $_product defines the _product.
312
  */
313
  public function custom_add_to_cart_loop_url( $url, $_product ) {
 
314
  $custom_url = get_post_meta( get_the_ID(), '_wcj_add_to_cart_button_loop_custom_url', true );
315
- if ( 0 != get_the_ID() && '' != ( $custom_url ) ) {
316
  return $custom_url;
317
  }
318
  return $url;
@@ -321,7 +324,7 @@ if ( ! class_exists( 'WCJ_Product_Add_To_Cart' ) ) :
321
  /**
322
  * Enqueue_disable_quantity_add_to_cart_script.
323
  *
324
- * @version 2.5.2
325
  * @since 2.5.2
326
  * @todo add "hide" (not just disable) option
327
  */
@@ -330,7 +333,7 @@ if ( ! class_exists( 'WCJ_Product_Add_To_Cart' ) ) :
330
  ( 'yes' === wcj_get_option( 'wcj_add_to_cart_quantity_disable', 'no' ) && is_product() ) ||
331
  ( 'yes' === wcj_get_option( 'wcj_add_to_cart_quantity_disable_cart', 'no' ) && is_cart() )
332
  ) {
333
- wp_enqueue_script( 'wcj-disable-quantity', wcj_plugin_url() . '/includes/js/wcj-disable-quantity.js', array( 'jquery' ) );
334
  }
335
  }
336
 
@@ -374,12 +377,17 @@ if ( ! class_exists( 'WCJ_Product_Add_To_Cart' ) ) :
374
  /**
375
  * Maybe_redirect_to_url.
376
  *
377
- * @version 3.4.0
378
  * @param string $url defines the url.
379
  * @param bool | int $product_id defines the product_id.
380
  */
381
  public function maybe_redirect_to_url( $url, $product_id = false ) {
382
- if ( 'yes' === apply_filters( 'booster_option', 'no', wcj_get_option( 'wcj_add_to_cart_redirect_per_product_enabled', 'no' ) ) && ( $product_id || isset( $_REQUEST['add-to-cart'] ) ) ) {
 
 
 
 
 
383
  if ( ! $product_id ) {
384
  $product_id = apply_filters( 'woocommerce_add_to_cart_product_id', absint( $_REQUEST['add-to-cart'] ) );
385
  }
@@ -404,7 +412,7 @@ if ( ! class_exists( 'WCJ_Product_Add_To_Cart' ) ) :
404
  /**
405
  * Add item to cart on visit.
406
  *
407
- * @version 5.5.8
408
  * @todo (maybe) optionally add product every time page is visited (instead of only once)
409
  */
410
  public function add_to_cart_on_visit() {
@@ -416,6 +424,7 @@ if ( ! class_exists( 'WCJ_Product_Add_To_Cart' ) ) :
416
  $_productid = wc_get_product( get_the_ID() );
417
 
418
  if ( $_productid->is_type( 'variable' ) ) {
 
419
  $default_attributes = $_productid->get_default_attributes();
420
 
421
  foreach ( $_productid->get_available_variations() as $variation_values ) {
@@ -424,7 +433,7 @@ if ( ! class_exists( 'WCJ_Product_Add_To_Cart' ) ) :
424
 
425
  $attribute_name = str_replace( 'attribute_', '', $key );
426
  $default_value = $_productid->get_variation_default_attribute( $attribute_name );
427
- if ( $default_value == $attribute_value ) {
428
 
429
  $product_id = $variation_values['variation_id'];
430
 
@@ -444,7 +453,8 @@ if ( ! class_exists( 'WCJ_Product_Add_To_Cart' ) ) :
444
  }
445
  if ( isset( WC()->cart ) ) {
446
  // Check if product already in cart.
447
- if ( sizeof( WC()->cart->get_cart() ) > 0 ) {
 
448
  foreach ( WC()->cart->get_cart() as $cart_item_key => $values ) {
449
  $_product = $values['data'];
450
 
2
  /**
3
  * Booster for WooCommerce - Module - Product Add To Cart
4
  *
5
+ * @version 5.6.2
6
  * @since 2.2.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
75
  }
76
 
77
  // Add to Cart on Visit.
78
+ if ( 'no' !== wcj_get_option( 'wcj_add_to_cart_on_visit_enabled', 'no' ) ) {
79
  add_action( 'wp', array( $this, 'add_to_cart_on_visit' ), 98 );
80
  }
81
 
253
  /**
254
  * Replace_external_with_custom_add_to_cart_on_single_end.
255
  *
256
+ * @version 5.6.2
257
  * @since 2.5.3
258
  */
259
  public function replace_external_with_custom_add_to_cart_on_single_end() {
261
  if ( $product->is_type( 'external' ) ) {
262
  $button_html = ob_get_contents();
263
  ob_end_clean();
264
+ echo wp_kses_post(
265
+ WCJ_IS_WC_VERSION_BELOW_3_4_0 ?
266
+ ( str_replace( '<a href=', '<a target="_blank" href=', $button_html ) ) : ( str_replace( '<form ', '<form target="_blank" ', $button_html ) )
267
+ );
268
  }
269
  }
270
 
307
  /**
308
  * Custom_add_to_cart_loop_url.
309
  *
310
+ * @version 5.6.2
311
  * @since 2.5.6
312
  * @param string $url defines the url.
313
  * @param array $_product defines the _product.
314
  */
315
  public function custom_add_to_cart_loop_url( $url, $_product ) {
316
+
317
  $custom_url = get_post_meta( get_the_ID(), '_wcj_add_to_cart_button_loop_custom_url', true );
318
+ if ( 0 !== get_the_ID() && '' !== ( $custom_url ) ) {
319
  return $custom_url;
320
  }
321
  return $url;
324
  /**
325
  * Enqueue_disable_quantity_add_to_cart_script.
326
  *
327
+ * @version 5.6.2
328
  * @since 2.5.2
329
  * @todo add "hide" (not just disable) option
330
  */
333
  ( 'yes' === wcj_get_option( 'wcj_add_to_cart_quantity_disable', 'no' ) && is_product() ) ||
334
  ( 'yes' === wcj_get_option( 'wcj_add_to_cart_quantity_disable_cart', 'no' ) && is_cart() )
335
  ) {
336
+ wp_enqueue_script( 'wcj-disable-quantity', wcj_plugin_url() . '/includes/js/wcj-disable-quantity.js', array( 'jquery' ), w_c_j()->version, true );
337
  }
338
  }
339
 
377
  /**
378
  * Maybe_redirect_to_url.
379
  *
380
+ * @version 5.6.2
381
  * @param string $url defines the url.
382
  * @param bool | int $product_id defines the product_id.
383
  */
384
  public function maybe_redirect_to_url( $url, $product_id = false ) {
385
+ $wpnonce = true;
386
+ if ( function_exists( 'wp_verify_nonce' ) ) {
387
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
388
+ }
389
+
390
+ if ( 'yes' === apply_filters( 'booster_option', 'no', wcj_get_option( 'wcj_add_to_cart_redirect_per_product_enabled', 'no' ) ) && ( $product_id || isset( $_REQUEST['add-to-cart'] ) ) && $wpnonce ) {
391
  if ( ! $product_id ) {
392
  $product_id = apply_filters( 'woocommerce_add_to_cart_product_id', absint( $_REQUEST['add-to-cart'] ) );
393
  }
412
  /**
413
  * Add item to cart on visit.
414
  *
415
+ * @version 5.6.2
416
  * @todo (maybe) optionally add product every time page is visited (instead of only once)
417
  */
418
  public function add_to_cart_on_visit() {
424
  $_productid = wc_get_product( get_the_ID() );
425
 
426
  if ( $_productid->is_type( 'variable' ) ) {
427
+
428
  $default_attributes = $_productid->get_default_attributes();
429
 
430
  foreach ( $_productid->get_available_variations() as $variation_values ) {
433
 
434
  $attribute_name = str_replace( 'attribute_', '', $key );
435
  $default_value = $_productid->get_variation_default_attribute( $attribute_name );
436
+ if ( $default_value === $attribute_value ) {
437
 
438
  $product_id = $variation_values['variation_id'];
439
 
453
  }
454
  if ( isset( WC()->cart ) ) {
455
  // Check if product already in cart.
456
+
457
+ if ( count( WC()->cart->get_cart() ) > 0 ) {
458
  foreach ( WC()->cart->get_cart() as $cart_item_key => $values ) {
459
  $_product = $values['data'];
460
 
includes/class-wcj-product-addons.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Product Addons
4
  *
5
- * @version 5.5.4
6
  * @since 2.5.3
7
  * @author Pluggabl LLC.
8
  * @todo admin order view (names)
@@ -23,7 +23,7 @@ if ( ! class_exists( 'WCJ_Product_Addons' ) ) :
23
  /**
24
  * Constructor.
25
  *
26
- * @version 5.4.0
27
  * @since 2.5.3
28
  * @todo (maybe) add "in progress" ajax message
29
  * @todo (maybe) for variable products - show addons only if variation is selected (e.g. move to addons from `woocommerce_before_add_to_cart_button` to variation description)
@@ -89,7 +89,7 @@ if ( ! class_exists( 'WCJ_Product_Addons' ) ) :
89
  // Addons quantity.
90
  $qty_triggers = wcj_get_option( 'wcj_product_addons_qty_decrease_triggers', '' );
91
  if ( ! empty( $qty_triggers ) ) {
92
- if ( in_array( 'woocommerce_new_order', $qty_triggers ) ) {
93
  $qty_triggers = array_merge(
94
  $qty_triggers,
95
  array(
@@ -273,7 +273,7 @@ if ( ! class_exists( 'WCJ_Product_Addons' ) ) :
273
  /**
274
  * Validate_on_add_to_cart.
275
  *
276
- * @version 4.9.0
277
  * @since 2.5.5
278
  * @param array | string $passed defines the passed.
279
  * @param int $product_id defines the product_id.
@@ -290,12 +290,12 @@ if ( ! class_exists( 'WCJ_Product_Addons' ) ) :
290
  if (
291
  ! empty( $variation_id ) &&
292
  ! empty( $addon['enable_by_variation'] ) &&
293
- ! in_array( $variation_id, $addon['enable_by_variation'] )
294
  ) {
295
  continue;
296
  }
297
  if ( 'yes' === $addon['is_required'] ) {
298
- if ( ! isset( $_POST[ $addon['checkbox_key'] ] ) && empty( $addon['default'] ) ) {
299
  wc_add_notice( __( 'Some of the required addons are not selected!', 'woocommerce-jetpack' ), 'error' );
300
  return false;
301
  }
@@ -317,7 +317,7 @@ if ( ! class_exists( 'WCJ_Product_Addons' ) ) :
317
  /**
318
  * Maybe_convert_currency.
319
  *
320
- * @version 5.3.3
321
  * @since 2.8.0
322
  * @param int $price defines the price.
323
  * @param null | array $product defines the product.
@@ -327,15 +327,15 @@ if ( ! class_exists( 'WCJ_Product_Addons' ) ) :
327
  if ( 'by_module' === $apply_price_filters ) {
328
  $modules_to_apply = wcj_get_option( 'wcj_product_addons_apply_price_filters_by_module', array() );
329
  // Multicurrency Product Base Price module.
330
- if ( ( empty( $modules_to_apply ) || in_array( 'multicurrency_base_price', $modules_to_apply ) ) && w_c_j()->modules['multicurrency_base_price']->is_enabled() ) {
331
  $price = w_c_j()->modules['multicurrency_base_price']->change_price( $price, $product );
332
  }
333
  // Multicurrency (Currency Switcher) module.
334
- if ( ( empty( $modules_to_apply ) || in_array( 'multicurrency', $modules_to_apply ) ) && w_c_j()->modules['multicurrency']->is_enabled() ) {
335
  $price = w_c_j()->modules['multicurrency']->change_price( $price, $product, array( 'do_save' => false ) );
336
  }
337
  // Global Discount module.
338
- if ( ( empty( $modules_to_apply ) || in_array( 'global_discount', $modules_to_apply ) ) && w_c_j()->modules['global_discount']->is_enabled() ) {
339
  $price = w_c_j()->modules['global_discount']->add_global_discount( $price, $product, 'price' );
340
  }
341
  } elseif ( 'yes' === $apply_price_filters ) {
@@ -347,7 +347,7 @@ if ( ! class_exists( 'WCJ_Product_Addons' ) ) :
347
  /**
348
  * Clean_and_explode.
349
  *
350
- * @version 3.7.0
351
  * @since 3.7.0
352
  * @todo move this to global functions (`wcj_clean_and_explode()`)
353
  * @param array $delimiter defines the delimiter.
@@ -360,29 +360,30 @@ if ( ! class_exists( 'WCJ_Product_Addons' ) ) :
360
  /**
361
  * Price_change_ajax.
362
  *
363
- * @version 4.6.0
364
  * @since 2.5.3
365
  * @param array | string $param defines the param.
366
  */
367
  public function price_change_ajax( $param ) {
368
- if ( ! isset( $_POST['product_id'] ) || 0 === $_POST['product_id'] ) {
369
  die();
370
  }
371
- $the_product = wc_get_product( $_POST['product_id'] );
372
- $parent_product_id = ( $the_product->is_type( 'variation' ) ) ? wp_get_post_parent_id( $_POST['product_id'] ) : $_POST['product_id'];
 
373
  $addons = $this->get_product_addons( $parent_product_id );
374
  $the_addons_price = 0;
375
  foreach ( $addons as $addon ) {
376
- $price_value = $this->replace_price_template_vars( $addon['price_value'], $_POST['product_id'] );
377
- if ( isset( $_POST[ $addon['checkbox_key'] ] ) ) {
378
- if ( ( 'checkbox' === $addon['type'] || '' === $addon['type'] ) || ( 'text' === $addon['type'] && '' !== $_POST[ $addon['checkbox_key'] ] ) ) {
379
  $the_addons_price += (float) $price_value;
380
  } elseif ( 'radio' === $addon['type'] || 'select' === $addon['type'] ) {
381
  $labels = $this->clean_and_explode( PHP_EOL, $addon['label_value'] );
382
  $prices = $this->clean_and_explode( PHP_EOL, $price_value );
383
  if ( count( $labels ) === count( $prices ) ) {
384
  foreach ( $labels as $i => $label ) {
385
- if ( sanitize_title( $label ) === $_POST[ $addon['checkbox_key'] ] ) {
386
  $the_addons_price += (float) $prices[ $i ];
387
  break;
388
  }
@@ -391,7 +392,7 @@ if ( ! class_exists( 'WCJ_Product_Addons' ) ) :
391
  }
392
  }
393
  }
394
- if ( 0 != $the_addons_price ) {
395
  $the_price = $the_product->get_price();
396
  $the_display_price = wcj_get_product_display_price( $the_product, ( $the_price + $this->maybe_convert_currency( $the_addons_price, $the_product ) ) );
397
  echo wp_kses_post( wc_price( $the_display_price ) );
@@ -433,7 +434,7 @@ if ( ! class_exists( 'WCJ_Product_Addons' ) ) :
433
  /**
434
  * Is_global_addon_visible.
435
  *
436
- * @version 3.0.0
437
  * @since 3.0.0
438
  * @todo add "include only products"
439
  * @todo add "include/exclude categories/tags"
@@ -442,7 +443,7 @@ if ( ! class_exists( 'WCJ_Product_Addons' ) ) :
442
  */
443
  public function is_global_addon_visible( $i, $product_id ) {
444
  $exclude_products = wcj_get_option( 'wcj_product_addons_all_products_exclude_products_' . $i, '' );
445
- if ( ! empty( $exclude_products ) && in_array( $product_id, $exclude_products ) ) {
446
  return false;
447
  }
448
  return true;
@@ -700,7 +701,7 @@ if ( ! class_exists( 'WCJ_Product_Addons' ) ) :
700
  /**
701
  * Add_addons_price_to_cart_item_data.
702
  *
703
- * @version 4.9.0
704
  * @since 2.5.3
705
  * @param array $cart_item_data defines the cart_item_data.
706
  * @param int $product_id defines the product_id.
@@ -713,16 +714,16 @@ if ( ! class_exists( 'WCJ_Product_Addons' ) ) :
713
  if (
714
  ! empty( $variation_id ) &&
715
  ! empty( $addon['enable_by_variation'] ) &&
716
- ! in_array( $variation_id, $addon['enable_by_variation'] )
717
  ) {
718
  continue;
719
  }
720
  $price_value = $this->replace_price_template_vars( $addon['price_value'], $variation_id ? $variation_id : $product_id );
721
  if (
722
- isset( $_POST[ $addon['checkbox_key'] ] ) ||
723
  ! empty( $addon['default'] )
724
  ) {
725
- $checkbox_key = isset( $_POST[ $addon['checkbox_key'] ] ) ? $_POST[ $addon['checkbox_key'] ] : ( ! empty( $addon['default'] ) ? $addon['default'] : null );
726
  if ( ( 'checkbox' === $addon['type'] || '' === $addon['type'] ) || ( 'text' === $addon['type'] && '' !== $checkbox_key ) ) {
727
  $cart_item_data[ $addon['price_key'] ] = $price_value;
728
  $cart_item_data[ $addon['label_key'] ] = $addon['label_value'];
@@ -750,7 +751,7 @@ if ( ! class_exists( 'WCJ_Product_Addons' ) ) :
750
  /**
751
  * Add_addons_to_frontend.
752
  *
753
- * @version 4.6.0
754
  * @since 2.5.3
755
  */
756
  public function add_addons_to_frontend() {
@@ -773,7 +774,7 @@ if ( ! class_exists( 'WCJ_Product_Addons' ) ) :
773
  $is_required = ( 'yes' === $addon['is_required'] ) ? ' required' : '';
774
  if ( 'checkbox' === $addon['type'] || '' === $addon['type'] ) {
775
  $is_checked = '';
776
- if ( isset( $_POST[ $addon['checkbox_key'] ] ) ) {
777
  $is_checked = ' checked';
778
  } elseif ( 'checked' === $addon['default'] ) {
779
  $is_checked = ' checked';
@@ -795,7 +796,7 @@ if ( ! class_exists( 'WCJ_Product_Addons' ) ) :
795
  )
796
  );
797
  } elseif ( 'text' === $addon['type'] ) {
798
- $default_value = ( isset( $_POST[ $addon['checkbox_key'] ] ) ? $_POST[ $addon['checkbox_key'] ] : $addon['default'] );
799
  $maybe_tooltip = ( '' !== $addon['tooltip'] ) ?
800
  ' <img style="display:inline;" class="wcj-question-icon" src="' . wcj_plugin_url() . '/assets/images/question-icon.png" title="' . $addon['tooltip'] . '">' :
801
  '';
@@ -826,8 +827,8 @@ if ( ! class_exists( 'WCJ_Product_Addons' ) ) :
826
  $label = sanitize_title( $label );
827
  $is_checked = '';
828
  $checked_or_selected = ( 'radio' === $addon['type'] ? ' checked' : ' selected' );
829
- if ( isset( $_POST[ $addon['checkbox_key'] ] ) ) {
830
- $is_checked = ( $label === $_POST[ $addon['checkbox_key'] ] ) ? $checked_or_selected : '';
831
  } elseif ( '' !== $addon['default'] ) {
832
  $is_checked = ( sanitize_title( $addon['default'] ) === $label ) ? $checked_or_selected : '';
833
  }
2
  /**
3
  * Booster for WooCommerce - Module - Product Addons
4
  *
5
+ * @version 5.6.2
6
  * @since 2.5.3
7
  * @author Pluggabl LLC.
8
  * @todo admin order view (names)
23
  /**
24
  * Constructor.
25
  *
26
+ * @version 5.6.2
27
  * @since 2.5.3
28
  * @todo (maybe) add "in progress" ajax message
29
  * @todo (maybe) for variable products - show addons only if variation is selected (e.g. move to addons from `woocommerce_before_add_to_cart_button` to variation description)
89
  // Addons quantity.
90
  $qty_triggers = wcj_get_option( 'wcj_product_addons_qty_decrease_triggers', '' );
91
  if ( ! empty( $qty_triggers ) ) {
92
+ if ( in_array( 'woocommerce_new_order', $qty_triggers, true ) ) {
93
  $qty_triggers = array_merge(
94
  $qty_triggers,
95
  array(
273
  /**
274
  * Validate_on_add_to_cart.
275
  *
276
+ * @version 5.6.2
277
  * @since 2.5.5
278
  * @param array | string $passed defines the passed.
279
  * @param int $product_id defines the product_id.
290
  if (
291
  ! empty( $variation_id ) &&
292
  ! empty( $addon['enable_by_variation'] ) &&
293
+ ! in_array( (string) $variation_id, $addon['enable_by_variation'], true )
294
  ) {
295
  continue;
296
  }
297
  if ( 'yes' === $addon['is_required'] ) {
298
+ if ( ! isset( $_POST[ $addon['checkbox_key'] ] ) && empty( $addon['default'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
299
  wc_add_notice( __( 'Some of the required addons are not selected!', 'woocommerce-jetpack' ), 'error' );
300
  return false;
301
  }
317
  /**
318
  * Maybe_convert_currency.
319
  *
320
+ * @version 5.6.2
321
  * @since 2.8.0
322
  * @param int $price defines the price.
323
  * @param null | array $product defines the product.
327
  if ( 'by_module' === $apply_price_filters ) {
328
  $modules_to_apply = wcj_get_option( 'wcj_product_addons_apply_price_filters_by_module', array() );
329
  // Multicurrency Product Base Price module.
330
+ if ( ( empty( $modules_to_apply ) || in_array( 'multicurrency_base_price', $modules_to_apply, true ) ) && w_c_j()->modules['multicurrency_base_price']->is_enabled() ) {
331
  $price = w_c_j()->modules['multicurrency_base_price']->change_price( $price, $product );
332
  }
333
  // Multicurrency (Currency Switcher) module.
334
+ if ( ( empty( $modules_to_apply ) || in_array( 'multicurrency', $modules_to_apply, true ) ) && w_c_j()->modules['multicurrency']->is_enabled() ) {
335
  $price = w_c_j()->modules['multicurrency']->change_price( $price, $product, array( 'do_save' => false ) );
336
  }
337
  // Global Discount module.
338
+ if ( ( empty( $modules_to_apply ) || in_array( 'global_discount', $modules_to_apply, true ) ) && w_c_j()->modules['global_discount']->is_enabled() ) {
339
  $price = w_c_j()->modules['global_discount']->add_global_discount( $price, $product, 'price' );
340
  }
341
  } elseif ( 'yes' === $apply_price_filters ) {
347
  /**
348
  * Clean_and_explode.
349
  *
350
+ * @version 5.6.2
351
  * @since 3.7.0
352
  * @todo move this to global functions (`wcj_clean_and_explode()`)
353
  * @param array $delimiter defines the delimiter.
360
  /**
361
  * Price_change_ajax.
362
  *
363
+ * @version 5.6.2
364
  * @since 2.5.3
365
  * @param array | string $param defines the param.
366
  */
367
  public function price_change_ajax( $param ) {
368
+ if ( ! isset( $_POST['product_id'] ) || 0 === $_POST['product_id'] ) { // phpcs:ignore WordPress.Security.NonceVerification
369
  die();
370
  }
371
+ $product_id = sanitize_text_field( wp_unslash( $_POST['product_id'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
372
+ $the_product = wc_get_product( $product_id );
373
+ $parent_product_id = ( $the_product->is_type( 'variation' ) ) ? wp_get_post_parent_id( $product_id ) : $product_id;
374
  $addons = $this->get_product_addons( $parent_product_id );
375
  $the_addons_price = 0;
376
  foreach ( $addons as $addon ) {
377
+ $price_value = $this->replace_price_template_vars( $addon['price_value'], $product_id );
378
+ if ( isset( $_POST[ $addon['checkbox_key'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
379
+ if ( ( 'checkbox' === $addon['type'] || '' === $addon['type'] ) || ( 'text' === $addon['type'] && '' !== $_POST[ $addon['checkbox_key'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
380
  $the_addons_price += (float) $price_value;
381
  } elseif ( 'radio' === $addon['type'] || 'select' === $addon['type'] ) {
382
  $labels = $this->clean_and_explode( PHP_EOL, $addon['label_value'] );
383
  $prices = $this->clean_and_explode( PHP_EOL, $price_value );
384
  if ( count( $labels ) === count( $prices ) ) {
385
  foreach ( $labels as $i => $label ) {
386
+ if ( sanitize_title( $label ) === $_POST[ $addon['checkbox_key'] ] ) { // phpcs:ignore WordPress.Security.NonceVerification
387
  $the_addons_price += (float) $prices[ $i ];
388
  break;
389
  }
392
  }
393
  }
394
  }
395
+ if ( 0 > $the_addons_price ) {
396
  $the_price = $the_product->get_price();
397
  $the_display_price = wcj_get_product_display_price( $the_product, ( $the_price + $this->maybe_convert_currency( $the_addons_price, $the_product ) ) );
398
  echo wp_kses_post( wc_price( $the_display_price ) );
434
  /**
435
  * Is_global_addon_visible.
436
  *
437
+ * @version 5.6.2
438
  * @since 3.0.0
439
  * @todo add "include only products"
440
  * @todo add "include/exclude categories/tags"
443
  */
444
  public function is_global_addon_visible( $i, $product_id ) {
445
  $exclude_products = wcj_get_option( 'wcj_product_addons_all_products_exclude_products_' . $i, '' );
446
+ if ( ! empty( $exclude_products ) && in_array( (string) $product_id, $exclude_products, true ) ) {
447
  return false;
448
  }
449
  return true;
701
  /**
702
  * Add_addons_price_to_cart_item_data.
703
  *
704
+ * @version 5.6.2
705
  * @since 2.5.3
706
  * @param array $cart_item_data defines the cart_item_data.
707
  * @param int $product_id defines the product_id.
714
  if (
715
  ! empty( $variation_id ) &&
716
  ! empty( $addon['enable_by_variation'] ) &&
717
+ ! in_array( (string) $variation_id, $addon['enable_by_variation'], true )
718
  ) {
719
  continue;
720
  }
721
  $price_value = $this->replace_price_template_vars( $addon['price_value'], $variation_id ? $variation_id : $product_id );
722
  if (
723
+ isset( $_POST[ $addon['checkbox_key'] ] ) || // phpcs:ignore WordPress.Security.NonceVerification
724
  ! empty( $addon['default'] )
725
  ) {
726
+ $checkbox_key = isset( $_POST[ $addon['checkbox_key'] ] ) ? sanitize_text_field( wp_unslash( $_POST[ $addon['checkbox_key'] ] ) ) : ( ! empty( $addon['default'] ) ? sanitize_text_field( wp_unslash( $addon['default'] ) ) : null ); // phpcs:ignore WordPress.Security.NonceVerification
727
  if ( ( 'checkbox' === $addon['type'] || '' === $addon['type'] ) || ( 'text' === $addon['type'] && '' !== $checkbox_key ) ) {
728
  $cart_item_data[ $addon['price_key'] ] = $price_value;
729
  $cart_item_data[ $addon['label_key'] ] = $addon['label_value'];
751
  /**
752
  * Add_addons_to_frontend.
753
  *
754
+ * @version 5.6.2
755
  * @since 2.5.3
756
  */
757
  public function add_addons_to_frontend() {
774
  $is_required = ( 'yes' === $addon['is_required'] ) ? ' required' : '';
775
  if ( 'checkbox' === $addon['type'] || '' === $addon['type'] ) {
776
  $is_checked = '';
777
+ if ( isset( $_POST[ $addon['checkbox_key'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
778
  $is_checked = ' checked';
779
  } elseif ( 'checked' === $addon['default'] ) {
780
  $is_checked = ' checked';
796
  )
797
  );
798
  } elseif ( 'text' === $addon['type'] ) {
799
+ $default_value = ( isset( $_POST[ $addon['checkbox_key'] ] ) ? sanitize_text_field( wp_unslash( $_POST[ $addon['checkbox_key'] ] ) ) : $addon['default'] ); // phpcs:ignore WordPress.Security.NonceVerification
800
  $maybe_tooltip = ( '' !== $addon['tooltip'] ) ?
801
  ' <img style="display:inline;" class="wcj-question-icon" src="' . wcj_plugin_url() . '/assets/images/question-icon.png" title="' . $addon['tooltip'] . '">' :
802
  '';
827
  $label = sanitize_title( $label );
828
  $is_checked = '';
829
  $checked_or_selected = ( 'radio' === $addon['type'] ? ' checked' : ' selected' );
830
+ if ( isset( $_POST[ $addon['checkbox_key'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
831
+ $is_checked = ( $label === $_POST[ $addon['checkbox_key'] ] ) ? $checked_or_selected : ''; // phpcs:ignore WordPress.Security.NonceVerification
832
  } elseif ( '' !== $addon['default'] ) {
833
  $is_checked = ( sanitize_title( $addon['default'] ) === $label ) ? $checked_or_selected : '';
834
  }
includes/class-wcj-product-bookings.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Bookings
4
  *
5
- * @version 5.5.9
6
  * @since 2.5.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -110,12 +110,15 @@ if ( ! class_exists( 'WCJ_Product_Bookings' ) ) :
110
  /**
111
  * Price_change_ajax.
112
  *
113
- * @version 3.2.4
114
  * @since 2.5.0
115
  * @param string | array $param defines the param.
116
  */
117
  public function price_change_ajax( $param ) {
118
- if ( isset( $_POST['date_from'] ) && '' !== $_POST['date_from'] && isset( $_POST['date_to'] ) && '' !== $_POST['date_to'] && isset( $_POST['product_id'] ) && '' !== $_POST['product_id'] ) {
 
 
 
119
  $date_to = strtotime( sanitize_text_field( wp_unslash( $_POST['date_to'] ) ) );
120
  $date_from = strtotime( sanitize_text_field( wp_unslash( $_POST['date_from'] ) ) );
121
  $seconds_diff = $date_to - $date_from;
@@ -123,7 +126,7 @@ if ( ! class_exists( 'WCJ_Product_Bookings' ) ) :
123
  $the_product = wc_get_product( sanitize_text_field( wp_unslash( $_POST['product_id'] ) ) );
124
  $price_per_day = wcj_get_product_display_price( $the_product );
125
  $the_price = $days_diff * $price_per_day;
126
- echo wc_price( $the_price );
127
  }
128
  die();
129
  }
@@ -261,7 +264,7 @@ if ( ! class_exists( 'WCJ_Product_Bookings' ) ) :
261
  /**
262
  * Validate_bookings_on_add_to_cart.
263
  *
264
- * @version 2.5.2
265
  * @since 2.5.0
266
  * @param string | array $passed defines the passed.
267
  * @param int $product_id defines the product_id.
@@ -269,16 +272,19 @@ if ( ! class_exists( 'WCJ_Product_Bookings' ) ) :
269
  public function validate_bookings_on_add_to_cart( $passed, $product_id ) {
270
  $the_product = wc_get_product( $product_id );
271
  if ( $this->is_bookings_product( $the_product ) ) {
272
- if ( ! isset( $_POST['wcj_product_bookings_date_from'] ) || '' == $_POST['wcj_product_bookings_date_from'] ) {
 
 
 
273
  wc_add_notice( wcj_get_option( 'wcj_product_bookings_message_no_date_from', __( '"Date from" must be set', 'woocommerce-jetpack' ) ), 'error' );
274
  return false;
275
  }
276
- if ( ! isset( $_POST['wcj_product_bookings_date_to'] ) || '' == $_POST['wcj_product_bookings_date_to'] ) {
277
  wc_add_notice( wcj_get_option( 'wcj_product_bookings_message_no_date_to', __( '"Date to" must be set', 'woocommerce-jetpack' ) ), 'error' );
278
  return false;
279
  }
280
- $date_to = strtotime( $_POST['wcj_product_bookings_date_to'] );
281
- $date_from = strtotime( $_POST['wcj_product_bookings_date_from'] );
282
  if ( $date_from >= $date_to ) {
283
  wc_add_notice( wcj_get_option( 'wcj_product_bookings_message_date_to_before_date_from', __( '"Date to" must be after "Date from"', 'woocommerce-jetpack' ) ), 'error' );
284
  return false;
@@ -306,28 +312,31 @@ if ( ! class_exists( 'WCJ_Product_Bookings' ) ) :
306
  /**
307
  * Add_bookings_price_to_cart_item_data.
308
  *
309
- * @version 2.5.0
310
  * @since 2.5.0
311
  * @param array $cart_item_data defines the cart_item_data.
312
  * @param int $product_id defines the product_id.
313
  * @param int $variation_id defines the variation_id.
314
  */
315
  public function add_bookings_price_to_cart_item_data( $cart_item_data, $product_id, $variation_id ) {
316
- if ( isset( $_POST['wcj_product_bookings_date_to'] ) && isset( $_POST['wcj_product_bookings_date_from'] ) ) {
 
 
 
317
  $the_product = wc_get_product( $product_id );
318
  if ( $this->is_bookings_product( $the_product ) ) {
319
- $date_to = strtotime( $_POST['wcj_product_bookings_date_to'] );
320
- $date_from = strtotime( $_POST['wcj_product_bookings_date_from'] );
321
  $seconds_diff = $date_to - $date_from;
322
  $days_diff = ( $seconds_diff / 60 / 60 / 24 );
323
- if ( 0 != $variation_id ) {
324
  $the_product = wc_get_product( $variation_id );
325
  }
326
  $price_per_day = $the_product->get_price();
327
  $the_price = $days_diff * $price_per_day;
328
  $cart_item_data['wcj_bookings_price'] = $the_price;
329
- $cart_item_data['wcj_bookings_date_from'] = $_POST['wcj_product_bookings_date_from'];
330
- $cart_item_data['wcj_bookings_date_to'] = $_POST['wcj_product_bookings_date_to'];
331
 
332
  }
333
  }
@@ -387,9 +396,9 @@ if ( ! class_exists( 'WCJ_Product_Bookings' ) ) :
387
  }
388
 
389
  /**
390
- * add_input_fields_to_frontend.
391
  *
392
- * @version 4.3.0
393
  * @since 2.5.0
394
  * @todo more options: exclude days (1-31), exact availability dates, mindate, maxdate, firstday, dateformat etc.
395
  */
@@ -399,17 +408,20 @@ if ( ! class_exists( 'WCJ_Product_Bookings' ) ) :
399
  }
400
  if ( $this->is_bookings_product( wc_get_product() ) ) {
401
  $this->create_custom_style();
 
 
 
402
  $data_table = array();
403
- $date_from_value = ( isset( $_POST['wcj_product_bookings_date_from'] ) ) ? $_POST['wcj_product_bookings_date_from'] : '';
404
- $date_to_value = ( isset( $_POST['wcj_product_bookings_date_to'] ) ) ? $_POST['wcj_product_bookings_date_to'] : '';
405
- $date_from_exclude_days = ( '' != ( $exclude = wcj_get_option( 'wcj_product_bookings_datepicker_date_from_exclude_days', '' ) ) ?
406
- ' excludedays="[' . str_replace( 'S', '0', implode( ',', $exclude ) ) . ']"' : '' );
407
- $date_to_exclude_days = ( '' != ( $exclude = wcj_get_option( 'wcj_product_bookings_datepicker_date_to_exclude_days', '' ) ) ?
408
- ' excludedays="[' . str_replace( 'S', '0', implode( ',', $exclude ) ) . ']"' : '' );
409
- $date_from_exclude_months = ( '' != ( $exclude = wcj_get_option( 'wcj_product_bookings_datepicker_date_from_exclude_months', '' ) ) ?
410
- ' excludemonths="[' . implode( ',', $exclude ) . ']"' : '' );
411
- $date_to_exclude_months = ( '' != ( $exclude = wcj_get_option( 'wcj_product_bookings_datepicker_date_to_exclude_months', '' ) ) ?
412
- ' excludemonths="[' . implode( ',', $exclude ) . ']"' : '' );
413
  $data_table[] = array(
414
  '<label for="wcj_product_bookings_date_from">' . wcj_get_option( 'wcj_product_bookings_label_date_from', __( 'Date from' ) ) . '</label>',
415
  '<input firstday="0"' . $date_from_exclude_days . $date_from_exclude_months . ' dateformat="mm/dd/yy" mindate="0" type="datepicker" display="date" id="wcj_product_bookings_date_from" name="wcj_product_bookings_date_from" placeholder="" value="' . $date_from_value . '">',
@@ -418,7 +430,7 @@ if ( ! class_exists( 'WCJ_Product_Bookings' ) ) :
418
  '<label for="wcj_product_bookings_date_to">' . wcj_get_option( 'wcj_product_bookings_label_date_to', __( 'Date to' ) ) . '</label>',
419
  '<input firstday="0"' . $date_to_exclude_days . $date_to_exclude_months . ' dateformat="mm/dd/yy" mindate="0" type="datepicker" display="date" id="wcj_product_bookings_date_to" name="wcj_product_bookings_date_to" placeholder="" value="' . $date_to_value . '">',
420
  );
421
- echo wcj_get_table_html( $data_table, array( 'table_heading_type' => 'none' ) );
422
  echo '<div class="wcj-bookings-price-wrapper"><div class="wcj-value"></div><div class="wcj-loader"></div></div>';
423
  echo '<div style="display:none !important;" name="wcj_bookings_message"><p style="color:red;"></p></div>';
424
  $this->are_bookings_input_fields_displayed = true;
@@ -464,7 +476,7 @@ if ( ! class_exists( 'WCJ_Product_Bookings' ) ) :
464
  /**
465
  * Save_meta_box_value.
466
  *
467
- * @version 2.5.0
468
  * @since 2.5.0
469
  * @param string $option_value defines the option_value.
470
  * @param string $option_name defines the option_name.
@@ -482,8 +494,8 @@ if ( ! class_exists( 'WCJ_Product_Bookings' ) ) :
482
  'post_type' => 'product',
483
  'post_status' => 'any',
484
  'posts_per_page' => 1,
485
- 'meta_key' => '_' . 'wcj_product_bookings_enabled',
486
- 'meta_value' => 'yes',
487
  'post__not_in' => array( get_the_ID() ),
488
  );
489
  $loop = new WP_Query( $args );
@@ -511,18 +523,18 @@ if ( ! class_exists( 'WCJ_Product_Bookings' ) ) :
511
  /**
512
  * Admin_notices.
513
  *
514
- * @version 2.5.0
515
  * @since 2.5.0
516
  */
517
  public function admin_notices() {
518
- if ( ! isset( $_GET['wcj_product_bookings_admin_notice'] ) ) {
519
  return;
520
  }
521
  ?>
522
  <div class="error"><p>
523
  <?php
524
  echo '<div class="message">'
525
- . __( 'Booster: Free plugin\'s version is limited to only one bookings product enabled at a time. You will need to get <a href="https://booster.io/plus/" target="_blank">Booster Plus</a> to add unlimited number of bookings products.', 'woocommerce-jetpack' )
526
  . '</div>';
527
  ?>
528
  </p></div>
2
  /**
3
  * Booster for WooCommerce - Module - Bookings
4
  *
5
+ * @version 5.6.2
6
  * @since 2.5.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
110
  /**
111
  * Price_change_ajax.
112
  *
113
+ * @version 5.6.2
114
  * @since 2.5.0
115
  * @param string | array $param defines the param.
116
  */
117
  public function price_change_ajax( $param ) {
118
+ if ( function_exists( 'wp_verify_nonce' ) ) {
119
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
120
+ }
121
+ if ( $wpnonce && isset( $_POST['date_from'] ) && '' !== $_POST['date_from'] && isset( $_POST['date_to'] ) && '' !== $_POST['date_to'] && isset( $_POST['product_id'] ) && '' !== $_POST['product_id'] ) {
122
  $date_to = strtotime( sanitize_text_field( wp_unslash( $_POST['date_to'] ) ) );
123
  $date_from = strtotime( sanitize_text_field( wp_unslash( $_POST['date_from'] ) ) );
124
  $seconds_diff = $date_to - $date_from;
126
  $the_product = wc_get_product( sanitize_text_field( wp_unslash( $_POST['product_id'] ) ) );
127
  $price_per_day = wcj_get_product_display_price( $the_product );
128
  $the_price = $days_diff * $price_per_day;
129
+ echo wp_kses_post( wc_price( $the_price ) );
130
  }
131
  die();
132
  }
264
  /**
265
  * Validate_bookings_on_add_to_cart.
266
  *
267
+ * @version 5.6.2
268
  * @since 2.5.0
269
  * @param string | array $passed defines the passed.
270
  * @param int $product_id defines the product_id.
272
  public function validate_bookings_on_add_to_cart( $passed, $product_id ) {
273
  $the_product = wc_get_product( $product_id );
274
  if ( $this->is_bookings_product( $the_product ) ) {
275
+ if ( function_exists( 'wp_verify_nonce' ) ) {
276
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
277
+ }
278
+ if ( $wpnonce && ( ! isset( $_POST['wcj_product_bookings_date_from'] ) || '' === $_POST['wcj_product_bookings_date_from'] ) ) {
279
  wc_add_notice( wcj_get_option( 'wcj_product_bookings_message_no_date_from', __( '"Date from" must be set', 'woocommerce-jetpack' ) ), 'error' );
280
  return false;
281
  }
282
+ if ( $wpnonce && ( ! isset( $_POST['wcj_product_bookings_date_to'] ) || '' === $_POST['wcj_product_bookings_date_to'] ) ) {
283
  wc_add_notice( wcj_get_option( 'wcj_product_bookings_message_no_date_to', __( '"Date to" must be set', 'woocommerce-jetpack' ) ), 'error' );
284
  return false;
285
  }
286
+ $date_to = strtotime( sanitize_text_field( wp_unslash( $_POST['wcj_product_bookings_date_to'] ) ) );
287
+ $date_from = strtotime( sanitize_text_field( wp_unslash( $_POST['wcj_product_bookings_date_from'] ) ) );
288
  if ( $date_from >= $date_to ) {
289
  wc_add_notice( wcj_get_option( 'wcj_product_bookings_message_date_to_before_date_from', __( '"Date to" must be after "Date from"', 'woocommerce-jetpack' ) ), 'error' );
290
  return false;
312
  /**
313
  * Add_bookings_price_to_cart_item_data.
314
  *
315
+ * @version 5.6.2
316
  * @since 2.5.0
317
  * @param array $cart_item_data defines the cart_item_data.
318
  * @param int $product_id defines the product_id.
319
  * @param int $variation_id defines the variation_id.
320
  */
321
  public function add_bookings_price_to_cart_item_data( $cart_item_data, $product_id, $variation_id ) {
322
+ if ( function_exists( 'wp_verify_nonce' ) ) {
323
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
324
+ }
325
+ if ( $wpnonce && isset( $_POST['wcj_product_bookings_date_to'] ) && isset( $_POST['wcj_product_bookings_date_from'] ) ) {
326
  $the_product = wc_get_product( $product_id );
327
  if ( $this->is_bookings_product( $the_product ) ) {
328
+ $date_to = strtotime( sanitize_text_field( wp_unslash( $_POST['wcj_product_bookings_date_to'] ) ) );
329
+ $date_from = strtotime( sanitize_text_field( wp_unslash( $_POST['wcj_product_bookings_date_from'] ) ) );
330
  $seconds_diff = $date_to - $date_from;
331
  $days_diff = ( $seconds_diff / 60 / 60 / 24 );
332
+ if ( 0 > $variation_id ) {
333
  $the_product = wc_get_product( $variation_id );
334
  }
335
  $price_per_day = $the_product->get_price();
336
  $the_price = $days_diff * $price_per_day;
337
  $cart_item_data['wcj_bookings_price'] = $the_price;
338
+ $cart_item_data['wcj_bookings_date_from'] = sanitize_text_field( wp_unslash( $_POST['wcj_product_bookings_date_from'] ) );
339
+ $cart_item_data['wcj_bookings_date_to'] = sanitize_text_field( wp_unslash( $_POST['wcj_product_bookings_date_to'] ) );
340
 
341
  }
342
  }
396
  }
397
 
398
  /**
399
+ * Add_input_fields_to_frontend.
400
  *
401
+ * @version 5.6.2
402
  * @since 2.5.0
403
  * @todo more options: exclude days (1-31), exact availability dates, mindate, maxdate, firstday, dateformat etc.
404
  */
408
  }
409
  if ( $this->is_bookings_product( wc_get_product() ) ) {
410
  $this->create_custom_style();
411
+ if ( function_exists( 'wp_verify_nonce' ) ) {
412
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
413
+ }
414
  $data_table = array();
415
+ $date_from_value = ( $wpnonce && isset( $_POST['wcj_product_bookings_date_from'] ) ) ? sanitize_text_field( wp_unslash( $_POST['wcj_product_bookings_date_from'] ) ) : '';
416
+ $date_to_value = ( $wpnonce && isset( $_POST['wcj_product_bookings_date_to'] ) ) ? sanitize_text_field( wp_unslash( $_POST['wcj_product_bookings_date_to'] ) ) : '';
417
+ $date_from_exclude_days = wcj_get_option( 'wcj_product_bookings_datepicker_date_from_exclude_days', '' );
418
+ $date_from_exclude_days = ( '' !== $date_from_exclude_days ? ' excludedays="[' . str_replace( 'S', '0', implode( ',', $date_from_exclude_days ) ) . ']"' : '' );
419
+ $date_to_exclude_days = wcj_get_option( 'wcj_product_bookings_datepicker_date_to_exclude_days', '' );
420
+ $date_to_exclude_days = ( '' !== $date_to_exclude_days ? ' excludedays="[' . str_replace( 'S', '0', implode( ',', $date_to_exclude_days ) ) . ']"' : '' );
421
+ $date_from_exclude_months = wcj_get_option( 'wcj_product_bookings_datepicker_date_from_exclude_months', '' );
422
+ $date_from_exclude_months = ( '' !== $date_from_exclude_months ? ' excludemonths="[' . implode( ',', $date_from_exclude_months ) . ']"' : '' );
423
+ $date_to_exclude_months = wcj_get_option( 'wcj_product_bookings_datepicker_date_to_exclude_months', '' );
424
+ $date_to_exclude_months = ( '' !== $date_to_exclude_months ? ' excludemonths="[' . implode( ',', $date_to_exclude_months ) . ']"' : '' );
425
  $data_table[] = array(
426
  '<label for="wcj_product_bookings_date_from">' . wcj_get_option( 'wcj_product_bookings_label_date_from', __( 'Date from' ) ) . '</label>',
427
  '<input firstday="0"' . $date_from_exclude_days . $date_from_exclude_months . ' dateformat="mm/dd/yy" mindate="0" type="datepicker" display="date" id="wcj_product_bookings_date_from" name="wcj_product_bookings_date_from" placeholder="" value="' . $date_from_value . '">',
430
  '<label for="wcj_product_bookings_date_to">' . wcj_get_option( 'wcj_product_bookings_label_date_to', __( 'Date to' ) ) . '</label>',
431
  '<input firstday="0"' . $date_to_exclude_days . $date_to_exclude_months . ' dateformat="mm/dd/yy" mindate="0" type="datepicker" display="date" id="wcj_product_bookings_date_to" name="wcj_product_bookings_date_to" placeholder="" value="' . $date_to_value . '">',
432
  );
433
+ echo wcj_get_table_html( $data_table, array( 'table_heading_type' => 'none' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
434
  echo '<div class="wcj-bookings-price-wrapper"><div class="wcj-value"></div><div class="wcj-loader"></div></div>';
435
  echo '<div style="display:none !important;" name="wcj_bookings_message"><p style="color:red;"></p></div>';
436
  $this->are_bookings_input_fields_displayed = true;
476
  /**
477
  * Save_meta_box_value.
478
  *
479
+ * @version 5.6.2
480
  * @since 2.5.0
481
  * @param string $option_value defines the option_value.
482
  * @param string $option_name defines the option_name.
494
  'post_type' => 'product',
495
  'post_status' => 'any',
496
  'posts_per_page' => 1,
497
+ 'meta_key' => '_wcj_product_bookings_enabled', //phpcs:ignore
498
+ 'meta_value' => 'yes', //phpcs:ignore
499
  'post__not_in' => array( get_the_ID() ),
500
  );
501
  $loop = new WP_Query( $args );
523
  /**
524
  * Admin_notices.
525
  *
526
+ * @version 5.6.2
527
  * @since 2.5.0
528
  */
529
  public function admin_notices() {
530
+ if ( ! isset( $_GET['wcj_product_bookings_admin_notice'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
531
  return;
532
  }
533
  ?>
534
  <div class="error"><p>
535
  <?php
536
  echo '<div class="message">'
537
+ . wp_kses_post( __( 'Booster: Free plugin\'s version is limited to only one bookings product enabled at a time. You will need to get <a href="https://booster.io/plus/" target="_blank">Booster Plus</a> to add unlimited number of bookings products.', 'woocommerce-jetpack' ) )
538
  . '</div>';
539
  ?>
540
  </p></div>
includes/class-wcj-product-bulk-meta-editor.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Product Bulk Meta Editor
4
  *
5
- * @version 5.5.6
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -46,7 +46,7 @@ if ( ! class_exists( 'WCJ_Product_Bulk_Meta_Editor' ) ) :
46
  /**
47
  * Create_product_bulk_meta_editor_tool.
48
  *
49
- * @version 2.8.0
50
  * @since 2.8.0
51
  * @todo (maybe) real permalink instead of `/?p=`
52
  * @todo (maybe) `wc_add_notice`
@@ -60,19 +60,23 @@ if ( ! class_exists( 'WCJ_Product_Bulk_Meta_Editor' ) ) :
60
  * @todo (maybe) multiple meta keys
61
  */
62
  public function create_product_bulk_meta_editor_tool() {
63
- // Actions
64
  $result = $this->perform_actions();
65
- // Preparing products data
66
- $_products = wcj_get_products( array(), 'any', 512, ( 'yes' === apply_filters( 'booster_option', 'no', wcj_get_option( 'wcj_product_bulk_meta_editor_add_variations', 'no' ) ) ) );
67
- $selected_products = isset( $_POST['wcj_product_bulk_meta_editor_products'] ) ? $_POST['wcj_product_bulk_meta_editor_products'] : array();
68
- // Output
69
- echo $this->get_tool_html( $result['meta_name'], $result['result_message'], $_products, $selected_products, $result['set_meta'] );
 
 
 
 
70
  }
71
 
72
  /**
73
  * Perform_actions.
74
  *
75
- * @version 2.8.0
76
  * @since 2.8.0
77
  * @todo break this into separate functions
78
  */
@@ -80,28 +84,33 @@ if ( ! class_exists( 'WCJ_Product_Bulk_Meta_Editor' ) ) :
80
  $meta_name = '';
81
  $set_meta = '';
82
  $result_message = '';
83
- if (
84
- isset( $_POST['wcj_product_bulk_meta_editor_save_single'] ) && 0 != $_POST['wcj_product_bulk_meta_editor_save_single'] &&
 
 
 
 
85
  isset( $_POST['wcj_product_bulk_meta_editor_meta'] ) && '' !== $_POST['wcj_product_bulk_meta_editor_meta']
86
  ) {
87
- $meta_name = $_POST['wcj_product_bulk_meta_editor_meta'];
88
- $success = 0;
89
- $fail = 0;
90
- $_product_id = $_POST['wcj_product_bulk_meta_editor_save_single'];
91
- if ( update_post_meta( $_product_id, $meta_name, $_POST[ 'wcj_product_bulk_meta_editor_id_' . $_product_id ] ) ) {
 
92
  $success++;
93
  } else {
94
  $fail++;
95
  }
96
  $result_message = $this->get_result_message( $success, $fail );
97
  } elseif (
98
- isset( $_POST['wcj_product_bulk_meta_editor_delete_single'] ) && 0 != $_POST['wcj_product_bulk_meta_editor_delete_single'] &&
99
  isset( $_POST['wcj_product_bulk_meta_editor_meta'] ) && '' !== $_POST['wcj_product_bulk_meta_editor_meta']
100
  ) {
101
- $meta_name = $_POST['wcj_product_bulk_meta_editor_meta'];
102
  $success = 0;
103
  $fail = 0;
104
- $_product_id = $_POST['wcj_product_bulk_meta_editor_delete_single'];
105
  if ( delete_post_meta( $_product_id, $meta_name ) ) {
106
  $success++;
107
  } else {
@@ -112,7 +121,7 @@ if ( ! class_exists( 'WCJ_Product_Bulk_Meta_Editor' ) ) :
112
  isset( $_POST['wcj_product_bulk_meta_editor_save_all'] ) &&
113
  isset( $_POST['wcj_product_bulk_meta_editor_meta'] ) && '' !== $_POST['wcj_product_bulk_meta_editor_meta']
114
  ) {
115
- $meta_name = $_POST['wcj_product_bulk_meta_editor_meta'];
116
  $key_start_length = strlen( 'wcj_product_bulk_meta_editor_id_' );
117
  $success = 0;
118
  $fail = 0;
@@ -131,7 +140,7 @@ if ( ! class_exists( 'WCJ_Product_Bulk_Meta_Editor' ) ) :
131
  isset( $_POST['wcj_product_bulk_meta_editor_delete_all'] ) &&
132
  isset( $_POST['wcj_product_bulk_meta_editor_meta'] ) && '' !== $_POST['wcj_product_bulk_meta_editor_meta']
133
  ) {
134
- $meta_name = $_POST['wcj_product_bulk_meta_editor_meta'];
135
  $key_start_length = strlen( 'wcj_product_bulk_meta_editor_id_' );
136
  $success = 0;
137
  $fail = 0;
@@ -151,8 +160,8 @@ if ( ! class_exists( 'WCJ_Product_Bulk_Meta_Editor' ) ) :
151
  isset( $_POST['wcj_product_bulk_meta_editor_set_meta'] ) &&
152
  isset( $_POST['wcj_product_bulk_meta_editor_meta'] ) && '' !== $_POST['wcj_product_bulk_meta_editor_meta']
153
  ) {
154
- $meta_name = $_POST['wcj_product_bulk_meta_editor_meta'];
155
- $set_meta = $_POST['wcj_product_bulk_meta_editor_set_meta'];
156
  $key_start_length = strlen( 'wcj_product_bulk_meta_editor_id_' );
157
  $success = 0;
158
  $fail = 0;
@@ -168,10 +177,10 @@ if ( ! class_exists( 'WCJ_Product_Bulk_Meta_Editor' ) ) :
168
  }
169
  $result_message = $this->get_result_message( $success, $fail );
170
  } elseif ( isset( $_POST['wcj_product_bulk_meta_editor_show'] ) ) {
171
- if ( '' === $_POST['wcj_product_bulk_meta_editor_show_meta'] ) {
172
  $result_message = '<p><div class="error"><p>' . __( 'Please enter meta key.', 'woocommerce-jetpack' ) . '</p></div></p>';
173
  }
174
- $meta_name = $_POST['wcj_product_bulk_meta_editor_show_meta'];
175
  }
176
  return array(
177
  'meta_name' => $meta_name,
@@ -264,7 +273,7 @@ if ( ! class_exists( 'WCJ_Product_Bulk_Meta_Editor' ) ) :
264
  /**
265
  * Get_html_products_select.
266
  *
267
- * @version 2.8.0
268
  * @since 2.8.0
269
  * @param array $_products defines the _products.
270
  * @param array $selected_products defines the selected_products.
@@ -273,11 +282,11 @@ if ( ! class_exists( 'WCJ_Product_Bulk_Meta_Editor' ) ) :
273
  $products_html = '';
274
  $products_html .= '<select name="wcj_product_bulk_meta_editor_products[]" multiple style="height:300px;width:100%;">';
275
  foreach ( $_products as $product_id => $product_title ) {
276
- $selected = ( empty( $selected_products ) || in_array( $product_id, $selected_products ) ? ' selected' : '' );
277
  $products_html .= '<option' . $selected . ' value="' . $product_id . '">' . $product_title . '</option>';
278
  }
279
  $products_html .= '</select>';
280
- $tip = '<p style="font-style:italic;color:gray;">' . '* ' .
281
  __( 'Hold <strong>Control</strong> key to select multiple products. Press <strong>Control</strong> + <strong>A</strong> to select all products.', 'woocommerce-jetpack' ) .
282
  '</p>';
283
  $table_data = array();
@@ -361,14 +370,14 @@ if ( ! class_exists( 'WCJ_Product_Bulk_Meta_Editor' ) ) :
361
  /**
362
  * Get_html_meta_table_content.
363
  *
364
- * @version 2.8.0
365
  * @since 2.8.0
366
  * @param string $meta_name defines the meta_name.
367
  * @param array $_products defines the _products.
368
  * @param string | array $selected_products defines the selected_products.
369
  * @param string $js_confirmation defines the js_confirmation.
370
  */
371
- function get_html_meta_table_content( $meta_name, $_products, $selected_products, $js_confirmation ) {
372
  $table_data = array();
373
  $table_headings = array(
374
  __( 'Product', 'woocommerce-jetpack' ),
@@ -379,17 +388,17 @@ if ( ! class_exists( 'WCJ_Product_Bulk_Meta_Editor' ) ) :
379
  $table_headings = $this->maybe_add_additional_columns_headings( $table_headings, $additional_columns );
380
  $table_data[] = $table_headings;
381
  foreach ( $_products as $product_id => $product_title ) {
382
- if ( ! in_array( $product_id, $selected_products ) ) {
383
  continue;
384
  }
385
  if ( ! metadata_exists( 'post', $product_id, $meta_name ) && 'yes' === wcj_get_option( 'wcj_product_bulk_meta_editor_check_if_exists', 'no' ) ) {
386
- $_post_meta = '<em>' . 'N/A' . '</em>';
387
  $save_button = '';
388
  $delete_button = '';
389
  } else {
390
  $_post_meta = get_post_meta( $product_id, $meta_name, true );
391
  if ( is_array( $_post_meta ) || is_object( $_post_meta ) ) {
392
- $_post_meta = print_r( $_post_meta, true );
393
  } else {
394
  $placeholder = ( ! metadata_exists( 'post', $product_id, $meta_name ) ? ' placeholder="N/A"' : '' );
395
  $_post_meta = '<input' . $placeholder . ' style="width:100%;" type="text" name="wcj_product_bulk_meta_editor_id_' . $product_id . '" value="' .
@@ -415,20 +424,20 @@ if ( ! class_exists( 'WCJ_Product_Bulk_Meta_Editor' ) ) :
415
  /**
416
  * Maybe_add_additional_columns_headings.
417
  *
418
- * @version 2.8.0
419
  * @since 2.8.0
420
  * @param array $table_headings defines the table_headings.
421
  * @param array $additional_columns defines the additional_columns.
422
  */
423
  public function maybe_add_additional_columns_headings( $table_headings, $additional_columns ) {
424
  if ( ! empty( $additional_columns ) ) {
425
- if ( in_array( 'product_id', $additional_columns ) ) {
426
  $table_headings[] = __( 'Product ID', 'woocommerce-jetpack' );
427
  }
428
- if ( in_array( 'product_status', $additional_columns ) ) {
429
  $table_headings[] = __( 'Product status', 'woocommerce-jetpack' );
430
  }
431
- if ( in_array( 'product_all_meta_keys', $additional_columns ) ) {
432
  $table_headings[] = __( 'Meta keys', 'woocommerce-jetpack' );
433
  }
434
  }
@@ -438,7 +447,7 @@ if ( ! class_exists( 'WCJ_Product_Bulk_Meta_Editor' ) ) :
438
  /**
439
  * Maybe_add_additional_columns_content.
440
  *
441
- * @version 2.8.0
442
  * @since 2.8.0
443
  * @param array $row defines the row.
444
  * @param array $additional_columns defines the additional_columns.
@@ -446,13 +455,13 @@ if ( ! class_exists( 'WCJ_Product_Bulk_Meta_Editor' ) ) :
446
  */
447
  public function maybe_add_additional_columns_content( $row, $additional_columns, $product_id ) {
448
  if ( ! empty( $additional_columns ) ) {
449
- if ( in_array( 'product_id', $additional_columns ) ) {
450
  $row[] = $product_id;
451
  }
452
- if ( in_array( 'product_status', $additional_columns ) ) {
453
  $row[] = get_post_status( $product_id );
454
  }
455
- if ( in_array( 'product_all_meta_keys', $additional_columns ) ) {
456
  $row[] = '<details style="color:gray;">' .
457
  '<summary><em>' . __( 'Show all', 'woocommerce-jetpack' ) . '</em></summary>' .
458
  '<p>' . implode( '<br>', array_keys( get_post_meta( $product_id ) ) ) . '</p>' .
2
  /**
3
  * Booster for WooCommerce - Module - Product Bulk Meta Editor
4
  *
5
+ * @version 5.6.2
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
46
  /**
47
  * Create_product_bulk_meta_editor_tool.
48
  *
49
+ * @version 5.6.2
50
  * @since 2.8.0
51
  * @todo (maybe) real permalink instead of `/?p=`
52
  * @todo (maybe) `wc_add_notice`
60
  * @todo (maybe) multiple meta keys
61
  */
62
  public function create_product_bulk_meta_editor_tool() {
63
+ // Actions.
64
  $result = $this->perform_actions();
65
+ // Preparing products data.
66
+ $_products = wcj_get_products( array(), 'any', 512, ( 'yes' === apply_filters( 'booster_option', 'no', wcj_get_option( 'wcj_product_bulk_meta_editor_add_variations', 'no' ) ) ) );
67
+ $wpnonce = true;
68
+ if ( function_exists( 'wp_verify_nonce' ) ) {
69
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
70
+ }
71
+ $selected_products = $wpnonce && isset( $_POST['wcj_product_bulk_meta_editor_products'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_POST['wcj_product_bulk_meta_editor_products'] ) ) : array();
72
+ // Output.
73
+ echo $this->get_tool_html( $result['meta_name'], $result['result_message'], $_products, $selected_products, $result['set_meta'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
74
  }
75
 
76
  /**
77
  * Perform_actions.
78
  *
79
+ * @version 5.6.2
80
  * @since 2.8.0
81
  * @todo break this into separate functions
82
  */
84
  $meta_name = '';
85
  $set_meta = '';
86
  $result_message = '';
87
+ $wpnonce = true;
88
+ if ( function_exists( 'wp_verify_nonce' ) ) {
89
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
90
+ }
91
+ if ( $wpnonce &&
92
+ isset( $_POST['wcj_product_bulk_meta_editor_save_single'] ) && null !== $_POST['wcj_product_bulk_meta_editor_save_single'] && 0 !== $_POST['wcj_product_bulk_meta_editor_save_single'] &&
93
  isset( $_POST['wcj_product_bulk_meta_editor_meta'] ) && '' !== $_POST['wcj_product_bulk_meta_editor_meta']
94
  ) {
95
+ $meta_name = sanitize_text_field( wp_unslash( $_POST['wcj_product_bulk_meta_editor_meta'] ) );
96
+ $success = 0;
97
+ $fail = 0;
98
+ $_product_id = sanitize_text_field( wp_unslash( $_POST['wcj_product_bulk_meta_editor_save_single'] ) );
99
+ $wcj_product_bulk_meta_editor_id = isset( $_POST[ 'wcj_product_bulk_meta_editor_id_' . $_product_id ] ) ? sanitize_text_field( wp_unslash( $_POST[ 'wcj_product_bulk_meta_editor_id_' . $_product_id ] ) ) : '';
100
+ if ( update_post_meta( $_product_id, $meta_name, $wcj_product_bulk_meta_editor_id ) ) {
101
  $success++;
102
  } else {
103
  $fail++;
104
  }
105
  $result_message = $this->get_result_message( $success, $fail );
106
  } elseif (
107
+ isset( $_POST['wcj_product_bulk_meta_editor_delete_single'] ) && 0 > $_POST['wcj_product_bulk_meta_editor_delete_single'] &&
108
  isset( $_POST['wcj_product_bulk_meta_editor_meta'] ) && '' !== $_POST['wcj_product_bulk_meta_editor_meta']
109
  ) {
110
+ $meta_name = sanitize_text_field( wp_unslash( $_POST['wcj_product_bulk_meta_editor_meta'] ) );
111
  $success = 0;
112
  $fail = 0;
113
+ $_product_id = sanitize_text_field( wp_unslash( $_POST['wcj_product_bulk_meta_editor_delete_single'] ) );
114
  if ( delete_post_meta( $_product_id, $meta_name ) ) {
115
  $success++;
116
  } else {
121
  isset( $_POST['wcj_product_bulk_meta_editor_save_all'] ) &&
122
  isset( $_POST['wcj_product_bulk_meta_editor_meta'] ) && '' !== $_POST['wcj_product_bulk_meta_editor_meta']
123
  ) {
124
+ $meta_name = sanitize_text_field( wp_unslash( $_POST['wcj_product_bulk_meta_editor_meta'] ) );
125
  $key_start_length = strlen( 'wcj_product_bulk_meta_editor_id_' );
126
  $success = 0;
127
  $fail = 0;
140
  isset( $_POST['wcj_product_bulk_meta_editor_delete_all'] ) &&
141
  isset( $_POST['wcj_product_bulk_meta_editor_meta'] ) && '' !== $_POST['wcj_product_bulk_meta_editor_meta']
142
  ) {
143
+ $meta_name = sanitize_text_field( wp_unslash( $_POST['wcj_product_bulk_meta_editor_meta'] ) );
144
  $key_start_length = strlen( 'wcj_product_bulk_meta_editor_id_' );
145
  $success = 0;
146
  $fail = 0;
160
  isset( $_POST['wcj_product_bulk_meta_editor_set_meta'] ) &&
161
  isset( $_POST['wcj_product_bulk_meta_editor_meta'] ) && '' !== $_POST['wcj_product_bulk_meta_editor_meta']
162
  ) {
163
+ $meta_name = sanitize_text_field( wp_unslash( $_POST['wcj_product_bulk_meta_editor_meta'] ) );
164
+ $set_meta = sanitize_text_field( wp_unslash( $_POST['wcj_product_bulk_meta_editor_set_meta'] ) );
165
  $key_start_length = strlen( 'wcj_product_bulk_meta_editor_id_' );
166
  $success = 0;
167
  $fail = 0;
177
  }
178
  $result_message = $this->get_result_message( $success, $fail );
179
  } elseif ( isset( $_POST['wcj_product_bulk_meta_editor_show'] ) ) {
180
+ if ( isset( $_POST['wcj_product_bulk_meta_editor_show_meta'] ) && '' === $_POST['wcj_product_bulk_meta_editor_show_meta'] ) {
181
  $result_message = '<p><div class="error"><p>' . __( 'Please enter meta key.', 'woocommerce-jetpack' ) . '</p></div></p>';
182
  }
183
+ $meta_name = sanitize_text_field( wp_unslash( $_POST['wcj_product_bulk_meta_editor_show_meta'] ) );
184
  }
185
  return array(
186
  'meta_name' => $meta_name,
273
  /**
274
  * Get_html_products_select.
275
  *
276
+ * @version 5.6.2
277
  * @since 2.8.0
278
  * @param array $_products defines the _products.
279
  * @param array $selected_products defines the selected_products.
282
  $products_html = '';
283
  $products_html .= '<select name="wcj_product_bulk_meta_editor_products[]" multiple style="height:300px;width:100%;">';
284
  foreach ( $_products as $product_id => $product_title ) {
285
+ $selected = ( empty( $selected_products ) || in_array( (string) $product_id, $selected_products, true ) ? ' selected' : '' );
286
  $products_html .= '<option' . $selected . ' value="' . $product_id . '">' . $product_title . '</option>';
287
  }
288
  $products_html .= '</select>';
289
+ $tip = '<p style="font-style:italic;color:gray;">* ' .
290
  __( 'Hold <strong>Control</strong> key to select multiple products. Press <strong>Control</strong> + <strong>A</strong> to select all products.', 'woocommerce-jetpack' ) .
291
  '</p>';
292
  $table_data = array();
370
  /**
371
  * Get_html_meta_table_content.
372
  *
373
+ * @version 5.6.2
374
  * @since 2.8.0
375
  * @param string $meta_name defines the meta_name.
376
  * @param array $_products defines the _products.
377
  * @param string | array $selected_products defines the selected_products.
378
  * @param string $js_confirmation defines the js_confirmation.
379
  */
380
+ public function get_html_meta_table_content( $meta_name, $_products, $selected_products, $js_confirmation ) {
381
  $table_data = array();
382
  $table_headings = array(
383
  __( 'Product', 'woocommerce-jetpack' ),
388
  $table_headings = $this->maybe_add_additional_columns_headings( $table_headings, $additional_columns );
389
  $table_data[] = $table_headings;
390
  foreach ( $_products as $product_id => $product_title ) {
391
+ if ( ! in_array( (string) $product_id, $selected_products, true ) ) {
392
  continue;
393
  }
394
  if ( ! metadata_exists( 'post', $product_id, $meta_name ) && 'yes' === wcj_get_option( 'wcj_product_bulk_meta_editor_check_if_exists', 'no' ) ) {
395
+ $_post_meta = '<em>N/A</em>';
396
  $save_button = '';
397
  $delete_button = '';
398
  } else {
399
  $_post_meta = get_post_meta( $product_id, $meta_name, true );
400
  if ( is_array( $_post_meta ) || is_object( $_post_meta ) ) {
401
+ $_post_meta = print_r( $_post_meta, true ); // phpcs:ignore
402
  } else {
403
  $placeholder = ( ! metadata_exists( 'post', $product_id, $meta_name ) ? ' placeholder="N/A"' : '' );
404
  $_post_meta = '<input' . $placeholder . ' style="width:100%;" type="text" name="wcj_product_bulk_meta_editor_id_' . $product_id . '" value="' .
424
  /**
425
  * Maybe_add_additional_columns_headings.
426
  *
427
+ * @version 5.6.2
428
  * @since 2.8.0
429
  * @param array $table_headings defines the table_headings.
430
  * @param array $additional_columns defines the additional_columns.
431
  */
432
  public function maybe_add_additional_columns_headings( $table_headings, $additional_columns ) {
433
  if ( ! empty( $additional_columns ) ) {
434
+ if ( in_array( 'product_id', $additional_columns, true ) ) {
435
  $table_headings[] = __( 'Product ID', 'woocommerce-jetpack' );
436
  }
437
+ if ( in_array( 'product_status', $additional_columns, true ) ) {
438
  $table_headings[] = __( 'Product status', 'woocommerce-jetpack' );
439
  }
440
+ if ( in_array( 'product_all_meta_keys', $additional_columns, true ) ) {
441
  $table_headings[] = __( 'Meta keys', 'woocommerce-jetpack' );
442
  }
443
  }
447
  /**
448
  * Maybe_add_additional_columns_content.
449
  *
450
+ * @version 5.6.2
451
  * @since 2.8.0
452
  * @param array $row defines the row.
453
  * @param array $additional_columns defines the additional_columns.
455
  */
456
  public function maybe_add_additional_columns_content( $row, $additional_columns, $product_id ) {
457
  if ( ! empty( $additional_columns ) ) {
458
+ if ( in_array( 'product_id', $additional_columns, true ) ) {
459
  $row[] = $product_id;
460
  }
461
+ if ( in_array( 'product_status', $additional_columns, true ) ) {
462
  $row[] = get_post_status( $product_id );
463
  }
464
+ if ( in_array( 'product_all_meta_keys', $additional_columns, true ) ) {
465
  $row[] = '<details style="color:gray;">' .
466
  '<summary><em>' . __( 'Show all', 'woocommerce-jetpack' ) . '</em></summary>' .
467
  '<p>' . implode( '<br>', array_keys( get_post_meta( $product_id ) ) ) . '</p>' .
includes/class-wcj-product-bulk-price-converter.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Bulk Price Converter
4
  *
5
- * @version 5.6.1
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -11,11 +11,11 @@ if ( ! defined( 'ABSPATH' ) ) {
11
  exit;
12
  }
13
 
14
- if ( ! class_exists( 'WCJ_Bulk_Price_Converter' ) ) :
15
  /**
16
- * WCJ_Bulk_Price_Converter.
17
  */
18
- class WCJ_Bulk_Price_Converter extends WCJ_Module {
19
 
20
  /**
21
  * Constructor.
@@ -43,7 +43,7 @@ if ( ! class_exists( 'WCJ_Bulk_Price_Converter' ) ) :
43
  /**
44
  * Change_price_by_type.
45
  *
46
- * @version 2.4.4
47
  * @param int $product_id defines the product_id.
48
  * @param string $multiply_price_by defines the multiply_price_by.
49
  * @param string $price_type defines the price_type.
@@ -55,10 +55,14 @@ if ( ! class_exists( 'WCJ_Bulk_Price_Converter' ) ) :
55
  public function change_price_by_type( $product_id, $multiply_price_by, $price_type, $is_preview, $parent_product_id, $min_price = 0, $max_price = 0 ) {
56
  $the_price = get_post_meta( $product_id, '_' . $price_type, true );
57
  $the_modified_price = $the_price;
 
 
 
 
58
  if ( '' !== $the_price && 0 !== $the_price ) {
59
  $precision = wcj_get_option( 'woocommerce_price_num_decimals', 2 );
60
  $the_modified_price = round( $the_price * $multiply_price_by, $precision );
61
- if ( isset( $_POST['make_pretty_prices_threshold'] ) && apply_filters( 'booster_option', 0, $_POST['make_pretty_prices_threshold'] ) > 0 ) {
62
  $the_modified_price = $this->make_pretty_price( $the_modified_price );
63
  }
64
  if ( $the_modified_price < 0 ) {
@@ -84,11 +88,11 @@ if ( ! class_exists( 'WCJ_Bulk_Price_Converter' ) ) :
84
  }
85
  if ( '' !== $the_price || '' !== $the_modified_price ) {
86
  echo '<tr>' .
87
- '<td>' . get_the_title( $product_id ) . '</td>' .
88
- '<td>' . implode( ', ', $product_cats ) . '</td>' .
89
  '<td><em>' . wp_kses_post( $price_type ) . '</em></td>' .
90
- '<td>' . $the_price . '</td>' .
91
- '<td>' . $the_modified_price . '</td>' .
92
  '</tr>';
93
  }
94
  }
@@ -96,14 +100,18 @@ if ( ! class_exists( 'WCJ_Bulk_Price_Converter' ) ) :
96
  /**
97
  * Change_price_all_types.
98
  *
99
- * @version 2.4.4
100
  * @param int $product_id defines the product_id.
101
  * @param int $multiply_price_by defines the multiply_price_by.
102
  * @param string | bool $is_preview defines the is_preview.
103
  * @param int $parent_product_id defines the parent_product_id.
104
  */
105
  public function change_price_all_types( $product_id, $multiply_price_by, $is_preview, $parent_product_id ) {
106
- $what_prices_to_modify = ( isset( $_POST['wcj_price_types'] ) ) ? $_POST['wcj_price_types'] : 'wcj_both';
 
 
 
 
107
  if ( 'wcj_both' === $what_prices_to_modify ) {
108
  $this->change_price_by_type( $product_id, $multiply_price_by, 'price', $is_preview, $parent_product_id );
109
  $this->change_price_by_type( $product_id, $multiply_price_by, 'sale_price', $is_preview, $parent_product_id );
@@ -181,7 +189,7 @@ if ( ! class_exists( 'WCJ_Bulk_Price_Converter' ) ) :
181
  /**
182
  * Change_all_products_prices.
183
  *
184
- * @version 3.9.0
185
  * @todo (dev) clear products transients after converting prices
186
  * @param int $multiply_prices_by defines the multiply_prices_by.
187
  * @param string | bool $is_preview defines the is_preview.
@@ -192,6 +200,11 @@ if ( ! class_exists( 'WCJ_Bulk_Price_Converter' ) ) :
192
  return;
193
  }
194
 
 
 
 
 
 
195
  ob_start();
196
 
197
  echo '<table class="widefat striped" style="margin-top: 10px;">';
@@ -215,13 +228,13 @@ if ( ! class_exists( 'WCJ_Bulk_Price_Converter' ) ) :
215
  'order' => 'DESC',
216
  'fields' => 'ids',
217
  );
218
- if ( isset( $_POST['wcj_product_cat'] ) && 'wcj_any' !== $_POST['wcj_product_cat'] && 'any' !== apply_filters( 'booster_option', 'any', '' ) ) {
219
- $args['tax_query'] = array(
220
  array(
221
  'taxonomy' => 'product_cat',
222
  'field' => 'slug',
223
- 'terms' => array( $_POST['wcj_product_cat'] ),
224
- 'operator' => ( 'wcj_none' !== $_POST['wcj_product_cat'] ) ? 'IN' : 'NOT EXISTS',
225
  ),
226
  );
227
  }
@@ -243,12 +256,15 @@ if ( ! class_exists( 'WCJ_Bulk_Price_Converter' ) ) :
243
  /**
244
  * Create_bulk_price_converter_tool.
245
  *
246
- * @version 5.6.1
247
  */
248
  public function create_bulk_price_converter_tool() {
249
  $result_message = '';
250
-
251
- $multiply_prices_by = isset( $_POST['multiply_prices_by'] ) ? $_POST['multiply_prices_by'] : 1;
 
 
 
252
  $is_preview = isset( $_POST['bulk_change_prices_preview'] );
253
 
254
  $result_changing_prices = '';
@@ -268,7 +284,7 @@ if ( ! class_exists( 'WCJ_Bulk_Price_Converter' ) ) :
268
  }
269
 
270
  $select_options_html = '';
271
- $selected_option = ( isset( $_POST['wcj_product_cat'] ) ) ? $_POST['wcj_product_cat'] : '';
272
  $product_categories = get_terms( 'product_cat', 'orderby=name&hide_empty=0' );
273
  if ( ! empty( $product_categories ) && ! is_wp_error( $product_categories ) ) {
274
  foreach ( $product_categories as $product_category ) {
@@ -291,7 +307,7 @@ if ( ! class_exists( 'WCJ_Bulk_Price_Converter' ) ) :
291
  '',
292
  );
293
 
294
- $selected_option_price_types = ( isset( $_POST['wcj_price_types'] ) ) ? $_POST['wcj_price_types'] : '';
295
  $data_table[] = array(
296
  __( 'Price type to modify', 'woocommerce-jetpack' ),
297
  '<select style="width:100%;" name="wcj_price_types">' .
@@ -315,7 +331,7 @@ if ( ! class_exists( 'WCJ_Bulk_Price_Converter' ) ) :
315
  '<em>' . apply_filters( 'booster_message', '', 'desc' ) . '</em>',
316
  );
317
  }
318
- $make_pretty_prices_threshold = isset( $_POST['make_pretty_prices_threshold'] ) ? $_POST['make_pretty_prices_threshold'] : 0;
319
  $data_table[] = array(
320
  __( '"Pretty prices" threshold', 'woocommerce-jetpack' ) . wcj_help_tip(
321
  __( 'Leave zero to disable.', 'woocommerce-jetpack' ) . ' ' .
@@ -341,7 +357,7 @@ if ( ! class_exists( 'WCJ_Bulk_Price_Converter' ) ) :
341
  );
342
  }
343
  echo (
344
- wcj_get_table_html(
345
  $data_table,
346
  array(
347
  'table_heading_type' => 'none',
@@ -361,7 +377,7 @@ if ( ! class_exists( 'WCJ_Bulk_Price_Converter' ) ) :
361
  /**
362
  * Make_pretty_price.
363
  *
364
- * @version 2.4.4
365
  * @since 2.4.4
366
  * @param int $price defines the price.
367
  */
@@ -369,8 +385,12 @@ if ( ! class_exists( 'WCJ_Bulk_Price_Converter' ) ) :
369
  if ( 0 === $price ) {
370
  return $price;
371
  }
 
 
 
 
372
  $the_modified_price = round( $price );
373
- if ( $price < $_POST['make_pretty_prices_threshold'] ) {
374
  $the_modified_price -= 0.01; // E.g. 49.49 -> 48.99 and 49.50 -> 49.99.
375
  } else {
376
  $mod_10 = $the_modified_price % 10;
@@ -387,4 +407,4 @@ if ( ! class_exists( 'WCJ_Bulk_Price_Converter' ) ) :
387
 
388
  endif;
389
 
390
- return new WCJ_Bulk_Price_Converter();
2
  /**
3
  * Booster for WooCommerce - Module - Bulk Price Converter
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
11
  exit;
12
  }
13
 
14
+ if ( ! class_exists( 'WCJ_Product_Bulk_Price_Converter' ) ) :
15
  /**
16
+ * WCJ_Product_Bulk_Price_Converter.
17
  */
18
+ class WCJ_Product_Bulk_Price_Converter extends WCJ_Module {
19
 
20
  /**
21
  * Constructor.
43
  /**
44
  * Change_price_by_type.
45
  *
46
+ * @version 5.6.2
47
  * @param int $product_id defines the product_id.
48
  * @param string $multiply_price_by defines the multiply_price_by.
49
  * @param string $price_type defines the price_type.
55
  public function change_price_by_type( $product_id, $multiply_price_by, $price_type, $is_preview, $parent_product_id, $min_price = 0, $max_price = 0 ) {
56
  $the_price = get_post_meta( $product_id, '_' . $price_type, true );
57
  $the_modified_price = $the_price;
58
+ $wpnonce = true;
59
+ if ( function_exists( 'wp_verify_nonce' ) ) {
60
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
61
+ }
62
  if ( '' !== $the_price && 0 !== $the_price ) {
63
  $precision = wcj_get_option( 'woocommerce_price_num_decimals', 2 );
64
  $the_modified_price = round( $the_price * $multiply_price_by, $precision );
65
+ if ( $wpnonce && isset( $_POST['make_pretty_prices_threshold'] ) && apply_filters( 'booster_option', 0, sanitize_text_field( wp_unslash( $_POST['make_pretty_prices_threshold'] ) ) ) > 0 ) {
66
  $the_modified_price = $this->make_pretty_price( $the_modified_price );
67
  }
68
  if ( $the_modified_price < 0 ) {
88
  }
89
  if ( '' !== $the_price || '' !== $the_modified_price ) {
90
  echo '<tr>' .
91
+ '<td>' . esc_html( get_the_title( $product_id ) ) . '</td>' .
92
+ '<td>' . wp_kses_post( implode( ', ', array_map( 'sanitize_text_field', $product_cats ) ) ) . '</td>' .
93
  '<td><em>' . wp_kses_post( $price_type ) . '</em></td>' .
94
+ '<td>' . wp_kses_post( $the_price ) . '</td>' .
95
+ '<td>' . wp_kses_post( $the_modified_price ) . '</td>' .
96
  '</tr>';
97
  }
98
  }
100
  /**
101
  * Change_price_all_types.
102
  *
103
+ * @version 5.6.2
104
  * @param int $product_id defines the product_id.
105
  * @param int $multiply_price_by defines the multiply_price_by.
106
  * @param string | bool $is_preview defines the is_preview.
107
  * @param int $parent_product_id defines the parent_product_id.
108
  */
109
  public function change_price_all_types( $product_id, $multiply_price_by, $is_preview, $parent_product_id ) {
110
+ $wpnonce = true;
111
+ if ( function_exists( 'wp_verify_nonce' ) ) {
112
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
113
+ }
114
+ $what_prices_to_modify = ( $wpnonce && isset( $_POST['wcj_price_types'] ) ) ? sanitize_text_field( wp_unslash( $_POST['wcj_price_types'] ) ) : 'wcj_both';
115
  if ( 'wcj_both' === $what_prices_to_modify ) {
116
  $this->change_price_by_type( $product_id, $multiply_price_by, 'price', $is_preview, $parent_product_id );
117
  $this->change_price_by_type( $product_id, $multiply_price_by, 'sale_price', $is_preview, $parent_product_id );
189
  /**
190
  * Change_all_products_prices.
191
  *
192
+ * @version 5.6.2
193
  * @todo (dev) clear products transients after converting prices
194
  * @param int $multiply_prices_by defines the multiply_prices_by.
195
  * @param string | bool $is_preview defines the is_preview.
200
  return;
201
  }
202
 
203
+ $wpnonce = true;
204
+ if ( function_exists( 'wp_verify_nonce' ) ) {
205
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
206
+ }
207
+
208
  ob_start();
209
 
210
  echo '<table class="widefat striped" style="margin-top: 10px;">';
228
  'order' => 'DESC',
229
  'fields' => 'ids',
230
  );
231
+ if ( $wpnonce && isset( $_POST['wcj_product_cat'] ) && 'wcj_any' !== $_POST['wcj_product_cat'] && 'any' !== apply_filters( 'booster_option', 'any', '' ) ) {
232
+ $args['tax_query'] = array(// phpcs:ignore
233
  array(
234
  'taxonomy' => 'product_cat',
235
  'field' => 'slug',
236
+ 'terms' => array( sanitize_text_field( wp_unslash( $_POST['wcj_product_cat'] ) ) ),
237
+ 'operator' => ( 'wcj_none' !== sanitize_text_field( wp_unslash( $_POST['wcj_product_cat'] ) ) ) ? 'IN' : 'NOT EXISTS',
238
  ),
239
  );
240
  }
256
  /**
257
  * Create_bulk_price_converter_tool.
258
  *
259
+ * @version 5.6.2
260
  */
261
  public function create_bulk_price_converter_tool() {
262
  $result_message = '';
263
+ $wpnonce = true;
264
+ if ( function_exists( 'wp_verify_nonce' ) ) {
265
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
266
+ }
267
+ $multiply_prices_by = $wpnonce && isset( $_POST['multiply_prices_by'] ) ? sanitize_text_field( wp_unslash( $_POST['multiply_prices_by'] ) ) : 1;
268
  $is_preview = isset( $_POST['bulk_change_prices_preview'] );
269
 
270
  $result_changing_prices = '';
284
  }
285
 
286
  $select_options_html = '';
287
+ $selected_option = ( isset( $_POST['wcj_product_cat'] ) ) ? sanitize_text_field( wp_unslash( $_POST['wcj_product_cat'] ) ) : '';
288
  $product_categories = get_terms( 'product_cat', 'orderby=name&hide_empty=0' );
289
  if ( ! empty( $product_categories ) && ! is_wp_error( $product_categories ) ) {
290
  foreach ( $product_categories as $product_category ) {
307
  '',
308
  );
309
 
310
+ $selected_option_price_types = ( isset( $_POST['wcj_price_types'] ) ) ? sanitize_text_field( wp_unslash( $_POST['wcj_price_types'] ) ) : '';
311
  $data_table[] = array(
312
  __( 'Price type to modify', 'woocommerce-jetpack' ),
313
  '<select style="width:100%;" name="wcj_price_types">' .
331
  '<em>' . apply_filters( 'booster_message', '', 'desc' ) . '</em>',
332
  );
333
  }
334
+ $make_pretty_prices_threshold = isset( $_POST['make_pretty_prices_threshold'] ) ? sanitize_text_field( wp_unslash( $_POST['make_pretty_prices_threshold'] ) ) : 0;
335
  $data_table[] = array(
336
  __( '"Pretty prices" threshold', 'woocommerce-jetpack' ) . wcj_help_tip(
337
  __( 'Leave zero to disable.', 'woocommerce-jetpack' ) . ' ' .
357
  );
358
  }
359
  echo (
360
+ wcj_get_table_html( // phpcs:ignore WordPress.Security.EscapeOutput
361
  $data_table,
362
  array(
363
  'table_heading_type' => 'none',
377
  /**
378
  * Make_pretty_price.
379
  *
380
+ * @version 5.6.2
381
  * @since 2.4.4
382
  * @param int $price defines the price.
383
  */
385
  if ( 0 === $price ) {
386
  return $price;
387
  }
388
+ $wpnonce = true;
389
+ if ( function_exists( 'wp_verify_nonce' ) ) {
390
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
391
+ }
392
  $the_modified_price = round( $price );
393
+ if ( $wpnonce && isset( $_POST['make_pretty_prices_threshold'] ) && $price < $_POST['make_pretty_prices_threshold'] ) {
394
  $the_modified_price -= 0.01; // E.g. 49.49 -> 48.99 and 49.50 -> 49.99.
395
  } else {
396
  $mod_10 = $the_modified_price % 10;
407
 
408
  endif;
409
 
410
+ return new WCJ_Product_Bulk_Price_Converter();
includes/class-wcj-product-by-country.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Product Visibility by Country
4
  *
5
- * @version 5.6.1
6
  * @since 2.5.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -75,12 +75,12 @@ if ( ! class_exists( 'WCJ_Product_By_Country' ) ) :
75
  /**
76
  * Get_check_option.
77
  *
78
- * @version 4.6.1
79
  * @since 3.6.0
80
  */
81
  public function get_check_option() {
82
  if ( 'manual' === apply_filters( 'booster_option', 'by_ip', wcj_get_option( 'wcj_product_by_country_selection_method', 'by_ip' ) ) ) {
83
- if ( '' == wcj_session_get( 'wcj_selected_country' ) ) {
84
  $country = wcj_get_country_by_ip();
85
  wcj_session_set( 'wcj_selected_country', $country );
86
  $check_option = $country;
@@ -92,7 +92,7 @@ if ( ! class_exists( 'WCJ_Product_By_Country' ) ) :
92
  }
93
 
94
  if ( 'yes' === wcj_get_option( 'wcj_product_by_country_selection_billing_country_overwrite', 'no' ) ) {
95
- $billing_country = isset( $_REQUEST['country'] ) && ! empty( $_REQUEST['country'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['country'] ) ) : '';
96
  if ( ! empty( $billing_country ) ) {
97
  $check_option = $billing_country;
98
  }
@@ -115,16 +115,16 @@ if ( ! class_exists( 'WCJ_Product_By_Country' ) ) :
115
  /**
116
  * Save_country_in_session.
117
  *
118
- * @version 4.9.0
119
  * @since 3.1.0
120
  */
121
  public function save_country_in_session() {
122
  wcj_session_maybe_start();
123
- if ( isset( $_REQUEST['wcj_country_selector'] ) ) {
124
- wcj_session_set( 'wcj_selected_country', sanitize_text_field( wp_unslash( $_REQUEST['wcj_country_selector'] ) ) );
125
  }
126
- if ( isset( $_REQUEST['wcj-country'] ) ) {
127
- wcj_session_set( 'wcj_selected_country', sanitize_text_field( wp_unslash( $_REQUEST['wcj-country'] ) ) );
128
  }
129
  }
130
 
@@ -136,7 +136,7 @@ if ( ! class_exists( 'WCJ_Product_By_Country' ) ) :
136
  * @param array $options defines the options.
137
  */
138
  public function maybe_extra_options_process( $options ) {
139
- if ( in_array( 'EU', $options ) ) {
140
  $options = array_merge( $options, wcj_get_european_union_countries() );
141
  }
142
  return $options;
@@ -145,7 +145,7 @@ if ( ! class_exists( 'WCJ_Product_By_Country' ) ) :
145
  /**
146
  * Maybe_add_extra_settings.
147
  *
148
- * @version 5.6.1
149
  * @since 3.6.0
150
  * @todo (maybe) move "Country List" inside the "Admin Options" section
151
  */
@@ -161,7 +161,7 @@ if ( ! class_exists( 'WCJ_Product_By_Country' ) ) :
161
  'desc_tip' => __( 'Possible values: "Automatically by IP" or "Manually".', 'woocommerce-jetpack' ),
162
  'desc' => sprintf(
163
  /* translators: %s: translation added */
164
- '<p>' . __( 'If "Manually" option is selected, you can add country selection drop box to frontend with "%s" widget or %s shortcode.', 'woocommerce-jetpack' ),
165
  __( 'Booster - Selector', 'woocommerce-jetpack' ),
166
  '<code>[wcj_selector selector_type="country"]</code>'
167
  ) .
2
  /**
3
  * Booster for WooCommerce - Module - Product Visibility by Country
4
  *
5
+ * @version 5.6.2
6
  * @since 2.5.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
75
  /**
76
  * Get_check_option.
77
  *
78
+ * @version 5.6.2
79
  * @since 3.6.0
80
  */
81
  public function get_check_option() {
82
  if ( 'manual' === apply_filters( 'booster_option', 'by_ip', wcj_get_option( 'wcj_product_by_country_selection_method', 'by_ip' ) ) ) {
83
+ if ( '' === wcj_session_get( 'wcj_selected_country' ) || null === wcj_session_get( 'wcj_selected_country' ) ) {
84
  $country = wcj_get_country_by_ip();
85
  wcj_session_set( 'wcj_selected_country', $country );
86
  $check_option = $country;
92
  }
93
 
94
  if ( 'yes' === wcj_get_option( 'wcj_product_by_country_selection_billing_country_overwrite', 'no' ) ) {
95
+ $billing_country = isset( $_REQUEST['country'] ) && ! empty( $_REQUEST['country'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['country'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
96
  if ( ! empty( $billing_country ) ) {
97
  $check_option = $billing_country;
98
  }
115
  /**
116
  * Save_country_in_session.
117
  *
118
+ * @version 5.6.2
119
  * @since 3.1.0
120
  */
121
  public function save_country_in_session() {
122
  wcj_session_maybe_start();
123
+ if ( isset( $_REQUEST['wcj_country_selector'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
124
+ wcj_session_set( 'wcj_selected_country', sanitize_text_field( wp_unslash( $_REQUEST['wcj_country_selector'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification
125
  }
126
+ if ( isset( $_REQUEST['wcj-country'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
127
+ wcj_session_set( 'wcj_selected_country', sanitize_text_field( wp_unslash( $_REQUEST['wcj-country'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification
128
  }
129
  }
130
 
136
  * @param array $options defines the options.
137
  */
138
  public function maybe_extra_options_process( $options ) {
139
+ if ( in_array( 'EU', $options, true ) ) {
140
  $options = array_merge( $options, wcj_get_european_union_countries() );
141
  }
142
  return $options;
145
  /**
146
  * Maybe_add_extra_settings.
147
  *
148
+ * @version 5.6.2
149
  * @since 3.6.0
150
  * @todo (maybe) move "Country List" inside the "Admin Options" section
151
  */
161
  'desc_tip' => __( 'Possible values: "Automatically by IP" or "Manually".', 'woocommerce-jetpack' ),
162
  'desc' => sprintf(
163
  /* translators: %s: translation added */
164
+ '<p>' . __( 'If "Manually" option is selected, you can add country selection drop box to frontend with "%1$s" widget or %2$s shortcode.', 'woocommerce-jetpack' ),
165
  __( 'Booster - Selector', 'woocommerce-jetpack' ),
166
  '<code>[wcj_selector selector_type="country"]</code>'
167
  ) .
includes/class-wcj-product-by-date.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Product Availability by Date
4
  *
5
- * @version 5.2.0
6
  * @since 2.9.1
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -21,7 +21,7 @@ if ( ! class_exists( 'WCJ_Product_By_Date' ) ) :
21
  /**
22
  * Constructor.
23
  *
24
- * @version 5.2.0
25
  * @since 2.9.1
26
  * @todo per category
27
  * @todo per tag
@@ -36,8 +36,7 @@ if ( ! class_exists( 'WCJ_Product_By_Date' ) ) :
36
  $this->desc_pro = __( 'Set product availability by date.', 'woocommerce-jetpack' );
37
  $this->link_slug = 'woocommerce-product-availability-by-date';
38
  parent::__construct();
39
-
40
- $this->time_now = current_time( 'timestamp' );
41
 
42
  if ( $this->is_enabled() ) {
43
  // Per product meta box.
2
  /**
3
  * Booster for WooCommerce - Module - Product Availability by Date
4
  *
5
+ * @version 5.6.2
6
  * @since 2.9.1
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
21
  /**
22
  * Constructor.
23
  *
24
+ * @version 5.6.2
25
  * @since 2.9.1
26
  * @todo per category
27
  * @todo per tag
36
  $this->desc_pro = __( 'Set product availability by date.', 'woocommerce-jetpack' );
37
  $this->link_slug = 'woocommerce-product-availability-by-date';
38
  parent::__construct();
39
+ $this->time_now = (int) gmdate( 'U' );
 
40
 
41
  if ( $this->is_enabled() ) {
42
  // Per product meta box.
includes/class-wcj-product-by-time.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Product Availability by Time
4
  *
5
- * @version 5.2.0
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -21,7 +21,7 @@ if ( ! class_exists( 'WCJ_Product_By_Time' ) ) :
21
  /**
22
  * Constructor.
23
  *
24
- * @version 5.2.0
25
  * @since 2.8.0
26
  * @todo per category
27
  * @todo per tag
@@ -36,8 +36,7 @@ if ( ! class_exists( 'WCJ_Product_By_Time' ) ) :
36
  $this->desc_pro = __( 'Set product availability by time.', 'woocommerce-jetpack' );
37
  $this->link_slug = 'woocommerce-product-availability-by-time';
38
  parent::__construct();
39
-
40
- $this->time_now = current_time( 'timestamp' );
41
 
42
  if ( $this->is_enabled() ) {
43
  // Per product meta box.
2
  /**
3
  * Booster for WooCommerce - Module - Product Availability by Time
4
  *
5
+ * @version 5.6.2
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
21
  /**
22
  * Constructor.
23
  *
24
+ * @version 5.6.2
25
  * @since 2.8.0
26
  * @todo per category
27
  * @todo per tag
36
  $this->desc_pro = __( 'Set product availability by time.', 'woocommerce-jetpack' );
37
  $this->link_slug = 'woocommerce-product-availability-by-time';
38
  parent::__construct();
39
+ $this->time_now = (int) gmdate( 'U' );
 
40
 
41
  if ( $this->is_enabled() ) {
42
  // Per product meta box.
includes/class-wcj-product-by-user-role.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Product Visibility by User Role
4
  *
5
- * @version 5.2.0
6
  * @since 2.5.5
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -42,12 +42,13 @@ if ( ! class_exists( 'WCJ_Product_By_User_Role' ) ) :
42
  /**
43
  * Maybe_add_extra_settings.
44
  *
45
- * @version 4.9.0
46
  * @since 4.9.0
47
  *
48
  * @return array
49
  */
50
  public function maybe_add_extra_settings() {
 
51
  return array(
52
  array(
53
  'title' => __( 'User Options', 'woocommerce-jetpack' ),
@@ -58,7 +59,7 @@ if ( ! class_exists( 'WCJ_Product_By_User_Role' ) ) :
58
  'title' => __( 'Skip Editable Roles Filter', 'woocommerce-jetpack' ),
59
  /* translators: %s: translation added */
60
  'desc_tip' => __( 'Ignores <code>editable_roles</code> filter on admin.', 'woocommerce-jetpack' ) . '<br />' . sprintf( __( 'Enable this option for example if the shop manager can\'t see some role but only if you\'ve already tried the <strong>Shop Manager Editable Roles</strong> on <a href="%s">Admin Tools</a> module.', 'woocommerce-jetpack' ), admin_url( 'admin.php?page=wc-settings&tab=jetpack&wcj-cat=emails_and_misc&section=admin_tools' ) ),
61
- 'desc' => empty( $message = apply_filters( 'booster_message', '', 'desc' ) ) ? __( 'Enable', 'woocommerce-jetpack' ) : $message,
62
  'custom_attributes' => apply_filters( 'booster_message', '', 'disabled' ),
63
  'id' => 'wcj_' . $this->id . '_user_options_skip_editable_roles',
64
  'default' => 'no',
2
  /**
3
  * Booster for WooCommerce - Module - Product Visibility by User Role
4
  *
5
+ * @version 5.6.2
6
  * @since 2.5.5
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
42
  /**
43
  * Maybe_add_extra_settings.
44
  *
45
+ * @version 5.6.2
46
  * @since 4.9.0
47
  *
48
  * @return array
49
  */
50
  public function maybe_add_extra_settings() {
51
+ $message = apply_filters( 'booster_message', '', 'desc' );
52
  return array(
53
  array(
54
  'title' => __( 'User Options', 'woocommerce-jetpack' ),
59
  'title' => __( 'Skip Editable Roles Filter', 'woocommerce-jetpack' ),
60
  /* translators: %s: translation added */
61
  'desc_tip' => __( 'Ignores <code>editable_roles</code> filter on admin.', 'woocommerce-jetpack' ) . '<br />' . sprintf( __( 'Enable this option for example if the shop manager can\'t see some role but only if you\'ve already tried the <strong>Shop Manager Editable Roles</strong> on <a href="%s">Admin Tools</a> module.', 'woocommerce-jetpack' ), admin_url( 'admin.php?page=wc-settings&tab=jetpack&wcj-cat=emails_and_misc&section=admin_tools' ) ),
62
+ 'desc' => empty( $message ) ? __( 'Enable', 'woocommerce-jetpack' ) : $message,
63
  'custom_attributes' => apply_filters( 'booster_message', '', 'disabled' ),
64
  'id' => 'wcj_' . $this->id . '_user_options_skip_editable_roles',
65
  'default' => 'no',
includes/class-wcj-product-by-user.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Product by User
4
  *
5
- * @version 5.6.1
6
  * @since 2.5.2
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -21,7 +21,7 @@ if ( ! class_exists( 'WCJ_Product_By_User' ) ) :
21
  /**
22
  * Constructor.
23
  *
24
- * @version 5.6.0
25
  * @since 2.5.2
26
  * @todo run `add_my_products_endpoint` only if module is enabled
27
  */
@@ -40,14 +40,13 @@ if ( ! class_exists( 'WCJ_Product_By_User' ) ) :
40
  register_deactivation_hook( __FILE__, array( $this, 'add_my_products_endpoint_flush_rewrite_rules' ) );
41
  add_filter( 'query_vars', array( $this, 'add_my_products_endpoint_query_var' ), 0 );
42
  add_action( 'init', array( $this, 'add_my_products_endpoint' ) );
43
- $sendEmailtoUserProduct = get_option( 'wcj_user_product_email_send' );
44
- if($sendEmailtoUserProduct == 'yes') {
45
- add_action( 'woocommerce_thankyou', array( $this, 'getProductOwnerEmail'), 10, 1 );
46
- add_filter( 'woocommerce_email_headers', array( $this,'sendemail_to_productowner_order_place_successfully'), 10, 3 );
47
- add_filter( 'woocommerce_email_recipient_no_stock', array( $this,'change_stock_email_recipient'), 10, 2 );
48
  }
49
 
50
-
51
  if ( $this->is_enabled() ) {
52
  if ( 'yes' === wcj_get_option( 'wcj_product_by_user_add_to_my_account', 'yes' ) ) {
53
  add_filter( 'woocommerce_account_menu_items', array( $this, 'add_my_products_tab_my_account_page' ) );
@@ -82,7 +81,7 @@ if ( ! class_exists( 'WCJ_Product_By_User' ) ) :
82
  /**
83
  * Send Email To Product User at success page when email send setting enable
84
  *
85
- * @version 5.6.1
86
  * @since 1.0.0
87
  * @param string $headers defines the headers.
88
  * @param string $email_id defines the email_id.
@@ -91,7 +90,7 @@ if ( ! class_exists( 'WCJ_Product_By_User' ) ) :
91
  public function sendemail_to_productowner_order_place_successfully( $headers, $email_id, $object ) {
92
  if ( 'new_order' === $email_id && is_a( $object, 'WC_Order' ) ) {
93
  $useremail = $this->getProductOwnerEmail( wcj_get_order_id( $object ) );
94
- $headers .= 'Cc: Name <' . $useremail . '>' . "\r\n";
95
  }
96
  return $headers;
97
  }
@@ -183,7 +182,7 @@ if ( ! class_exists( 'WCJ_Product_By_User' ) ) :
183
  /**
184
  * Custom help to add new items into an array after a selected item.
185
  *
186
- * @version 2.5.7
187
  * @since 2.5.7
188
  * @param array $items defines the items.
189
  * @param string $new_items defines the new_items.
@@ -193,7 +192,7 @@ if ( ! class_exists( 'WCJ_Product_By_User' ) ) :
193
  */
194
  public function insert_after_helper( $items, $new_items, $after ) {
195
  // Search for the item position and +1 since is after the selected item key.
196
- $position = array_search( $after, array_keys( $items ) ) + 1;
197
  // Insert the new item.
198
  $array = array_slice( $items, 0, $position, true );
199
  $array += $new_items;
@@ -218,28 +217,32 @@ if ( ! class_exists( 'WCJ_Product_By_User' ) ) :
218
  /**
219
  * Add_my_products_content_my_account_page.
220
  *
221
- * @version 5.5.9
222
  * @since 2.5.2
223
  */
224
  public function add_my_products_content_my_account_page() {
225
  $user_ID = get_current_user_id();
226
- if ( 0 == $user_ID ) {
227
  return;
228
  }
229
- if ( isset( $_GET['wcj_delete_product'] ) ) {
230
- $product_id = $_GET['wcj_delete_product'];
 
 
 
 
231
  $post_author_id = get_post_field( 'post_author', $product_id );
232
- if ( $user_ID != $post_author_id ) {
233
- echo '<p>' . __( 'Wrong user ID!', 'woocommerce-jetpack' ) . '</p>';
234
  } else {
235
  wp_delete_post( $product_id, true );
236
  }
237
  }
238
- if ( isset( $_GET['wcj_edit_product'] ) ) {
239
- $product_id = $_GET['wcj_edit_product'];
240
  $post_author_id = get_post_field( 'post_author', $product_id );
241
- if ( $user_ID != $post_author_id ) {
242
- echo '<p>' . __( 'Wrong user ID!', 'woocommerce-jetpack' ) . '</p>';
243
  } else {
244
  echo do_shortcode( '[wcj_product_add_new product_id="' . $product_id . '"]' );
245
  }
@@ -270,7 +273,7 @@ if ( ! class_exists( 'WCJ_Product_By_User' ) ) :
270
  }
271
  $offset += $block_size;
272
  }
273
- if ( 0 != count( $products ) ) {
274
  $table_data = array();
275
  $table_data[] = array( '', __( 'Status', 'woocommerce-jetpack' ), __( 'Title', 'woocommerce-jetpack' ), __( 'Actions', 'woocommerce-jetpack' ) );
276
  $i = 0;
@@ -280,11 +283,11 @@ if ( ! class_exists( 'WCJ_Product_By_User' ) ) :
280
  /* $i . ' [' . $_product_id . ']' . */ get_the_post_thumbnail( $_product_id, array( 25, 25 ) ),
281
  '<code>' . $_product_data['status'] . '</code>',
282
  $_product_data['title'],
283
- '<a class="button" href="' . esc_url( add_query_arg( 'wcj_edit_product', $_product_id, remove_query_arg( array( 'wcj_edit_product_image_delete', 'wcj_delete_product' ) ) ) ) . '">' . __( 'Edit', 'woocommerce-jetpack' ) . '</a>' . ' ' .
284
- '<a class="button" href="' . esc_url( add_query_arg( 'wcj_delete_product', $_product_id, remove_query_arg( array( 'wcj_edit_product_image_delete', 'wcj_edit_product' ) ) ) ) . '" onclick="return confirm(\'' . __( 'Are you sure?', 'woocommerce-jetpack' ) . '\')">' . __( 'Delete', 'woocommerce-jetpack' ) . '</a>',
285
  );
286
  }
287
- echo wcj_get_table_html( $table_data, array( 'table_class' => 'shop_table shop_table_responsive my_account_orders' ) );
288
  }
289
  }
290
 
2
  /**
3
  * Booster for WooCommerce - Module - Product by User
4
  *
5
+ * @version 5.6.2
6
  * @since 2.5.2
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
21
  /**
22
  * Constructor.
23
  *
24
+ * @version 5.6.2
25
  * @since 2.5.2
26
  * @todo run `add_my_products_endpoint` only if module is enabled
27
  */
40
  register_deactivation_hook( __FILE__, array( $this, 'add_my_products_endpoint_flush_rewrite_rules' ) );
41
  add_filter( 'query_vars', array( $this, 'add_my_products_endpoint_query_var' ), 0 );
42
  add_action( 'init', array( $this, 'add_my_products_endpoint' ) );
43
+ $send_email_to_user_product = get_option( 'wcj_user_product_email_send', 'no' );
44
+ if ( 'yes' === $send_email_to_user_product ) {
45
+ add_action( 'woocommerce_thankyou', array( $this, 'getProductOwnerEmail' ), 10, 1 );
46
+ add_filter( 'woocommerce_email_headers', array( $this, 'sendemail_to_productowner_order_place_successfully' ), 10, 3 );
47
+ add_filter( 'woocommerce_email_recipient_no_stock', array( $this, 'change_stock_email_recipient' ), 10, 2 );
48
  }
49
 
 
50
  if ( $this->is_enabled() ) {
51
  if ( 'yes' === wcj_get_option( 'wcj_product_by_user_add_to_my_account', 'yes' ) ) {
52
  add_filter( 'woocommerce_account_menu_items', array( $this, 'add_my_products_tab_my_account_page' ) );
81
  /**
82
  * Send Email To Product User at success page when email send setting enable
83
  *
84
+ * @version 5.6.2
85
  * @since 1.0.0
86
  * @param string $headers defines the headers.
87
  * @param string $email_id defines the email_id.
90
  public function sendemail_to_productowner_order_place_successfully( $headers, $email_id, $object ) {
91
  if ( 'new_order' === $email_id && is_a( $object, 'WC_Order' ) ) {
92
  $useremail = $this->getProductOwnerEmail( wcj_get_order_id( $object ) );
93
+ $headers .= 'Cc: Name <' . $useremail . '>' . "\r\n";
94
  }
95
  return $headers;
96
  }
182
  /**
183
  * Custom help to add new items into an array after a selected item.
184
  *
185
+ * @version 5.6.2
186
  * @since 2.5.7
187
  * @param array $items defines the items.
188
  * @param string $new_items defines the new_items.
192
  */
193
  public function insert_after_helper( $items, $new_items, $after ) {
194
  // Search for the item position and +1 since is after the selected item key.
195
+ $position = array_search( $after, array_keys( $items ), true ) + 1;
196
  // Insert the new item.
197
  $array = array_slice( $items, 0, $position, true );
198
  $array += $new_items;
217
  /**
218
  * Add_my_products_content_my_account_page.
219
  *
220
+ * @version 5.6.2
221
  * @since 2.5.2
222
  */
223
  public function add_my_products_content_my_account_page() {
224
  $user_ID = get_current_user_id();
225
+ if ( 0 === $user_ID ) {
226
  return;
227
  }
228
+ $wpnonce = true;
229
+ if ( function_exists( 'wp_verify_nonce' ) ) {
230
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
231
+ }
232
+ if ( $wpnonce && isset( $_GET['wcj_delete_product'] ) ) {
233
+ $product_id = sanitize_text_field( wp_unslash( $_GET['wcj_delete_product'] ) );
234
  $post_author_id = get_post_field( 'post_author', $product_id );
235
+ if ( (string) $user_ID !== $post_author_id ) {
236
+ echo '<p>' . esc_html__( 'Wrong user ID!', 'woocommerce-jetpack' ) . '</p>';
237
  } else {
238
  wp_delete_post( $product_id, true );
239
  }
240
  }
241
+ if ( $wpnonce && isset( $_GET['wcj_edit_product'] ) ) {
242
+ $product_id = sanitize_text_field( wp_unslash( $_GET['wcj_edit_product'] ) );
243
  $post_author_id = get_post_field( 'post_author', $product_id );
244
+ if ( (string) $user_ID !== $post_author_id ) {
245
+ echo '<p>' . esc_html__( 'Wrong user ID!', 'woocommerce-jetpack' ) . '</p>';
246
  } else {
247
  echo do_shortcode( '[wcj_product_add_new product_id="' . $product_id . '"]' );
248
  }
273
  }
274
  $offset += $block_size;
275
  }
276
+ if ( 0 !== count( $products ) ) {
277
  $table_data = array();
278
  $table_data[] = array( '', __( 'Status', 'woocommerce-jetpack' ), __( 'Title', 'woocommerce-jetpack' ), __( 'Actions', 'woocommerce-jetpack' ) );
279
  $i = 0;
283
  /* $i . ' [' . $_product_id . ']' . */ get_the_post_thumbnail( $_product_id, array( 25, 25 ) ),
284
  '<code>' . $_product_data['status'] . '</code>',
285
  $_product_data['title'],
286
+ '<a class="button" href="' . esc_url( add_query_arg( 'wcj_edit_product', $_product_id, remove_query_arg( array( 'wcj_edit_product_image_delete', 'wcj_delete_product' ) ) ) ) . '">' . __( 'Edit', 'woocommerce-jetpack' ) . '</a>
287
+ <a class="button" href="' . esc_url( add_query_arg( 'wcj_delete_product', $_product_id, remove_query_arg( array( 'wcj_edit_product_image_delete', 'wcj_edit_product' ) ) ) ) . '" onclick="return confirm(\'' . __( 'Are you sure?', 'woocommerce-jetpack' ) . '\')">' . __( 'Delete', 'woocommerce-jetpack' ) . '</a>',
288
  );
289
  }
290
+ echo wcj_get_table_html( $table_data, array( 'table_class' => 'shop_table shop_table_responsive my_account_orders' ) ); //phpcs:ignore
291
  }
292
  }
293
 
includes/class-wcj-product-custom-info.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Product Info
4
  *
5
- * @version 5.2.0
6
  * @since 2.4.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -12,11 +12,11 @@ if ( ! defined( 'ABSPATH' ) ) {
12
  exit; // Exit if accessed directly.
13
  }
14
 
15
- if ( ! class_exists( 'WCJ_Product_Custom_info' ) ) :
16
  /**
17
- * WCJ_Product_Custom_info.
18
  */
19
- class WCJ_Product_Custom_info extends WCJ_Module {
20
 
21
  /**
22
  * Constructor.
@@ -70,7 +70,7 @@ if ( ! class_exists( 'WCJ_Product_Custom_info' ) ) :
70
  /**
71
  * Check_content_and_filter.
72
  *
73
- * @version 2.9.0
74
  * @since 2.9.0
75
  * @param string $current_filter defines the current_filter.
76
  * @param string $current_filter_priority defines the current_filter_priority.
@@ -82,14 +82,14 @@ if ( ! class_exists( 'WCJ_Product_Custom_info' ) ) :
82
  return (
83
  '' !== wcj_get_option( 'wcj_product_custom_info_content_' . $single_or_archive . '_' . $i ) &&
84
  wcj_get_option( 'wcj_product_custom_info_hook_' . $single_or_archive . '_' . $i, $default_hook ) === $current_filter &&
85
- wcj_get_option( 'wcj_product_custom_info_priority_' . $single_or_archive . '_' . $i, 10 ) === $current_filter_priority
86
  );
87
  }
88
 
89
  /**
90
  * Check_included_and_excluded.
91
  *
92
- * @version 3.5.0
93
  * @since 2.9.0
94
  * @param int $product_id defines the product_id.
95
  * @param string $single_or_archive defines the single_or_archive.
@@ -107,8 +107,8 @@ if ( ! class_exists( 'WCJ_Product_Custom_info' ) ) :
107
  ( empty( $product_cats_to_include ) || wcj_is_product_term( $product_id, $product_cats_to_include, 'product_cat' ) ) &&
108
  ( empty( $product_tags_to_exclude ) || ! wcj_is_product_term( $product_id, $product_tags_to_exclude, 'product_tag' ) ) &&
109
  ( empty( $product_tags_to_include ) || wcj_is_product_term( $product_id, $product_tags_to_include, 'product_tag' ) ) &&
110
- ( empty( $products_to_exclude ) || ! in_array( $product_id, $products_to_exclude, true ) ) &&
111
- ( empty( $products_to_include ) || in_array( $product_id, $products_to_include, true ) )
112
  );
113
  }
114
 
@@ -137,4 +137,4 @@ if ( ! class_exists( 'WCJ_Product_Custom_info' ) ) :
137
 
138
  endif;
139
 
140
- return new WCJ_Product_Custom_info();
2
  /**
3
  * Booster for WooCommerce - Module - Product Info
4
  *
5
+ * @version 5.6.2
6
  * @since 2.4.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
12
  exit; // Exit if accessed directly.
13
  }
14
 
15
+ if ( ! class_exists( 'WCJ_Product_Custom_Info' ) ) :
16
  /**
17
+ * WCJ_Product_Custom_Info.
18
  */
19
+ class WCJ_Product_Custom_Info extends WCJ_Module {
20
 
21
  /**
22
  * Constructor.
70
  /**
71
  * Check_content_and_filter.
72
  *
73
+ * @version 5.6.2
74
  * @since 2.9.0
75
  * @param string $current_filter defines the current_filter.
76
  * @param string $current_filter_priority defines the current_filter_priority.
82
  return (
83
  '' !== wcj_get_option( 'wcj_product_custom_info_content_' . $single_or_archive . '_' . $i ) &&
84
  wcj_get_option( 'wcj_product_custom_info_hook_' . $single_or_archive . '_' . $i, $default_hook ) === $current_filter &&
85
+ wcj_get_option( 'wcj_product_custom_info_priority_' . $single_or_archive . '_' . $i, '10' ) === (string) $current_filter_priority
86
  );
87
  }
88
 
89
  /**
90
  * Check_included_and_excluded.
91
  *
92
+ * @version 5.6.2
93
  * @since 2.9.0
94
  * @param int $product_id defines the product_id.
95
  * @param string $single_or_archive defines the single_or_archive.
107
  ( empty( $product_cats_to_include ) || wcj_is_product_term( $product_id, $product_cats_to_include, 'product_cat' ) ) &&
108
  ( empty( $product_tags_to_exclude ) || ! wcj_is_product_term( $product_id, $product_tags_to_exclude, 'product_tag' ) ) &&
109
  ( empty( $product_tags_to_include ) || wcj_is_product_term( $product_id, $product_tags_to_include, 'product_tag' ) ) &&
110
+ ( empty( $products_to_exclude ) || ! in_array( (string) $product_id, $products_to_exclude, true ) ) &&
111
+ ( empty( $products_to_include ) || in_array( (string) $product_id, $products_to_include, true ) )
112
  );
113
  }
114
 
137
 
138
  endif;
139
 
140
+ return new WCJ_Product_Custom_Info();
includes/class-wcj-product-custom-visibility.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Product Custom Visibility
4
  *
5
- * @version 5.6.1
6
  * @since 3.2.4
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -21,7 +21,7 @@ if ( ! class_exists( 'WCJ_Product_Custom_Visibility' ) ) :
21
  /**
22
  * Constructor.
23
  *
24
- * @version 5.6.1
25
  * @since 3.2.4
26
  */
27
  public function __construct() {
@@ -34,7 +34,7 @@ if ( ! class_exists( 'WCJ_Product_Custom_Visibility' ) ) :
34
  $this->extra_desc = __( 'When enabled, module will add new "Booster: Product Custom Visibility" meta box to each product\'s edit page.', 'woocommerce-jetpack' ) . '<br>' .
35
  sprintf(
36
  /* translators: %s: translation added */
37
- __( 'You can add selection drop box to frontend with "%s" widget (set "Product custom visibility" as "Selector Type") or %s shortcode.', 'woocommerce-jetpack' ),
38
  __( 'Booster - Selector', 'woocommerce-jetpack' ),
39
  '<code>[wcj_selector selector_type="product_custom_visibility"]</code>'
40
  );
@@ -78,12 +78,17 @@ if ( ! class_exists( 'WCJ_Product_Custom_Visibility' ) ) :
78
  /**
79
  * Save_selection_in_session.
80
  *
81
- * @version 3.2.4
82
  * @since 3.2.4
83
  */
84
  public function save_selection_in_session() {
 
 
 
 
 
85
  wcj_session_maybe_start();
86
- if ( isset( $_REQUEST['wcj_product_custom_visibility_selector'] ) ) {
87
  wcj_session_set( 'wcj_selected_product_custom_visibility', sanitize_text_field( wp_unslash( $_REQUEST['wcj_product_custom_visibility_selector'] ) ) );
88
  }
89
  }
2
  /**
3
  * Booster for WooCommerce - Module - Product Custom Visibility
4
  *
5
+ * @version 5.6.2
6
  * @since 3.2.4
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
21
  /**
22
  * Constructor.
23
  *
24
+ * @version 5.6.2
25
  * @since 3.2.4
26
  */
27
  public function __construct() {
34
  $this->extra_desc = __( 'When enabled, module will add new "Booster: Product Custom Visibility" meta box to each product\'s edit page.', 'woocommerce-jetpack' ) . '<br>' .
35
  sprintf(
36
  /* translators: %s: translation added */
37
+ __( 'You can add selection drop box to frontend with "%1$s" widget (set "Product custom visibility" as "Selector Type") or %2$s shortcode.', 'woocommerce-jetpack' ),
38
  __( 'Booster - Selector', 'woocommerce-jetpack' ),
39
  '<code>[wcj_selector selector_type="product_custom_visibility"]</code>'
40
  );
78
  /**
79
  * Save_selection_in_session.
80
  *
81
+ * @version 5.6.2
82
  * @since 3.2.4
83
  */
84
  public function save_selection_in_session() {
85
+ $wpnonce = true;
86
+ if ( function_exists( 'wp_verify_nonce' ) ) {
87
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
88
+ }
89
+
90
  wcj_session_maybe_start();
91
+ if ( isset( $_REQUEST['wcj_product_custom_visibility_selector'] ) && $wpnonce ) {
92
  wcj_session_set( 'wcj_selected_product_custom_visibility', sanitize_text_field( wp_unslash( $_REQUEST['wcj_product_custom_visibility_selector'] ) ) );
93
  }
94
  }
includes/class-wcj-product-info.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Product Info V1 (Deprecated)
4
  *
5
- * @version 2.8.0
6
  * @author Pluggabl LLC.
7
  * @deprecated
8
  * @package Booster_For_WooCommerce/includes
@@ -155,9 +155,9 @@ if ( ! class_exists( 'WCJ_Product_Info' ) ) :
155
  public function add_product_info_filters( $single_or_archive ) {
156
  // Product Info.
157
  if ( ( 'yes' === wcj_get_option( 'wcj_product_info_on_' . $single_or_archive . '_enabled' ) ) &&
158
- ( '' != wcj_get_option( 'wcj_product_info_on_' . $single_or_archive ) ) &&
159
- ( '' != wcj_get_option( 'wcj_product_info_on_' . $single_or_archive . '_filter' ) ) &&
160
- ( '' != wcj_get_option( 'wcj_product_info_on_' . $single_or_archive . '_filter_priority' ) ) ) {
161
  add_action( wcj_get_option( 'wcj_product_info_on_' . $single_or_archive . '_filter' ), array( $this, 'product_info' ), wcj_get_option( 'wcj_product_info_on_' . $single_or_archive . '_filter_priority' ) );
162
  }
163
  // More product Info.
@@ -215,14 +215,14 @@ if ( ! class_exists( 'WCJ_Product_Info' ) ) :
215
  /**
216
  * Apply_product_info_short_codes.
217
  *
218
- * @version 2.4.0
219
  * @param string | array $the_product_info defines the the_product_info.
220
  * @param string $remove_on_empty defines the remove_on_empty.
221
  */
222
  public function apply_product_info_short_codes( $the_product_info, $remove_on_empty ) {
223
 
224
  $product_ids_to_exclude = wcj_get_option( 'wcj_product_info_products_to_exclude', '' );
225
- if ( '' != $product_ids_to_exclude ) {
226
  $product_ids_to_exclude = str_replace( ' ', '', $product_ids_to_exclude );
227
  $product_ids_to_exclude = explode( ',', $product_ids_to_exclude );
228
  $product_id = get_the_ID();
@@ -231,7 +231,7 @@ if ( ! class_exists( 'WCJ_Product_Info' ) ) :
231
  }
232
  }
233
 
234
- if ( '' == $the_product_info ) {
235
  return;
236
  }
237
 
@@ -295,10 +295,11 @@ if ( ! class_exists( 'WCJ_Product_Info' ) ) :
295
  * @param array $settings defines the settings.
296
  * @param string $single_or_archive defines the single_or_archive.
297
  *
298
- * @version 2.4.0
299
  */
300
  public function admin_add_product_info_fields( &$settings, $single_or_archive ) {
301
- for ( $i = 1; $i <= apply_filters( 'booster_option', 4, wcj_get_option( 'wcj_more_product_info_on_' . $single_or_archive . '_fields_total', 4 ) ); $i++ ) {
 
302
  $field_id = 'wcj_more_product_info_on_' . $single_or_archive . '_' . $i;
303
  $default_value = '';
304
  switch ( $i ) {
2
  /**
3
  * Booster for WooCommerce - Module - Product Info V1 (Deprecated)
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @deprecated
8
  * @package Booster_For_WooCommerce/includes
155
  public function add_product_info_filters( $single_or_archive ) {
156
  // Product Info.
157
  if ( ( 'yes' === wcj_get_option( 'wcj_product_info_on_' . $single_or_archive . '_enabled' ) ) &&
158
+ ( '' !== wcj_get_option( 'wcj_product_info_on_' . $single_or_archive ) ) &&
159
+ ( '' !== wcj_get_option( 'wcj_product_info_on_' . $single_or_archive . '_filter' ) ) &&
160
+ ( '' !== wcj_get_option( 'wcj_product_info_on_' . $single_or_archive . '_filter_priority' ) ) ) {
161
  add_action( wcj_get_option( 'wcj_product_info_on_' . $single_or_archive . '_filter' ), array( $this, 'product_info' ), wcj_get_option( 'wcj_product_info_on_' . $single_or_archive . '_filter_priority' ) );
162
  }
163
  // More product Info.
215
  /**
216
  * Apply_product_info_short_codes.
217
  *
218
+ * @version 5.6.2
219
  * @param string | array $the_product_info defines the the_product_info.
220
  * @param string $remove_on_empty defines the remove_on_empty.
221
  */
222
  public function apply_product_info_short_codes( $the_product_info, $remove_on_empty ) {
223
 
224
  $product_ids_to_exclude = wcj_get_option( 'wcj_product_info_products_to_exclude', '' );
225
+ if ( '' !== $product_ids_to_exclude ) {
226
  $product_ids_to_exclude = str_replace( ' ', '', $product_ids_to_exclude );
227
  $product_ids_to_exclude = explode( ',', $product_ids_to_exclude );
228
  $product_id = get_the_ID();
231
  }
232
  }
233
 
234
+ if ( '' === $the_product_info ) {
235
  return;
236
  }
237
 
295
  * @param array $settings defines the settings.
296
  * @param string $single_or_archive defines the single_or_archive.
297
  *
298
+ * @version 5.6.2
299
  */
300
  public function admin_add_product_info_fields( &$settings, $single_or_archive ) {
301
+ $wcj_more_product_info_on = apply_filters( 'booster_option', 4, wcj_get_option( 'wcj_more_product_info_on_' . $single_or_archive . '_fields_total', 4 ) );
302
+ for ( $i = 1; $i <= $wcj_more_product_info_on; $i++ ) {
303
  $field_id = 'wcj_more_product_info_on_' . $single_or_archive . '_' . $i;
304
  $default_value = '';
305
  switch ( $i ) {
includes/class-wcj-product-input-fields.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Product Input Fields
4
  *
5
- * @version 5.6.1
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -42,7 +42,7 @@ if ( ! class_exists( 'WCJ_Product_Input_Fields' ) ) :
42
  '</li>' .
43
  '<li>' . sprintf(
44
  /* translators: %s: translation added */
45
- __( '<strong>PHP code:</strong> by using %s function,<br> e.g.: %s', 'woocommerce-jetpack' ),
46
  '<code>do_shortcode()</code>',
47
  '<code>echo&nbsp;do_shortcode(&nbsp;\'[wcj_order_items_meta meta_key = "_wcj_product_input_fields_global_1]\'&nbsp;);</code>'
48
  ) .
@@ -152,12 +152,12 @@ if ( ! class_exists( 'WCJ_Product_Input_Fields' ) ) :
152
  /**
153
  * Handle_downloads.
154
  *
155
- * @version 2.5.0
156
  * @since 2.2.2
157
  */
158
  public function handle_downloads() {
159
- if ( isset( $_GET['wcj_download_file'] ) ) {
160
- $file_name = sanitize_text_field( wp_unslash( $_GET['wcj_download_file'] ) );
161
  $upload_dir = wcj_get_wcj_uploads_dir( 'input_fields_uploads' );
162
  $file_path = $upload_dir . '/' . $file_name;
163
  if ( wcj_is_user_role( 'administrator' ) || is_shop_manager() ) {
@@ -167,7 +167,7 @@ if ( ! class_exists( 'WCJ_Product_Input_Fields' ) ) :
167
  header( 'Content-disposition: attachment; filename=' . $file_name );
168
  header( 'Content-Transfer-Encoding: binary' );
169
  header( 'Content-Length: ' . filesize( $file_path ) );
170
- readfile( $file_path );
171
  exit();
172
  }
173
  }
2
  /**
3
  * Booster for WooCommerce - Module - Product Input Fields
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
42
  '</li>' .
43
  '<li>' . sprintf(
44
  /* translators: %s: translation added */
45
+ __( '<strong>PHP code:</strong> by using %1$s function,<br> e.g.: %2$s', 'woocommerce-jetpack' ),
46
  '<code>do_shortcode()</code>',
47
  '<code>echo&nbsp;do_shortcode(&nbsp;\'[wcj_order_items_meta meta_key = "_wcj_product_input_fields_global_1]\'&nbsp;);</code>'
48
  ) .
152
  /**
153
  * Handle_downloads.
154
  *
155
+ * @version 5.6.2
156
  * @since 2.2.2
157
  */
158
  public function handle_downloads() {
159
+ if ( isset( $_GET['wcj_download_file'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
160
+ $file_name = sanitize_text_field( wp_unslash( $_GET['wcj_download_file'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
161
  $upload_dir = wcj_get_wcj_uploads_dir( 'input_fields_uploads' );
162
  $file_path = $upload_dir . '/' . $file_name;
163
  if ( wcj_is_user_role( 'administrator' ) || is_shop_manager() ) {
167
  header( 'Content-disposition: attachment; filename=' . $file_name );
168
  header( 'Content-Transfer-Encoding: binary' );
169
  header( 'Content-Length: ' . filesize( $file_path ) );
170
+ readfile( $file_path ); //phpcs:ignore
171
  exit();
172
  }
173
  }
includes/class-wcj-product-listings.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Product Listings
4
  *
5
- * @version 5.3.6
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -80,7 +80,7 @@ if ( ! class_exists( 'WCJ_Product_Listings' ) ) :
80
  /**
81
  * Product_visibility_by_price.
82
  *
83
- * @version 3.2.4
84
  * @since 3.2.3
85
  * @todo grouped products
86
  * @todo (maybe) as new "Product Visibility by Price" module
@@ -98,7 +98,8 @@ if ( ! class_exists( 'WCJ_Product_Listings' ) ) :
98
  }
99
  $min_price_limit = wcj_get_option( 'wcj_product_listings_product_visibility_by_price_min', 0 );
100
  $max_price_limit = wcj_get_option( 'wcj_product_listings_product_visibility_by_price_max', 0 );
101
- return ( ( 0 != $min_price_limit && $min_price < $min_price_limit ) || ( 0 != $max_price_limit && $max_price > $max_price_limit ) ? false : $visible );
 
102
  }
103
 
104
  /**
@@ -138,7 +139,7 @@ if ( ! class_exists( 'WCJ_Product_Listings' ) ) :
138
  global $wp_query;
139
  if (
140
  is_product_category() &&
141
- get_option( 'woocommerce_category_archive_display' ) == 'subcategories' &&
142
  'no' === wcj_get_option( 'wcj_product_listings_show_products_if_no_cats_on_archives' )
143
  ) {
144
  $wp_query->post_count = 0;
@@ -146,7 +147,7 @@ if ( ! class_exists( 'WCJ_Product_Listings' ) ) :
146
  }
147
  if (
148
  is_shop() &&
149
- get_option( 'woocommerce_shop_page_display' ) == 'subcategories' &&
150
  'no' === wcj_get_option( 'wcj_product_listings_show_products_if_no_cats_on_shop' )
151
  ) {
152
  $wp_query->post_count = 0;
2
  /**
3
  * Booster for WooCommerce - Module - Product Listings
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
80
  /**
81
  * Product_visibility_by_price.
82
  *
83
+ * @version 5.6.2
84
  * @since 3.2.3
85
  * @todo grouped products
86
  * @todo (maybe) as new "Product Visibility by Price" module
98
  }
99
  $min_price_limit = wcj_get_option( 'wcj_product_listings_product_visibility_by_price_min', 0 );
100
  $max_price_limit = wcj_get_option( 'wcj_product_listings_product_visibility_by_price_max', 0 );
101
+
102
+ return ( ( (string) 0 !== $min_price_limit && $min_price < $min_price_limit ) || ( (string) 0 !== $max_price_limit && $max_price > $max_price_limit && '' !== $max_price_limit ) ? false : $visible );
103
  }
104
 
105
  /**
139
  global $wp_query;
140
  if (
141
  is_product_category() &&
142
+ get_option( 'woocommerce_category_archive_display' ) === 'subcategories' &&
143
  'no' === wcj_get_option( 'wcj_product_listings_show_products_if_no_cats_on_archives' )
144
  ) {
145
  $wp_query->post_count = 0;
147
  }
148
  if (
149
  is_shop() &&
150
+ get_option( 'woocommerce_shop_page_display' ) === 'subcategories' &&
151
  'no' === wcj_get_option( 'wcj_product_listings_show_products_if_no_cats_on_shop' )
152
  ) {
153
  $wp_query->post_count = 0;
includes/class-wcj-product-msrp.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Product MSRP
4
  *
5
- * @version 5.6.1
6
  * @since 3.6.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -141,14 +141,14 @@ if ( ! class_exists( 'WCJ_Product_MSRP' ) ) :
141
  /**
142
  * Save_msrp_input_variable.
143
  *
144
- * @version 3.6.0
145
  * @since 3.6.0
146
  * @param int $variation_id defines the variation_id.
147
  * @param int $i defines the i.
148
  */
149
  public function save_msrp_input_variable( $variation_id, $i ) {
150
- if ( isset( $_POST['variable_wcj_msrp'][ $i ] ) ) {
151
- update_post_meta( $variation_id, '_wcj_msrp', wc_clean( sanitize_text_field( wp_unslash( $_POST['variable_wcj_msrp'][ $i ] ) ) ) );
152
  }
153
  }
154
 
@@ -174,13 +174,14 @@ if ( ! class_exists( 'WCJ_Product_MSRP' ) ) :
174
  /**
175
  * Save_msrp_input.
176
  *
177
- * @version 3.6.0
178
  * @since 3.6.0
179
  * @param int $post_id defines the post_id.
180
  * @param string | array $__post defines the __post.
181
  */
182
  public function save_msrp_input( $post_id, $__post ) {
183
- if ( isset( $_POST['_wcj_msrp'] ) ) {
 
184
  update_post_meta( $post_id, '_wcj_msrp', sanitize_text_field( wp_unslash( $_POST['_wcj_msrp'] ) ) );
185
  }
186
  }
@@ -188,7 +189,7 @@ if ( ! class_exists( 'WCJ_Product_MSRP' ) ) :
188
  /**
189
  * Get_section_id_by_template_path.
190
  *
191
- * @version 5.1.0
192
  * @since 5.1.0
193
  *
194
  * @param string $template defines the template.
@@ -196,6 +197,7 @@ if ( ! class_exists( 'WCJ_Product_MSRP' ) ) :
196
  * @return string
197
  */
198
  public function get_section_id_by_template_path( $template ) {
 
199
  $archive_detection_method = wcj_get_option( 'wcj_product_msrp_archive_detection_method', 'loop' );
200
  $archive_detection_method = array_values( array_filter( explode( PHP_EOL, $archive_detection_method ) ) );
201
  return count(
@@ -205,13 +207,13 @@ if ( ! class_exists( 'WCJ_Product_MSRP' ) ) :
205
  return strpos( $template, $item ) !== false;
206
  }
207
  )
208
- ) == 0 && is_singular() ? 'single' : 'archives';
209
  }
210
 
211
  /**
212
  * Display.
213
  *
214
- * @version 5.6.1
215
  * @since 3.6.0
216
  * @todo (maybe) multicurrency
217
  * @todo (feature) (maybe) variable product's msrp: add another option to enter MSRP directly for the whole variable product, instead of taking first variation's MSRP
@@ -221,7 +223,8 @@ if ( ! class_exists( 'WCJ_Product_MSRP' ) ) :
221
  public function display( $price_html, $product ) {
222
  $section_id = $this->get_section_id_by_template_path( $this->current_template_path );
223
  $display = wcj_get_option( 'wcj_product_msrp_display_on_' . $section_id, 'show' );
224
- if ( 'hide' == $display ) {
 
225
  return $price_html;
226
  }
227
  $product_id = false;
@@ -254,7 +257,8 @@ if ( ! class_exists( 'WCJ_Product_MSRP' ) ) :
254
  }
255
  $msrp = apply_filters( 'wcj_product_msrp', get_post_meta( $product_id, $msrp_product_meta_name, true ), $product );
256
  $msrp = str_replace( ',', '.', $msrp );
257
- if ( '' == $msrp || 0 == $msrp ) {
 
258
  return $price_html;
259
  }
260
 
@@ -263,7 +267,7 @@ if ( ! class_exists( 'WCJ_Product_MSRP' ) ) :
263
  return $price_html;
264
  }
265
 
266
- if ( ( 'show_if_diff' == $display && $msrp == $price ) || ( 'show_if_higher' == $display && $msrp <= $price ) ) {
267
  return $price_html;
268
  }
269
 
@@ -291,7 +295,8 @@ if ( ! class_exists( 'WCJ_Product_MSRP' ) ) :
291
  '%you_save%' => str_replace( '%you_save_raw%', wc_price( $you_save_formula_result ), $you_save ),
292
  '%you_save_percent%' => str_replace( '%you_save_percent_raw%', round( $you_save_percent_formula_result, $you_save_round ), $you_save_percent ),
293
  );
294
- return ( 'before_price' == $position ?
 
295
  wcj_handle_replacements( $replaced_values, $template ) . $price_html :
296
  $price_html . wcj_handle_replacements( $replaced_values, $template ) );
297
  }
2
  /**
3
  * Booster for WooCommerce - Module - Product MSRP
4
  *
5
+ * @version 5.6.2
6
  * @since 3.6.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
141
  /**
142
  * Save_msrp_input_variable.
143
  *
144
+ * @version 5.6.2
145
  * @since 3.6.0
146
  * @param int $variation_id defines the variation_id.
147
  * @param int $i defines the i.
148
  */
149
  public function save_msrp_input_variable( $variation_id, $i ) {
150
+ if ( isset( $_POST['variable_wcj_msrp'][ $i ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
151
+ update_post_meta( $variation_id, '_wcj_msrp', wc_clean( sanitize_text_field( wp_unslash( $_POST['variable_wcj_msrp'][ $i ] ) ) ) ); // phpcs:ignore WordPress.Security.NonceVerification
152
  }
153
  }
154
 
174
  /**
175
  * Save_msrp_input.
176
  *
177
+ * @version 5.6.2
178
  * @since 3.6.0
179
  * @param int $post_id defines the post_id.
180
  * @param string | array $__post defines the __post.
181
  */
182
  public function save_msrp_input( $post_id, $__post ) {
183
+ $nonce = wp_verify_nonce( wp_unslash( isset( $_POST['woocommerce_meta_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['woocommerce_meta_nonce'] ) ) : '' ), 'woocommerce_save_data' );
184
+ if ( isset( $_POST['_wcj_msrp'] ) && $nonce ) {
185
  update_post_meta( $post_id, '_wcj_msrp', sanitize_text_field( wp_unslash( $_POST['_wcj_msrp'] ) ) );
186
  }
187
  }
189
  /**
190
  * Get_section_id_by_template_path.
191
  *
192
+ * @version 5.6.2
193
  * @since 5.1.0
194
  *
195
  * @param string $template defines the template.
197
  * @return string
198
  */
199
  public function get_section_id_by_template_path( $template ) {
200
+
201
  $archive_detection_method = wcj_get_option( 'wcj_product_msrp_archive_detection_method', 'loop' );
202
  $archive_detection_method = array_values( array_filter( explode( PHP_EOL, $archive_detection_method ) ) );
203
  return count(
207
  return strpos( $template, $item ) !== false;
208
  }
209
  )
210
+ ) === 0 && is_singular() ? 'single' : 'archives';
211
  }
212
 
213
  /**
214
  * Display.
215
  *
216
+ * @version 5.6.2
217
  * @since 3.6.0
218
  * @todo (maybe) multicurrency
219
  * @todo (feature) (maybe) variable product's msrp: add another option to enter MSRP directly for the whole variable product, instead of taking first variation's MSRP
223
  public function display( $price_html, $product ) {
224
  $section_id = $this->get_section_id_by_template_path( $this->current_template_path );
225
  $display = wcj_get_option( 'wcj_product_msrp_display_on_' . $section_id, 'show' );
226
+
227
+ if ( 'hide' === $display ) {
228
  return $price_html;
229
  }
230
  $product_id = false;
257
  }
258
  $msrp = apply_filters( 'wcj_product_msrp', get_post_meta( $product_id, $msrp_product_meta_name, true ), $product );
259
  $msrp = str_replace( ',', '.', $msrp );
260
+
261
+ if ( '' === $msrp || (string) 0 === $msrp ) {
262
  return $price_html;
263
  }
264
 
267
  return $price_html;
268
  }
269
 
270
+ if ( ( 'show_if_diff' === $display && $msrp === $price ) || ( 'show_if_higher' === $display && $msrp <= $price ) ) {
271
  return $price_html;
272
  }
273
 
295
  '%you_save%' => str_replace( '%you_save_raw%', wc_price( $you_save_formula_result ), $you_save ),
296
  '%you_save_percent%' => str_replace( '%you_save_percent_raw%', round( $you_save_percent_formula_result, $you_save_round ), $you_save_percent ),
297
  );
298
+
299
+ return ( 'before_price' === $position ?
300
  wcj_handle_replacements( $replaced_values, $template ) . $price_html :
301
  $price_html . wcj_handle_replacements( $replaced_values, $template ) );
302
  }
includes/class-wcj-product-open-pricing.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Product Open Pricing
4
  *
5
- * @version 5.6.1
6
  * @since 2.4.8
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -186,7 +186,7 @@ if ( ! class_exists( 'WCJ_Product_Open_Pricing' ) ) :
186
  /**
187
  * Save_meta_box_value.
188
  *
189
- * @version 2.5.0
190
  * @since 2.4.8
191
  * @param string $option_value defines the option_value.
192
  * @param string $option_name defines the option_name.
@@ -204,8 +204,8 @@ if ( ! class_exists( 'WCJ_Product_Open_Pricing' ) ) :
204
  'post_type' => 'product',
205
  'post_status' => 'any',
206
  'posts_per_page' => 1,
207
- 'meta_key' => '_wcj_product_open_price_enabled',
208
- 'meta_value' => 'yes',
209
  'post__not_in' => array( get_the_ID() ),
210
  );
211
  $loop = new WP_Query( $args );
@@ -233,11 +233,15 @@ if ( ! class_exists( 'WCJ_Product_Open_Pricing' ) ) :
233
  /**
234
  * Admin_notices.
235
  *
236
- * @version 2.4.8
237
  * @since 2.4.8
238
  */
239
  public function admin_notices() {
240
- if ( ! isset( $_GET['wcj_product_open_price_admin_notice'] ) ) {
 
 
 
 
241
  return;
242
  }
243
  ?><div class="error"><p>
@@ -359,16 +363,20 @@ if ( ! class_exists( 'WCJ_Product_Open_Pricing' ) ) :
359
  /**
360
  * Validate_open_price_on_add_to_cart.
361
  *
362
- * @version 4.2.0
363
  * @since 2.4.8
364
  * @param string $passed defines the passed.
365
  * @param int $product_id defines the product_id.
366
  */
367
  public function validate_open_price_on_add_to_cart( $passed, $product_id ) {
 
 
 
 
368
  $the_product = wc_get_product( $product_id );
369
  if ( $this->is_open_price_product( $the_product ) ) {
370
  // Empty price.
371
- if ( ! isset( $_POST['wcj_open_price'] ) || '' === $_POST['wcj_open_price'] ) {
372
  wc_add_notice( wcj_get_option( 'wcj_product_open_price_messages_required', __( 'Price is required!', 'woocommerce-jetpack' ) ), 'error' );
373
  return false;
374
  }
@@ -378,7 +386,7 @@ if ( ! class_exists( 'WCJ_Product_Open_Pricing' ) ) :
378
  wc_add_notice(
379
  wcj_handle_replacements(
380
  array(
381
- '%price%' => $this->wc_price_shop_currency( $_POST['wcj_open_price'] ),
382
  '%min_price%' => $this->wc_price_shop_currency( $min_price ),
383
  ),
384
  get_option( 'wcj_product_open_price_messages_to_small', __( 'Entered price is too small!', 'woocommerce-jetpack' ) )
@@ -393,7 +401,7 @@ if ( ! class_exists( 'WCJ_Product_Open_Pricing' ) ) :
393
  wc_add_notice(
394
  wcj_handle_replacements(
395
  array(
396
- '%price%' => $this->wc_price_shop_currency( $_POST['wcj_open_price'] ),
397
  '%max_price%' => $this->wc_price_shop_currency( $max_price ),
398
  ),
399
  get_option( 'wcj_product_open_price_messages_to_big', __( 'Entered price is too big!', 'woocommerce-jetpack' ) )
@@ -425,7 +433,7 @@ if ( ! class_exists( 'WCJ_Product_Open_Pricing' ) ) :
425
  /**
426
  * Add_open_price_to_cart_item_data.
427
  *
428
- * @version 4.4.0
429
  * @since 2.4.8
430
  * @todo [dev] (maybe) better conversion for Currency Switcher module (i.e. include rounding)
431
  * @param array $cart_item_data defines the cart_item_data.
@@ -433,8 +441,12 @@ if ( ! class_exists( 'WCJ_Product_Open_Pricing' ) ) :
433
  * @param int $variation_id defines the variation_id.
434
  */
435
  public function add_open_price_to_cart_item_data( $cart_item_data, $product_id, $variation_id ) {
436
- if ( isset( $_POST['wcj_open_price'] ) ) {
437
- $cart_item_data['wcj_open_price'] = $_POST['wcj_open_price'];
 
 
 
 
438
  $product_bundles_divide = wcj_get_option( 'wcj_product_open_price_woosb_product_bundles_divide', 'no' );
439
  if ( 'no' !== ( $product_bundles_divide ) ) {
440
  // "WPC Product Bundles for WooCommerce" plugin.
@@ -494,7 +506,7 @@ if ( ! class_exists( 'WCJ_Product_Open_Pricing' ) ) :
494
  /**
495
  * Add_open_price_input_field_to_frontend.
496
  *
497
- * @version 5.6.1
498
  * @since 2.4.8
499
  */
500
  public function add_open_price_input_field_to_frontend() {
@@ -503,6 +515,10 @@ if ( ! class_exists( 'WCJ_Product_Open_Pricing' ) ) :
503
  }
504
  $the_product = wc_get_product();
505
  if ( $this->is_open_price_product( $the_product ) ) {
 
 
 
 
506
  // Title.
507
  $title = wcj_get_option( 'wcj_product_open_price_label_frontend', __( 'Name Your Price', 'woocommerce-jetpack' ) );
508
  // Prices.
@@ -511,12 +527,12 @@ if ( ! class_exists( 'WCJ_Product_Open_Pricing' ) ) :
511
  $max_price = $this->maybe_convert_price_currency( get_post_meta( $_product_id, '_wcj_product_open_price_max_price', true ) );
512
  $default_price = $this->maybe_convert_price_currency( get_post_meta( $_product_id, '_wcj_product_open_price_default_price', true ) );
513
  // Input field.
514
- $value = ( isset( $_POST['wcj_open_price'] ) ) ? $_POST['wcj_open_price'] : $default_price;
515
  $default_price_step = 1 / pow( 10, absint( wcj_get_option( 'woocommerce_price_num_decimals', 2 ) ) );
516
  $custom_attributes = '';
517
  $custom_attributes .= 'step="' . wcj_get_option( 'wcj_product_open_price_price_step', $default_price_step ) . '" ';
518
- $custom_attributes .= ( '' == $min_price || 'no' === wcj_get_option( 'wcj_product_open_price_enable_js_validation', 'no' ) ) ? 'min="0" ' : 'min="' . $min_price . '" ';
519
- $custom_attributes .= ( '' == $max_price || 'no' === wcj_get_option( 'wcj_product_open_price_enable_js_validation', 'no' ) ) ? '' : 'max="' . $max_price . '" ';
520
  $input_field = '<input '
521
  . 'type="number" '
522
  . 'class="text" '
2
  /**
3
  * Booster for WooCommerce - Module - Product Open Pricing
4
  *
5
+ * @version 5.6.2
6
  * @since 2.4.8
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
186
  /**
187
  * Save_meta_box_value.
188
  *
189
+ * @version 5.6.2
190
  * @since 2.4.8
191
  * @param string $option_value defines the option_value.
192
  * @param string $option_name defines the option_name.
204
  'post_type' => 'product',
205
  'post_status' => 'any',
206
  'posts_per_page' => 1,
207
+ 'meta_key' => '_wcj_product_open_price_enabled', //phpcs:ignore
208
+ 'meta_value' => 'yes', //phpcs:ignore
209
  'post__not_in' => array( get_the_ID() ),
210
  );
211
  $loop = new WP_Query( $args );
233
  /**
234
  * Admin_notices.
235
  *
236
+ * @version 5.6.2
237
  * @since 2.4.8
238
  */
239
  public function admin_notices() {
240
+ $wpnonce = true;
241
+ if ( function_exists( 'wp_verify_nonce' ) ) {
242
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
243
+ }
244
+ if ( ! $wpnonce || ! isset( $_GET['wcj_product_open_price_admin_notice'] ) ) {
245
  return;
246
  }
247
  ?><div class="error"><p>
363
  /**
364
  * Validate_open_price_on_add_to_cart.
365
  *
366
+ * @version 5.6.2
367
  * @since 2.4.8
368
  * @param string $passed defines the passed.
369
  * @param int $product_id defines the product_id.
370
  */
371
  public function validate_open_price_on_add_to_cart( $passed, $product_id ) {
372
+ $wpnonce = true;
373
+ if ( function_exists( 'wp_verify_nonce' ) ) {
374
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
375
+ }
376
  $the_product = wc_get_product( $product_id );
377
  if ( $this->is_open_price_product( $the_product ) ) {
378
  // Empty price.
379
+ if ( ! $wpnonce || ! isset( $_POST['wcj_open_price'] ) || '' === $_POST['wcj_open_price'] ) {
380
  wc_add_notice( wcj_get_option( 'wcj_product_open_price_messages_required', __( 'Price is required!', 'woocommerce-jetpack' ) ), 'error' );
381
  return false;
382
  }
386
  wc_add_notice(
387
  wcj_handle_replacements(
388
  array(
389
+ '%price%' => $this->wc_price_shop_currency( sanitize_text_field( wp_unslash( $_POST['wcj_open_price'] ) ) ),
390
  '%min_price%' => $this->wc_price_shop_currency( $min_price ),
391
  ),
392
  get_option( 'wcj_product_open_price_messages_to_small', __( 'Entered price is too small!', 'woocommerce-jetpack' ) )
401
  wc_add_notice(
402
  wcj_handle_replacements(
403
  array(
404
+ '%price%' => $this->wc_price_shop_currency( sanitize_text_field( wp_unslash( $_POST['wcj_open_price'] ) ) ),
405
  '%max_price%' => $this->wc_price_shop_currency( $max_price ),
406
  ),
407
  get_option( 'wcj_product_open_price_messages_to_big', __( 'Entered price is too big!', 'woocommerce-jetpack' ) )
433
  /**
434
  * Add_open_price_to_cart_item_data.
435
  *
436
+ * @version 5.6.2
437
  * @since 2.4.8
438
  * @todo [dev] (maybe) better conversion for Currency Switcher module (i.e. include rounding)
439
  * @param array $cart_item_data defines the cart_item_data.
441
  * @param int $variation_id defines the variation_id.
442
  */
443
  public function add_open_price_to_cart_item_data( $cart_item_data, $product_id, $variation_id ) {
444
+ $wpnonce = true;
445
+ if ( function_exists( 'wp_verify_nonce' ) ) {
446
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
447
+ }
448
+ if ( $wpnonce && isset( $_POST['wcj_open_price'] ) ) {
449
+ $cart_item_data['wcj_open_price'] = sanitize_text_field( wp_unslash( $_POST['wcj_open_price'] ) );
450
  $product_bundles_divide = wcj_get_option( 'wcj_product_open_price_woosb_product_bundles_divide', 'no' );
451
  if ( 'no' !== ( $product_bundles_divide ) ) {
452
  // "WPC Product Bundles for WooCommerce" plugin.
506
  /**
507
  * Add_open_price_input_field_to_frontend.
508
  *
509
+ * @version 5.6.2
510
  * @since 2.4.8
511
  */
512
  public function add_open_price_input_field_to_frontend() {
515
  }
516
  $the_product = wc_get_product();
517
  if ( $this->is_open_price_product( $the_product ) ) {
518
+ $wpnonce = true;
519
+ if ( function_exists( 'wp_verify_nonce' ) ) {
520
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
521
+ }
522
  // Title.
523
  $title = wcj_get_option( 'wcj_product_open_price_label_frontend', __( 'Name Your Price', 'woocommerce-jetpack' ) );
524
  // Prices.
527
  $max_price = $this->maybe_convert_price_currency( get_post_meta( $_product_id, '_wcj_product_open_price_max_price', true ) );
528
  $default_price = $this->maybe_convert_price_currency( get_post_meta( $_product_id, '_wcj_product_open_price_default_price', true ) );
529
  // Input field.
530
+ $value = ( $wpnonce && isset( $_POST['wcj_open_price'] ) ) ? sanitize_text_field( wp_unslash( $_POST['wcj_open_price'] ) ) : $default_price;
531
  $default_price_step = 1 / pow( 10, absint( wcj_get_option( 'woocommerce_price_num_decimals', 2 ) ) );
532
  $custom_attributes = '';
533
  $custom_attributes .= 'step="' . wcj_get_option( 'wcj_product_open_price_price_step', $default_price_step ) . '" ';
534
+ $custom_attributes .= ( '' === $min_price || 'no' === wcj_get_option( 'wcj_product_open_price_enable_js_validation', 'no' ) ) ? 'min="0" ' : 'min="' . $min_price . '" ';
535
+ $custom_attributes .= ( '' === $max_price || 'no' === wcj_get_option( 'wcj_product_open_price_enable_js_validation', 'no' ) ) ? '' : 'max="' . $max_price . '" ';
536
  $input_field = '<input '
537
  . 'type="number" '
538
  . 'class="text" '
includes/class-wcj-product-price-by-formula.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Product Price by Formula
4
  *
5
- * @version 5.6.1
6
  * @since 2.5.1
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -12,16 +12,16 @@ if ( ! defined( 'ABSPATH' ) ) {
12
  exit;
13
  }
14
 
15
- if ( ! class_exists( 'WCJ_Product_Price_by_Formula' ) ) :
16
  /**
17
- * WCJ_Product_Price_by_Formula.
18
  */
19
- class WCJ_Product_Price_by_Formula extends WCJ_Module {
20
 
21
  /**
22
  * Constructor.
23
  *
24
- * @version 5.6.1
25
  * @since 2.5.1
26
  * @todo use WC math library instead of `PHPMathParser`
27
  */
@@ -39,11 +39,10 @@ if ( ! class_exists( 'WCJ_Product_Price_by_Formula' ) ) :
39
 
40
  add_action( 'add_meta_boxes', array( $this, 'add_meta_box' ) );
41
  add_action( 'save_post_product', array( $this, 'save_meta_box' ), PHP_INT_MAX, 2 );
42
-
43
  if (
44
  ( wcj_is_frontend() && 'yes' === wcj_get_option( 'wcj_product_price_by_formula_admin_scope', 'yes' ) ) ||
45
  ( 'no' === wcj_get_option( 'wcj_product_price_by_formula_admin_scope', 'yes' ) && ( wcj_is_frontend() || is_admin() ) ) ||
46
- isset( $_GET['wcj_create_products_xml'] )
47
  ) {
48
  wcj_add_change_price_hooks( $this, wcj_get_module_price_hooks_priority( 'product_price_by_formula' ), false );
49
  }
@@ -185,21 +184,20 @@ if ( ! class_exists( 'WCJ_Product_Price_by_Formula' ) ) :
185
  /**
186
  * Reset_settings.
187
  *
188
- * @version 5.3.0
189
  * @since 5.3.0
190
  */
191
  public function reset_settings() {
192
  if (
193
- isset( $_GET['wcj_reset_settings'] )
194
- && $this->id === $_GET['wcj_reset_settings']
195
  && wcj_is_user_role( 'administrator' )
196
- && ! isset( $_POST['save'] )
197
  && 'yes' === wcj_get_option( 'wcj_product_price_by_formula_reset_products', 'no' )
198
  ) {
199
  global $wpdb;
200
  $prefix = '_wcj_product_price_by_formula';
201
- $sql = "delete from {$wpdb->postmeta} where meta_key REGEXP %s";
202
- $wpdb->query( $wpdb->prepare( $sql, $prefix ) );
203
  }
204
  parent::reset_settings(); // TODO: Change the autogenerated stub.
205
  }
@@ -394,7 +392,7 @@ if ( ! class_exists( 'WCJ_Product_Price_by_Formula' ) ) :
394
  /**
395
  * Save_meta_box_value.
396
  *
397
- * @version 2.5.0
398
  * @since 2.5.0
399
  * @param string $option_value defines the option_value.
400
  * @param string $option_name defines the option_name.
@@ -412,8 +410,8 @@ if ( ! class_exists( 'WCJ_Product_Price_by_Formula' ) ) :
412
  'post_type' => 'product',
413
  'post_status' => 'any',
414
  'posts_per_page' => 1,
415
- 'meta_key' => '_wcj_product_price_by_formula_enabled',
416
- 'meta_value' => 'yes',
417
  'post__not_in' => array( get_the_ID() ),
418
  );
419
  $loop = new WP_Query( $args );
@@ -435,17 +433,17 @@ if ( ! class_exists( 'WCJ_Product_Price_by_Formula' ) ) :
435
  */
436
  public function add_notice_query_var( $location ) {
437
  remove_filter( 'redirect_post_location', array( $this, 'add_notice_query_var' ), 99 );
438
- return esc_url( add_query_arg( array( 'wcj_product_price_by_formula_admin_notice' => true ), $location ) );
439
  }
440
 
441
  /**
442
  * Admin_notices.
443
  *
444
- * @version 2.5.0
445
  * @since 2.5.0
446
  */
447
  public function admin_notices() {
448
- if ( ! isset( $_GET['wcj_product_price_by_formula_admin_notice'] ) ) {
449
  return;
450
  }
451
  ?><div class="error"><p>
@@ -497,4 +495,4 @@ if ( ! class_exists( 'WCJ_Product_Price_by_Formula' ) ) :
497
 
498
  endif;
499
 
500
- return new WCJ_Product_Price_by_Formula();
2
  /**
3
  * Booster for WooCommerce - Module - Product Price by Formula
4
  *
5
+ * @version 5.6.2
6
  * @since 2.5.1
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
12
  exit;
13
  }
14
 
15
+ if ( ! class_exists( 'WCJ_Product_Price_By_Formula' ) ) :
16
  /**
17
+ * WCJ_Product_Price_By_Formula.
18
  */
19
+ class WCJ_Product_Price_By_Formula extends WCJ_Module {
20
 
21
  /**
22
  * Constructor.
23
  *
24
+ * @version 5.6.2
25
  * @since 2.5.1
26
  * @todo use WC math library instead of `PHPMathParser`
27
  */
39
 
40
  add_action( 'add_meta_boxes', array( $this, 'add_meta_box' ) );
41
  add_action( 'save_post_product', array( $this, 'save_meta_box' ), PHP_INT_MAX, 2 );
 
42
  if (
43
  ( wcj_is_frontend() && 'yes' === wcj_get_option( 'wcj_product_price_by_formula_admin_scope', 'yes' ) ) ||
44
  ( 'no' === wcj_get_option( 'wcj_product_price_by_formula_admin_scope', 'yes' ) && ( wcj_is_frontend() || is_admin() ) ) ||
45
+ isset( $_GET['wcj_create_products_xml'] ) // phpcs:ignore WordPress.Security.NonceVerification
46
  ) {
47
  wcj_add_change_price_hooks( $this, wcj_get_module_price_hooks_priority( 'product_price_by_formula' ), false );
48
  }
184
  /**
185
  * Reset_settings.
186
  *
187
+ * @version 5.6.2
188
  * @since 5.3.0
189
  */
190
  public function reset_settings() {
191
  if (
192
+ isset( $_GET['wcj_reset_settings'] ) // phpcs:ignore WordPress.Security.NonceVerification
193
+ && $this->id === $_GET['wcj_reset_settings'] // phpcs:ignore WordPress.Security.NonceVerification
194
  && wcj_is_user_role( 'administrator' )
195
+ && ! isset( $_POST['save'] ) // phpcs:ignore WordPress.Security.NonceVerification
196
  && 'yes' === wcj_get_option( 'wcj_product_price_by_formula_reset_products', 'no' )
197
  ) {
198
  global $wpdb;
199
  $prefix = '_wcj_product_price_by_formula';
200
+ $wpdb->query( $wpdb->prepare( 'delete from ' . $wpdb->postmeta . ' where meta_key REGEXP %s', $prefix ) ); // WPCS: db call ok and cache ok.
 
201
  }
202
  parent::reset_settings(); // TODO: Change the autogenerated stub.
203
  }
392
  /**
393
  * Save_meta_box_value.
394
  *
395
+ * @version 5.6.2
396
  * @since 2.5.0
397
  * @param string $option_value defines the option_value.
398
  * @param string $option_name defines the option_name.
410
  'post_type' => 'product',
411
  'post_status' => 'any',
412
  'posts_per_page' => 1,
413
+ 'meta_key' => '_wcj_product_price_by_formula_enabled', //phpcs:ignore
414
+ 'meta_value' => 'yes', //phpcs:ignore
415
  'post__not_in' => array( get_the_ID() ),
416
  );
417
  $loop = new WP_Query( $args );
433
  */
434
  public function add_notice_query_var( $location ) {
435
  remove_filter( 'redirect_post_location', array( $this, 'add_notice_query_var' ), 99 );
436
+ return add_query_arg( array( 'wcj_product_price_by_formula_admin_notice' => true ), $location );
437
  }
438
 
439
  /**
440
  * Admin_notices.
441
  *
442
+ * @version 5.6.2
443
  * @since 2.5.0
444
  */
445
  public function admin_notices() {
446
+ if ( ! isset( $_GET['wcj_product_price_by_formula_admin_notice'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
447
  return;
448
  }
449
  ?><div class="error"><p>
495
 
496
  endif;
497
 
498
+ return new WCJ_Product_Price_By_Formula();
includes/class-wcj-product-tabs.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Product Tabs
4
  *
5
- * @version 5.5.7
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -20,10 +20,10 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
20
  /**
21
  * Constructor.
22
  *
23
- * @version 5.2.0
24
  * @todo code refactoring and clean-up
25
  */
26
- function __construct() {
27
 
28
  $this->id = 'product_tabs';
29
  $this->short_desc = __( 'Product Tabs', 'woocommerce-jetpack' );
@@ -48,10 +48,10 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
48
  /**
49
  * Enqueue_admin_scripts.
50
  *
51
- * @version 3.2.4
52
  * @since 3.2.4
53
  */
54
- function enqueue_admin_scripts() {
55
  if ( wcj_is_admin_product_edit_page() ) {
56
  wp_enqueue_script(
57
  'wcj-custom-tabs-yoast-seo',
@@ -66,28 +66,28 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
66
  /**
67
  * Get_tab_key.
68
  *
69
- * @version 3.1.0
70
  * @since 3.1.0
71
  * @param string $tab_option_key defines the tab_option_key.
72
  * @param string $scope defines the scope.
73
  * @param int $product_id defines the product_id.
74
  */
75
- function get_tab_key( $tab_option_key, $scope, $product_id = 0 ) {
76
  $tab_key = ( 'global' === $scope ?
77
  get_option( 'wcj_custom_product_tabs_key_' . $tab_option_key, $tab_option_key ) :
78
- get_post_meta( $product_id, '_' . 'wcj_custom_product_tabs_key_' . $tab_option_key, true )
79
  );
80
- return ( '' == $tab_key ? $tab_option_key : $tab_key );
81
  }
82
 
83
  /**
84
  * Customize_default_tabs.
85
  *
86
- * @version 3.1.0
87
  * @since 3.1.0
88
  * @param array $tabs defines the tabs.
89
  */
90
- function customize_default_tabs( $tabs ) {
91
 
92
  // Unset.
93
  if ( 'yes' === wcj_get_option( 'wcj_product_info_product_tabs_description_disable', 'no' ) ) {
@@ -102,20 +102,23 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
102
 
103
  // Priority and Title.
104
  if ( isset( $tabs['description'] ) ) {
 
105
  $tabs['description']['priority'] = apply_filters( 'booster_option', 10, wcj_get_option( 'wcj_product_info_product_tabs_description_priority', 10 ) );
106
- if ( '' != ( $title = wcj_get_option( 'wcj_product_info_product_tabs_description_title', '' ) ) ) {
107
  $tabs['description']['title'] = $title;
108
  }
109
  }
110
  if ( isset( $tabs['additional_information'] ) ) {
 
111
  $tabs['additional_information']['priority'] = apply_filters( 'booster_option', 20, wcj_get_option( 'wcj_product_info_product_tabs_additional_information_priority', 20 ) );
112
- if ( '' != ( $title = wcj_get_option( 'wcj_product_info_product_tabs_additional_information_title', '' ) ) ) {
113
  $tabs['additional_information']['title'] = $title;
114
  }
115
  }
116
  if ( isset( $tabs['reviews'] ) ) {
 
117
  $tabs['reviews']['priority'] = apply_filters( 'booster_option', 30, wcj_get_option( 'wcj_product_info_product_tabs_reviews_priority', 30 ) );
118
- if ( '' != ( $title = wcj_get_option( 'wcj_product_info_product_tabs_reviews_title', '' ) ) ) {
119
  $tabs['reviews']['title'] = $title;
120
  }
121
  }
@@ -127,7 +130,7 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
127
  /**
128
  * Gets local title, including from other possible languages when using WPML.
129
  *
130
- * @version 4.2.0
131
  * @since 4.2.0
132
  *
133
  * @param int $product_id defines the product_id.
@@ -136,19 +139,19 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
136
  *
137
  * @return mixed
138
  */
139
- function get_local_title( $product_id, $option_key, $i ) {
140
- $title = get_post_meta( $product_id, '_' . 'wcj_custom_product_tabs_title_' . $option_key, true );
141
- if (
142
- function_exists( 'icl_object_id' ) &&
143
- ! empty( $curr_language_product_id = icl_object_id( $product_id, 'product', true ) )
144
- ) {
145
- // Try to get title from wp_options first, like 'wcj_custom_product_tabs_title_local_default_1'
146
- $title_option = wcj_get_option( 'wcj_custom_product_tabs_title_' . 'local_default_' . $i, true );
147
- $title = ! empty( $title_option ) ? $title_option : $title;
148
-
149
- // Overwrite by post meta if there is any
150
- $translated_title = get_post_meta( $curr_language_product_id, '_' . 'wcj_custom_product_tabs_title_' . $option_key, true );
151
- $title = ! empty( $translated_title ) ? $translated_title : $title;
152
  }
153
  return $title;
154
  }
@@ -156,20 +159,21 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
156
  /**
157
  * Add_custom_product_tabs.
158
  *
159
- * @version 4.2.0
160
  * @since 3.1.0
161
  * @todo add visibility by user roles
162
  * @param string $scope defines the scope.
163
  * @param array $tabs defines the tabs.
164
  * @param int $product_id defines the product_id.
165
  */
166
- function add_custom_product_tabs( $scope, $tabs, $product_id ) {
167
  switch ( $scope ) {
168
  case 'global':
169
  $total_custom_tabs = apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_custom_product_tabs_global_total_number', 1 ) );
170
  break;
171
  default: // 'local'.
172
- if ( ! ( $total_custom_tabs = get_post_meta( $product_id, '_' . 'wcj_custom_product_tabs_local_total_number', true ) ) ) {
 
173
  $total_custom_tabs = apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_custom_product_tabs_local_total_number_default', 1 ) );
174
  }
175
  break;
@@ -185,17 +189,17 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
185
  $priority = wcj_get_option( 'wcj_custom_product_tabs_priority_' . $option_key, 40 );
186
  $link = wcj_get_option( 'wcj_custom_product_tabs_link_' . $option_key, '' );
187
  break;
188
- default: // 'local'
189
  $title = $this->get_local_title( $product_id, $option_key, $i );
190
- $content = get_post_meta( $product_id, '_' . 'wcj_custom_product_tabs_content_' . $option_key, true );
191
- $priority = get_post_meta( $product_id, '_' . 'wcj_custom_product_tabs_priority_' . $option_key, true );
192
- $link = get_post_meta( $product_id, '_' . 'wcj_custom_product_tabs_link_' . $option_key, true );
193
  if ( ! $priority ) {
194
  $priority = ( 50 + $i - 1 );
195
  }
196
  break;
197
  }
198
- if ( '' != $title && ( '' != do_shortcode( $content ) || '' != $link ) ) {
199
  // Adding the tab.
200
  $tab_key = $this->get_tab_key( $option_key, $scope, $product_id );
201
  $this->tab_option_keys[ $scope ][ $tab_key ] = $option_key;
@@ -213,10 +217,10 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
213
  /**
214
  * Customize the product tabs.
215
  *
216
- * @version 3.6.0
217
  * @param string $tabs defines the tabs.
218
  */
219
- function customize_product_tabs( $tabs ) {
220
 
221
  $product_id = wcj_maybe_get_product_id_wpml( get_the_ID() );
222
 
@@ -239,7 +243,7 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
239
  /**
240
  * Is_global_tab_visible.
241
  *
242
- * @version 2.8.0
243
  * @since 2.8.0
244
  * @param int $i defines the i.
245
  * @param int $_product_id defines the _product_id.
@@ -248,32 +252,32 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
248
 
249
  // Exclude by product id.
250
  $array_to_exclude = wcj_get_option( 'wcj_custom_product_tabs_global_hide_in_products_' . $i );
251
- if ( '' == $array_to_exclude || empty( $array_to_exclude ) ) {
252
  $list_to_exclude = wcj_get_option( 'wcj_custom_product_tabs_title_global_hide_in_product_ids_' . $i );
253
- if ( '' != $list_to_exclude ) {
254
  $array_to_exclude = explode( ',', $list_to_exclude );
255
  }
256
  }
257
- if ( '' != $array_to_exclude && ! empty( $array_to_exclude ) ) {
258
- if ( $array_to_exclude && in_array( $_product_id, $array_to_exclude ) ) {
259
  return false;
260
  }
261
  }
262
 
263
  // Exclude by product category.
264
  $array_to_exclude = wcj_get_option( 'wcj_custom_product_tabs_global_hide_in_cats_' . $i );
265
- if ( '' == $array_to_exclude || empty( $array_to_exclude ) ) {
266
  $list_to_exclude = wcj_get_option( 'wcj_custom_product_tabs_title_global_hide_in_cats_ids_' . $i );
267
- if ( '' != $list_to_exclude ) {
268
  $array_to_exclude = explode( ',', $list_to_exclude );
269
  }
270
  }
271
- if ( '' != $array_to_exclude && ! empty( $array_to_exclude ) ) {
272
  $do_exclude = false;
273
  $product_categories_objects = get_the_terms( $_product_id, 'product_cat' );
274
  if ( $product_categories_objects && ! empty( $product_categories_objects ) ) {
275
  foreach ( $product_categories_objects as $product_categories_object ) {
276
- if ( $array_to_exclude && in_array( $product_categories_object->term_id, $array_to_exclude ) ) {
277
  $do_exclude = true;
278
  break;
279
  }
@@ -286,12 +290,12 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
286
 
287
  // Exclude by product tag.
288
  $array_to_exclude = wcj_get_option( 'wcj_custom_product_tabs_global_hide_in_tags_' . $i );
289
- if ( '' != $array_to_exclude && ! empty( $array_to_exclude ) ) {
290
  $do_exclude = false;
291
  $product_tags_objects = get_the_terms( $_product_id, 'product_tag' );
292
  if ( $product_tags_objects && ! empty( $product_tags_objects ) ) {
293
  foreach ( $product_tags_objects as $product_tags_object ) {
294
- if ( $array_to_exclude && in_array( $product_tags_object->term_id, $array_to_exclude ) ) {
295
  $do_exclude = true;
296
  break;
297
  }
@@ -304,33 +308,33 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
304
 
305
  // Include by product id.
306
  $array_to_include = wcj_get_option( 'wcj_custom_product_tabs_global_show_in_products_' . $i );
307
- if ( '' == $array_to_include || empty( $array_to_include ) ) {
308
  $list_to_include = wcj_get_option( 'wcj_custom_product_tabs_title_global_show_in_product_ids_' . $i );
309
- if ( '' != $list_to_include ) {
310
  $array_to_include = explode( ',', $list_to_include );
311
  }
312
  }
313
- if ( '' != $array_to_include && ! empty( $array_to_include ) ) {
314
  // If NOT in array then hide this tab for this product.
315
- if ( $array_to_include && ! in_array( $_product_id, $array_to_include ) ) {
316
  return false;
317
  }
318
  }
319
 
320
  // Include by product category.
321
  $array_to_include = wcj_get_option( 'wcj_custom_product_tabs_global_show_in_cats_' . $i );
322
- if ( '' == $array_to_include || empty( $array_to_include ) ) {
323
  $list_to_include = wcj_get_option( 'wcj_custom_product_tabs_title_global_show_in_cats_ids_' . $i );
324
- if ( '' != $list_to_include ) {
325
  $array_to_include = explode( ',', $list_to_include );
326
  }
327
  }
328
- if ( '' != $array_to_include && ! empty( $array_to_include ) ) {
329
  $do_include = false;
330
  $product_categories_objects = get_the_terms( $_product_id, 'product_cat' );
331
  if ( $product_categories_objects && ! empty( $product_categories_objects ) ) {
332
  foreach ( $product_categories_objects as $product_categories_object ) {
333
- if ( $array_to_include && in_array( $product_categories_object->term_id, $array_to_include ) ) {
334
  $do_include = true;
335
  break;
336
  }
@@ -343,12 +347,12 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
343
 
344
  // Include by product tag.
345
  $array_to_include = wcj_get_option( 'wcj_custom_product_tabs_global_show_in_tags_' . $i );
346
- if ( '' != $array_to_include && ! empty( $array_to_include ) ) {
347
  $do_include = false;
348
  $product_tags_objects = get_the_terms( $_product_id, 'product_tag' );
349
  if ( $product_tags_objects && ! empty( $product_tags_objects ) ) {
350
  foreach ( $product_tags_objects as $product_tags_object ) {
351
- if ( $array_to_include && in_array( $product_tags_object->term_id, $array_to_include ) ) {
352
  $do_include = true;
353
  break;
354
  }
@@ -365,28 +369,28 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
365
  /**
366
  * Is_local_tab_visible.
367
  *
368
- * @version 2.4.7
369
  * @since 2.4.7
370
  * @param string $custom_tab_index defines the custom_tab_index.
371
  * @param int $product_id defines the product_id.
372
  */
373
- function is_local_tab_visible( $custom_tab_index, $product_id ) {
374
 
375
  // Exclude by product id.
376
  $array_to_exclude = wcj_get_option( 'wcj_custom_product_tabs_local_hide_in_products_' . $custom_tab_index );
377
- if ( '' != $array_to_exclude && ! empty( $array_to_exclude ) ) {
378
- if ( $array_to_exclude && in_array( $product_id, $array_to_exclude ) ) {
379
  return false;
380
  }
381
  }
382
 
383
  // Exclude by product category.
384
  $array_to_exclude = wcj_get_option( 'wcj_custom_product_tabs_local_hide_in_cats_' . $custom_tab_index );
385
- if ( '' != $array_to_exclude && ! empty( $array_to_exclude ) ) {
386
  $product_categories_objects = get_the_terms( $product_id, 'product_cat' );
387
  if ( $product_categories_objects && ! empty( $product_categories_objects ) ) {
388
  foreach ( $product_categories_objects as $product_categories_object ) {
389
- if ( $array_to_exclude && in_array( $product_categories_object->term_id, $array_to_exclude ) ) {
390
  return false;
391
  }
392
  }
@@ -395,11 +399,11 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
395
 
396
  // Exclude by product tag.
397
  $array_to_exclude = wcj_get_option( 'wcj_custom_product_tabs_local_hide_in_tags_' . $custom_tab_index );
398
- if ( '' != $array_to_exclude && ! empty( $array_to_exclude ) ) {
399
  $product_tags_objects = get_the_terms( $product_id, 'product_tag' );
400
  if ( $product_tags_objects && ! empty( $product_tags_objects ) ) {
401
  foreach ( $product_tags_objects as $product_tags_object ) {
402
- if ( $array_to_exclude && in_array( $product_tags_object->term_id, $array_to_exclude ) ) {
403
  return false;
404
  }
405
  }
@@ -408,21 +412,21 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
408
 
409
  // Include by product id.
410
  $array_to_include = wcj_get_option( 'wcj_custom_product_tabs_local_show_in_products_' . $custom_tab_index );
411
- if ( '' != $array_to_include && ! empty( $array_to_include ) ) {
412
  // If NOT in array then hide this tab for this product.
413
- if ( $array_to_include && ! in_array( $product_id, $array_to_include ) ) {
414
  return false;
415
  }
416
  }
417
 
418
  // Include by product category.
419
  $array_to_include = wcj_get_option( 'wcj_custom_product_tabs_local_show_in_cats_' . $custom_tab_index );
420
- if ( '' != $array_to_include && ! empty( $array_to_include ) ) {
421
  $do_include = false;
422
  $product_categories_objects = get_the_terms( $product_id, 'product_cat' );
423
  if ( $product_categories_objects && ! empty( $product_categories_objects ) ) {
424
  foreach ( $product_categories_objects as $product_categories_object ) {
425
- if ( $array_to_include && in_array( $product_categories_object->term_id, $array_to_include ) ) {
426
  $do_include = true;
427
  break;
428
  }
@@ -435,12 +439,12 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
435
 
436
  // Include by product tag.
437
  $array_to_include = wcj_get_option( 'wcj_custom_product_tabs_local_show_in_tags_' . $custom_tab_index );
438
- if ( '' != $array_to_include && ! empty( $array_to_include ) ) {
439
  $do_include = false;
440
  $product_tags_objects = get_the_terms( $product_id, 'product_tag' );
441
  if ( $product_tags_objects && ! empty( $product_tags_objects ) ) {
442
  foreach ( $product_tags_objects as $product_tags_object ) {
443
- if ( $array_to_include && in_array( $product_tags_object->term_id, $array_to_include ) ) {
444
  $do_include = true;
445
  break;
446
  }
@@ -457,13 +461,13 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
457
  /**
458
  * Get_js_link_script.
459
  *
460
- * @version 2.8.0
461
  * @since 2.8.0
462
  * @param string $link defines the link.
463
  * @param string $tab_key defines the tab_key.
464
  * @param string $do_open_in_new_window defines the do_open_in_new_window.
465
  */
466
- function get_js_link_script( $link, $tab_key, $do_open_in_new_window ) {
467
  $link = do_shortcode( $link );
468
  $command = ( 'yes' === $do_open_in_new_window ) ?
469
  'window.open("' . $link . '","_blank");' :
@@ -481,33 +485,38 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
481
  /**
482
  * Maybe_add_js_links.
483
  *
484
- * @version 3.6.0
485
  * @since 2.8.0
486
  */
487
- function maybe_add_js_links() {
488
- $current_post_id = wcj_maybe_get_product_id_wpml( get_the_ID() );
489
- // Global tabs
490
- for ( $i = 1; $i <= apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_custom_product_tabs_global_total_number', 1 ) ); $i++ ) {
 
 
491
  if ( $this->is_global_tab_visible( $i, $current_post_id ) ) {
492
- $key = 'global_' . $i;
493
- if ( '' != wcj_get_option( 'wcj_custom_product_tabs_title_' . $key, '' ) && '' != ( $link = wcj_get_option( 'wcj_custom_product_tabs_link_' . $key, '' ) ) ) {
494
- echo $this->get_js_link_script( $link, $this->get_tab_key( $key, 'global' ), wcj_get_option( 'wcj_custom_product_tabs_link_new_tab_' . $key, true ) );
 
495
  }
496
  }
497
  }
498
- // Local tabs
499
  if ( 'yes' !== wcj_get_option( 'wcj_custom_product_tabs_local_enabled', 'yes' ) ) {
500
  return;
501
  }
502
- if ( ! ( $total_custom_tabs = get_post_meta( $current_post_id, '_' . 'wcj_custom_product_tabs_local_total_number', true ) ) ) {
 
503
  $total_custom_tabs = apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_custom_product_tabs_local_total_number_default', 1 ) );
504
  }
505
  for ( $i = 1; $i <= $total_custom_tabs; $i++ ) {
506
  if ( $this->is_local_tab_visible( $i, $current_post_id ) ) {
507
- $key = 'local_' . $i;
508
- if ( '' != get_post_meta( $current_post_id, '_' . 'wcj_custom_product_tabs_title_' . $key, true ) ) {
509
- if ( '' != ( $link = get_post_meta( $current_post_id, '_' . 'wcj_custom_product_tabs_link_' . $key, true ) ) ) {
510
- echo $this->get_js_link_script( $link, $this->get_tab_key( $key, 'local', $current_post_id ), get_post_meta( $current_post_id, '_' . 'wcj_custom_product_tabs_link_new_tab_' . $key, true ) );
 
511
  }
512
  }
513
  }
@@ -517,11 +526,11 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
517
  /**
518
  * Get_tab_output.
519
  *
520
- * @version 3.4.5
521
  * @since 3.4.5
522
  * @param string $content defines the content.
523
  */
524
- function get_tab_output( $content ) {
525
  switch ( wcj_get_option( 'wcj_custom_product_tabs_general_content_processing', 'the_content' ) ) {
526
  case 'disabled':
527
  return $content;
@@ -535,35 +544,35 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
535
  /**
536
  * Create_new_custom_product_tab_local.
537
  *
538
- * @version 5.5.6
539
  * @param string $key defines the key.
540
  * @param string $tab defines the tab.
541
  */
542
- function create_new_custom_product_tab_local( $key, $tab ) {
543
- echo $this->get_tab_output( get_post_meta( wcj_maybe_get_product_id_wpml( get_the_ID() ), '_' . 'wcj_custom_product_tabs_content_' . $this->tab_option_keys['local'][ $key ], true ) );
544
  }
545
 
546
  /**
547
  * Create_new_custom_product_tab_global.
548
  *
549
- * @version 5.5.7
550
  * @param string $key defines the key.
551
  * @param string $tab defines the tab.
552
  */
553
- function create_new_custom_product_tab_global( $key, $tab ) {
554
- echo $this->get_tab_output( wcj_get_option( 'wcj_custom_product_tabs_content_' . $this->tab_option_keys['global'][ $key ] ) );
555
  }
556
 
557
 
558
  /**
559
  * Save_custom_tabs_meta_box.
560
  *
561
- * @version 3.1.0
562
  * @todo rewrite as standard `WCJ_Module` function
563
  * @param int $post_id defines the post_id.
564
  * @param string | array $post defines the post.
565
  */
566
- function save_custom_tabs_meta_box( $post_id, $post ) {
567
 
568
  // Check that we are saving with custom tab metabox displayed.
569
  if ( ! isset( $_POST['woojetpack_custom_tabs_save_post'] ) ) {
@@ -580,28 +589,31 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
580
  'wcj_custom_product_tabs_link_new_tab_local_',
581
  );
582
  $default_total_custom_tabs = apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_custom_product_tabs_local_total_number_default', 1 ) );
583
- $total_custom_tabs_before_saving = get_post_meta( $post_id, '_' . 'wcj_custom_product_tabs_local_total_number', true );
584
- $total_custom_tabs_before_saving = ( '' != $total_custom_tabs_before_saving ) ? $total_custom_tabs_before_saving : $default_total_custom_tabs;
 
 
585
  for ( $i = 1; $i <= $total_custom_tabs_before_saving; $i++ ) {
586
  if ( $this->is_local_tab_visible( $i, $post_id ) ) {
587
  foreach ( $option_names as $option_name ) {
588
- update_post_meta( $post_id, '_' . $option_name . $i, $_POST[ $option_name . $i ] );
 
589
  }
590
  }
591
  }
592
 
593
- // Save: total custom tabs number
594
  $option_name = 'wcj_custom_product_tabs_local_total_number';
595
- $total_custom_tabs = isset( $_POST[ $option_name ] ) ? $_POST[ $option_name ] : $default_total_custom_tabs;
596
- update_post_meta( $post_id, '_' . $option_name, $_POST[ $option_name ] );
597
  }
598
 
599
  /**
600
  * Add_custom_tabs_meta_box.
601
  *
602
- * @version 2.4.7
603
  */
604
- function add_custom_tabs_meta_box() {
605
  add_meta_box(
606
  'wc-jetpack-custom-tabs',
607
  __( 'Booster: Custom Tabs', 'woocommerce-jetpack' ),
@@ -615,13 +627,13 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
615
  /**
616
  * Create_custom_tabs_meta_box.
617
  *
618
- * @version 3.6.0
619
  */
620
- function create_custom_tabs_meta_box() {
621
-
622
- $current_post_id = wcj_maybe_get_product_id_wpml( get_the_ID() );
623
- $option_name = 'wcj_custom_product_tabs_local_total_number';
624
- if ( ! ( $total_custom_tabs = get_post_meta( $current_post_id, '_' . $option_name, true ) ) ) {
625
  $total_custom_tabs = apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_custom_product_tabs_local_total_number_default', 1 ) );
626
  }
627
  $html = '';
@@ -643,7 +655,7 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
643
  $html .= '</td>';
644
  $html .= '</tr>';
645
  $html .= '</table>';
646
- echo $html;
647
 
648
  $options = array(
649
  array(
@@ -685,15 +697,16 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
685
  $enable_wp_editor = ( 'yes' === wcj_get_option( 'wcj_custom_product_tabs_local_wp_editor_enabled', 'yes' ) );
686
  for ( $i = 1; $i <= $total_custom_tabs; $i++ ) {
687
  $is_local_tab_visible = $this->is_local_tab_visible( $i, $current_post_id );
688
- $readonly = ( $is_local_tab_visible ) ? '' : ' readonly'; // not really used
689
  $disabled = ( $is_local_tab_visible ) ? '' : ' - ' . __( 'Disabled', 'woocommerce-jetpack' );
690
  $data = array();
691
  $html = '<hr>';
692
  $html .= '<h4>' . __( 'Custom Product Tab', 'woocommerce-jetpack' ) . ' #' . $i . $disabled . '</h4>';
693
  if ( $is_local_tab_visible ) {
694
  foreach ( $options as $option ) {
695
- $option_id = $option['id'] . $i;
696
- if ( ! ( $option_value = get_post_meta( $current_post_id, '_' . $option_id, true ) ) ) {
 
697
  $option_value = wcj_get_option( $option['id'] . 'default_' . $i, '' );
698
  if ( '' === $option_value && 'wcj_custom_product_tabs_priority_local_' === $option['id'] ) {
699
  $option_value = ( 50 + $i - 1 );
@@ -726,8 +739,8 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
726
  }
727
  break;
728
  }
729
- if ( '' != $the_field ) {
730
- if ( isset( $option['desc_tip'] ) && '' != $option['desc_tip'] ) {
731
  $option['title'] .= '<span class="woocommerce-help-tip" data-tip="' . $option['desc_tip'] . '"></span>';
732
  }
733
  $data[] = array( $option['title'], $the_field );
@@ -743,10 +756,10 @@ if ( ! class_exists( 'WCJ_Product_Tabs' ) ) :
743
  )
744
  );
745
  }
746
- echo $html;
747
  }
748
  $html = '<input type="hidden" name="woojetpack_custom_tabs_save_post" value="woojetpack_custom_tabs_save_post">';
749
- echo $html;
750
  }
751
 
752
  }
2
  /**
3
  * Booster for WooCommerce - Module - Product Tabs
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
20
  /**
21
  * Constructor.
22
  *
23
+ * @version 5.6.2
24
  * @todo code refactoring and clean-up
25
  */
26
+ public function __construct() {
27
 
28
  $this->id = 'product_tabs';
29
  $this->short_desc = __( 'Product Tabs', 'woocommerce-jetpack' );
48
  /**
49
  * Enqueue_admin_scripts.
50
  *
51
+ * @version 5.6.2
52
  * @since 3.2.4
53
  */
54
+ public function enqueue_admin_scripts() {
55
  if ( wcj_is_admin_product_edit_page() ) {
56
  wp_enqueue_script(
57
  'wcj-custom-tabs-yoast-seo',
66
  /**
67
  * Get_tab_key.
68
  *
69
+ * @version 5.6.2
70
  * @since 3.1.0
71
  * @param string $tab_option_key defines the tab_option_key.
72
  * @param string $scope defines the scope.
73
  * @param int $product_id defines the product_id.
74
  */
75
+ public function get_tab_key( $tab_option_key, $scope, $product_id = 0 ) {
76
  $tab_key = ( 'global' === $scope ?
77
  get_option( 'wcj_custom_product_tabs_key_' . $tab_option_key, $tab_option_key ) :
78
+ get_post_meta( $product_id, '_wcj_custom_product_tabs_key_' . $tab_option_key, true )
79
  );
80
+ return ( '' === $tab_key || null === $tab_key ? $tab_option_key : $tab_key );
81
  }
82
 
83
  /**
84
  * Customize_default_tabs.
85
  *
86
+ * @version 5.6.2
87
  * @since 3.1.0
88
  * @param array $tabs defines the tabs.
89
  */
90
+ public function customize_default_tabs( $tabs ) {
91
 
92
  // Unset.
93
  if ( 'yes' === wcj_get_option( 'wcj_product_info_product_tabs_description_disable', 'no' ) ) {
102
 
103
  // Priority and Title.
104
  if ( isset( $tabs['description'] ) ) {
105
+ $title = wcj_get_option( 'wcj_product_info_product_tabs_description_title', '' );
106
  $tabs['description']['priority'] = apply_filters( 'booster_option', 10, wcj_get_option( 'wcj_product_info_product_tabs_description_priority', 10 ) );
107
+ if ( '' !== $title ) {
108
  $tabs['description']['title'] = $title;
109
  }
110
  }
111
  if ( isset( $tabs['additional_information'] ) ) {
112
+ $title = wcj_get_option( 'wcj_product_info_product_tabs_additional_information_title', '' );
113
  $tabs['additional_information']['priority'] = apply_filters( 'booster_option', 20, wcj_get_option( 'wcj_product_info_product_tabs_additional_information_priority', 20 ) );
114
+ if ( '' !== $title ) {
115
  $tabs['additional_information']['title'] = $title;
116
  }
117
  }
118
  if ( isset( $tabs['reviews'] ) ) {
119
+ $title = wcj_get_option( 'wcj_product_info_product_tabs_reviews_title', '' );
120
  $tabs['reviews']['priority'] = apply_filters( 'booster_option', 30, wcj_get_option( 'wcj_product_info_product_tabs_reviews_priority', 30 ) );
121
+ if ( '' !== $title ) {
122
  $tabs['reviews']['title'] = $title;
123
  }
124
  }
130
  /**
131
  * Gets local title, including from other possible languages when using WPML.
132
  *
133
+ * @version 5.6.2
134
  * @since 4.2.0
135
  *
136
  * @param int $product_id defines the product_id.
139
  *
140
  * @return mixed
141
  */
142
+ public function get_local_title( $product_id, $option_key, $i ) {
143
+ $title = get_post_meta( $product_id, '_wcj_custom_product_tabs_title_' . $option_key, true );
144
+ if ( function_exists( 'icl_object_id' ) ) {
145
+ if ( ! empty( icl_object_id( $product_id, 'product', true ) ) ) {
146
+ $curr_language_product_id = ! empty( icl_object_id( $product_id, 'product', true ) );
147
+ // Try to get title from wp_options first, like 'wcj_custom_product_tabs_title_local_default_1'.
148
+ $title_option = wcj_get_option( 'wcj_custom_product_tabs_title_local_default_' . $i, true );
149
+ $title = ! empty( $title_option ) ? $title_option : $title;
150
+
151
+ // Overwrite by post meta if there is any.
152
+ $translated_title = get_post_meta( $curr_language_product_id, '_wcj_custom_product_tabs_title_' . $option_key, true );
153
+ $title = ! empty( $translated_title ) ? $translated_title : $title;
154
+ }
155
  }
156
  return $title;
157
  }
159
  /**
160
  * Add_custom_product_tabs.
161
  *
162
+ * @version 5.6.2
163
  * @since 3.1.0
164
  * @todo add visibility by user roles
165
  * @param string $scope defines the scope.
166
  * @param array $tabs defines the tabs.
167
  * @param int $product_id defines the product_id.
168
  */
169
+ public function add_custom_product_tabs( $scope, $tabs, $product_id ) {
170
  switch ( $scope ) {
171
  case 'global':
172
  $total_custom_tabs = apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_custom_product_tabs_global_total_number', 1 ) );
173
  break;
174
  default: // 'local'.
175
+ $total_custom_tabs = get_post_meta( $product_id, '_wcj_custom_product_tabs_local_total_number', true );
176
+ if ( ! $total_custom_tabs ) {
177
  $total_custom_tabs = apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_custom_product_tabs_local_total_number_default', 1 ) );
178
  }
179
  break;
189
  $priority = wcj_get_option( 'wcj_custom_product_tabs_priority_' . $option_key, 40 );
190
  $link = wcj_get_option( 'wcj_custom_product_tabs_link_' . $option_key, '' );
191
  break;
192
+ default: // 'local'.
193
  $title = $this->get_local_title( $product_id, $option_key, $i );
194
+ $content = get_post_meta( $product_id, '_wcj_custom_product_tabs_content_' . $option_key, true );
195
+ $priority = get_post_meta( $product_id, '_wcj_custom_product_tabs_priority_' . $option_key, true );
196
+ $link = get_post_meta( $product_id, '_wcj_custom_product_tabs_link_' . $option_key, true );
197
  if ( ! $priority ) {
198
  $priority = ( 50 + $i - 1 );
199
  }
200
  break;
201
  }
202
+ if ( '' !== $title && ( '' !== do_shortcode( $content ) || '' !== $link ) ) {
203
  // Adding the tab.
204
  $tab_key = $this->get_tab_key( $option_key, $scope, $product_id );
205
  $this->tab_option_keys[ $scope ][ $tab_key ] = $option_key;
217
  /**
218
  * Customize the product tabs.
219
  *
220
+ * @version 5.6.2
221
  * @param string $tabs defines the tabs.
222
  */
223
+ public function customize_product_tabs( $tabs ) {
224
 
225
  $product_id = wcj_maybe_get_product_id_wpml( get_the_ID() );
226
 
243
  /**
244
  * Is_global_tab_visible.
245
  *
246
+ * @version 5.6.2
247
  * @since 2.8.0
248
  * @param int $i defines the i.
249
  * @param int $_product_id defines the _product_id.
252
 
253
  // Exclude by product id.
254
  $array_to_exclude = wcj_get_option( 'wcj_custom_product_tabs_global_hide_in_products_' . $i );
255
+ if ( '' === $array_to_exclude || empty( $array_to_exclude ) ) {
256
  $list_to_exclude = wcj_get_option( 'wcj_custom_product_tabs_title_global_hide_in_product_ids_' . $i );
257
+ if ( '' !== $list_to_exclude && null !== $list_to_exclude ) {
258
  $array_to_exclude = explode( ',', $list_to_exclude );
259
  }
260
  }
261
+ if ( '' !== $array_to_exclude && ! empty( $array_to_exclude ) ) {
262
+ if ( $array_to_exclude && in_array( (string) $_product_id, $array_to_exclude, true ) ) {
263
  return false;
264
  }
265
  }
266
 
267
  // Exclude by product category.
268
  $array_to_exclude = wcj_get_option( 'wcj_custom_product_tabs_global_hide_in_cats_' . $i );
269
+ if ( '' === $array_to_exclude || empty( $array_to_exclude ) ) {
270
  $list_to_exclude = wcj_get_option( 'wcj_custom_product_tabs_title_global_hide_in_cats_ids_' . $i );
271
+ if ( '' !== $list_to_exclude && null !== $list_to_exclude ) {
272
  $array_to_exclude = explode( ',', $list_to_exclude );
273
  }
274
  }
275
+ if ( '' !== $array_to_exclude && ! empty( $array_to_exclude ) ) {
276
  $do_exclude = false;
277
  $product_categories_objects = get_the_terms( $_product_id, 'product_cat' );
278
  if ( $product_categories_objects && ! empty( $product_categories_objects ) ) {
279
  foreach ( $product_categories_objects as $product_categories_object ) {
280
+ if ( $array_to_exclude && in_array( (string) $product_categories_object->term_id, $array_to_exclude, true ) ) {
281
  $do_exclude = true;
282
  break;
283
  }
290
 
291
  // Exclude by product tag.
292
  $array_to_exclude = wcj_get_option( 'wcj_custom_product_tabs_global_hide_in_tags_' . $i );
293
+ if ( '' !== $array_to_exclude && ! empty( $array_to_exclude ) ) {
294
  $do_exclude = false;
295
  $product_tags_objects = get_the_terms( $_product_id, 'product_tag' );
296
  if ( $product_tags_objects && ! empty( $product_tags_objects ) ) {
297
  foreach ( $product_tags_objects as $product_tags_object ) {
298
+ if ( $array_to_exclude && in_array( (string) $product_tags_object->term_id, $array_to_exclude, true ) ) {
299
  $do_exclude = true;
300
  break;
301
  }
308
 
309
  // Include by product id.
310
  $array_to_include = wcj_get_option( 'wcj_custom_product_tabs_global_show_in_products_' . $i );
311
+ if ( '' === $array_to_include || empty( $array_to_include ) ) {
312
  $list_to_include = wcj_get_option( 'wcj_custom_product_tabs_title_global_show_in_product_ids_' . $i );
313
+ if ( '' !== $list_to_include && null !== $list_to_include ) {
314
  $array_to_include = explode( ',', $list_to_include );
315
  }
316
  }
317
+ if ( '' !== $array_to_include && ! empty( $array_to_include ) ) {
318
  // If NOT in array then hide this tab for this product.
319
+ if ( $array_to_include && ! in_array( (string) $_product_id, $array_to_include, true ) ) {
320
  return false;
321
  }
322
  }
323
 
324
  // Include by product category.
325
  $array_to_include = wcj_get_option( 'wcj_custom_product_tabs_global_show_in_cats_' . $i );
326
+ if ( '' === $array_to_include || empty( $array_to_include ) ) {
327
  $list_to_include = wcj_get_option( 'wcj_custom_product_tabs_title_global_show_in_cats_ids_' . $i );
328
+ if ( '' !== $list_to_include && null !== $list_to_include ) {
329
  $array_to_include = explode( ',', $list_to_include );
330
  }
331
  }
332
+ if ( '' !== $array_to_include && ! empty( $array_to_include ) ) {
333
  $do_include = false;
334
  $product_categories_objects = get_the_terms( $_product_id, 'product_cat' );
335
  if ( $product_categories_objects && ! empty( $product_categories_objects ) ) {
336
  foreach ( $product_categories_objects as $product_categories_object ) {
337
+ if ( $array_to_include && in_array( (string) $product_categories_object->term_id, $array_to_include, true ) ) {
338
  $do_include = true;
339
  break;
340
  }
347
 
348
  // Include by product tag.
349
  $array_to_include = wcj_get_option( 'wcj_custom_product_tabs_global_show_in_tags_' . $i );
350
+ if ( '' !== $array_to_include && ! empty( $array_to_include ) ) {
351
  $do_include = false;
352
  $product_tags_objects = get_the_terms( $_product_id, 'product_tag' );
353
  if ( $product_tags_objects && ! empty( $product_tags_objects ) ) {
354
  foreach ( $product_tags_objects as $product_tags_object ) {
355
+ if ( $array_to_include && in_array( (string) $product_tags_object->term_id, $array_to_include, true ) ) {
356
  $do_include = true;
357
  break;
358
  }
369
  /**
370
  * Is_local_tab_visible.
371
  *
372
+ * @version 5.6.2
373
  * @since 2.4.7
374
  * @param string $custom_tab_index defines the custom_tab_index.
375
  * @param int $product_id defines the product_id.
376
  */
377
+ public function is_local_tab_visible( $custom_tab_index, $product_id ) {
378
 
379
  // Exclude by product id.
380
  $array_to_exclude = wcj_get_option( 'wcj_custom_product_tabs_local_hide_in_products_' . $custom_tab_index );
381
+ if ( '' !== $array_to_exclude && ! empty( $array_to_exclude ) ) {
382
+ if ( $array_to_exclude && in_array( (string) $product_id, $array_to_exclude, true ) ) {
383
  return false;
384
  }
385
  }
386
 
387
  // Exclude by product category.
388
  $array_to_exclude = wcj_get_option( 'wcj_custom_product_tabs_local_hide_in_cats_' . $custom_tab_index );
389
+ if ( '' !== $array_to_exclude && ! empty( $array_to_exclude ) ) {
390
  $product_categories_objects = get_the_terms( $product_id, 'product_cat' );
391
  if ( $product_categories_objects && ! empty( $product_categories_objects ) ) {
392
  foreach ( $product_categories_objects as $product_categories_object ) {
393
+ if ( $array_to_exclude && in_array( (string) $product_categories_object->term_id, $array_to_exclude, true ) ) {
394
  return false;
395
  }
396
  }
399
 
400
  // Exclude by product tag.
401
  $array_to_exclude = wcj_get_option( 'wcj_custom_product_tabs_local_hide_in_tags_' . $custom_tab_index );
402
+ if ( '' !== $array_to_exclude && ! empty( $array_to_exclude ) ) {
403
  $product_tags_objects = get_the_terms( $product_id, 'product_tag' );
404
  if ( $product_tags_objects && ! empty( $product_tags_objects ) ) {
405
  foreach ( $product_tags_objects as $product_tags_object ) {
406
+ if ( $array_to_exclude && in_array( (string) $product_tags_object->term_id, $array_to_exclude, true ) ) {
407
  return false;
408
  }
409
  }
412
 
413
  // Include by product id.
414
  $array_to_include = wcj_get_option( 'wcj_custom_product_tabs_local_show_in_products_' . $custom_tab_index );
415
+ if ( '' !== $array_to_include && ! empty( $array_to_include ) ) {
416
  // If NOT in array then hide this tab for this product.
417
+ if ( $array_to_include && ! in_array( (string) $product_id, $array_to_include, true ) ) {
418
  return false;
419
  }
420
  }
421
 
422
  // Include by product category.
423
  $array_to_include = wcj_get_option( 'wcj_custom_product_tabs_local_show_in_cats_' . $custom_tab_index );
424
+ if ( '' !== $array_to_include && ! empty( $array_to_include ) ) {
425
  $do_include = false;
426
  $product_categories_objects = get_the_terms( $product_id, 'product_cat' );
427
  if ( $product_categories_objects && ! empty( $product_categories_objects ) ) {
428
  foreach ( $product_categories_objects as $product_categories_object ) {
429
+ if ( $array_to_include && in_array( (string) $product_categories_object->term_id, $array_to_include, true ) ) {
430
  $do_include = true;
431
  break;
432
  }
439
 
440
  // Include by product tag.
441
  $array_to_include = wcj_get_option( 'wcj_custom_product_tabs_local_show_in_tags_' . $custom_tab_index );
442
+ if ( '' !== $array_to_include && ! empty( $array_to_include ) ) {
443
  $do_include = false;
444
  $product_tags_objects = get_the_terms( $product_id, 'product_tag' );
445
  if ( $product_tags_objects && ! empty( $product_tags_objects ) ) {
446
  foreach ( $product_tags_objects as $product_tags_object ) {
447
+ if ( $array_to_include && in_array( (string) $product_tags_object->term_id, $array_to_include, true ) ) {
448
  $do_include = true;
449
  break;
450
  }
461
  /**
462
  * Get_js_link_script.
463
  *
464
+ * @version 5.6.2
465
  * @since 2.8.0
466
  * @param string $link defines the link.
467
  * @param string $tab_key defines the tab_key.
468
  * @param string $do_open_in_new_window defines the do_open_in_new_window.
469
  */
470
+ public function get_js_link_script( $link, $tab_key, $do_open_in_new_window ) {
471
  $link = do_shortcode( $link );
472
  $command = ( 'yes' === $do_open_in_new_window ) ?
473
  'window.open("' . $link . '","_blank");' :
485
  /**
486
  * Maybe_add_js_links.
487
  *
488
+ * @version 5.6.2
489
  * @since 2.8.0
490
  */
491
+ public function maybe_add_js_links() {
492
+ $current_post_id = wcj_maybe_get_product_id_wpml( get_the_ID() );
493
+ $wcj_custom_product_tabs_global_total_number = apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_custom_product_tabs_global_total_number', 1 ) );
494
+ // Global tabs.
495
+ for ( $i = 1; $i <= $wcj_custom_product_tabs_global_total_number; $i++ ) {
496
+
497
  if ( $this->is_global_tab_visible( $i, $current_post_id ) ) {
498
+ $key = 'global_' . $i;
499
+ $link = wcj_get_option( 'wcj_custom_product_tabs_link_' . $key, '' );
500
+ if ( '' !== wcj_get_option( 'wcj_custom_product_tabs_title_' . $key, '' ) && '' !== $link ) {
501
+ echo wp_kses_post( $this->get_js_link_script( $link, $this->get_tab_key( $key, 'global' ), wcj_get_option( 'wcj_custom_product_tabs_link_new_tab_' . $key, true ) ) );
502
  }
503
  }
504
  }
505
+ // Local tabs.
506
  if ( 'yes' !== wcj_get_option( 'wcj_custom_product_tabs_local_enabled', 'yes' ) ) {
507
  return;
508
  }
509
+ $total_custom_tabs = get_post_meta( $current_post_id, '_wcj_custom_product_tabs_local_total_number', true );
510
+ if ( ! $total_custom_tabs ) {
511
  $total_custom_tabs = apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_custom_product_tabs_local_total_number_default', 1 ) );
512
  }
513
  for ( $i = 1; $i <= $total_custom_tabs; $i++ ) {
514
  if ( $this->is_local_tab_visible( $i, $current_post_id ) ) {
515
+ $key = 'local_' . $i;
516
+ $link = get_post_meta( $current_post_id, '_wcj_custom_product_tabs_link_' . $key, true );
517
+ if ( '' !== get_post_meta( $current_post_id, '_wcj_custom_product_tabs_title_' . $key, true ) ) {
518
+ if ( '' !== $link ) {
519
+ echo wp_kses_post( $this->get_js_link_script( $link, $this->get_tab_key( $key, 'local', $current_post_id ), get_post_meta( $current_post_id, '_wcj_custom_product_tabs_link_new_tab_' . $key, true ) ) );
520
  }
521
  }
522
  }
526
  /**
527
  * Get_tab_output.
528
  *
529
+ * @version 5.6.2
530
  * @since 3.4.5
531
  * @param string $content defines the content.
532
  */
533
+ public function get_tab_output( $content ) {
534
  switch ( wcj_get_option( 'wcj_custom_product_tabs_general_content_processing', 'the_content' ) ) {
535
  case 'disabled':
536
  return $content;
544
  /**
545
  * Create_new_custom_product_tab_local.
546
  *
547
+ * @version 5.6.2
548
  * @param string $key defines the key.
549
  * @param string $tab defines the tab.
550
  */
551
+ public function create_new_custom_product_tab_local( $key, $tab ) {
552
+ echo $this->get_tab_output( get_post_meta( wcj_maybe_get_product_id_wpml( get_the_ID() ), '_wcj_custom_product_tabs_content_' . $this->tab_option_keys['local'][ $key ], true ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
553
  }
554
 
555
  /**
556
  * Create_new_custom_product_tab_global.
557
  *
558
+ * @version 5.6.2
559
  * @param string $key defines the key.
560
  * @param string $tab defines the tab.
561
  */
562
+ public function create_new_custom_product_tab_global( $key, $tab ) {
563
+ echo $this->get_tab_output( wcj_get_option( 'wcj_custom_product_tabs_content_' . $this->tab_option_keys['global'][ $key ] ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
564
  }
565
 
566
 
567
  /**
568
  * Save_custom_tabs_meta_box.
569
  *
570
+ * @version 5.6.2
571
  * @todo rewrite as standard `WCJ_Module` function
572
  * @param int $post_id defines the post_id.
573
  * @param string | array $post defines the post.
574
  */
575
+ public function save_custom_tabs_meta_box( $post_id, $post ) {
576
 
577
  // Check that we are saving with custom tab metabox displayed.
578
  if ( ! isset( $_POST['woojetpack_custom_tabs_save_post'] ) ) {
589
  'wcj_custom_product_tabs_link_new_tab_local_',
590
  );
591
  $default_total_custom_tabs = apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_custom_product_tabs_local_total_number_default', 1 ) );
592
+ $total_custom_tabs_before_saving = get_post_meta( $post_id, '_wcj_custom_product_tabs_local_total_number', true );
593
+ $total_custom_tabs_before_saving = ( '' !== $total_custom_tabs_before_saving && null !== $total_custom_tabs_before_saving && '' !== $total_custom_tabs_before_saving ) ? $total_custom_tabs_before_saving : $default_total_custom_tabs;
594
+ $wpnonce = wp_verify_nonce( wp_unslash( isset( $_POST['woocommerce_meta_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['woocommerce_meta_nonce'] ) ) : '' ), 'woocommerce_save_data' );
595
+
596
  for ( $i = 1; $i <= $total_custom_tabs_before_saving; $i++ ) {
597
  if ( $this->is_local_tab_visible( $i, $post_id ) ) {
598
  foreach ( $option_names as $option_name ) {
599
+ $sanitized_option_name = $wpnonce && isset( $_POST[ $option_name . $i ] ) ? sanitize_text_field( wp_unslash( $_POST[ $option_name . $i ] ) ) : '';
600
+ update_post_meta( $post_id, '_' . $option_name . $i, sanitize_text_field( wp_unslash( $sanitized_option_name ) ) );
601
  }
602
  }
603
  }
604
 
605
+ // Save: total custom tabs number.
606
  $option_name = 'wcj_custom_product_tabs_local_total_number';
607
+ $total_custom_tabs = isset( $_POST[ $option_name ] ) ? sanitize_text_field( wp_unslash( $_POST[ $option_name ] ) ) : $default_total_custom_tabs;
608
+ update_post_meta( $post_id, '_' . $option_name, sanitize_text_field( wp_unslash( $_POST[ $option_name ] ) ) );
609
  }
610
 
611
  /**
612
  * Add_custom_tabs_meta_box.
613
  *
614
+ * @version 5.6.2
615
  */
616
+ public function add_custom_tabs_meta_box() {
617
  add_meta_box(
618
  'wc-jetpack-custom-tabs',
619
  __( 'Booster: Custom Tabs', 'woocommerce-jetpack' ),
627
  /**
628
  * Create_custom_tabs_meta_box.
629
  *
630
+ * @version 5.6.2
631
  */
632
+ public function create_custom_tabs_meta_box() {
633
+ $current_post_id = wcj_maybe_get_product_id_wpml( get_the_ID() );
634
+ $option_name = 'wcj_custom_product_tabs_local_total_number';
635
+ $total_custom_tabs = get_post_meta( $current_post_id, '_' . $option_name, true );
636
+ if ( ! $total_custom_tabs ) {
637
  $total_custom_tabs = apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_custom_product_tabs_local_total_number_default', 1 ) );
638
  }
639
  $html = '';
655
  $html .= '</td>';
656
  $html .= '</tr>';
657
  $html .= '</table>';
658
+ echo wp_kses_post( $html );
659
 
660
  $options = array(
661
  array(
697
  $enable_wp_editor = ( 'yes' === wcj_get_option( 'wcj_custom_product_tabs_local_wp_editor_enabled', 'yes' ) );
698
  for ( $i = 1; $i <= $total_custom_tabs; $i++ ) {
699
  $is_local_tab_visible = $this->is_local_tab_visible( $i, $current_post_id );
700
+ $readonly = ( $is_local_tab_visible ) ? '' : ' readonly'; // not really used.
701
  $disabled = ( $is_local_tab_visible ) ? '' : ' - ' . __( 'Disabled', 'woocommerce-jetpack' );
702
  $data = array();
703
  $html = '<hr>';
704
  $html .= '<h4>' . __( 'Custom Product Tab', 'woocommerce-jetpack' ) . ' #' . $i . $disabled . '</h4>';
705
  if ( $is_local_tab_visible ) {
706
  foreach ( $options as $option ) {
707
+ $option_id = $option['id'] . $i;
708
+ $option_value = get_post_meta( $current_post_id, '_' . $option_id, true );
709
+ if ( ! $option_value ) {
710
  $option_value = wcj_get_option( $option['id'] . 'default_' . $i, '' );
711
  if ( '' === $option_value && 'wcj_custom_product_tabs_priority_local_' === $option['id'] ) {
712
  $option_value = ( 50 + $i - 1 );
739
  }
740
  break;
741
  }
742
+ if ( '' !== $the_field ) {
743
+ if ( isset( $option['desc_tip'] ) && '' !== $option['desc_tip'] && null !== $option['desc_tip'] ) {
744
  $option['title'] .= '<span class="woocommerce-help-tip" data-tip="' . $option['desc_tip'] . '"></span>';
745
  }
746
  $data[] = array( $option['title'], $the_field );
756
  )
757
  );
758
  }
759
+ echo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
760
  }
761
  $html = '<input type="hidden" name="woojetpack_custom_tabs_save_post" value="woojetpack_custom_tabs_save_post">';
762
+ echo wp_kses_post( $html );
763
  }
764
 
765
  }
includes/class-wcj-products-per-page.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Products per Page
4
  *
5
- * @version 5.6.1
6
  * @since 2.6.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -53,7 +53,7 @@ if ( ! class_exists( 'WCJ_Products_Per_Page' ) ) :
53
  /**
54
  * Add_products_per_page_form.
55
  *
56
- * @version 5.6.1
57
  * @since 2.5.3
58
  */
59
  public function add_products_per_page_form() {
@@ -63,7 +63,8 @@ if ( ! class_exists( 'WCJ_Products_Per_Page' ) ) :
63
  $products_per_page = $this->get_current_products_per_page_number( false );
64
 
65
  $paged = get_query_var( 'paged' );
66
- if ( 0 == $paged ) {
 
67
  $paged = 1;
68
  }
69
 
@@ -93,11 +94,12 @@ if ( ! class_exists( 'WCJ_Products_Per_Page' ) ) :
93
  $html .= '<form action="' . esc_url( remove_query_arg( 'paged' ) ) . '" method="' . $form_method . '">';
94
  $_text = wcj_get_option(
95
  'wcj_products_per_page_text',
96
- __( 'Products <strong>%from% - %to%</strong> from <strong>%total%</strong>. Products on page %select_form%', 'woocommerce-jetpack' )
 
97
  );
98
- $html .= str_replace( array( '%from%', '%to%', '%total%', '%select_form%' ), array( $products_from, $products_to, $products_total, $select_form ), $_text );
99
- $html .= '</form>';
100
- $html .= wcj_get_option( 'wcj_products_per_page_text_after', '</div>' );
101
 
102
  echo wp_kses_post( $html );
103
  }
@@ -131,17 +133,22 @@ if ( ! class_exists( 'WCJ_Products_Per_Page' ) ) :
131
  /**
132
  * Get_current_products_per_page_number.
133
  *
134
- * @version 4.7.0
135
  * @since 3.8.0
136
  * @param string $do_save defines the do_save.
137
  */
138
  public function get_current_products_per_page_number( $do_save ) {
 
 
 
 
139
  $products_per_page = $this->get_saved_products_per_page_number();
140
- if ( isset( $_REQUEST['wcj_products_per_page'] ) && ! empty( $_REQUEST['wcj_products_per_page'] ) ) {
 
141
  if ( $do_save ) {
142
- $this->save_products_per_page_number( intval( sanitize_text_field( $_REQUEST['wcj_products_per_page'] ) ) );
143
  }
144
- return intval( sanitize_text_field( $_REQUEST['wcj_products_per_page'] ) );
145
  } elseif ( $products_per_page ) {
146
  return $products_per_page;
147
  } else {
@@ -152,7 +159,7 @@ if ( ! class_exists( 'WCJ_Products_Per_Page' ) ) :
152
  /**
153
  * Save_products_per_page_number.
154
  *
155
- * @version 3.8.0
156
  * @since 3.8.0
157
  * @param int $products_per_page defines the products_per_page.
158
  */
@@ -162,14 +169,15 @@ if ( ! class_exists( 'WCJ_Products_Per_Page' ) ) :
162
  wcj_session_set( 'wcj_products_per_page', $products_per_page );
163
  break;
164
  default: // 'cookie'
165
- setcookie( 'wcj_products_per_page', $products_per_page, ( time() + 1209600 ), '/', $_SERVER['SERVER_NAME'], false );
 
166
  }
167
  }
168
 
169
  /**
170
  * Get_saved_products_per_page_number.
171
  *
172
- * @version 3.8.0
173
  * @since 3.8.0
174
  */
175
  public function get_saved_products_per_page_number() {
@@ -177,7 +185,7 @@ if ( ! class_exists( 'WCJ_Products_Per_Page' ) ) :
177
  case 'session':
178
  return wcj_session_get( 'wcj_products_per_page', false );
179
  default: // 'cookie'
180
- return ( isset( $_COOKIE['wcj_products_per_page'] ) ? $_COOKIE['wcj_products_per_page'] : false );
181
  }
182
  }
183
 
2
  /**
3
  * Booster for WooCommerce - Module - Products per Page
4
  *
5
+ * @version 5.6.2
6
  * @since 2.6.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
53
  /**
54
  * Add_products_per_page_form.
55
  *
56
+ * @version 5.6.2
57
  * @since 2.5.3
58
  */
59
  public function add_products_per_page_form() {
63
  $products_per_page = $this->get_current_products_per_page_number( false );
64
 
65
  $paged = get_query_var( 'paged' );
66
+
67
+ if ( 0 === $paged ) {
68
  $paged = 1;
69
  }
70
 
94
  $html .= '<form action="' . esc_url( remove_query_arg( 'paged' ) ) . '" method="' . $form_method . '">';
95
  $_text = wcj_get_option(
96
  'wcj_products_per_page_text',
97
+ /* translators: %s: translators Added */
98
+ __( 'Products <strong>%1$from% - %to%</strong> from <strong>%total%</strong>. Products on page %2$select_form%', 'woocommerce-jetpack' )
99
  );
100
+ $html .= str_replace( array( '%from%', '%to%', '%total%', '%select_form%' ), array( $products_from, $products_to, $products_total, $select_form ), $_text );
101
+ $html .= '</form>';
102
+ $html .= wcj_get_option( 'wcj_products_per_page_text_after', '</div>' );
103
 
104
  echo wp_kses_post( $html );
105
  }
133
  /**
134
  * Get_current_products_per_page_number.
135
  *
136
+ * @version 5.6.2
137
  * @since 3.8.0
138
  * @param string $do_save defines the do_save.
139
  */
140
  public function get_current_products_per_page_number( $do_save ) {
141
+ $wpnonce = true;
142
+ if ( function_exists( 'wp_verify_nonce' ) ) {
143
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
144
+ }
145
  $products_per_page = $this->get_saved_products_per_page_number();
146
+
147
+ if ( isset( $_REQUEST['wcj_products_per_page'] ) && ! empty( $_REQUEST['wcj_products_per_page'] ) && $wpnonce ) {
148
  if ( $do_save ) {
149
+ $this->save_products_per_page_number( intval( sanitize_text_field( wp_unslash( $_REQUEST['wcj_products_per_page'] ) ) ) );
150
  }
151
+ return intval( sanitize_text_field( wp_unslash( $_REQUEST['wcj_products_per_page'] ) ) );
152
  } elseif ( $products_per_page ) {
153
  return $products_per_page;
154
  } else {
159
  /**
160
  * Save_products_per_page_number.
161
  *
162
+ * @version 5.6.2
163
  * @since 3.8.0
164
  * @param int $products_per_page defines the products_per_page.
165
  */
169
  wcj_session_set( 'wcj_products_per_page', $products_per_page );
170
  break;
171
  default: // 'cookie'
172
+ $server_name = isset( $_SERVER['SERVER_NAME'] ) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_NAME'] ) ) : '';
173
+ setcookie( 'wcj_products_per_page', $products_per_page, ( time() + 1209600 ), '/', $server_name, false );
174
  }
175
  }
176
 
177
  /**
178
  * Get_saved_products_per_page_number.
179
  *
180
+ * @version 5.6.2
181
  * @since 3.8.0
182
  */
183
  public function get_saved_products_per_page_number() {
185
  case 'session':
186
  return wcj_session_get( 'wcj_products_per_page', false );
187
  default: // 'cookie'
188
+ return ( isset( $_COOKIE['wcj_products_per_page'] ) ? sanitize_text_field( wp_unslash( $_COOKIE['wcj_products_per_page'] ) ) : false );
189
  }
190
  }
191
 
includes/class-wcj-products-xml.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Products XML
4
  *
5
- * @version 5.5.9
6
  * @since 2.5.7
7
  * @author Pluggabl LLC.
8
  * @todo create all files at once (manually and synchronize update)
@@ -111,18 +111,18 @@ if ( ! class_exists( 'WCJ_Products_XML' ) ) :
111
  /**
112
  * Admin_notices.
113
  *
114
- * @version 5.4.9
115
  * @since 2.5.7
116
  */
117
  public function admin_notices() {
118
- if ( isset( $_GET['wcj_create_products_xml_result'] ) ) {
119
- if ( 0 == $_GET['wcj_create_products_xml_result'] ) {
120
  $class = 'notice notice-error';
121
  $message = __( 'An error has occurred while creating products XML file.', 'woocommerce-jetpack' );
122
  } else {
123
  $class = 'notice notice-success is-dismissible';
124
  /* translators: %s: translation added */
125
- $message = sprintf( __( 'Products XML file #%s created successfully.', 'woocommerce-jetpack' ), sanitize_text_field( $_GET['wcj_create_products_xml_result'] ) );
126
  }
127
  echo '<div class="' . wp_kses_post( $class ) . '"><p>' . wp_kses_post( $message ) . '</p></div>';
128
  }
@@ -131,15 +131,15 @@ if ( ! class_exists( 'WCJ_Products_XML' ) ) :
131
  /**
132
  * Wcj_create_products_xml.
133
  *
134
- * @version 5.5.9
135
  * @since 2.5.7
136
  */
137
  public function wcj_create_products_xml() {
138
- if ( isset( $_GET['wcj_create_products_xml'] ) ) {
139
- $file_num = $_GET['wcj_create_products_xml'];
140
  $result = $this->create_products_xml( $file_num );
141
  if ( false !== $result ) {
142
- update_option( 'wcj_products_time_file_created_' . $file_num, current_time( 'timestamp' ) );
143
  }
144
  wp_safe_redirect( add_query_arg( 'wcj_create_products_xml_result', ( false === $result ? 0 : $file_num ), remove_query_arg( 'wcj_create_products_xml' ) ) );
145
  exit;
@@ -149,7 +149,7 @@ if ( ! class_exists( 'WCJ_Products_XML' ) ) :
149
  /**
150
  * Create_products_xml_cron.
151
  *
152
- * @version 2.6.0
153
  * @since 2.5.7
154
  * @param string $interval defines the interval.
155
  * @param int $file_num defines the file_num.
@@ -157,7 +157,7 @@ if ( ! class_exists( 'WCJ_Products_XML' ) ) :
157
  public function create_products_xml_cron( $interval, $file_num ) {
158
  $result = $this->create_products_xml( $file_num );
159
  if ( false !== $result ) {
160
- update_option( 'wcj_products_time_file_created_' . $file_num, current_time( 'timestamp' ) );
161
  }
162
  die();
163
  }
@@ -177,7 +177,7 @@ if ( ! class_exists( 'WCJ_Products_XML' ) ) :
177
  /**
178
  * Create_products_xml.
179
  *
180
- * @version 3.9.0
181
  * @since 2.5.7
182
  * @param int $file_num defines the file_num.
183
  */
@@ -208,8 +208,8 @@ if ( ! class_exists( 'WCJ_Products_XML' ) ) :
208
  'order' => $order,
209
  'offset' => $offset,
210
  );
211
- if ( 'all' != $products_scope ) {
212
- $args['meta_query'] = WC()->query->get_meta_query();
213
  switch ( $products_scope ) {
214
  case 'sale_only':
215
  $args['post__in'] = array_merge( array( 0 ), wc_get_product_ids_on_sale() );
@@ -233,7 +233,7 @@ if ( ! class_exists( 'WCJ_Products_XML' ) ) :
233
  }
234
  if ( ! empty( $products_cats_in_ids ) ) {
235
  if ( ! isset( $args['tax_query'] ) ) {
236
- $args['tax_query'] = array();
237
  }
238
  $args['tax_query'][] = array(
239
  'taxonomy' => 'product_cat',
@@ -244,7 +244,7 @@ if ( ! class_exists( 'WCJ_Products_XML' ) ) :
244
  }
245
  if ( ! empty( $products_cats_ex_ids ) ) {
246
  if ( ! isset( $args['tax_query'] ) ) {
247
- $args['tax_query'] = array();
248
  }
249
  $args['tax_query'][] = array(
250
  'taxonomy' => 'product_cat',
@@ -255,7 +255,7 @@ if ( ! class_exists( 'WCJ_Products_XML' ) ) :
255
  }
256
  if ( ! empty( $products_tags_in_ids ) ) {
257
  if ( ! isset( $args['tax_query'] ) ) {
258
- $args['tax_query'] = array();
259
  }
260
  $args['tax_query'][] = array(
261
  'taxonomy' => 'product_tag',
@@ -266,7 +266,7 @@ if ( ! class_exists( 'WCJ_Products_XML' ) ) :
266
  }
267
  if ( ! empty( $products_tags_ex_ids ) ) {
268
  if ( ! isset( $args['tax_query'] ) ) {
269
- $args['tax_query'] = array();
270
  }
271
  $args['tax_query'][] = array(
272
  'taxonomy' => 'product_tag',
@@ -280,7 +280,7 @@ if ( ! class_exists( 'WCJ_Products_XML' ) ) :
280
  break;
281
  }
282
  while ( $loop->have_posts() ) {
283
- if ( -1 != $max && $counter >= $max ) {
284
  break;
285
  }
286
  $loop->the_post();
@@ -288,13 +288,13 @@ if ( ! class_exists( 'WCJ_Products_XML' ) ) :
288
  $counter++;
289
  }
290
  $offset += $block_size;
291
- if ( -1 != $max && $counter >= $max ) {
292
  break;
293
  }
294
  }
295
  wp_reset_postdata();
296
- return file_put_contents(
297
- ABSPATH . wcj_get_option( 'wcj_products_xml_file_path_' . $file_num, ( ( 1 == $file_num ) ? 'products.xml' : 'products_' . $file_num . '.xml' ) ),
298
  $this->process_shortcode( $xml_header_template ) . $xml_items . $this->process_shortcode( $xml_footer_template )
299
  );
300
  }
2
  /**
3
  * Booster for WooCommerce - Module - Products XML
4
  *
5
+ * @version 5.6.2
6
  * @since 2.5.7
7
  * @author Pluggabl LLC.
8
  * @todo create all files at once (manually and synchronize update)
111
  /**
112
  * Admin_notices.
113
  *
114
+ * @version 5.6.2
115
  * @since 2.5.7
116
  */
117
  public function admin_notices() {
118
+ if ( isset( $_GET['wcj_create_products_xml_result'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
119
+ if ( 0 === (int) $_GET['wcj_create_products_xml_result'] ) { // phpcs:ignore WordPress.Security.NonceVerification
120
  $class = 'notice notice-error';
121
  $message = __( 'An error has occurred while creating products XML file.', 'woocommerce-jetpack' );
122
  } else {
123
  $class = 'notice notice-success is-dismissible';
124
  /* translators: %s: translation added */
125
+ $message = sprintf( __( 'Products XML file #%s created successfully.', 'woocommerce-jetpack' ), sanitize_text_field( wp_unslash( $_GET['wcj_create_products_xml_result'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification
126
  }
127
  echo '<div class="' . wp_kses_post( $class ) . '"><p>' . wp_kses_post( $message ) . '</p></div>';
128
  }
131
  /**
132
  * Wcj_create_products_xml.
133
  *
134
+ * @version 5.6.2
135
  * @since 2.5.7
136
  */
137
  public function wcj_create_products_xml() {
138
+ if ( isset( $_GET['wcj_create_products_xml'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
139
+ $file_num = sanitize_text_field( wp_unslash( $_GET['wcj_create_products_xml'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
140
  $result = $this->create_products_xml( $file_num );
141
  if ( false !== $result ) {
142
+ update_option( 'wcj_products_time_file_created_' . $file_num, gmdate( 'U' ) );
143
  }
144
  wp_safe_redirect( add_query_arg( 'wcj_create_products_xml_result', ( false === $result ? 0 : $file_num ), remove_query_arg( 'wcj_create_products_xml' ) ) );
145
  exit;
149
  /**
150
  * Create_products_xml_cron.
151
  *
152
+ * @version 5.6.2
153
  * @since 2.5.7
154
  * @param string $interval defines the interval.
155
  * @param int $file_num defines the file_num.
157
  public function create_products_xml_cron( $interval, $file_num ) {
158
  $result = $this->create_products_xml( $file_num );
159
  if ( false !== $result ) {
160
+ update_option( 'wcj_products_time_file_created_' . $file_num, gmdate( 'U' ) );
161
  }
162
  die();
163
  }
177
  /**
178
  * Create_products_xml.
179
  *
180
+ * @version 5.6.2
181
  * @since 2.5.7
182
  * @param int $file_num defines the file_num.
183
  */
208
  'order' => $order,
209
  'offset' => $offset,
210
  );
211
+ if ( 'all' !== $products_scope ) {
212
+ $args['meta_query'] = WC()->query->get_meta_query(); //phpcs:ignore
213
  switch ( $products_scope ) {
214
  case 'sale_only':
215
  $args['post__in'] = array_merge( array( 0 ), wc_get_product_ids_on_sale() );
233
  }
234
  if ( ! empty( $products_cats_in_ids ) ) {
235
  if ( ! isset( $args['tax_query'] ) ) {
236
+ $args['tax_query'] = array(); //phpcs:ignore
237
  }
238
  $args['tax_query'][] = array(
239
  'taxonomy' => 'product_cat',
244
  }
245
  if ( ! empty( $products_cats_ex_ids ) ) {
246
  if ( ! isset( $args['tax_query'] ) ) {
247
+ $args['tax_query'] = array(); //phpcs:ignore
248
  }
249
  $args['tax_query'][] = array(
250
  'taxonomy' => 'product_cat',
255
  }
256
  if ( ! empty( $products_tags_in_ids ) ) {
257
  if ( ! isset( $args['tax_query'] ) ) {
258
+ $args['tax_query'] = array(); //phpcs:ignore
259
  }
260
  $args['tax_query'][] = array(
261
  'taxonomy' => 'product_tag',
266
  }
267
  if ( ! empty( $products_tags_ex_ids ) ) {
268
  if ( ! isset( $args['tax_query'] ) ) {
269
+ $args['tax_query'] = array(); //phpcs:ignore
270
  }
271
  $args['tax_query'][] = array(
272
  'taxonomy' => 'product_tag',
280
  break;
281
  }
282
  while ( $loop->have_posts() ) {
283
+ if ( '-1' !== $max && $counter >= $max ) {
284
  break;
285
  }
286
  $loop->the_post();
288
  $counter++;
289
  }
290
  $offset += $block_size;
291
+ if ( '-1' !== $max && $counter >= $max ) {
292
  break;
293
  }
294
  }
295
  wp_reset_postdata();
296
+ return file_put_contents( //phpcs:ignore
297
+ ABSPATH . wcj_get_option( 'wcj_products_xml_file_path_' . $file_num, ( ( '1' === $file_num ) ? 'products.xml' : 'products_' . $file_num . '.xml' ) ),
298
  $this->process_shortcode( $xml_header_template ) . $xml_items . $this->process_shortcode( $xml_footer_template )
299
  );
300
  }
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 5.6.1
6
  * @since 2.2.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -21,7 +21,7 @@ if ( ! class_exists( 'WCJ_Purchase_Data' ) ) :
21
  /**
22
  * Constructor.
23
  *
24
- * @version 5.6.1
25
  * @todo (maybe) pre-calculate profit for orders
26
  * @todo (maybe) "Apply costs to orders that do not have costs set"
27
  * @todo (maybe) "Apply costs to all orders, overriding previous costs"
@@ -46,7 +46,7 @@ if ( ! class_exists( 'WCJ_Purchase_Data' ) ) :
46
  '</li>' .
47
  '<li>' . sprintf(
48
  /* translators: %s: translation added */
49
- __( '<strong>PHP code:</strong> by using %s function, e.g.: %s', 'woocommerce-jetpack' ),
50
  '<code>do_shortcode()</code>',
51
  '<code>echo&nbsp;do_shortcode(&nbsp;\'[wcj_order_profit]\'&nbsp;);</code>'
52
  ) .
@@ -93,12 +93,16 @@ if ( ! class_exists( 'WCJ_Purchase_Data' ) ) :
93
  /**
94
  * Create_import_from_wc_cog_tool.
95
  *
96
- * @version 5.5.6
97
  * @since 2.9.0
98
  */
99
  public function create_import_from_wc_cog_tool() {
100
  // Action and Products list.
101
- $perform_import = ( isset( $_POST['wcj_import_from_wc_cog'] ) );
 
 
 
 
102
  $table_data = array();
103
  $table_data[] = array(
104
  __( 'Product ID', 'woocommerce-jetpack' ),
@@ -159,7 +163,7 @@ if ( ! class_exists( 'WCJ_Purchase_Data' ) ) :
159
  /**
160
  * Render_product_columns.
161
  *
162
- * @version 3.9.0
163
  * @since 2.9.0
164
  * @param string $column defines the column.
165
  */
@@ -187,20 +191,20 @@ if ( ! class_exists( 'WCJ_Purchase_Data' ) ) :
187
  if ( 'purchase_cost' === $column ) {
188
  $min_cost = min( $purchase_costs );
189
  $max_cost = max( $purchase_costs );
190
- echo ( $min_cost === $max_cost ? wc_price( $min_cost ) : wc_format_price_range( $min_cost, $max_cost ) );
191
  } elseif ( 'profit' === $column ) {
192
  $min_profit = min( $profits );
193
  $max_profit = max( $profits );
194
- echo ( $min_profit === $max_profit ? wc_price( $min_profit ) : wc_format_price_range( $min_profit, $max_profit ) );
195
  }
196
  } else {
197
  $purchase_cost = wc_get_product_purchase_price( $product_id );
198
  if ( 'purchase_cost' === $column ) {
199
- echo wc_price( $purchase_cost );
200
  } elseif ( 'profit' === $column ) {
201
  $_price = $_product->get_price();
202
  if ( is_numeric( $_price ) ) {
203
- echo wc_price( $_price - $purchase_cost );
204
  }
205
  }
206
  }
@@ -227,7 +231,7 @@ if ( ! class_exists( 'WCJ_Purchase_Data' ) ) :
227
  /**
228
  * Output custom columns for orders.
229
  *
230
- * @version 2.7.0
231
  * @since 2.2.4
232
  * @todo forecasted profit `$value = $line_total * $average_profit_margin`
233
  * @todo (maybe) use `[wcj_order_profit]` and `[wcj_order_items_cost]`
@@ -237,14 +241,14 @@ if ( ! class_exists( 'WCJ_Purchase_Data' ) ) :
237
  if ( 'profit' === $column || 'purchase_cost' === $column ) {
238
  $total = 0;
239
  $the_order = wc_get_order( get_the_ID() );
240
- if ( ! in_array( $the_order->get_status(), array( 'cancelled', 'refunded', 'failed' ) ) ) {
241
  $is_forecasted = false;
242
  foreach ( $the_order->get_items() as $item_id => $item ) {
243
  $value = 0;
244
- $product_id = ( isset( $item['variation_id'] ) && 0 != $item['variation_id'] && 'no' === wcj_get_option( 'wcj_purchase_data_variable_as_simple_enabled', 'no' )
245
  ? $item['variation_id'] : $item['product_id'] );
246
  $purchase_price = wc_get_product_purchase_price( $product_id );
247
- if ( 0 != ( $purchase_price ) ) {
248
  if ( 'profit' === $column ) {
249
  $_order_prices_include_tax = ( WCJ_IS_WC_VERSION_BELOW_3 ? $the_order->prices_include_tax : $the_order->get_prices_include_tax() );
250
  $line_total = ( $_order_prices_include_tax ) ? ( $item['line_total'] + $item['line_tax'] ) : $item['line_total'];
@@ -258,11 +262,11 @@ if ( ! class_exists( 'WCJ_Purchase_Data' ) ) :
258
  $total += $value;
259
  }
260
  }
261
- if ( 0 != $total ) {
262
  if ( ! $is_forecasted ) {
263
  echo '<span style="color:green;">';
264
  }
265
- echo wc_price( $total );
266
  if ( ! $is_forecasted ) {
267
  echo '</span>';
268
  }
@@ -273,7 +277,7 @@ if ( ! class_exists( 'WCJ_Purchase_Data' ) ) :
273
  /**
274
  * Create_meta_box.
275
  *
276
- * @version 4.5.0
277
  * @since 2.4.5
278
  * @todo (maybe) min_profit
279
  */
@@ -296,10 +300,10 @@ if ( ! class_exists( 'WCJ_Purchase_Data' ) ) :
296
  }
297
  foreach ( $products as $product_id => $desc ) {
298
  $purchase_price = wc_get_product_purchase_price( $product_id );
299
- if ( 0 != $purchase_price ) {
300
  $the_product = wc_get_product( $product_id );
301
  $the_price = $the_product->get_price();
302
- if ( 0 != $the_price ) {
303
  $the_profit = $the_price - $purchase_price;
304
  $table_data = array();
305
  $table_data[] = array( __( 'Selling', 'woocommerce-jetpack' ), wc_price( $the_price ) );
2
  /**
3
  * Booster for WooCommerce - Module - Cost of Goods (formerly Product Cost Price)
4
  *
5
+ * @version 5.6.2
6
  * @since 2.2.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
21
  /**
22
  * Constructor.
23
  *
24
+ * @version 5.6.2
25
  * @todo (maybe) pre-calculate profit for orders
26
  * @todo (maybe) "Apply costs to orders that do not have costs set"
27
  * @todo (maybe) "Apply costs to all orders, overriding previous costs"
46
  '</li>' .
47
  '<li>' . sprintf(
48
  /* translators: %s: translation added */
49
+ __( '<strong>PHP code:</strong> by using %1$s function, e.g.: %2$s', 'woocommerce-jetpack' ),
50
  '<code>do_shortcode()</code>',
51
  '<code>echo&nbsp;do_shortcode(&nbsp;\'[wcj_order_profit]\'&nbsp;);</code>'
52
  ) .
93
  /**
94
  * Create_import_from_wc_cog_tool.
95
  *
96
+ * @version 5.6.2
97
  * @since 2.9.0
98
  */
99
  public function create_import_from_wc_cog_tool() {
100
  // Action and Products list.
101
+ $wpnonce = true;
102
+ if ( function_exists( 'wp_verify_nonce' ) ) {
103
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
104
+ }
105
+ $perform_import = ( $wpnonce && isset( $_POST['wcj_import_from_wc_cog'] ) );
106
  $table_data = array();
107
  $table_data[] = array(
108
  __( 'Product ID', 'woocommerce-jetpack' ),
163
  /**
164
  * Render_product_columns.
165
  *
166
+ * @version 5.6.2
167
  * @since 2.9.0
168
  * @param string $column defines the column.
169
  */
191
  if ( 'purchase_cost' === $column ) {
192
  $min_cost = min( $purchase_costs );
193
  $max_cost = max( $purchase_costs );
194
+ echo wp_kses_post( $min_cost === $max_cost ? wc_price( $min_cost ) : wc_format_price_range( $min_cost, $max_cost ) );
195
  } elseif ( 'profit' === $column ) {
196
  $min_profit = min( $profits );
197
  $max_profit = max( $profits );
198
+ echo wp_kses_post( $min_profit === $max_profit ? wc_price( $min_profit ) : wc_format_price_range( $min_profit, $max_profit ) );
199
  }
200
  } else {
201
  $purchase_cost = wc_get_product_purchase_price( $product_id );
202
  if ( 'purchase_cost' === $column ) {
203
+ echo wp_kses_post( wc_price( $purchase_cost ) );
204
  } elseif ( 'profit' === $column ) {
205
  $_price = $_product->get_price();
206
  if ( is_numeric( $_price ) ) {
207
+ echo wp_kses_post( wc_price( $_price - $purchase_cost ) );
208
  }
209
  }
210
  }
231
  /**
232
  * Output custom columns for orders.
233
  *
234
+ * @version 5.6.2
235
  * @since 2.2.4
236
  * @todo forecasted profit `$value = $line_total * $average_profit_margin`
237
  * @todo (maybe) use `[wcj_order_profit]` and `[wcj_order_items_cost]`
241
  if ( 'profit' === $column || 'purchase_cost' === $column ) {
242
  $total = 0;
243
  $the_order = wc_get_order( get_the_ID() );
244
+ if ( ! in_array( $the_order->get_status(), array( 'cancelled', 'refunded', 'failed' ), true ) ) {
245
  $is_forecasted = false;
246
  foreach ( $the_order->get_items() as $item_id => $item ) {
247
  $value = 0;
248
+ $product_id = ( isset( $item['variation_id'] ) && 0 !== $item['variation_id'] && 'no' === wcj_get_option( 'wcj_purchase_data_variable_as_simple_enabled', 'no' )
249
  ? $item['variation_id'] : $item['product_id'] );
250
  $purchase_price = wc_get_product_purchase_price( $product_id );
251
+ if ( 0 !== ( $purchase_price ) && '0' !== ( $purchase_price ) ) {
252
  if ( 'profit' === $column ) {
253
  $_order_prices_include_tax = ( WCJ_IS_WC_VERSION_BELOW_3 ? $the_order->prices_include_tax : $the_order->get_prices_include_tax() );
254
  $line_total = ( $_order_prices_include_tax ) ? ( $item['line_total'] + $item['line_tax'] ) : $item['line_total'];
262
  $total += $value;
263
  }
264
  }
265
+ if ( 0 > $total ) {
266
  if ( ! $is_forecasted ) {
267
  echo '<span style="color:green;">';
268
  }
269
+ echo wp_kses_post( wc_price( $total ) );
270
  if ( ! $is_forecasted ) {
271
  echo '</span>';
272
  }
277
  /**
278
  * Create_meta_box.
279
  *
280
+ * @version 5.6.2
281
  * @since 2.4.5
282
  * @todo (maybe) min_profit
283
  */
300
  }
301
  foreach ( $products as $product_id => $desc ) {
302
  $purchase_price = wc_get_product_purchase_price( $product_id );
303
+ if ( 0 > $purchase_price ) {
304
  $the_product = wc_get_product( $product_id );
305
  $the_price = $the_product->get_price();
306
+ if ( 0 > $the_price ) {
307
  $the_profit = $the_price - $purchase_price;
308
  $table_data = array();
309
  $table_data[] = array( __( 'Selling', 'woocommerce-jetpack' ), wc_price( $the_price ) );
includes/class-wcj-related-products.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  /**
3
  * Booster for WooCommerce - Module - Related Products
4
  *
5
- * @version 5.5.9
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -39,7 +39,7 @@ if ( ! class_exists( 'WCJ_Related_Products' ) ) :
39
  /**
40
  * WCJ_Related_Products.
41
  */
42
- class WCJ_Related_Products extends WCJ_Module {
43
 
44
 
45
  /**
@@ -194,7 +194,7 @@ if ( ! class_exists( 'WCJ_Related_Products' ) ) :
194
  /**
195
  * Get_related_products_ids_wc3.
196
  *
197
- * @version 4.1.0
198
  * @since 2.8.0
199
  * @param int $product_id defines the product_id.
200
  */
@@ -222,7 +222,7 @@ if ( ! class_exists( 'WCJ_Related_Products' ) ) :
222
  if ( 'global' === wcj_get_option( 'wcj_product_info_related_products_by_attribute_attribute_type', 'global' ) ) {
223
  // Relate by Global Attributes.
224
  // http://snippet.fm/snippets/query-for-woocommerce-products-by-global-product-attributes/.
225
- $args['tax_query'] = array(
226
  array(
227
  'taxonomy' => 'pa_' . $attribute_name,
228
  'field' => 'name',
@@ -232,9 +232,9 @@ if ( ! class_exists( 'WCJ_Related_Products' ) ) :
232
  } else {
233
  // Relate by Local Product Attributes.
234
  // http://snippet.fm/snippets/query-woocommerce-products-product-specific-custom-attribute/.
235
- $serialized_value = serialize( 'name' ) . serialize( $attribute_name ) . serialize( 'value' ) . serialize( $attribute_value );
236
  // extended version: $serialized_value = serialize( $attribute_name ) . 'a:6:{' . serialize( 'name' ) . serialize( $attribute_name ) . serialize( 'value' ) . serialize( $attribute_value ) . serialize( 'position' );.
237
- $args['meta_query'] = array(
238
  array(
239
  'key' => '_product_attributes',
240
  'value' => $serialized_value,
@@ -273,11 +273,11 @@ if ( ! class_exists( 'WCJ_Related_Products' ) ) :
273
  if ( false !== $include_ids ) {
274
  $include_ids = implode( ',', array_map( 'absint', $include_ids ) );
275
  }
276
- $cats_array = array();
277
- $tags_array = array();
278
- $_product = wc_get_product( $product_id );
279
 
280
- $exclude_ids = array_merge( array( 0, $product_id ), $_product->get_upsell_ids() );
281
  if ( false === $include_ids ) {
282
  $include_ids = array( 0 );
283
  $limit = 0;
@@ -286,30 +286,30 @@ if ( ! class_exists( 'WCJ_Related_Products' ) ) :
286
  $limit = $limit > 0 ? $limit : 5;
287
  $limit += 20;
288
  }
289
- global $wpdb;
290
-
291
- // Arrays to string.
292
- $exclude_ids = implode( ',', array_map( 'absint', $exclude_ids ) );
293
- $cats_array = implode( ',', array_map( 'absint', $cats_array ) );
294
- $tags_array = implode( ',', array_map( 'absint', $tags_array ) );
295
-
296
- $limit = absint( $limit );
297
- $_query = array();
298
- $_query['fields'] = "SELECT DISTINCT ID FROM {$wpdb->posts} p";
299
- $_query['join'] = " INNER JOIN {$wpdb->term_relationships} tr ON (p.ID = tr.object_id)";
300
- $_query['join'] .= " INNER JOIN {$wpdb->term_taxonomy} tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id)";
301
- $_query['join'] .= " INNER JOIN {$wpdb->terms} t ON (t.term_id = tt.term_id)";
302
- $_query['where'] = ' WHERE 1=1';
303
- $_query['where'] .= " AND p.post_status = 'publish'";
304
- $_query['where'] .= " AND p.post_type = 'product'";
305
- $_query['where'] .= " AND p.ID NOT IN ( {$exclude_ids} )";
306
- //
307
- // Pluggabl.
308
  if ( ! is_array( $include_ids ) && $include_ids ) {
309
  $_query['where'] .= " AND p.ID IN ( {$include_ids} )";
310
  }
311
 
312
- $product_visibility_term_ids = wc_get_product_visibility_term_ids();
313
 
314
  if ( $product_visibility_term_ids['exclude-from-catalog'] ) {
315
  $_query['where'] .= ' AND t.term_id !=' . $product_visibility_term_ids['exclude-from-catalog'];
@@ -385,11 +385,11 @@ if ( ! class_exists( 'WCJ_Related_Products' ) ) :
385
  /**
386
  * Maybe_delete_product_transients.
387
  *
388
- * @since 3.1.1
389
  * @version 2.6.0
390
  */
391
  public function maybe_delete_product_transients() {
392
- if ( isset( $_GET['wcj_clear_all_products_transients'] ) ) {
393
  $offset = 0;
394
  $block_size = 256;
395
  while ( true ) {
@@ -419,7 +419,7 @@ if ( ! class_exists( 'WCJ_Related_Products' ) ) :
419
  /**
420
  * Related_products_args.
421
  *
422
- * @version 4.1.0
423
  * @todo save custom results as product transient (for < WC3)
424
  * @param array $args defines the args.
425
  */
@@ -434,7 +434,7 @@ if ( ! class_exists( 'WCJ_Related_Products' ) ) :
434
  $orderby = wcj_get_option( 'wcj_product_info_related_products_orderby', 'rand' );
435
  $args['orderby'] = $orderby;
436
  if ( 'meta_value' === $orderby || 'meta_value_num' === $orderby ) {
437
- $args['meta_key'] = wcj_get_option( 'wcj_product_info_related_products_orderby_meta_value_meta_key', '' );
438
  }
439
  // Order.
440
  if ( 'rand' !== $orderby ) {
@@ -459,7 +459,7 @@ if ( ! class_exists( 'WCJ_Related_Products' ) ) :
459
  if ( 'global' === wcj_get_option( 'wcj_product_info_related_products_by_attribute_attribute_type', 'global' ) ) {
460
  // Relate by Global Attributes.
461
  // http://snippet.fm/snippets/query-for-woocommerce-products-by-global-product-attributes/.
462
- $args['tax_query'] = array(
463
  array(
464
  'taxonomy' => 'pa_' . $attribute_name,
465
  'field' => 'name',
@@ -469,9 +469,9 @@ if ( ! class_exists( 'WCJ_Related_Products' ) ) :
469
  } else {
470
  // Relate by Local Product Attributes.
471
  // http://snippet.fm/snippets/query-woocommerce-products-product-specific-custom-attribute/.
472
- $serialized_value = serialize( 'name' ) . serialize( $attribute_name ) . serialize( 'value' ) . serialize( $attribute_value );
473
  // extended version: $serialized_value = serialize( $attribute_name ) . 'a:6:{' . serialize( 'name' ) . serialize( $attribute_name ) . serialize( 'value' ) . serialize( $attribute_value ) . serialize( 'position' );.
474
- $args['meta_query'] = array(
475
  array(
476
  'key' => '_product_attributes',
477
  'value' => $serialized_value,
1
+ <?php //phpcs:ignore
2
  /**
3
  * Booster for WooCommerce - Module - Related Products
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
39
  /**
40
  * WCJ_Related_Products.
41
  */
42
+ class WCJ_Related_Products extends WCJ_Module { //phpcs:ignore
43
 
44
 
45
  /**
194
  /**
195
  * Get_related_products_ids_wc3.
196
  *
197
+ * @version 5.6.2
198
  * @since 2.8.0
199
  * @param int $product_id defines the product_id.
200
  */
222
  if ( 'global' === wcj_get_option( 'wcj_product_info_related_products_by_attribute_attribute_type', 'global' ) ) {
223
  // Relate by Global Attributes.
224
  // http://snippet.fm/snippets/query-for-woocommerce-products-by-global-product-attributes/.
225
+ $args['tax_query'] = array( //phpcs:ignore
226
  array(
227
  'taxonomy' => 'pa_' . $attribute_name,
228
  'field' => 'name',
232
  } else {
233
  // Relate by Local Product Attributes.
234
  // http://snippet.fm/snippets/query-woocommerce-products-product-specific-custom-attribute/.
235
+ $serialized_value = serialize( 'name' ) . serialize( $attribute_name ) . serialize( 'value' ) . serialize( $attribute_value ); //phpcs:ignore
236
  // extended version: $serialized_value = serialize( $attribute_name ) . 'a:6:{' . serialize( 'name' ) . serialize( $attribute_name ) . serialize( 'value' ) . serialize( $attribute_value ) . serialize( 'position' );.
237
+ $args['meta_query'] = array( //phpcs:ignore
238
  array(
239
  'key' => '_product_attributes',
240
  'value' => $serialized_value,
273
  if ( false !== $include_ids ) {
274
  $include_ids = implode( ',', array_map( 'absint', $include_ids ) );
275
  }
276
+ $cats_array = array();
277
+ $tags_array = array();
278
+ $_product = wc_get_product( $product_id );
279
 
280
+ $exclude_ids = array_merge( array( 0, $product_id ), $_product->get_upsell_ids() );
281
  if ( false === $include_ids ) {
282
  $include_ids = array( 0 );
283
  $limit = 0;
286
  $limit = $limit > 0 ? $limit : 5;
287
  $limit += 20;
288
  }
289
+ global $wpdb;
290
+
291
+ // Arrays to string.
292
+ $exclude_ids = implode( ',', array_map( 'absint', $exclude_ids ) );
293
+ $cats_array = implode( ',', array_map( 'absint', $cats_array ) );
294
+ $tags_array = implode( ',', array_map( 'absint', $tags_array ) );
295
+
296
+ $limit = absint( $limit );
297
+ $_query = array();
298
+ $_query['fields'] = "SELECT DISTINCT ID FROM {$wpdb->posts} p";
299
+ $_query['join'] = " INNER JOIN {$wpdb->term_relationships} tr ON (p.ID = tr.object_id)";
300
+ $_query['join'] .= " INNER JOIN {$wpdb->term_taxonomy} tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id)";
301
+ $_query['join'] .= " INNER JOIN {$wpdb->terms} t ON (t.term_id = tt.term_id)";
302
+ $_query['where'] = ' WHERE 1=1';
303
+ $_query['where'] .= " AND p.post_status = 'publish'";
304
+ $_query['where'] .= " AND p.post_type = 'product'";
305
+ $_query['where'] .= " AND p.ID NOT IN ( {$exclude_ids} )";
306
+ //
307
+ // Pluggabl.
308
  if ( ! is_array( $include_ids ) && $include_ids ) {
309
  $_query['where'] .= " AND p.ID IN ( {$include_ids} )";
310
  }
311
 
312
+ $product_visibility_term_ids = wc_get_product_visibility_term_ids();
313
 
314
  if ( $product_visibility_term_ids['exclude-from-catalog'] ) {
315
  $_query['where'] .= ' AND t.term_id !=' . $product_visibility_term_ids['exclude-from-catalog'];
385
  /**
386
  * Maybe_delete_product_transients.
387
  *
388
+ * @since 5.6.2
389
  * @version 2.6.0
390
  */
391
  public function maybe_delete_product_transients() {
392
+ if ( isset( $_GET['wcj_clear_all_products_transients'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
393
  $offset = 0;
394
  $block_size = 256;
395
  while ( true ) {
419
  /**
420
  * Related_products_args.
421
  *
422
+ * @version 5.6.2
423
  * @todo save custom results as product transient (for < WC3)
424
  * @param array $args defines the args.
425
  */
434
  $orderby = wcj_get_option( 'wcj_product_info_related_products_orderby', 'rand' );
435
  $args['orderby'] = $orderby;
436
  if ( 'meta_value' === $orderby || 'meta_value_num' === $orderby ) {
437
+ $args['meta_key'] = wcj_get_option( 'wcj_product_info_related_products_orderby_meta_value_meta_key', '' ); //phpcs:ignore
438
  }
439
  // Order.
440
  if ( 'rand' !== $orderby ) {
459
  if ( 'global' === wcj_get_option( 'wcj_product_info_related_products_by_attribute_attribute_type', 'global' ) ) {
460
  // Relate by Global Attributes.
461
  // http://snippet.fm/snippets/query-for-woocommerce-products-by-global-product-attributes/.
462
+ $args['tax_query'] = array( //phpcs:ignore
463
  array(
464
  'taxonomy' => 'pa_' . $attribute_name,
465
  'field' => 'name',
469
  } else {
470
  // Relate by Local Product Attributes.
471
  // http://snippet.fm/snippets/query-woocommerce-products-product-specific-custom-attribute/.
472
+ $serialized_value = serialize( 'name' ) . serialize( $attribute_name ) . serialize( 'value' ) . serialize( $attribute_value ); //phpcs:ignore
473
  // extended version: $serialized_value = serialize( $attribute_name ) . 'a:6:{' . serialize( 'name' ) . serialize( $attribute_name ) . serialize( 'value' ) . serialize( $attribute_value ) . serialize( 'position' );.
474
+ $args['meta_query'] = array( //phpcs:ignore
475
  array(
476
  'key' => '_product_attributes',
477
  'value' => $serialized_value,
includes/class-wcj-reports.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Reports
4
  *
5
- * @version 5.5.9
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -60,12 +60,12 @@ if ( ! class_exists( 'WCJ_Reports' ) ) :
60
  add_filter( 'woocommerce_admin_reports', array( $this, 'add_sales_reports' ) );
61
  add_action( 'init', array( $this, 'catch_arguments' ) );
62
 
63
- include_once 'reports/wcj-class-reports-customers.php';
64
- include_once 'reports/wcj-class-reports-stock.php';
65
- include_once 'reports/wcj-class-reports-sales-daily.php';
66
  include_once 'reports/wcj-class-reports-sales-gateways.php';
67
- include_once 'reports/wcj-class-reports-sales.php';
68
- include_once 'reports/wcj-class-reports-monthly-sales.php';
69
 
70
  add_action( 'admin_bar_menu', array( $this, 'add_custom_order_reports_ranges_to_admin_bar' ), PHP_INT_MAX );
71
  add_action( 'admin_bar_menu', array( $this, 'add_custom_order_reports_ranges_by_month_to_admin_bar' ), PHP_INT_MAX );
@@ -76,13 +76,14 @@ if ( ! class_exists( 'WCJ_Reports' ) ) :
76
  /**
77
  * Add_custom_order_reports_ranges_by_month_to_admin_bar.
78
  *
79
- * @version 5.5.9
80
  * @since 2.2.4
81
  * @param string | array $wp_admin_bar defines the wp_admin_bar.
82
  */
83
  public function add_custom_order_reports_ranges_by_month_to_admin_bar( $wp_admin_bar ) {
84
  $is_reports = ( isset( $_GET['page'] ) && 'wc-reports' === $_GET['page'] );
85
  $is_orders_reports = ( isset( $_GET['tab'] ) && 'orders' === $_GET['tab'] || ! isset( $_GET['tab'] ) );
 
86
  if ( $is_reports && $is_orders_reports ) {
87
 
88
  $parent = 'reports_orders_more_ranges_months';
@@ -96,7 +97,7 @@ if ( ! class_exists( 'WCJ_Reports' ) ) :
96
  $wp_admin_bar->add_node( $args );
97
 
98
  $custom_range_nonce = wp_create_nonce( 'custom_range' );
99
- $current_time = (int) current_time( 'timestamp' );
100
  for ( $i = 1; $i <= 12; $i++ ) {
101
  $month_start_date = strtotime( gmdate( 'Y-m-01', $current_time ) . " -$i months" );
102
  $month_num = gmdate( 'm', $month_start_date );
@@ -127,12 +128,13 @@ if ( ! class_exists( 'WCJ_Reports' ) ) :
127
  /**
128
  * Add_custom_order_reports_ranges_to_admin_bar.
129
  *
130
- * @version 5.5.9
131
  * @param string | array $wp_admin_bar defines the wp_admin_bar.
132
  */
133
  public function add_custom_order_reports_ranges_to_admin_bar( $wp_admin_bar ) {
134
- $is_reports = ( isset( $_GET['page'] ) && 'wc-reports' === $_GET['page'] );
135
- $is_orders_reports = ( isset( $_GET['tab'] ) && 'orders' === $_GET['tab'] || ! isset( $_GET['tab'] ) );
 
136
  if ( $is_reports && $is_orders_reports ) {
137
 
138
  $parent = 'reports_orders_more_ranges';
@@ -172,8 +174,9 @@ if ( ! class_exists( 'WCJ_Reports' ) ) :
172
  * Catch_arguments.
173
  */
174
  public function catch_arguments() {
175
- $this->report_id = ( isset( $_GET['report'] ) ) ? $_GET['report'] : 'on_stock';
176
- $this->range_days = isset( $_GET['period'] ) ? $_GET['period'] : 30;
 
177
  $this->group_countries = ( 'customers_by_country_sets' === $this->report_id ) ? 'yes' : 'no';
178
  }
179
 
@@ -182,40 +185,40 @@ if ( ! class_exists( 'WCJ_Reports' ) ) :
182
  */
183
  public function get_report_sales() {
184
  $report = new WCJ_Reports_Sales();
185
- echo $report->get_report();
186
  }
187
 
188
  /**
189
  * Get_report_products_sales_daily.
190
  *
191
- * @version 2.9.0
192
  * @since 2.9.0
193
  */
194
  public function get_report_products_sales_daily() {
195
  $report = new WCJ_Reports_Product_Sales_Daily();
196
- echo $report->get_report();
197
  }
198
 
199
  /**
200
  * Get_report_monthly_sales.
201
  *
202
- * @version 2.4.7
203
  * @since 2.4.7
204
  */
205
  public function get_report_monthly_sales() {
206
  $report = new WCJ_Reports_Monthly_Sales();
207
- echo $report->get_report();
208
  }
209
 
210
  /**
211
  * Get_report_orders_gateways.
212
  *
213
- * @version 3.6.0
214
  * @since 3.6.0
215
  */
216
  public function get_report_orders_gateways() {
217
  $report = new WCJ_Reports_Product_Sales_Gateways();
218
- echo $report->get_report();
219
  }
220
 
221
  /**
@@ -228,7 +231,7 @@ if ( ! class_exists( 'WCJ_Reports' ) ) :
228
  'range_days' => $this->range_days,
229
  )
230
  );
231
- echo $report->get_report_html();
232
  }
233
 
234
  /**
@@ -236,7 +239,7 @@ if ( ! class_exists( 'WCJ_Reports' ) ) :
236
  */
237
  public function get_report_customers() {
238
  $report = new WCJ_Reports_Customers( array( 'group_countries' => $this->group_countries ) );
239
- echo $report->get_report();
240
  }
241
 
242
  /**
2
  /**
3
  * Booster for WooCommerce - Module - Reports
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
60
  add_filter( 'woocommerce_admin_reports', array( $this, 'add_sales_reports' ) );
61
  add_action( 'init', array( $this, 'catch_arguments' ) );
62
 
63
+ include_once 'reports/class-wcj-reports-customers.php';
64
+ include_once 'reports/class-wcj-reports-stock.php';
65
+ include_once 'reports/class-wcj-reports-product-sales-daily.php';
66
  include_once 'reports/wcj-class-reports-sales-gateways.php';
67
+ include_once 'reports/class-wcj-reports-sales.php';
68
+ include_once 'reports/class-wcj-reports-monthly-sales.php';
69
 
70
  add_action( 'admin_bar_menu', array( $this, 'add_custom_order_reports_ranges_to_admin_bar' ), PHP_INT_MAX );
71
  add_action( 'admin_bar_menu', array( $this, 'add_custom_order_reports_ranges_by_month_to_admin_bar' ), PHP_INT_MAX );
76
  /**
77
  * Add_custom_order_reports_ranges_by_month_to_admin_bar.
78
  *
79
+ * @version 5.6.2
80
  * @since 2.2.4
81
  * @param string | array $wp_admin_bar defines the wp_admin_bar.
82
  */
83
  public function add_custom_order_reports_ranges_by_month_to_admin_bar( $wp_admin_bar ) {
84
  $is_reports = ( isset( $_GET['page'] ) && 'wc-reports' === $_GET['page'] );
85
  $is_orders_reports = ( isset( $_GET['tab'] ) && 'orders' === $_GET['tab'] || ! isset( $_GET['tab'] ) );
86
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
87
  if ( $is_reports && $is_orders_reports ) {
88
 
89
  $parent = 'reports_orders_more_ranges_months';
97
  $wp_admin_bar->add_node( $args );
98
 
99
  $custom_range_nonce = wp_create_nonce( 'custom_range' );
100
+ $current_time = (int) gmdate( 'U' );
101
  for ( $i = 1; $i <= 12; $i++ ) {
102
  $month_start_date = strtotime( gmdate( 'Y-m-01', $current_time ) . " -$i months" );
103
  $month_num = gmdate( 'm', $month_start_date );
128
  /**
129
  * Add_custom_order_reports_ranges_to_admin_bar.
130
  *
131
+ * @version 5.6.2
132
  * @param string | array $wp_admin_bar defines the wp_admin_bar.
133
  */
134
  public function add_custom_order_reports_ranges_to_admin_bar( $wp_admin_bar ) {
135
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
136
+ $is_reports = ( $wpnonce && isset( $_GET['page'] ) && 'wc-reports' === $_GET['page'] );
137
+ $is_orders_reports = ( $wpnonce && isset( $_GET['tab'] ) && 'orders' === $_GET['tab'] || ! isset( $_GET['tab'] ) );
138
  if ( $is_reports && $is_orders_reports ) {
139
 
140
  $parent = 'reports_orders_more_ranges';
174
  * Catch_arguments.
175
  */
176
  public function catch_arguments() {
177
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
178
+ $this->report_id = ( $wpnonce && isset( $_GET['report'] ) ) ? sanitize_text_field( wp_unslash( $_GET['report'] ) ) : 'on_stock';
179
+ $this->range_days = $wpnonce && isset( $_GET['period'] ) ? sanitize_text_field( wp_unslash( $_GET['period'] ) ) : 30;
180
  $this->group_countries = ( 'customers_by_country_sets' === $this->report_id ) ? 'yes' : 'no';
181
  }
182
 
185
  */
186
  public function get_report_sales() {
187
  $report = new WCJ_Reports_Sales();
188
+ echo $report->get_report(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
189
  }
190
 
191
  /**
192
  * Get_report_products_sales_daily.
193
  *
194
+ * @version 5.6.2
195
  * @since 2.9.0
196
  */
197
  public function get_report_products_sales_daily() {
198
  $report = new WCJ_Reports_Product_Sales_Daily();
199
+ echo $report->get_report(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
200
  }
201
 
202
  /**
203
  * Get_report_monthly_sales.
204
  *
205
+ * @version 5.6.2
206
  * @since 2.4.7
207
  */
208
  public function get_report_monthly_sales() {
209
  $report = new WCJ_Reports_Monthly_Sales();
210
+ echo $report->get_report(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
211
  }
212
 
213
  /**
214
  * Get_report_orders_gateways.
215
  *
216
+ * @version 5.6.2
217
  * @since 3.6.0
218
  */
219
  public function get_report_orders_gateways() {
220
  $report = new WCJ_Reports_Product_Sales_Gateways();
221
+ echo $report->get_report(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
222
  }
223
 
224
  /**
231
  'range_days' => $this->range_days,
232
  )
233
  );
234
+ echo $report->get_report_html(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
235
  }
236
 
237
  /**
239
  */
240
  public function get_report_customers() {
241
  $report = new WCJ_Reports_Customers( array( 'group_countries' => $this->group_countries ) );
242
+ echo $report->get_report(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
243
  }
244
 
245
  /**
includes/class-wcj-sale-flash.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Sale Flash
4
  *
5
- * @version 5.2.0
6
  * @since 3.2.4
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -78,7 +78,7 @@ if ( ! class_exists( 'WCJ_Sale_Flash' ) ) :
78
  /**
79
  * Get_taxonomy_sale_flash.
80
  *
81
- * @version 4.0.0
82
  * @param int $product_id defines the product_id.
83
  * @param string $taxonomy defines the taxonomy.
84
  */
@@ -86,7 +86,7 @@ if ( ! class_exists( 'WCJ_Sale_Flash' ) ) :
86
  $product_terms = get_the_terms( $product_id, $taxonomy );
87
  if ( ! empty( $product_terms ) && isset( $product_terms[0]->term_id ) ) {
88
  $term_id = $product_terms[0]->term_id;
89
- if ( in_array( $term_id, $this->sale_flash_per_taxonomy[ $taxonomy ]['terms'] ) ) {
90
  return ( isset( $this->sale_flash_per_taxonomy[ $taxonomy ]['html'][ $term_id ] ) ?
91
  do_shortcode( $this->sale_flash_per_taxonomy[ $taxonomy ]['html'][ $term_id ] ) :
92
  '<span class="onsale">' . __( 'Sale!', 'woocommerce' ) . '</span>'
2
  /**
3
  * Booster for WooCommerce - Module - Sale Flash
4
  *
5
+ * @version 5.6.2
6
  * @since 3.2.4
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
78
  /**
79
  * Get_taxonomy_sale_flash.
80
  *
81
+ * @version 5.6.2
82
  * @param int $product_id defines the product_id.
83
  * @param string $taxonomy defines the taxonomy.
84
  */
86
  $product_terms = get_the_terms( $product_id, $taxonomy );
87
  if ( ! empty( $product_terms ) && isset( $product_terms[0]->term_id ) ) {
88
  $term_id = $product_terms[0]->term_id;
89
+ if ( in_array( $term_id, $this->sale_flash_per_taxonomy[ $taxonomy ]['terms'], true ) ) {
90
  return ( isset( $this->sale_flash_per_taxonomy[ $taxonomy ]['html'][ $term_id ] ) ?
91
  do_shortcode( $this->sale_flash_per_taxonomy[ $taxonomy ]['html'][ $term_id ] ) :
92
  '<span class="onsale">' . __( 'Sale!', 'woocommerce' ) . '</span>'
includes/class-wcj-shipping-by-cities.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Shipping by Cities
4
  *
5
- * @version 5.2.0
6
  * @since 3.6.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -60,7 +60,7 @@ if ( ! class_exists( 'WCJ_Shipping_By_Cities' ) ) :
60
  /**
61
  * Check.
62
  *
63
- * @version 5.1.0
64
  * @since 3.6.0
65
  * @todo `$_REQUEST['city']` (i.e. billing city)
66
  * @todo `get_base_city()` - do we really need this?
@@ -72,13 +72,23 @@ if ( ! class_exists( 'WCJ_Shipping_By_Cities' ) ) :
72
  public function check( $options_id, $values, $include_or_exclude, $package ) {
73
  switch ( $options_id ) {
74
  case 'cities':
 
 
 
 
 
75
  $user_city = WC()->customer->get_shipping_city();
76
- $customer_city = strtoupper( ( isset( $_REQUEST['s_city'] ) ) ? $_REQUEST['s_city'] : ( isset( $_REQUEST['calc_shipping_city'] ) ? $_REQUEST['calc_shipping_city'] : ( ! empty( $user_city ) ? $user_city : WC()->countries->get_base_city() ) ) );
77
  $values = array_map( 'strtoupper', array_map( 'trim', explode( PHP_EOL, $values ) ) );
78
- return in_array( $customer_city, $values );
 
79
  case 'postcodes':
 
 
 
 
80
  $customer_shipping_postcode = WC()->customer->get_shipping_postcode();
81
- $customer_postcode = strtoupper( isset( $_REQUEST['s_postcode'] ) ? ( $_REQUEST['s_postcode'] ) : ( ! empty( $customer_shipping_postcode ) ? $customer_shipping_postcode : WC()->countries->get_base_postcode() ) );
82
  $postcodes = array_map( 'strtoupper', array_map( 'trim', explode( PHP_EOL, $values ) ) );
83
  return wcj_check_postcode( $customer_postcode, $postcodes );
84
  }
2
  /**
3
  * Booster for WooCommerce - Module - Shipping by Cities
4
  *
5
+ * @version 5.6.2
6
  * @since 3.6.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
60
  /**
61
  * Check.
62
  *
63
+ * @version 5.6.2
64
  * @since 3.6.0
65
  * @todo `$_REQUEST['city']` (i.e. billing city)
66
  * @todo `get_base_city()` - do we really need this?
72
  public function check( $options_id, $values, $include_or_exclude, $package ) {
73
  switch ( $options_id ) {
74
  case 'cities':
75
+ $wpnonce = true;
76
+ if ( function_exists( 'wp_verify_nonce' ) ) {
77
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
78
+ }
79
+
80
  $user_city = WC()->customer->get_shipping_city();
81
+ $customer_city = strtoupper( ( isset( $_REQUEST['s_city'] ) && $wpnonce ) ? sanitize_text_field( wp_unslash( $_REQUEST['s_city'] ) ) : ( isset( $_REQUEST['calc_shipping_city'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['calc_shipping_city'] ) ) : ( ! empty( $user_city ) ? $user_city : WC()->countries->get_base_city() ) ) );
82
  $values = array_map( 'strtoupper', array_map( 'trim', explode( PHP_EOL, $values ) ) );
83
+
84
+ return in_array( $customer_city, $values, true );
85
  case 'postcodes':
86
+ $wpnonce = true;
87
+ if ( function_exists( 'wp_verify_nonce' ) ) {
88
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
89
+ }
90
  $customer_shipping_postcode = WC()->customer->get_shipping_postcode();
91
+ $customer_postcode = strtoupper( ( isset( $_REQUEST['s_postcode'] ) && $wpnonce ) ? sanitize_text_field( wp_unslash( $_REQUEST['s_postcode'] ) ) : ( ! empty( $customer_shipping_postcode ) ? $customer_shipping_postcode : WC()->countries->get_base_postcode() ) );
92
  $postcodes = array_map( 'strtoupper', array_map( 'trim', explode( PHP_EOL, $values ) ) );
93
  return wcj_check_postcode( $customer_postcode, $postcodes );
94
  }
includes/class-wcj-shipping-by-order-amount.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Shipping Methods by Min/Max Order Amount
4
  *
5
- * @version 5.2.0
6
  * @since 3.2.1
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -46,7 +46,7 @@ if ( ! class_exists( 'WCJ_Shipping_By_Order_Amount' ) ) :
46
  /**
47
  * Available_shipping_methods.
48
  *
49
- * @version 3.5.0
50
  * @since 3.2.1
51
  * @todo [dev] currency conversion
52
  * @todo apply_filters( 'booster_option' )
@@ -55,6 +55,7 @@ if ( ! class_exists( 'WCJ_Shipping_By_Order_Amount' ) ) :
55
  * @param string | array $package Get packages.
56
  */
57
  public function available_shipping_methods( $rates, $package ) {
 
58
  if ( ! isset( WC()->cart ) || WC()->cart->is_empty() ) {
59
  return $rates;
60
  }
@@ -64,9 +65,9 @@ if ( ! class_exists( 'WCJ_Shipping_By_Order_Amount' ) ) :
64
  get_option( 'wcj_shipping_by_order_amount_min_instance_' . $rate->instance_id, 0 ) : wcj_get_option( 'wcj_shipping_by_order_amount_min_' . $rate->method_id, 0 ) );
65
  $max = ( $this->use_shipping_instances ?
66
  get_option( 'wcj_shipping_by_order_amount_max_instance_' . $rate->instance_id, 0 ) : wcj_get_option( 'wcj_shipping_by_order_amount_max_' . $rate->method_id, 0 ) );
67
- if ( 0 != $min && $total_in_cart < $min ) {
68
  unset( $rates[ $rate_key ] );
69
- } elseif ( 0 != $max && $total_in_cart > $max ) {
70
  unset( $rates[ $rate_key ] );
71
  }
72
  }
2
  /**
3
  * Booster for WooCommerce - Module - Shipping Methods by Min/Max Order Amount
4
  *
5
+ * @version 5.6.2
6
  * @since 3.2.1
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
46
  /**
47
  * Available_shipping_methods.
48
  *
49
+ * @version 5.6.2
50
  * @since 3.2.1
51
  * @todo [dev] currency conversion
52
  * @todo apply_filters( 'booster_option' )
55
  * @param string | array $package Get packages.
56
  */
57
  public function available_shipping_methods( $rates, $package ) {
58
+
59
  if ( ! isset( WC()->cart ) || WC()->cart->is_empty() ) {
60
  return $rates;
61
  }
65
  get_option( 'wcj_shipping_by_order_amount_min_instance_' . $rate->instance_id, 0 ) : wcj_get_option( 'wcj_shipping_by_order_amount_min_' . $rate->method_id, 0 ) );
66
  $max = ( $this->use_shipping_instances ?
67
  get_option( 'wcj_shipping_by_order_amount_max_instance_' . $rate->instance_id, 0 ) : wcj_get_option( 'wcj_shipping_by_order_amount_max_' . $rate->method_id, 0 ) );
68
+ if ( (string) 0 !== $min && $total_in_cart < $min ) {
69
  unset( $rates[ $rate_key ] );
70
+ } elseif ( (string) 0 !== $max && $total_in_cart > $max ) {
71
  unset( $rates[ $rate_key ] );
72
  }
73
  }
includes/class-wcj-shipping-by-order-qty.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Shipping Methods by Min/Max Order Quantity
4
  *
5
- * @version 4.3.0
6
  * @since 4.3.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -72,7 +72,7 @@ if ( ! class_exists( 'WCJ_Shipping_By_Order_Qty' ) ) :
72
  /**
73
  * Available_shipping_methods.
74
  *
75
- * @version 4.3.0
76
  * @since 4.3.0
77
  * @todo apply_filters( 'booster_option' )
78
  * @param array $rates defines the rates.
@@ -84,9 +84,11 @@ if ( ! class_exists( 'WCJ_Shipping_By_Order_Qty' ) ) :
84
  }
85
  $total_qty = WC()->cart->get_cart_contents_count();
86
  foreach ( $rates as $rate_key => $rate ) {
87
- if ( 0 != ( $min = $this->get_min_max_qty( $rate, 'min' ) ) && $total_qty < $min ) {
 
 
88
  unset( $rates[ $rate_key ] );
89
- } elseif ( 0 != ( $max = $this->get_min_max_qty( $rate, 'max' ) ) && $total_qty > $max ) {
90
  unset( $rates[ $rate_key ] );
91
  }
92
  }
2
  /**
3
  * Booster for WooCommerce - Module - Shipping Methods by Min/Max Order Quantity
4
  *
5
+ * @version 5.6.2
6
  * @since 4.3.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
72
  /**
73
  * Available_shipping_methods.
74
  *
75
+ * @version 5.6.2
76
  * @since 4.3.0
77
  * @todo apply_filters( 'booster_option' )
78
  * @param array $rates defines the rates.
84
  }
85
  $total_qty = WC()->cart->get_cart_contents_count();
86
  foreach ( $rates as $rate_key => $rate ) {
87
+ $min = $this->get_min_max_qty( $rate, 'min' );
88
+ $max = $this->get_min_max_qty( $rate, 'max' );
89
+ if ( '0' !== $min && $total_qty < $min ) {
90
  unset( $rates[ $rate_key ] );
91
+ } elseif ( '0' !== $max && $total_qty > $max ) {
92
  unset( $rates[ $rate_key ] );
93
  }
94
  }
includes/class-wcj-shipping-by-products.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Shipping Methods by Products
4
  *
5
- * @version 5.2.0
6
  * @since 3.2.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -93,7 +93,7 @@ if ( ! class_exists( 'WCJ_Shipping_By_Products' ) ) :
93
  /**
94
  * Check.
95
  *
96
- * @version 4.2.0
97
  * @since 3.2.0
98
  * @todo variations in `classes`
99
  * @todo check for `if ( is_object( $product ) && is_callable( array( $product, 'get_shipping_class_id' ) ) ) { ... }`
@@ -126,10 +126,10 @@ if ( ! class_exists( 'WCJ_Shipping_By_Products' ) ) :
126
  foreach ( $this->get_items( $cart_instead_of_package, $package ) as $item ) {
127
  switch ( $options_id ) {
128
  case 'products':
129
- $_product_id = ( $do_add_variations && 0 != $item['variation_id'] ? $item['variation_id'] : $item['product_id'] );
130
- if ( $validate_all_for_include && ! in_array( $_product_id, $values ) ) {
131
  return false;
132
- } elseif ( ! $validate_all_for_include && in_array( $_product_id, $values ) ) {
133
  return true;
134
  }
135
  break;
@@ -144,9 +144,9 @@ if ( ! class_exists( 'WCJ_Shipping_By_Products' ) ) :
144
  }
145
  }
146
  foreach ( $product_terms as $product_term ) {
147
- if ( $validate_all_for_include && ! in_array( $product_term->term_id, $values ) ) {
148
  return false;
149
- } elseif ( ! $validate_all_for_include && in_array( $product_term->term_id, $values ) ) {
150
  return true;
151
  }
152
  }
@@ -154,9 +154,9 @@ if ( ! class_exists( 'WCJ_Shipping_By_Products' ) ) :
154
  case 'classes':
155
  $product = $item['data'];
156
  $product_shipping_class = $product->get_shipping_class_id();
157
- if ( $validate_all_for_include && ! in_array( $product_shipping_class, $values ) ) {
158
  return false;
159
- } elseif ( ! $validate_all_for_include && in_array( $product_shipping_class, $values ) ) {
160
  return true;
161
  }
162
  break;
2
  /**
3
  * Booster for WooCommerce - Module - Shipping Methods by Products
4
  *
5
+ * @version 5.6.2
6
  * @since 3.2.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
93
  /**
94
  * Check.
95
  *
96
+ * @version 5.6.2
97
  * @since 3.2.0
98
  * @todo variations in `classes`
99
  * @todo check for `if ( is_object( $product ) && is_callable( array( $product, 'get_shipping_class_id' ) ) ) { ... }`
126
  foreach ( $this->get_items( $cart_instead_of_package, $package ) as $item ) {
127
  switch ( $options_id ) {
128
  case 'products':
129
+ $_product_id = ( $do_add_variations && 0 > $item['variation_id'] ? $item['variation_id'] : $item['product_id'] );
130
+ if ( $validate_all_for_include && ! in_array( (string) $_product_id, $values, true ) ) {
131
  return false;
132
+ } elseif ( ! $validate_all_for_include && in_array( (string) $_product_id, $values, true ) ) {
133
  return true;
134
  }
135
  break;
144
  }
145
  }
146
  foreach ( $product_terms as $product_term ) {
147
+ if ( $validate_all_for_include && ! in_array( (string) $product_term->term_id, $values, true ) ) {
148
  return false;
149
+ } elseif ( ! $validate_all_for_include && in_array( (string) $product_term->term_id, $values, true ) ) {
150
  return true;
151
  }
152
  }
154
  case 'classes':
155
  $product = $item['data'];
156
  $product_shipping_class = $product->get_shipping_class_id();
157
+ if ( $validate_all_for_include && ! in_array( (string) $product_shipping_class, $values, true ) ) {
158
  return false;
159
+ } elseif ( ! $validate_all_for_include && in_array( (string) $product_shipping_class, $values, true ) ) {
160
  return true;
161
  }
162
  break;
includes/class-wcj-shipping-by-time.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Shipping by Time
4
  *
5
- * @version 5.6.1
6
  * @since 4.0.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -79,7 +79,7 @@ if ( ! class_exists( 'WCJ_Shipping_By_Time' ) ) :
79
  */
80
  public function parse_time( $value ) {
81
  $value = explode( '~', $value );
82
- if ( 2 != count( $value ) ) {
83
  return false;
84
  }
85
  $time_from = strtotime( $value[0] );
@@ -99,7 +99,7 @@ if ( ! class_exists( 'WCJ_Shipping_By_Time' ) ) :
99
  /**
100
  * Check.
101
  *
102
- * @version 4.0.0
103
  * @since 4.0.0
104
  * @param string $options_id defines the options_id.
105
  * @param array $values defines the values.
@@ -111,10 +111,10 @@ if ( ! class_exists( 'WCJ_Shipping_By_Time' ) ) :
111
  case 'time':
112
  $parsed_time = $this->parse_time( $values );
113
  if ( $parsed_time ) {
114
- $current_time = (int) current_time( 'timestamp' );
115
  return ( $current_time >= $parsed_time['time_from'] && $current_time <= $parsed_time['time_to'] );
116
  }
117
- return ( 'include' == $include_or_exclude ); // not parsable time input - leaving shipping method enabled.
118
  }
119
  }
120
 
@@ -145,8 +145,8 @@ if ( ! class_exists( 'WCJ_Shipping_By_Time' ) ) :
145
  $parsed_time = $this->parse_time( $values );
146
  if ( $parsed_time ) {
147
  return '. ' . sprintf(
148
- /* translators: %s: translators Added */
149
- __( 'According to current time, your time input will be parsed as: from %s to %s.', 'woocommerce-jetpack' ),
150
  '<code>' . gmdate( 'Y-m-d H:i:s', $parsed_time['time_from'] ) . '</code>',
151
  '<code>' . gmdate( 'Y-m-d H:i:s', $parsed_time['time_to'] ) . '</code>'
152
  );
2
  /**
3
  * Booster for WooCommerce - Module - Shipping by Time
4
  *
5
+ * @version 5.6.2
6
  * @since 4.0.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
79
  */
80
  public function parse_time( $value ) {
81
  $value = explode( '~', $value );
82
+ if ( 2 !== count( $value ) ) {
83
  return false;
84
  }
85
  $time_from = strtotime( $value[0] );
99
  /**
100
  * Check.
101
  *
102
+ * @version 5.6.2
103
  * @since 4.0.0
104
  * @param string $options_id defines the options_id.
105
  * @param array $values defines the values.
111
  case 'time':
112
  $parsed_time = $this->parse_time( $values );
113
  if ( $parsed_time ) {
114
+ $current_time = (int) gmdate( 'U' );
115
  return ( $current_time >= $parsed_time['time_from'] && $current_time <= $parsed_time['time_to'] );
116
  }
117
+ return ( 'include' === $include_or_exclude ); // not parsable time input - leaving shipping method enabled.
118
  }
119
  }
120
 
145
  $parsed_time = $this->parse_time( $values );
146
  if ( $parsed_time ) {
147
  return '. ' . sprintf(
148
+ /* translators: %1$s,%2$s: translators Added */
149
+ __( 'According to current time, your time input will be parsed as: from %1$s to %2$s.', 'woocommerce-jetpack' ),
150
  '<code>' . gmdate( 'Y-m-d H:i:s', $parsed_time['time_from'] ) . '</code>',
151
  '<code>' . gmdate( 'Y-m-d H:i:s', $parsed_time['time_to'] ) . '</code>'
152
  );
includes/class-wcj-shipping-by-user-role.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Shipping by User Role
4
  *
5
- * @version 5.2.0
6
  * @since 5.2.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -77,7 +77,7 @@ if ( ! class_exists( 'WCJ_Shipping_By_User_Role' ) ) :
77
  /**
78
  * Check.
79
  *
80
- * @version 4.8.0
81
  * @since 3.2.0
82
  * @todo use `$package` (and in this case update `wcj_get_left_to_free_shipping()`)
83
  * @param string $options_id defines the options_id.
@@ -97,7 +97,7 @@ if ( ! class_exists( 'WCJ_Shipping_By_User_Role' ) ) :
97
  if ( ! isset( $this->user_id ) ) {
98
  $this->user_id = get_current_user_id();
99
  }
100
- return in_array( $this->user_id, $user_roles_or_ids_or_membership_plans );
101
  case 'user_membership':
102
  if ( ! isset( $this->user_id ) ) {
103
  $this->user_id = get_current_user_id();
2
  /**
3
  * Booster for WooCommerce - Module - Shipping by User Role
4
  *
5
+ * @version 5.6.2
6
  * @since 5.2.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
77
  /**
78
  * Check.
79
  *
80
+ * @version 5.6.2
81
  * @since 3.2.0
82
  * @todo use `$package` (and in this case update `wcj_get_left_to_free_shipping()`)
83
  * @param string $options_id defines the options_id.
97
  if ( ! isset( $this->user_id ) ) {
98
  $this->user_id = get_current_user_id();
99
  }
100
+ return in_array( $this->user_id, $user_roles_or_ids_or_membership_plans, true );
101
  case 'user_membership':
102
  if ( ! isset( $this->user_id ) ) {
103
  $this->user_id = get_current_user_id();
includes/class-wcj-shipping-calculator.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Shipping Calculator
4
  *
5
- * @version 5.2.0
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -67,7 +67,7 @@ if ( ! class_exists( 'WCJ_Shipping_Calculator' ) ) :
67
  /**
68
  * Add_custom_styles.
69
  *
70
- * @version 2.8.0
71
  */
72
  public function add_custom_styles() {
73
  $html = '<style type="text/css">';
@@ -83,7 +83,7 @@ if ( ! class_exists( 'WCJ_Shipping_Calculator' ) ) :
83
  }
84
  }
85
  $html .= '</style>';
86
- echo $html;
87
  }
88
 
89
  /**
2
  /**
3
  * Booster for WooCommerce - Module - Shipping Calculator
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
67
  /**
68
  * Add_custom_styles.
69
  *
70
+ * @version 5.6.2
71
  */
72
  public function add_custom_styles() {
73
  $html = '<style type="text/css">';
83
  }
84
  }
85
  $html .= '</style>';
86
+ echo wp_kses_post( $html );
87
  }
88
 
89
  /**
includes/{class-wcj-shipping-description.php → class-wcj-shipping-descriptions.php} RENAMED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Shipping Descriptions
4
  *
5
- * @version 5.2.0
6
  * @since 3.4.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -47,7 +47,7 @@ if ( ! class_exists( 'WCJ_Shipping_Descriptions' ) ) :
47
  * Shipping_description.
48
  *
49
  * @version 3.6.0
50
- * @since 2.5.6
51
  * @todo `shipping_descriptions_position` on per method basis
52
  * @param String $label Get shipping label.
53
  * @param String $method Get shipping method.
@@ -62,7 +62,7 @@ if ( ! class_exists( 'WCJ_Shipping_Descriptions' ) ) :
62
  $use_shipping_instances = ( 'yes' === wcj_get_option( 'wcj_shipping_descriptions_use_shipping_instance', 'no' ) );
63
  $option_id = 'wcj_shipping_description_' . ( $use_shipping_instances ? 'instance_' . $method->instance_id : $method->method_id );
64
  $desc = wcj_get_option( $option_id, '' );
65
- if ( '' != ( $desc ) ) {
66
  switch ( $this->shipping_descriptions_position ) {
67
  case 'before':
68
  return $desc . $label;
2
  /**
3
  * Booster for WooCommerce - Module - Shipping Descriptions
4
  *
5
+ * @version 5.6.2
6
  * @since 3.4.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
47
  * Shipping_description.
48
  *
49
  * @version 3.6.0
50
+ * @since 5.6.2
51
  * @todo `shipping_descriptions_position` on per method basis
52
  * @param String $label Get shipping label.
53
  * @param String $method Get shipping method.
62
  $use_shipping_instances = ( 'yes' === wcj_get_option( 'wcj_shipping_descriptions_use_shipping_instance', 'no' ) );
63
  $option_id = 'wcj_shipping_description_' . ( $use_shipping_instances ? 'instance_' . $method->instance_id : $method->method_id );
64
  $desc = wcj_get_option( $option_id, '' );
65
+ if ( '' !== ( $desc ) ) {
66
  switch ( $this->shipping_descriptions_position ) {
67
  case 'before':
68
  return $desc . $label;
includes/class-wcj-shipping-icons.php CHANGED
@@ -60,9 +60,9 @@ if ( ! class_exists( 'WCJ_Shipping_Icons' ) ) :
60
  $use_shipping_instances = ( 'yes' === wcj_get_option( 'wcj_shipping_icons_use_shipping_instance', 'no' ) );
61
  $option_id = 'wcj_shipping_icon_' . ( $use_shipping_instances ? 'instance_' . $method->instance_id : $method->method_id );
62
  $icon_url = wcj_get_option( $option_id, '' );
63
- if ( '' != ( $icon_url ) ) {
64
  $style = wcj_get_option( 'wcj_shipping_icons_style', 'display:inline;' );
65
- $style_html = ( '' != ( $style ) ) ? 'style="' . $style . '" ' : '';
66
  $img = '<img ' . $style_html . 'class="wcj_shipping_icon" id="' . $option_id . '" src="' . $icon_url . '">';
67
  $label = ( 'before' === wcj_get_option( 'wcj_shipping_icons_position', 'before' ) ) ? $img . ' ' . $label : $label . ' ' . $img;
68
  }
60
  $use_shipping_instances = ( 'yes' === wcj_get_option( 'wcj_shipping_icons_use_shipping_instance', 'no' ) );
61
  $option_id = 'wcj_shipping_icon_' . ( $use_shipping_instances ? 'instance_' . $method->instance_id : $method->method_id );
62
  $icon_url = wcj_get_option( $option_id, '' );
63
+ if ( '' !== ( $icon_url ) ) {
64
  $style = wcj_get_option( 'wcj_shipping_icons_style', 'display:inline;' );
65
+ $style_html = ( '' !== ( $style ) ) ? 'style="' . $style . '" ' : '';
66
  $img = '<img ' . $style_html . 'class="wcj_shipping_icon" id="' . $option_id . '" src="' . $icon_url . '">';
67
  $label = ( 'before' === wcj_get_option( 'wcj_shipping_icons_position', 'before' ) ) ? $img . ' ' . $label : $label . ' ' . $img;
68
  }
includes/class-wcj-shipping-options.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Shipping Options
4
  *
5
- * @version 5.2.0
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -68,7 +68,7 @@ if ( ! class_exists( 'WCJ_Shipping_Options' ) ) :
68
  /**
69
  * Show_most_expensive_shipping.
70
  *
71
- * @version 5.2.0
72
  * @since 5.2.0
73
  *
74
  * @param array $rates defines the rates.
@@ -86,7 +86,7 @@ if ( ! class_exists( 'WCJ_Shipping_Options' ) ) :
86
  if ( is_array( $rates ) ) :
87
  foreach ( $rates as $key => $rate ) {
88
  if (
89
- ! in_array( $rate->method_id, $ignored_method_ids ) &&
90
  ( empty( $most_expensive_method ) || $rate->cost > $most_expensive_method->cost )
91
  ) {
92
  $most_expensive_method = $rate;
@@ -97,7 +97,7 @@ if ( ! class_exists( 'WCJ_Shipping_Options' ) ) :
97
  $returned_rates[ $most_expensive_method->id ] = $most_expensive_method;
98
  }
99
  foreach ( $rates as $key => $rate ) {
100
- if ( in_array( $rate->method_id, $ignored_method_ids ) ) {
101
  $returned_rates[ $rate->id ] = $rate;
102
  }
103
  }
@@ -110,7 +110,7 @@ if ( ! class_exists( 'WCJ_Shipping_Options' ) ) :
110
  /**
111
  * Free_shipping_by_product.
112
  *
113
- * @version 2.6.0
114
  * @since 2.6.0
115
  * @return bool
116
  * @param string | bool $is_available defines the is_available.
@@ -124,7 +124,7 @@ if ( ! class_exists( 'WCJ_Shipping_Options' ) ) :
124
  $free_shipping_granting_products_type = apply_filters( 'booster_option', 'all', wcj_get_option( 'wcj_shipping_free_shipping_by_product_type', 'all' ) );
125
  $package_grants_free_shipping = false;
126
  foreach ( $package['contents'] as $item ) {
127
- if ( in_array( $item['product_id'], $free_shipping_granting_products ) ) {
128
  if ( 'at_least_one' === $free_shipping_granting_products_type ) {
129
  return true;
130
  } elseif ( ! $package_grants_free_shipping ) {
2
  /**
3
  * Booster for WooCommerce - Module - Shipping Options
4
  *
5
+ * @version 5.6.2
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
68
  /**
69
  * Show_most_expensive_shipping.
70
  *
71
+ * @version 5.6.2
72
  * @since 5.2.0
73
  *
74
  * @param array $rates defines the rates.
86
  if ( is_array( $rates ) ) :
87
  foreach ( $rates as $key => $rate ) {
88
  if (
89
+ ! in_array( $rate->method_id, $ignored_method_ids, true ) &&
90
  ( empty( $most_expensive_method ) || $rate->cost > $most_expensive_method->cost )
91
  ) {
92
  $most_expensive_method = $rate;
97
  $returned_rates[ $most_expensive_method->id ] = $most_expensive_method;
98
  }
99
  foreach ( $rates as $key => $rate ) {
100
+ if ( in_array( $rate->method_id, $ignored_method_ids, true ) ) {
101
  $returned_rates[ $rate->id ] = $rate;
102
  }
103
  }
110
  /**
111
  * Free_shipping_by_product.
112
  *
113
+ * @version 5.6.2
114
  * @since 2.6.0
115
  * @return bool
116
  * @param string | bool $is_available defines the is_available.
124
  $free_shipping_granting_products_type = apply_filters( 'booster_option', 'all', wcj_get_option( 'wcj_shipping_free_shipping_by_product_type', 'all' ) );
125
  $package_grants_free_shipping = false;
126
  foreach ( $package['contents'] as $item ) {
127
+ if ( in_array( $item['product_id'], $free_shipping_granting_products, true ) ) {
128
  if ( 'at_least_one' === $free_shipping_granting_products_type ) {
129
  return true;
130
  } elseif ( ! $package_grants_free_shipping ) {
includes/class-wcj-shipping.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Custom Shipping
4
  *
5
- * @version 4.7.1
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -54,13 +54,13 @@ if ( ! class_exists( 'WCJ_Shipping' ) ) :
54
  * @since 4.5.0
55
  */
56
  public function init_template_class() {
57
- require_once 'shipping/class-wc-shipping-wcj-custom.php';
58
  }
59
 
60
  /**
61
  * Init_shipping_zones_class
62
  *
63
- * @version 4.5.0
64
  * @since 4.5.0
65
  */
66
  public function init_shipping_zones_class() {
2
  /**
3
  * Booster for WooCommerce - Module - Custom Shipping
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
54
  * @since 4.5.0
55
  */
56
  public function init_template_class() {
57
+ require_once 'shipping/class-wc-shipping-wcj-custom-template.php';
58
  }
59
 
60
  /**
61
  * Init_shipping_zones_class
62
  *
63
+ * @version 5.6.2
64
  * @since 4.5.0
65
  */
66
  public function init_shipping_zones_class() {
includes/class-wcj-sku.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - SKU
4
  *
5
- * @version 5.6.1
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -82,12 +82,15 @@ if ( ! class_exists( 'WCJ_SKU' ) ) :
82
  /**
83
  * Generate_default_hashids_salt.
84
  *
85
- * @version 4.7.0
86
  * @since 4.7.0
87
  */
88
  public function generate_default_hashids_salt() {
89
- if (
90
- isset( $_GET['page'] ) && 'wc-settings' === $_GET['page'] &&
 
 
 
91
  isset( $_GET['tab'] ) && 'jetpack' === $_GET['tab'] &&
92
  isset( $_GET['wcj-cat'] ) && 'products' === $_GET['wcj-cat'] &&
93
  isset( $_GET['section'] ) && 'sku' === $_GET['section']
@@ -157,7 +160,7 @@ if ( ! class_exists( 'WCJ_SKU' ) ) :
157
  /**
158
  * Add_search_by_sku_to_frontend_posts_search.
159
  *
160
- * @version 3.4.0
161
  * @since 3.4.0
162
  * @see https://plugins.svn.wordpress.org/search-by-sku-for-woocommerce/
163
  * @param string $where defines the where.
@@ -165,11 +168,11 @@ if ( ! class_exists( 'WCJ_SKU' ) ) :
165
  public function add_search_by_sku_to_frontend_posts_search( $where ) {
166
  global $pagenow, $wpdb, $wp;
167
  if (
168
- ( is_admin() && 'edit.php' != $pagenow ) ||
169
  ! is_search() ||
170
  ! isset( $wp->query_vars['s'] ) ||
171
- ( isset( $wp->query_vars['post_type'] ) && 'product' != $wp->query_vars['post_type'] ) ||
172
- ( isset( $wp->query_vars['post_type'] ) && is_array( $wp->query_vars['post_type'] ) && ! in_array( 'product', $wp->query_vars['post_type'] ) )
173
  ) {
174
  return $where;
175
  }
@@ -179,16 +182,12 @@ if ( ! class_exists( 'WCJ_SKU' ) ) :
179
  if ( is_admin() && is_numeric( $term ) ) {
180
  $search_ids[] = $term;
181
  }
182
- $variations_query = 'SELECT p.post_parent as post_id' .
183
- " FROM {$wpdb->posts} as p join {$wpdb->postmeta} pm on p.ID = pm.post_id and pm.meta_key='_sku' and pm.meta_value" .
184
- " LIKE '%%%s%%' where p.post_parent <> 0 group by p.post_parent";
185
- $regular_products_query = "SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key='_sku' AND meta_value LIKE '%%%s%%';";
186
- $sku_to_parent_id = $wpdb->get_col( $wpdb->prepare( $variations_query, wc_clean( $term ) ) );
187
- $sku_to_id = $wpdb->get_col( $wpdb->prepare( $regular_products_query, wc_clean( $term ) ) );
188
- $search_ids = array_merge( $search_ids, $sku_to_id, $sku_to_parent_id );
189
  }
190
  $search_ids = array_filter( array_map( 'absint', $search_ids ) );
191
- if ( sizeof( $search_ids ) > 0 ) {
192
  $where = str_replace( ')))', ") OR ({$wpdb->posts}.ID IN (" . implode( ',', $search_ids ) . '))))', $where );
193
  }
194
  return $where;
@@ -273,7 +272,7 @@ if ( ! class_exists( 'WCJ_SKU' ) ) :
273
  /**
274
  * Set_sku_with_variable.
275
  *
276
- * @version 4.7.0
277
  * @todo `as_variable_with_suffix` - handle cases with more than 26 variations
278
  * @param int $product_id defines the product_id.
279
  * @param string | bool $is_preview defines the is_preview.
@@ -314,7 +313,7 @@ if ( ! class_exists( 'WCJ_SKU' ) ) :
314
  $sku_object = $this->generate_sku( $variation['variation_id'], $suffix . '_' . sprintf( '%u', crc32( $variation['variation_id'] ) ), $product_id, wc_get_product( $variation['variation_id'] ) );
315
  }
316
  $this->set_sku( $variation['variation_id'], $sku_object, $is_preview );
317
- if ( 26 == $abc ) {
318
  $abc = 0;
319
  }
320
  }
@@ -361,7 +360,7 @@ if ( ! class_exists( 'WCJ_SKU' ) ) :
361
  /**
362
  * Maybe_process_attributes.
363
  *
364
- * @version 3.6.0
365
  * @since 3.6.0
366
  * @param array $_product defines the _product.
367
  * @param string $format_template defines the format_template.
@@ -398,7 +397,7 @@ if ( ! class_exists( 'WCJ_SKU' ) ) :
398
  if ( isset( $atts[ $att_name ] ) ) {
399
  if ( $is_variation ) {
400
  $slug = $atts[ $att_name ];
401
- if ( 0 != $limit ) {
402
  $slug = substr( $slug, 0, $limit );
403
  }
404
  $att_res[] = $slug; // array is not necessary here (always one slug).
@@ -406,7 +405,7 @@ if ( ! class_exists( 'WCJ_SKU' ) ) :
406
  $att_object = $atts[ $att_name ];
407
  if ( is_object( $att_object ) && 'WC_Product_Attribute' === get_class( $att_object ) ) {
408
  foreach ( $att_object->get_slugs() as $slug ) {
409
- if ( 0 != $limit ) {
410
  $slug = substr( $slug, 0, $limit );
411
  }
412
  $att_res[] = $slug;
@@ -546,7 +545,7 @@ if ( ! class_exists( 'WCJ_SKU' ) ) :
546
  /**
547
  * Set_sku.
548
  *
549
- * @version 4.7.0
550
  * @todo deprecate `{prefix}` and `{suffix}`
551
  * @todo `{tag_prefix}`, `{tag_suffix}`
552
  * @todo (maybe) remove some "replaced values" that can be replaced by Booster products shortcodes, e.g.: `[wcj_product_slug]` (and update description in settings)
@@ -563,7 +562,7 @@ if ( ! class_exists( 'WCJ_SKU' ) ) :
563
  $do_generate_new_sku = $sku_object['do_generate_new_sku'];
564
  if ( $is_preview ) {
565
  $this->preview_buffer .= '<tr>' .
566
- '<td>' . $this->product_counter++ . '</td>' .
567
  '<td>' . $product_id . '</td>' .
568
  '<td>' . $product->get_title() . '</td>' .
569
  '<td>' . $product_cat . '</td>' .
@@ -618,15 +617,16 @@ if ( ! class_exists( 'WCJ_SKU' ) ) :
618
  /**
619
  * Set_all_products_skus.
620
  *
621
- * @version 3.5.0
622
  * @param string | bool $is_preview defines the is_preview.
623
  */
624
- function set_all_products_skus( $is_preview ) {
625
  $this->maybe_get_sequential_counters();
626
  $limit = 512;
627
  $offset = 0;
628
- $start_id = ( isset( $_POST['wcj_sku_start_id'] ) && 0 != sanitize_text_field( wp_unslash( $_POST['wcj_sku_start_id'] ) ) ? sanitize_text_field( wp_unslash( $_POST['wcj_sku_start_id'] ) ) : 0 );
629
- $end_id = ( isset( $_POST['wcj_sku_end_id'] ) && 0 != sanitize_text_field( wp_unslash( $_POST['wcj_sku_end_id'] ) ) ? sanitize_text_field( wp_unslash( $_POST['wcj_sku_end_id'] ) ) : PHP_INT_MAX );
 
630
  while ( true ) {
631
  $posts = new WP_Query(
632
  array(
@@ -670,20 +670,20 @@ if ( ! class_exists( 'WCJ_SKU' ) ) :
670
  /**
671
  * Set_sku_for_new_product.
672
  *
673
- * @version 3.1.3
674
  * @todo (maybe) set `wcj_sku_new_products_generate_only_on_publish` to `yes` by default
675
  * @param string | int $post_ID defines the post_ID.
676
  * @param string | array $post defines the post.
677
  * @param string | bool $update defines the update.
678
  */
679
  public function set_sku_for_new_product( $post_ID, $post, $update ) {
680
- if ( 'product' != $post->post_type ) {
681
  return;
682
  }
683
  $do_generate_only_on_first_publish = ( 'yes' === wcj_get_option( 'wcj_sku_new_products_generate_only_on_publish', 'no' ) );
684
  if (
685
  ( false === $update && ! $do_generate_only_on_first_publish ) ||
686
- ( $do_generate_only_on_first_publish && 'publish' === $post->post_status && '' == get_post_meta( $post_ID, '_sku', true ) )
687
  ) {
688
  $this->maybe_get_sequential_counters();
689
  $this->set_sku_with_variable( $post_ID, false );
@@ -694,10 +694,11 @@ if ( ! class_exists( 'WCJ_SKU' ) ) :
694
  /**
695
  * Create_sku_tool
696
  *
697
- * @version 5.5.6
698
  */
699
  public function create_sku_tool() {
700
  $result_message = '';
 
701
  $is_preview = ( isset( $_POST['preview_sku'] ) );
702
  if ( isset( $_POST['set_sku'] ) || isset( $_POST['preview_sku'] ) ) {
703
  $this->product_counter = 1;
@@ -734,18 +735,19 @@ if ( ! class_exists( 'WCJ_SKU' ) ) :
734
  $html .= '<em>' . __( 'You can optionally limit affected products by main product\'s ID (set option to zero to ignore):', 'woocommerce-jetpack' ) . '</em>';
735
  $html .= '<br>';
736
  $html .= '<label for="wcj_sku_start_id">' . __( 'Min ID', 'woocommerce-jetpack' ) . ': </label>';
737
- $html .= '<input type="number" name="wcj_sku_start_id" id="wcj_sku_start_id" min="0" value="' . ( isset( $_POST['wcj_sku_start_id'] ) ? sanitize_text_field( wp_unslash( $_POST['wcj_sku_start_id'] ) ) : 0 ) . '">';
738
  $html .= ' ';
739
  $html .= '<label for="wcj_sku_end_id">' . __( 'Max ID', 'woocommerce-jetpack' ) . ': </label>';
740
- $html .= '<input type="number" name="wcj_sku_end_id" id="wcj_sku_end_id" min="0" value="' . ( isset( $_POST['wcj_sku_end_id'] ) ? sanitize_text_field( wp_unslash( $_POST['wcj_sku_end_id'] ) ) : 0 ) . '">';
741
  $html .= '</p>';
 
742
  $html .= '</form>';
743
  if ( $is_preview ) {
744
  $html .= $preview_html;
745
  }
746
  $html .= '</div>';
747
  $html .= '</div>';
748
- echo $html;
749
  }
750
 
751
  /**
2
  /**
3
  * Booster for WooCommerce - Module - SKU
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
82
  /**
83
  * Generate_default_hashids_salt.
84
  *
85
+ * @version 5.6.2
86
  * @since 4.7.0
87
  */
88
  public function generate_default_hashids_salt() {
89
+ $wpnonce = true;
90
+ if ( function_exists( 'wp_verify_nonce' ) ) {
91
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
92
+ }
93
+ if ( $wpnonce && isset( $_GET['page'] ) && 'wc-settings' === $_GET['page'] &&
94
  isset( $_GET['tab'] ) && 'jetpack' === $_GET['tab'] &&
95
  isset( $_GET['wcj-cat'] ) && 'products' === $_GET['wcj-cat'] &&
96
  isset( $_GET['section'] ) && 'sku' === $_GET['section']
160
  /**
161
  * Add_search_by_sku_to_frontend_posts_search.
162
  *
163
+ * @version 5.6.2
164
  * @since 3.4.0
165
  * @see https://plugins.svn.wordpress.org/search-by-sku-for-woocommerce/
166
  * @param string $where defines the where.
168
  public function add_search_by_sku_to_frontend_posts_search( $where ) {
169
  global $pagenow, $wpdb, $wp;
170
  if (
171
+ ( is_admin() && 'edit.php' !== $pagenow ) ||
172
  ! is_search() ||
173
  ! isset( $wp->query_vars['s'] ) ||
174
+ ( isset( $wp->query_vars['post_type'] ) && 'product' !== $wp->query_vars['post_type'] ) ||
175
+ ( isset( $wp->query_vars['post_type'] ) && is_array( $wp->query_vars['post_type'] ) && ! in_array( 'product', $wp->query_vars['post_type'], true ) )
176
  ) {
177
  return $where;
178
  }
182
  if ( is_admin() && is_numeric( $term ) ) {
183
  $search_ids[] = $term;
184
  }
185
+ $sku_to_parent_id = $wpdb->get_col( $wpdb->prepare( 'SELECT p.post_parent as post_id FROM {$wpdb->posts} as p join {$wpdb->postmeta} pm on p.ID = pm.post_id and pm.meta_key="_sku" and pm.meta_value LIKE %s where p.post_parent <> 0 group by p.post_parent', $wpdb->esc_like( wc_clean( '%' . $term . '%' ) ) ) ); // WPCS: db call ok and cache ok.
186
+ $sku_to_id = $wpdb->get_col( $wpdb->prepare( "SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key='_sku' AND meta_value LIKE %s;", $wpdb->esc_like( '%' . wc_clean( $term ) . '%' ) ) ); // WPCS: db call ok and cache ok.
187
+ $search_ids = array_merge( $search_ids, $sku_to_id, $sku_to_parent_id );
 
 
 
 
188
  }
189
  $search_ids = array_filter( array_map( 'absint', $search_ids ) );
190
+ if ( count( $search_ids ) > 0 ) {
191
  $where = str_replace( ')))', ") OR ({$wpdb->posts}.ID IN (" . implode( ',', $search_ids ) . '))))', $where );
192
  }
193
  return $where;
272
  /**
273
  * Set_sku_with_variable.
274
  *
275
+ * @version 5.6.2
276
  * @todo `as_variable_with_suffix` - handle cases with more than 26 variations
277
  * @param int $product_id defines the product_id.
278
  * @param string | bool $is_preview defines the is_preview.
313
  $sku_object = $this->generate_sku( $variation['variation_id'], $suffix . '_' . sprintf( '%u', crc32( $variation['variation_id'] ) ), $product_id, wc_get_product( $variation['variation_id'] ) );
314
  }
315
  $this->set_sku( $variation['variation_id'], $sku_object, $is_preview );
316
+ if ( 26 === $abc ) {
317
  $abc = 0;
318
  }
319
  }
360
  /**
361
  * Maybe_process_attributes.
362
  *
363
+ * @version 5.6.2
364
  * @since 3.6.0
365
  * @param array $_product defines the _product.
366
  * @param string $format_template defines the format_template.
397
  if ( isset( $atts[ $att_name ] ) ) {
398
  if ( $is_variation ) {
399
  $slug = $atts[ $att_name ];
400
+ if ( 0 !== (int) $limit ) {
401
  $slug = substr( $slug, 0, $limit );
402
  }
403
  $att_res[] = $slug; // array is not necessary here (always one slug).
405
  $att_object = $atts[ $att_name ];
406
  if ( is_object( $att_object ) && 'WC_Product_Attribute' === get_class( $att_object ) ) {
407
  foreach ( $att_object->get_slugs() as $slug ) {
408
+ if ( 0 !== (int) $limit ) {
409
  $slug = substr( $slug, 0, $limit );
410
  }
411
  $att_res[] = $slug;
545
  /**
546
  * Set_sku.
547
  *
548
+ * @version 5.6.2
549
  * @todo deprecate `{prefix}` and `{suffix}`
550
  * @todo `{tag_prefix}`, `{tag_suffix}`
551
  * @todo (maybe) remove some "replaced values" that can be replaced by Booster products shortcodes, e.g.: `[wcj_product_slug]` (and update description in settings)
562
  $do_generate_new_sku = $sku_object['do_generate_new_sku'];
563
  if ( $is_preview ) {
564
  $this->preview_buffer .= '<tr>' .
565
+ '<td>' . ( $this->product_counter++ ) . '</td>' .
566
  '<td>' . $product_id . '</td>' .
567
  '<td>' . $product->get_title() . '</td>' .
568
  '<td>' . $product_cat . '</td>' .
617
  /**
618
  * Set_all_products_skus.
619
  *
620
+ * @version 5.6.2
621
  * @param string | bool $is_preview defines the is_preview.
622
  */
623
+ public function set_all_products_skus( $is_preview ) {
624
  $this->maybe_get_sequential_counters();
625
  $limit = 512;
626
  $offset = 0;
627
+ $wpnonce = wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'wcj-sku-tools-nonce' );
628
+ $start_id = ( $wpnonce && isset( $_POST['wcj_sku_start_id'] ) && '0' !== sanitize_text_field( wp_unslash( $_POST['wcj_sku_start_id'] ) ) ? sanitize_text_field( wp_unslash( $_POST['wcj_sku_start_id'] ) ) : 0 );
629
+ $end_id = ( $wpnonce && isset( $_POST['wcj_sku_end_id'] ) && '0' !== sanitize_text_field( wp_unslash( $_POST['wcj_sku_end_id'] ) ) ? sanitize_text_field( wp_unslash( $_POST['wcj_sku_end_id'] ) ) : PHP_INT_MAX );
630
  while ( true ) {
631
  $posts = new WP_Query(
632
  array(
670
  /**
671
  * Set_sku_for_new_product.
672
  *
673
+ * @version 5.6.2
674
  * @todo (maybe) set `wcj_sku_new_products_generate_only_on_publish` to `yes` by default
675
  * @param string | int $post_ID defines the post_ID.
676
  * @param string | array $post defines the post.
677
  * @param string | bool $update defines the update.
678
  */
679
  public function set_sku_for_new_product( $post_ID, $post, $update ) {
680
+ if ( 'product' !== $post->post_type ) {
681
  return;
682
  }
683
  $do_generate_only_on_first_publish = ( 'yes' === wcj_get_option( 'wcj_sku_new_products_generate_only_on_publish', 'no' ) );
684
  if (
685
  ( false === $update && ! $do_generate_only_on_first_publish ) ||
686
+ ( $do_generate_only_on_first_publish && 'publish' === $post->post_status && '' === get_post_meta( $post_ID, '_sku', true ) )
687
  ) {
688
  $this->maybe_get_sequential_counters();
689
  $this->set_sku_with_variable( $post_ID, false );
694
  /**
695
  * Create_sku_tool
696
  *
697
+ * @version 5.6.2
698
  */
699
  public function create_sku_tool() {
700
  $result_message = '';
701
+ $wpnonce = wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'wcj-sku-tools-nonce' );
702
  $is_preview = ( isset( $_POST['preview_sku'] ) );
703
  if ( isset( $_POST['set_sku'] ) || isset( $_POST['preview_sku'] ) ) {
704
  $this->product_counter = 1;
735
  $html .= '<em>' . __( 'You can optionally limit affected products by main product\'s ID (set option to zero to ignore):', 'woocommerce-jetpack' ) . '</em>';
736
  $html .= '<br>';
737
  $html .= '<label for="wcj_sku_start_id">' . __( 'Min ID', 'woocommerce-jetpack' ) . ': </label>';
738
+ $html .= '<input type="number" name="wcj_sku_start_id" id="wcj_sku_start_id" min="0" value="' . ( $wpnonce && isset( $_POST['wcj_sku_start_id'] ) ? sanitize_text_field( wp_unslash( $_POST['wcj_sku_start_id'] ) ) : 0 ) . '">';
739
  $html .= ' ';
740
  $html .= '<label for="wcj_sku_end_id">' . __( 'Max ID', 'woocommerce-jetpack' ) . ': </label>';
741
+ $html .= '<input type="number" name="wcj_sku_end_id" id="wcj_sku_end_id" min="0" value="' . ( $wpnonce && isset( $_POST['wcj_sku_end_id'] ) ? sanitize_text_field( wp_unslash( $_POST['wcj_sku_end_id'] ) ) : 0 ) . '">';
742
  $html .= '</p>';
743
+ $html .= wp_nonce_field( 'wcj-sku-tools-nonce' );
744
  $html .= '</form>';
745
  if ( $is_preview ) {
746
  $html .= $preview_html;
747
  }
748
  $html .= '</div>';
749
  $html .= '</div>';
750
+ echo wp_kses_post( $html );
751
  }
752
 
753
  /**
includes/class-wcj-sorting.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Sorting
4
  *
5
- * @version 5.2.0
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -298,13 +298,17 @@ if ( ! class_exists( 'WCJ_Sorting' ) ) :
298
  * Add new sorting options to WooCommerce sorting.
299
  *
300
  * @param array $args Get args.
301
- * @version 2.7.0
302
  */
303
  public function custom_woocommerce_get_catalog_ordering_args( $args ) {
304
-
305
  // Get ordering from query string.
 
 
 
 
 
306
  $orderby_value = ( WCJ_IS_WC_VERSION_BELOW_3 ) ?
307
- ( isset( $_GET['orderby'] ) ? woocommerce_clean( sanitize_text_field( wp_unslash( $_GET['orderby'] ) ) ) : apply_filters(
308
  'woocommerce_default_catalog_orderby',
309
  get_option( 'woocommerce_default_catalog_orderby' )
310
  ) ) :
@@ -321,34 +325,34 @@ if ( ! class_exists( 'WCJ_Sorting' ) ) :
321
  case 'title_asc':
322
  $args['orderby'] = 'title';
323
  $args['order'] = 'asc';
324
- $args['meta_key'] = '';
325
  break;
326
  case 'title_desc':
327
  $args['orderby'] = 'title';
328
  $args['order'] = 'desc';
329
- $args['meta_key'] = '';
330
  break;
331
  case 'sku_asc':
332
  $args['orderby'] = ( 'no' === apply_filters( 'booster_option', 'no', wcj_get_option( 'wcj_sorting_by_sku_num_enabled', 'no' ) ) ) ?
333
  'meta_value' : 'meta_value_num';
334
  $args['order'] = 'asc';
335
- $args['meta_key'] = '_sku';
336
  break;
337
  case 'sku_desc':
338
  $args['orderby'] = ( 'no' === apply_filters( 'booster_option', 'no', wcj_get_option( 'wcj_sorting_by_sku_num_enabled', 'no' ) ) ) ?
339
  'meta_value' : 'meta_value_num';
340
  $args['order'] = 'desc';
341
- $args['meta_key'] = '_sku';
342
  break;
343
  case 'stock_quantity_asc':
344
  $args['orderby'] = 'meta_value_num';
345
  $args['order'] = 'asc';
346
- $args['meta_key'] = '_stock';
347
  break;
348
  case 'stock_quantity_desc':
349
  $args['orderby'] = 'meta_value_num';
350
  $args['order'] = 'desc';
351
- $args['meta_key'] = '_stock';
352
  break;
353
  endswitch;
354
 
2
  /**
3
  * Booster for WooCommerce - Module - Sorting
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
298
  * Add new sorting options to WooCommerce sorting.
299
  *
300
  * @param array $args Get args.
301
+ * @version 5.6.2
302
  */
303
  public function custom_woocommerce_get_catalog_ordering_args( $args ) {
 
304
  // Get ordering from query string.
305
+ $wpnonce = true;
306
+ if ( function_exists( 'wp_verify_nonce' ) ) {
307
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
308
+ }
309
+
310
  $orderby_value = ( WCJ_IS_WC_VERSION_BELOW_3 ) ?
311
+ ( ( isset( $_GET['orderby'] ) && $wpnonce ) ? woocommerce_clean( sanitize_text_field( wp_unslash( $_GET['orderby'] ) ) ) : apply_filters(
312
  'woocommerce_default_catalog_orderby',
313
  get_option( 'woocommerce_default_catalog_orderby' )
314
  ) ) :
325
  case 'title_asc':
326
  $args['orderby'] = 'title';
327
  $args['order'] = 'asc';
328
+ $args['meta_key'] = ''; //phpcs:ignore
329
  break;
330
  case 'title_desc':
331
  $args['orderby'] = 'title';
332
  $args['order'] = 'desc';
333
+ $args['meta_key'] = ''; //phpcs:ignore
334
  break;
335
  case 'sku_asc':
336
  $args['orderby'] = ( 'no' === apply_filters( 'booster_option', 'no', wcj_get_option( 'wcj_sorting_by_sku_num_enabled', 'no' ) ) ) ?
337
  'meta_value' : 'meta_value_num';
338
  $args['order'] = 'asc';
339
+ $args['meta_key'] = '_sku'; //phpcs:ignore
340
  break;
341
  case 'sku_desc':
342
  $args['orderby'] = ( 'no' === apply_filters( 'booster_option', 'no', wcj_get_option( 'wcj_sorting_by_sku_num_enabled', 'no' ) ) ) ?
343
  'meta_value' : 'meta_value_num';
344
  $args['order'] = 'desc';
345
+ $args['meta_key'] = '_sku'; //phpcs:ignore
346
  break;
347
  case 'stock_quantity_asc':
348
  $args['orderby'] = 'meta_value_num';
349
  $args['order'] = 'asc';
350
+ $args['meta_key'] = '_stock'; //phpcs:ignore
351
  break;
352
  case 'stock_quantity_desc':
353
  $args['orderby'] = 'meta_value_num';
354
  $args['order'] = 'desc';
355
+ $args['meta_key'] = '_stock'; //phpcs:ignore
356
  break;
357
  endswitch;
358
 
includes/class-wcj-tax-display.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Tax Display
4
  *
5
- * @version 4.6.0
6
  * @since 3.2.4
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -59,14 +59,18 @@ if ( ! class_exists( 'WCJ_Tax_Display' ) ) :
59
  /**
60
  * Tax_display_toggle_param.
61
  *
62
- * @version 3.2.4
63
  * @since 3.2.4
64
  */
65
  public function tax_display_toggle_param() {
66
  wcj_session_maybe_start();
67
- if ( isset( $_REQUEST['wcj_button_toggle_tax_display'] ) ) {
 
 
 
 
68
  $session_value = wcj_session_get( 'wcj_toggle_tax_display' );
69
- $current_value = ( '' == ( $session_value ) ? wcj_get_option( 'woocommerce_tax_display_shop', 'excl' ) : $session_value );
70
  wcj_session_set( 'wcj_toggle_tax_display', ( 'incl' === $current_value ? 'excl' : 'incl' ) );
71
  }
72
  }
@@ -74,7 +78,7 @@ if ( ! class_exists( 'WCJ_Tax_Display' ) ) :
74
  /**
75
  * Tax_display_toggle.
76
  *
77
- * @version 3.2.4
78
  * @since 3.2.4
79
  * @todo [dev] widget
80
  * @todo [dev] (maybe) floating button or at least give CSS instructions ($)
@@ -86,7 +90,7 @@ if ( ! class_exists( 'WCJ_Tax_Display' ) ) :
86
  return $value;
87
  }
88
  $session_value = wcj_session_get( 'wcj_toggle_tax_display' );
89
- if ( '' !== ( $session_value ) && NULL !== ( $session_value ) ) {
90
  return $session_value;
91
  }
92
  return $value;
@@ -95,7 +99,7 @@ if ( ! class_exists( 'WCJ_Tax_Display' ) ) :
95
  /**
96
  * Tax_display_by_user_role.
97
  *
98
- * @version 4.6.0
99
  * @since 3.2.0
100
  * @param string $value Get Value.
101
  */
@@ -107,10 +111,10 @@ if ( ! class_exists( 'WCJ_Tax_Display' ) ) :
107
  if ( '' !== ( $display_taxes_by_user_role_roles ) ) {
108
  $current_user_roles = wcj_get_current_user_all_roles();
109
  foreach ( $current_user_roles as $current_user_first_role ) {
110
- if ( in_array( $current_user_first_role, $display_taxes_by_user_role_roles ) ) {
111
  $option_name = 'option_woocommerce_tax_display_shop' === current_filter() ? 'wcj_product_listings_display_taxes_by_user_role_' . $current_user_first_role : 'wcj_product_listings_display_taxes_on_cart_by_user_role_' . $current_user_first_role;
112
  $tax_display = wcj_get_option( $option_name, 'no_changes' );
113
- if ( 'no_changes' != ( $tax_display ) ) {
114
  return $tax_display;
115
  }
116
  }
@@ -136,15 +140,15 @@ if ( ! class_exists( 'WCJ_Tax_Display' ) ) :
136
  $products_excl_tax = wcj_get_option( 'wcj_product_listings_display_taxes_products_excl_tax', '' );
137
  $product_cats_incl_tax = wcj_get_option( 'wcj_product_listings_display_taxes_product_cats_incl_tax', '' );
138
  $product_cats_excl_tax = wcj_get_option( 'wcj_product_listings_display_taxes_product_cats_excl_tax', '' );
139
- if ( '' != $products_incl_tax || '' != $products_incl_tax || '' != $products_incl_tax || '' != $products_incl_tax ) {
140
  // Products.
141
  if ( ! empty( $products_incl_tax ) ) {
142
- if ( in_array( $product_id, $products_incl_tax ) ) {
143
  return 'incl';
144
  }
145
  }
146
  if ( ! empty( $products_excl_tax ) ) {
147
- if ( in_array( $product_id, $products_excl_tax ) ) {
148
  return 'excl';
149
  }
150
  }
@@ -153,7 +157,7 @@ if ( ! class_exists( 'WCJ_Tax_Display' ) ) :
153
  if ( ! empty( $product_cats_incl_tax ) ) {
154
  if ( ! empty( $product_categories ) ) {
155
  foreach ( $product_categories as $product_category ) {
156
- if ( in_array( $product_category->term_id, $product_cats_incl_tax ) ) {
157
  return 'incl';
158
  }
159
  }
@@ -162,7 +166,7 @@ if ( ! class_exists( 'WCJ_Tax_Display' ) ) :
162
  if ( ! empty( $product_cats_excl_tax ) ) {
163
  if ( ! empty( $product_categories ) ) {
164
  foreach ( $product_categories as $product_category ) {
165
- if ( in_array( $product_category->term_id, $product_cats_excl_tax ) ) {
166
  return 'excl';
167
  }
168
  }
2
  /**
3
  * Booster for WooCommerce - Module - Tax Display
4
  *
5
+ * @version 5.6.2
6
  * @since 3.2.4
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
59
  /**
60
  * Tax_display_toggle_param.
61
  *
62
+ * @version 5.6.2
63
  * @since 3.2.4
64
  */
65
  public function tax_display_toggle_param() {
66
  wcj_session_maybe_start();
67
+ $wpnonce = true;
68
+ if ( function_exists( 'wp_verify_nonce' ) ) {
69
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
70
+ }
71
+ if ( $wpnonce && isset( $_REQUEST['wcj_button_toggle_tax_display'] ) ) {
72
  $session_value = wcj_session_get( 'wcj_toggle_tax_display' );
73
+ $current_value = ( '' === $session_value ? wcj_get_option( 'woocommerce_tax_display_shop', 'excl' ) : $session_value );
74
  wcj_session_set( 'wcj_toggle_tax_display', ( 'incl' === $current_value ? 'excl' : 'incl' ) );
75
  }
76
  }
78
  /**
79
  * Tax_display_toggle.
80
  *
81
+ * @version 5.6.2
82
  * @since 3.2.4
83
  * @todo [dev] widget
84
  * @todo [dev] (maybe) floating button or at least give CSS instructions ($)
90
  return $value;
91
  }
92
  $session_value = wcj_session_get( 'wcj_toggle_tax_display' );
93
+ if ( '' !== ( $session_value ) && null !== $session_value ) {
94
  return $session_value;
95
  }
96
  return $value;
99
  /**
100
  * Tax_display_by_user_role.
101
  *
102
+ * @version 5.6.2
103
  * @since 3.2.0
104
  * @param string $value Get Value.
105
  */
111
  if ( '' !== ( $display_taxes_by_user_role_roles ) ) {
112
  $current_user_roles = wcj_get_current_user_all_roles();
113
  foreach ( $current_user_roles as $current_user_first_role ) {
114
+ if ( in_array( $current_user_first_role, $display_taxes_by_user_role_roles, true ) ) {
115
  $option_name = 'option_woocommerce_tax_display_shop' === current_filter() ? 'wcj_product_listings_display_taxes_by_user_role_' . $current_user_first_role : 'wcj_product_listings_display_taxes_on_cart_by_user_role_' . $current_user_first_role;
116
  $tax_display = wcj_get_option( $option_name, 'no_changes' );
117
+ if ( 'no_changes' !== $tax_display ) {
118
  return $tax_display;
119
  }
120
  }
140
  $products_excl_tax = wcj_get_option( 'wcj_product_listings_display_taxes_products_excl_tax', '' );
141
  $product_cats_incl_tax = wcj_get_option( 'wcj_product_listings_display_taxes_product_cats_incl_tax', '' );
142
  $product_cats_excl_tax = wcj_get_option( 'wcj_product_listings_display_taxes_product_cats_excl_tax', '' );
143
+ if ( '' !== $products_incl_tax || '' !== $products_incl_tax || '' !== $products_incl_tax || '' !== $products_incl_tax ) {
144
  // Products.
145
  if ( ! empty( $products_incl_tax ) ) {
146
+ if ( in_array( (string) $product_id, $products_incl_tax, true ) ) {
147
  return 'incl';
148
  }
149
  }
150
  if ( ! empty( $products_excl_tax ) ) {
151
+ if ( in_array( (string) $product_id, $products_excl_tax, true ) ) {
152
  return 'excl';
153
  }
154
  }
157
  if ( ! empty( $product_cats_incl_tax ) ) {
158
  if ( ! empty( $product_categories ) ) {
159
  foreach ( $product_categories as $product_category ) {
160
+ if ( in_array( (string) $product_category->term_id, $product_cats_incl_tax, true ) ) {
161
  return 'incl';
162
  }
163
  }
166
  if ( ! empty( $product_cats_excl_tax ) ) {
167
  if ( ! empty( $product_categories ) ) {
168
  foreach ( $product_categories as $product_category ) {
169
+ if ( in_array( (string) $product_category->term_id, $product_cats_excl_tax, true ) ) {
170
  return 'excl';
171
  }
172
  }
includes/class-wcj-template-editor.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Template Editor
4
  *
5
- * @version 4.7.1
6
  * @since 3.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -47,14 +47,14 @@ if ( ! class_exists( 'WCJ_Template_Editor' ) ) :
47
  /**
48
  * Create_templates.
49
  *
50
- * @version 3.9.0
51
  * @since 3.9.0
52
  * @todo [dev] also delete on "Reset settings"
53
  * @param string | array $sections defines the sections.
54
  * @param string | array $current_section defines the current_section.
55
  */
56
  public function create_templates( $sections, $current_section ) {
57
- if ( $this->id == $current_section ) {
58
  $this->delete_dir( wcj_get_wcj_uploads_dir( 'templates' ) );
59
  $templates_content = wcj_get_option( 'wcj_template_editor_templates_content', array() );
60
  foreach ( wcj_get_option( 'wcj_template_editor_templates_to_edit', array() ) as $template ) {
@@ -63,7 +63,7 @@ if ( ! class_exists( 'WCJ_Template_Editor' ) ) :
63
  $_template_file = $_template[ count( $_template ) - 1 ];
64
  $_template_dirs = str_replace( $_template_file, '', $template );
65
  $_template_path = wcj_get_wcj_uploads_dir( 'templates' . DIRECTORY_SEPARATOR . $_template_dirs ) . DIRECTORY_SEPARATOR . $_template_file;
66
- file_put_contents( $_template_path, $templates_content[ $template ] );
67
  }
68
  }
69
  }
@@ -81,7 +81,7 @@ if ( ! class_exists( 'WCJ_Template_Editor' ) ) :
81
  * @param string $default_path defines the default_path.
82
  */
83
  public function replace_template( $located, $template_name, $args, $template_path, $default_path ) {
84
- if ( in_array( $template_name, $this->templates_to_edit ) ) {
85
  $modified_template = wcj_get_wcj_uploads_dir( 'templates', false ) . DIRECTORY_SEPARATOR . $template_name;
86
  return ( file_exists( $modified_template ) ? $modified_template : $located );
87
  }
@@ -101,7 +101,7 @@ if ( ! class_exists( 'WCJ_Template_Editor' ) ) :
101
  public function get_path_by_template( $template ) {
102
  $templates_by_path = wcj_get_option( 'wcj_template_editor_templates_by_path', array() );
103
  foreach ( $templates_by_path as $path => $templates ) {
104
- if ( in_array( $template, $templates ) ) {
105
  return $path;
106
  }
107
  }
2
  /**
3
  * Booster for WooCommerce - Module - Template Editor
4
  *
5
+ * @version 5.6.2
6
  * @since 3.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
47
  /**
48
  * Create_templates.
49
  *
50
+ * @version 5.6.2
51
  * @since 3.9.0
52
  * @todo [dev] also delete on "Reset settings"
53
  * @param string | array $sections defines the sections.
54
  * @param string | array $current_section defines the current_section.
55
  */
56
  public function create_templates( $sections, $current_section ) {
57
+ if ( $this->id === $current_section ) {
58
  $this->delete_dir( wcj_get_wcj_uploads_dir( 'templates' ) );
59
  $templates_content = wcj_get_option( 'wcj_template_editor_templates_content', array() );
60
  foreach ( wcj_get_option( 'wcj_template_editor_templates_to_edit', array() ) as $template ) {
63
  $_template_file = $_template[ count( $_template ) - 1 ];
64
  $_template_dirs = str_replace( $_template_file, '', $template );
65
  $_template_path = wcj_get_wcj_uploads_dir( 'templates' . DIRECTORY_SEPARATOR . $_template_dirs ) . DIRECTORY_SEPARATOR . $_template_file;
66
+ file_put_contents( $_template_path, $templates_content[ $template ] ); //phpcs:ignore
67
  }
68
  }
69
  }
81
  * @param string $default_path defines the default_path.
82
  */
83
  public function replace_template( $located, $template_name, $args, $template_path, $default_path ) {
84
+ if ( in_array( $template_name, $this->templates_to_edit, true ) ) {
85
  $modified_template = wcj_get_wcj_uploads_dir( 'templates', false ) . DIRECTORY_SEPARATOR . $template_name;
86
  return ( file_exists( $modified_template ) ? $modified_template : $located );
87
  }
101
  public function get_path_by_template( $template ) {
102
  $templates_by_path = wcj_get_option( 'wcj_template_editor_templates_by_path', array() );
103
  foreach ( $templates_by_path as $path => $templates ) {
104
+ if ( in_array( $template, $templates, true ) ) {
105
  return $path;
106
  }
107
  }
includes/class-wcj-track-users.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - User Tracking
4
  *
5
- * @version 5.6.1
6
  * @since 3.1.3
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -12,14 +12,14 @@ if ( ! defined( 'ABSPATH' ) ) {
12
  exit; // Exit if accessed directly.
13
  }
14
 
15
- if ( ! class_exists( 'WCJ_User_Tracking' ) ) :
16
  /**
17
- * WCJ_User_Tracking.
18
  *
19
- * @version 3.6.0
20
  * @since 3.6.0
21
  */
22
- class WCJ_User_Tracking extends WCJ_Module {
23
 
24
  /**
25
  * Constructor.
@@ -96,7 +96,7 @@ if ( ! class_exists( 'WCJ_User_Tracking' ) ) :
96
  /**
97
  * Render_order_columns.
98
  *
99
- * @version 3.6.0
100
  * @since 3.6.0
101
  * @param string $column defines the column.
102
  */
@@ -106,10 +106,10 @@ if ( ! class_exists( 'WCJ_User_Tracking' ) ) :
106
  $referer = get_post_meta( $order_id, '_wcj_track_users_http_referer', true );
107
  switch ( $column ) {
108
  case 'wcj_track_users_referer':
109
- echo $referer;
110
  break;
111
  case 'wcj_track_users_referer_type':
112
- echo $this->get_referer_type( $referer );
113
  break;
114
  }
115
  }
@@ -118,12 +118,12 @@ if ( ! class_exists( 'WCJ_User_Tracking' ) ) :
118
  /**
119
  * Track_users_update_county_stats.
120
  *
121
- * @version 3.9.0
122
  * @since 2.9.1
123
  * @todo (maybe) `wp_nonce`
124
  */
125
  public function track_users_update_county_stats() {
126
- if ( isset( $_GET['wcj_track_users_update_county_stats'] ) ) {
127
  $this->track_users_generate_stats_cron( 'manual' );
128
  wp_safe_redirect( esc_url( remove_query_arg( 'wcj_track_users_update_county_stats' ) ) );
129
  exit;
@@ -215,18 +215,18 @@ if ( ! class_exists( 'WCJ_User_Tracking' ) ) :
215
  /**
216
  * Add_http_referer_to_order.
217
  *
218
- * @version 2.9.1
219
  * @since 2.9.1
220
  * @todo add "all orders by referer type" stats
221
  * @param int $order_id defines the order_id.
222
  */
223
- public function add_http_referer_to_order( $order_id ) {
224
  global $wpdb;
225
  $table_name = $wpdb->prefix . 'wcj_track_users';
226
  $http_referer = 'N/A';
227
- if ( $wpdb->get_var( "SHOW TABLES LIKE '$table_name'" ) === $table_name ) {
228
  $user_ip = ( class_exists( 'WC_Geolocation' ) ? WC_Geolocation::get_ip_address() : wcj_get_the_ip() );
229
- $result = $wpdb->get_row( "SELECT * FROM $table_name WHERE ip = '$user_ip' ORDER BY time DESC" );
230
  if ( $result ) {
231
  $http_referer = $result->referer;
232
  }
@@ -237,16 +237,15 @@ if ( ! class_exists( 'WCJ_User_Tracking' ) ) :
237
  /**
238
  * Maybe_delete_track_users_stats.
239
  *
240
- * @version 2.9.1
241
  * @since 2.9.1
242
  * @todo (maybe) wp_nonce
243
  */
244
  public function maybe_delete_track_users_stats() {
245
- if ( isset( $_GET['wcj_delete_track_users_stats'] ) ) {
246
  global $wpdb;
247
  $table_name = $wpdb->prefix . 'wcj_track_users';
248
- $sql = "DROP TABLE IF EXISTS $table_name";
249
- $wpdb->query( $sql );
250
  delete_option( 'wcj_track_users_stats_by_country' );
251
  delete_option( 'wcj_track_users_cron_time_last_run' );
252
  wp_safe_redirect( remove_query_arg( 'wcj_delete_track_users_stats' ) );
@@ -287,7 +286,7 @@ if ( ! class_exists( 'WCJ_User_Tracking' ) ) :
287
  /**
288
  * Generate_track_users_stats_by_country.
289
  *
290
- * @version 2.9.1
291
  * @since 2.9.1
292
  * @param string | int $scope defines the scope.
293
  */
@@ -299,13 +298,13 @@ if ( ! class_exists( 'WCJ_User_Tracking' ) ) :
299
  $select_query = "SELECT * FROM $table_name";
300
  break;
301
  default:
302
- $time_expired = gmdate( 'Y-m-d H:i:s', ( current_time( 'timestamp' ) - $scope * 24 * 60 * 60 ) );
303
  $select_query = "SELECT * FROM $table_name WHERE time > '" . $time_expired . "'";
304
  break;
305
  }
306
  $totals = array();
307
- $results = $wpdb->get_results( $select_query );
308
- if ( $wpdb->get_var( "SHOW TABLES LIKE '$table_name'" ) === $table_name && ( $results ) ) {
309
  foreach ( $results as $result ) {
310
  if ( ! isset( $totals[ $result->country ] ) ) {
311
  $totals[ $result->country ] = 1;
@@ -321,7 +320,7 @@ if ( ! class_exists( 'WCJ_User_Tracking' ) ) :
321
  /**
322
  * Track_users_by_country_dashboard_widget.
323
  *
324
- * @version 5.6.1
325
  * @since 2.9.1
326
  * @todo (maybe) display all info (IP, referer etc.) on country click
327
  * @todo (maybe) display stats by day and/or month
@@ -370,15 +369,16 @@ if ( ! class_exists( 'WCJ_User_Tracking' ) ) :
370
  $_time = wcj_get_option( 'wcj_track_users_cron_time_schedule', '' );
371
  $cron_next_schedule = ( '' !== ( $_time ) ? gmdate( 'Y-m-d H:i:s', $_time ) : '-' );
372
  echo '<p>' .
373
- sprintf( __( 'Stats generated at %s. Next update is scheduled at %s.', 'woocommerce-jetpack' ), $cron_last_run, $cron_next_schedule ) . ' ' .
374
- '<a href="' . esc_url( add_query_arg( 'wcj_track_users_update_county_stats', '1' ) ) . '">' . __( 'Update now', 'woocommerce-jetpack' ) . '</a>.' .
 
375
  '</p>';
376
  }
377
 
378
  /**
379
  * Enqueue_track_users_script.
380
  *
381
- * @version 2.9.1
382
  * @since 2.9.1
383
  */
384
  public function enqueue_track_users_script() {
@@ -388,7 +388,7 @@ if ( ! class_exists( 'WCJ_User_Tracking' ) ) :
388
  'track_users_ajax_object',
389
  array(
390
  'ajax_url' => admin_url( 'admin-ajax.php' ),
391
- 'http_referer' => ( isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : 'N/A' ),
392
  'user_ip' => ( class_exists( 'WC_Geolocation' ) ? WC_Geolocation::get_ip_address() : wcj_get_the_ip() ),
393
  )
394
  );
@@ -397,19 +397,19 @@ if ( ! class_exists( 'WCJ_User_Tracking' ) ) :
397
  /**
398
  * Track_users.
399
  *
400
- * @version 2.9.1
401
  * @since 2.9.1
402
  * @todo (maybe) customizable `$time_expired`
403
  * @todo (maybe) optionally do not track selected user roles (e.g. admin)
404
  */
405
  public function track_users() {
406
- if ( ! isset( $_POST['wcj_user_ip'] ) ) {
407
  die();
408
  }
409
- $user_ip = $_POST['wcj_user_ip'];
410
  global $wpdb;
411
  $table_name = $wpdb->prefix . 'wcj_track_users';
412
- if ( $wpdb->get_var( "SHOW TABLES LIKE '$table_name'" ) !== $table_name ) {
413
  // Create DB table.
414
  $charset_collate = $wpdb->get_charset_collate();
415
  $sql = "CREATE TABLE $table_name (
@@ -425,8 +425,8 @@ if ( ! class_exists( 'WCJ_User_Tracking' ) ) :
425
  dbDelta( $sql );
426
  } else {
427
  // Check if already tracked recently.
428
- $time_expired = gmdate( 'Y-m-d H:i:s', strtotime( '-1 day', current_time( 'timestamp' ) ) );
429
- $result = $wpdb->get_row( "SELECT * FROM $table_name WHERE ip = '$user_ip' AND time > '$time_expired'" );
430
  if ( $result ) {
431
  return;
432
  }
@@ -437,7 +437,7 @@ if ( ! class_exists( 'WCJ_User_Tracking' ) ) :
437
  'state' => '',
438
  ) );
439
  // HTTP referrer.
440
- $http_referer = ( isset( $_POST['wcj_http_referer'] ) ? $_POST['wcj_http_referer'] : 'N/A' );
441
  // Add row to DB table.
442
  $wpdb->insert(
443
  $table_name,
@@ -448,7 +448,7 @@ if ( ! class_exists( 'WCJ_User_Tracking' ) ) :
448
  'ip' => $user_ip,
449
  'referer' => $http_referer,
450
  )
451
- );
452
  die();
453
  }
454
 
@@ -456,4 +456,4 @@ if ( ! class_exists( 'WCJ_User_Tracking' ) ) :
456
 
457
  endif;
458
 
459
- return new WCJ_User_Tracking();
2
  /**
3
  * Booster for WooCommerce - Module - User Tracking
4
  *
5
+ * @version 5.6.2
6
  * @since 3.1.3
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
12
  exit; // Exit if accessed directly.
13
  }
14
 
15
+ if ( ! class_exists( 'WCJ_Track_Users' ) ) :
16
  /**
17
+ * WCJ_Track_Users.
18
  *
19
+ * @version 5.6.2
20
  * @since 3.6.0
21
  */
22
+ class WCJ_Track_Users extends WCJ_Module {
23
 
24
  /**
25
  * Constructor.
96
  /**
97
  * Render_order_columns.
98
  *
99
+ * @version 5.6.2
100
  * @since 3.6.0
101
  * @param string $column defines the column.
102
  */
106
  $referer = get_post_meta( $order_id, '_wcj_track_users_http_referer', true );
107
  switch ( $column ) {
108
  case 'wcj_track_users_referer':
109
+ echo esc_html( $referer );
110
  break;
111
  case 'wcj_track_users_referer_type':
112
+ echo esc_html( $this->get_referer_type( $referer ) );
113
  break;
114
  }
115
  }
118
  /**
119
  * Track_users_update_county_stats.
120
  *
121
+ * @version 5.6.2
122
  * @since 2.9.1
123
  * @todo (maybe) `wp_nonce`
124
  */
125
  public function track_users_update_county_stats() {
126
+ if ( isset( $_GET['wcj_track_users_update_county_stats'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
127
  $this->track_users_generate_stats_cron( 'manual' );
128
  wp_safe_redirect( esc_url( remove_query_arg( 'wcj_track_users_update_county_stats' ) ) );
129
  exit;
215
  /**
216
  * Add_http_referer_to_order.
217
  *
218
+ * @version 5.6.2
219
  * @since 2.9.1
220
  * @todo add "all orders by referer type" stats
221
  * @param int $order_id defines the order_id.
222
  */
223
+ public function add_http_referer_to_order( $order_id = null ) {
224
  global $wpdb;
225
  $table_name = $wpdb->prefix . 'wcj_track_users';
226
  $http_referer = 'N/A';
227
+ if ( $wpdb->get_var( "SHOW TABLES LIKE '$table_name'" ) === $table_name ) {// phpcs:ignore
228
  $user_ip = ( class_exists( 'WC_Geolocation' ) ? WC_Geolocation::get_ip_address() : wcj_get_the_ip() );
229
+ $result = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}wcj_track_users WHERE ip = %s ORDER BY time DESC", $user_ip ) ); // WPCS: db call ok and cache ok.
230
  if ( $result ) {
231
  $http_referer = $result->referer;
232
  }
237
  /**
238
  * Maybe_delete_track_users_stats.
239
  *
240
+ * @version 5.6.2
241
  * @since 2.9.1
242
  * @todo (maybe) wp_nonce
243
  */
244
  public function maybe_delete_track_users_stats() {
245
+ if ( isset( $_GET['wcj_delete_track_users_stats'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
246
  global $wpdb;
247
  $table_name = $wpdb->prefix . 'wcj_track_users';
248
+ $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}wcj_track_users" ); //phpcs:ignore.
 
249
  delete_option( 'wcj_track_users_stats_by_country' );
250
  delete_option( 'wcj_track_users_cron_time_last_run' );
251
  wp_safe_redirect( remove_query_arg( 'wcj_delete_track_users_stats' ) );
286
  /**
287
  * Generate_track_users_stats_by_country.
288
  *
289
+ * @version 5.6.2
290
  * @since 2.9.1
291
  * @param string | int $scope defines the scope.
292
  */
298
  $select_query = "SELECT * FROM $table_name";
299
  break;
300
  default:
301
+ $time_expired = gmdate( 'Y-m-d H:i:s', ( gmdate( 'U' ) - $scope * 24 * 60 * 60 ) );
302
  $select_query = "SELECT * FROM $table_name WHERE time > '" . $time_expired . "'";
303
  break;
304
  }
305
  $totals = array();
306
+ $results = $wpdb->get_results( $select_query ); // phpcs:ignore
307
+ if ( $wpdb->get_var( "SHOW TABLES LIKE '$table_name'" ) === $table_name && ( $results ) ) { // phpcs:ignore
308
  foreach ( $results as $result ) {
309
  if ( ! isset( $totals[ $result->country ] ) ) {
310
  $totals[ $result->country ] = 1;
320
  /**
321
  * Track_users_by_country_dashboard_widget.
322
  *
323
+ * @version 5.6.2
324
  * @since 2.9.1
325
  * @todo (maybe) display all info (IP, referer etc.) on country click
326
  * @todo (maybe) display stats by day and/or month
369
  $_time = wcj_get_option( 'wcj_track_users_cron_time_schedule', '' );
370
  $cron_next_schedule = ( '' !== ( $_time ) ? gmdate( 'Y-m-d H:i:s', $_time ) : '-' );
371
  echo '<p>' .
372
+ /* translators: %1$s, %2$s translators Added */
373
+ sprintf( esc_html__( 'Stats generated at %1$s. Next update is scheduled at %2$s.', 'woocommerce-jetpack' ), esc_html( $cron_last_run ), esc_html( $cron_next_schedule ) ) . ' ' .
374
+ '<a href="' . esc_url( add_query_arg( 'wcj_track_users_update_county_stats', '1' ) ) . '">' . esc_html__( 'Update now', 'woocommerce-jetpack' ) . '</a>.' .
375
  '</p>';
376
  }
377
 
378
  /**
379
  * Enqueue_track_users_script.
380
  *
381
+ * @version 5.6.2
382
  * @since 2.9.1
383
  */
384
  public function enqueue_track_users_script() {
388
  'track_users_ajax_object',
389
  array(
390
  'ajax_url' => admin_url( 'admin-ajax.php' ),
391
+ 'http_referer' => ( isset( $_SERVER['HTTP_REFERER'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_REFERER'] ) ) : 'N/A' ),
392
  'user_ip' => ( class_exists( 'WC_Geolocation' ) ? WC_Geolocation::get_ip_address() : wcj_get_the_ip() ),
393
  )
394
  );
397
  /**
398
  * Track_users.
399
  *
400
+ * @version 5.6.2
401
  * @since 2.9.1
402
  * @todo (maybe) customizable `$time_expired`
403
  * @todo (maybe) optionally do not track selected user roles (e.g. admin)
404
  */
405
  public function track_users() {
406
+ if ( ! isset( $_POST['wcj_user_ip'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
407
  die();
408
  }
409
+ $user_ip = sanitize_text_field( wp_unslash( $_POST['wcj_user_ip'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
410
  global $wpdb;
411
  $table_name = $wpdb->prefix . 'wcj_track_users';
412
+ if ( $wpdb->get_var( "SHOW TABLES LIKE '$table_name'" ) !== $table_name ) { //phpcs:ignore
413
  // Create DB table.
414
  $charset_collate = $wpdb->get_charset_collate();
415
  $sql = "CREATE TABLE $table_name (
425
  dbDelta( $sql );
426
  } else {
427
  // Check if already tracked recently.
428
+ $time_expired = gmdate( 'Y-m-d H:i:s', strtotime( '-1 day', gmdate( 'U' ) ) );
429
+ $result = $wpdb->get_row( "SELECT * FROM $table_name WHERE ip = '$user_ip' AND time > '$time_expired'" ); //phpcs:ignore
430
  if ( $result ) {
431
  return;
432
  }
437
  'state' => '',
438
  ) );
439
  // HTTP referrer.
440
+ $http_referer = ( isset( $_POST['wcj_http_referer'] ) ? sanitize_text_field( wp_unslash( $_POST['wcj_http_referer'] ) ) : 'N/A' ); // phpcs:ignore WordPress.Security.NonceVerification
441
  // Add row to DB table.
442
  $wpdb->insert(
443
  $table_name,
448
  'ip' => $user_ip,
449
  'referer' => $http_referer,
450
  )
451
+ );// WPCS: db call ok.
452
  die();
453
  }
454
 
456
 
457
  endif;
458
 
459
+ return new WCJ_Track_Users();
includes/class-wcj-upsells.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Upsells
4
  *
5
- * @version 5.2.0
6
  * @since 3.5.3
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -88,7 +88,7 @@ if ( ! class_exists( 'WCJ_Upsells' ) ) :
88
  /**
89
  * Upsell_ids.
90
  *
91
- * @version 3.6.0
92
  * @since 3.6.0
93
  * @param int $ids Get ids.
94
  * @param Array $_product Get products.
@@ -98,7 +98,7 @@ if ( ! class_exists( 'WCJ_Upsells' ) ) :
98
  if ( ! empty( $global_upsells ) ) {
99
  $global_upsells = array_unique( $global_upsells );
100
  $product_id = wcj_get_product_id_or_variation_parent_id( $_product );
101
- $key = array_search( $product_id, $global_upsells );
102
  if ( false !== ( $key ) ) {
103
  unset( $global_upsells[ $key ] );
104
  }
@@ -122,27 +122,27 @@ if ( ! class_exists( 'WCJ_Upsells' ) ) :
122
  /**
123
  * Upsells_columns.
124
  *
125
- * @version 3.5.3
126
  * @since 3.5.3
127
  * @todo (maybe) check for `isset( $args['columns'] )`
128
  * @param array $columns defines the columns.
129
  */
130
  public function upsells_columns( $columns ) {
131
  $_columns = wcj_get_option( 'wcj_upsells_columns', 0 );
132
- return ( 0 != ( $_columns ) ? $_columns : $columns );
133
  }
134
 
135
  /**
136
  * Upsells_total.
137
  *
138
- * @version 3.6.0
139
  * @since 3.5.3
140
  * @todo (maybe) check for `isset( $args['posts_per_page'] )`
141
  * @param int $limit defines the limit.
142
  */
143
  public function upsells_total( $limit ) {
144
  $_limit = wcj_get_option( 'wcj_upsells_total', 0 );
145
- return ( 0 != ( $_limit ) ? $_limit : $limit );
146
  }
147
 
148
  }
2
  /**
3
  * Booster for WooCommerce - Module - Upsells
4
  *
5
+ * @version 5.6.2
6
  * @since 3.5.3
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
88
  /**
89
  * Upsell_ids.
90
  *
91
+ * @version 5.6.2
92
  * @since 3.6.0
93
  * @param int $ids Get ids.
94
  * @param Array $_product Get products.
98
  if ( ! empty( $global_upsells ) ) {
99
  $global_upsells = array_unique( $global_upsells );
100
  $product_id = wcj_get_product_id_or_variation_parent_id( $_product );
101
+ $key = array_search( $product_id, $global_upsells, true );
102
  if ( false !== ( $key ) ) {
103
  unset( $global_upsells[ $key ] );
104
  }
122
  /**
123
  * Upsells_columns.
124
  *
125
+ * @version 5.6.2
126
  * @since 3.5.3
127
  * @todo (maybe) check for `isset( $args['columns'] )`
128
  * @param array $columns defines the columns.
129
  */
130
  public function upsells_columns( $columns ) {
131
  $_columns = wcj_get_option( 'wcj_upsells_columns', 0 );
132
+ return ( 0 !== ( $_columns ) ? $_columns : $columns );
133
  }
134
 
135
  /**
136
  * Upsells_total.
137
  *
138
+ * @version 5.6.2
139
  * @since 3.5.3
140
  * @todo (maybe) check for `isset( $args['posts_per_page'] )`
141
  * @param int $limit defines the limit.
142
  */
143
  public function upsells_total( $limit ) {
144
  $_limit = wcj_get_option( 'wcj_upsells_total', 0 );
145
+ return ( 0 !== ( $_limit ) ? $_limit : $limit );
146
  }
147
 
148
  }
includes/class-wcj-url-coupons.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - URL Coupons
4
  *
5
- * @version 5.2.0
6
  * @since 2.9.1
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -95,14 +95,18 @@ if ( ! class_exists( 'WCJ_URL_Coupons' ) ) :
95
  /**
96
  * Maybe_apply_url_coupon.
97
  *
98
- * @version 2.9.1
99
  * @since 2.7.0
100
  * @todo (maybe) options to add products to cart with query arg
101
  * @todo (maybe) if ( ! WC()->cart->has_discount( $coupon_code ) ) {}
102
  */
103
  public function maybe_apply_url_coupon() {
104
  $arg_key = wcj_get_option( 'wcj_url_coupons_key', 'wcj_apply_coupon' );
105
- if ( isset( $_GET[ $arg_key ] ) && '' !== $_GET[ $arg_key ] ) {
 
 
 
 
106
  $coupon_code = sanitize_text_field( ( wp_unslash( $_GET[ $arg_key ] ) ) );
107
  $this->maybe_add_products_to_cart( $coupon_code );
108
  WC()->cart->add_discount( $coupon_code );
2
  /**
3
  * Booster for WooCommerce - Module - URL Coupons
4
  *
5
+ * @version 5.6.2
6
  * @since 2.9.1
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
95
  /**
96
  * Maybe_apply_url_coupon.
97
  *
98
+ * @version 5.6.2
99
  * @since 2.7.0
100
  * @todo (maybe) options to add products to cart with query arg
101
  * @todo (maybe) if ( ! WC()->cart->has_discount( $coupon_code ) ) {}
102
  */
103
  public function maybe_apply_url_coupon() {
104
  $arg_key = wcj_get_option( 'wcj_url_coupons_key', 'wcj_apply_coupon' );
105
+ $wpnonce = true;
106
+ if ( function_exists( 'wp_verify_nonce' ) ) {
107
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
108
+ }
109
+ if ( isset( $_GET[ $arg_key ] ) && '' !== $_GET[ $arg_key ] && $wpnonce ) {
110
  $coupon_code = sanitize_text_field( ( wp_unslash( $_GET[ $arg_key ] ) ) );
111
  $this->maybe_add_products_to_cart( $coupon_code );
112
  WC()->cart->add_discount( $coupon_code );
includes/class-wcj-wholesale-price.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Wholesale Price
4
  *
5
- * @version 5.4.5
6
  * @since 2.2.0
7
  * @author Pluggabl LLC.
8
  * @todo per variation
@@ -62,7 +62,7 @@ if ( ! class_exists( 'WCJ_Wholesale_Price' ) ) :
62
  /**
63
  * Get_price_for_cart.
64
  *
65
- * @version 3.4.0
66
  * @since 3.4.0
67
  * @param int $price defines the price.
68
  * @param array $_product defines the _product.
@@ -70,7 +70,7 @@ if ( ! class_exists( 'WCJ_Wholesale_Price' ) ) :
70
  public function get_price_for_cart( $price, $_product ) {
71
  $product_prices_include_tax = ( 'yes' === wcj_get_option( 'woocommerce_prices_include_tax' ) );
72
  $cart_prices_include_tax = ( 'incl' === wcj_get_option( 'woocommerce_tax_display_cart' ) );
73
- if ( $product_prices_include_tax != $cart_prices_include_tax ) {
74
  return ( $cart_prices_include_tax ?
75
  wc_get_price_including_tax(
76
  $_product,
@@ -129,7 +129,7 @@ if ( ! class_exists( 'WCJ_Wholesale_Price' ) ) :
129
  if ( isset( $cart_item['wcj_wholesale_price'] ) ) {
130
  $the_quantity = $this->get_quantity( WC()->cart, $cart_item );
131
  $discount = $this->get_discount_by_quantity( $the_quantity, $cart_item['product_id'] );
132
- if ( 0 != $discount ) {
133
  $discount_type = ( wcj_is_product_wholesale_enabled_per_product( $cart_item['product_id'] ) )
134
  ? get_post_meta( $cart_item['product_id'], '_wcj_wholesale_price_discount_type', true )
135
  : wcj_get_option( 'wcj_wholesale_price_discount_type', 'percent' );
@@ -239,7 +239,7 @@ if ( ! class_exists( 'WCJ_Wholesale_Price' ) ) :
239
  ? get_post_meta( $product_id, '_wcj_wholesale_price_discount_type', true )
240
  : wcj_get_option( 'wcj_wholesale_price_discount_type', 'percent' );
241
  if ( 'price_directly' === $discount_type ) {
242
- return ( 0 != $discount ) ? apply_filters( 'wcj_get_wholesale_price', $discount, $product_id ) : $price;
243
  } elseif ( 'percent' === $discount_type ) {
244
  return $price * ( 1.0 - ( $discount / 100.0 ) );
245
  } else {
@@ -302,7 +302,7 @@ if ( ! class_exists( 'WCJ_Wholesale_Price' ) ) :
302
 
303
  // If other discount was applied in cart.
304
  if ( 'yes' === wcj_get_option( 'wcj_wholesale_price_apply_only_if_no_other_discounts', 'no' ) ) {
305
- if ( WC()->cart->get_total_discount() > 0 || sizeof( WC()->cart->applied_coupons ) > 0 ) {
306
  continue;
307
  }
308
  }
@@ -314,7 +314,7 @@ if ( ! class_exists( 'WCJ_Wholesale_Price' ) ) :
314
  if ( 'yes' === wcj_get_option( 'wcj_wholesale_price_rounding_enabled', 'yes' ) ) {
315
  $wholesale_price = round( $wholesale_price, wcj_get_option( 'woocommerce_price_num_decimals', 2 ) );
316
  }
317
- if ( $wholesale_price != $price ) {
318
  // Setting wholesale price.
319
  WC()->cart->cart_contents[ $item_key ]['data']->wcj_wholesale_price = $wholesale_price;
320
  WC()->cart->cart_contents[ $item_key ]['wcj_wholesale_price'] = $wholesale_price;
2
  /**
3
  * Booster for WooCommerce - Module - Wholesale Price
4
  *
5
+ * @version 5.6.2
6
  * @since 2.2.0
7
  * @author Pluggabl LLC.
8
  * @todo per variation
62
  /**
63
  * Get_price_for_cart.
64
  *
65
+ * @version 5.6.2
66
  * @since 3.4.0
67
  * @param int $price defines the price.
68
  * @param array $_product defines the _product.
70
  public function get_price_for_cart( $price, $_product ) {
71
  $product_prices_include_tax = ( 'yes' === wcj_get_option( 'woocommerce_prices_include_tax' ) );
72
  $cart_prices_include_tax = ( 'incl' === wcj_get_option( 'woocommerce_tax_display_cart' ) );
73
+ if ( $product_prices_include_tax !== $cart_prices_include_tax ) {
74
  return ( $cart_prices_include_tax ?
75
  wc_get_price_including_tax(
76
  $_product,
129
  if ( isset( $cart_item['wcj_wholesale_price'] ) ) {
130
  $the_quantity = $this->get_quantity( WC()->cart, $cart_item );
131
  $discount = $this->get_discount_by_quantity( $the_quantity, $cart_item['product_id'] );
132
+ if ( '0' !== $discount ) {
133
  $discount_type = ( wcj_is_product_wholesale_enabled_per_product( $cart_item['product_id'] ) )
134
  ? get_post_meta( $cart_item['product_id'], '_wcj_wholesale_price_discount_type', true )
135
  : wcj_get_option( 'wcj_wholesale_price_discount_type', 'percent' );
239
  ? get_post_meta( $product_id, '_wcj_wholesale_price_discount_type', true )
240
  : wcj_get_option( 'wcj_wholesale_price_discount_type', 'percent' );
241
  if ( 'price_directly' === $discount_type ) {
242
+ return ( '0' !== $discount ) ? apply_filters( 'wcj_get_wholesale_price', $discount, $product_id ) : $price;
243
  } elseif ( 'percent' === $discount_type ) {
244
  return $price * ( 1.0 - ( $discount / 100.0 ) );
245
  } else {
302
 
303
  // If other discount was applied in cart.
304
  if ( 'yes' === wcj_get_option( 'wcj_wholesale_price_apply_only_if_no_other_discounts', 'no' ) ) {
305
+ if ( WC()->cart->get_total_discount() > 0 || count( WC()->cart->applied_coupons ) > 0 ) {
306
  continue;
307
  }
308
  }
314
  if ( 'yes' === wcj_get_option( 'wcj_wholesale_price_rounding_enabled', 'yes' ) ) {
315
  $wholesale_price = round( $wholesale_price, wcj_get_option( 'woocommerce_price_num_decimals', 2 ) );
316
  }
317
+ if ( $wholesale_price !== $price ) {
318
  // Setting wholesale price.
319
  WC()->cart->cart_contents[ $item_key ]['data']->wcj_wholesale_price = $wholesale_price;
320
  WC()->cart->cart_contents[ $item_key ]['wcj_wholesale_price'] = $wholesale_price;
includes/class-wcj-wpml.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - WPML
4
  *
5
- * @version 5.6.1
6
  * @since 2.2.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -191,14 +191,14 @@ if ( ! class_exists( 'WCJ_WPML' ) ) :
191
  /**
192
  * Create_wpml_xml_file.
193
  *
194
- * @version 2.5.0
195
  * @since 2.4.1
196
  */
197
  public function create_wpml_xml_file_tool() {
198
- if ( ! isset( $_GET['create_wpml_xml_file'] ) || ! wcj_is_user_role( 'administrator' ) ) {
199
  return;
200
  }
201
- if ( ! isset( $_GET['section'] ) || 'wpml' !== $_GET['section'] ) {
202
  return;
203
  }
204
  $this->create_wpml_xml_file();
@@ -208,10 +208,11 @@ if ( ! class_exists( 'WCJ_WPML' ) ) :
208
  /**
209
  * Create_wpml_xml_file.
210
  *
211
- * @version 5.6.1
212
  * @see https://wpml.org/documentation/support/language-configuration-files/#admin-texts
213
  */
214
  public function create_wpml_xml_file() {
 
215
  $file_path = wcj_free_plugin_path() . '/wpml-config.xml';
216
  $handle = fopen( $file_path, 'w' );
217
  if ( false !== ( $handle ) ) {
@@ -247,6 +248,7 @@ if ( ! class_exists( 'WCJ_WPML' ) ) :
247
  fwrite( $handle, '</wpml-config>' . PHP_EOL );
248
  fclose( $handle );
249
  }
 
250
  }
251
 
252
  /**
2
  /**
3
  * Booster for WooCommerce - Module - WPML
4
  *
5
+ * @version 5.6.2
6
  * @since 2.2.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
191
  /**
192
  * Create_wpml_xml_file.
193
  *
194
+ * @version 5.6.2
195
  * @since 2.4.1
196
  */
197
  public function create_wpml_xml_file_tool() {
198
+ if ( ! isset( $_GET['create_wpml_xml_file'] ) || ! wcj_is_user_role( 'administrator' ) ) { // phpcs:ignore WordPress.Security.NonceVerification
199
  return;
200
  }
201
+ if ( ! isset( $_GET['section'] ) || 'wpml' !== $_GET['section'] ) { // phpcs:ignore WordPress.Security.NonceVerification
202
  return;
203
  }
204
  $this->create_wpml_xml_file();
208
  /**
209
  * Create_wpml_xml_file.
210
  *
211
+ * @version 5.6.2
212
  * @see https://wpml.org/documentation/support/language-configuration-files/#admin-texts
213
  */
214
  public function create_wpml_xml_file() {
215
+ // phpcs:disable
216
  $file_path = wcj_free_plugin_path() . '/wpml-config.xml';
217
  $handle = fopen( $file_path, 'w' );
218
  if ( false !== ( $handle ) ) {
248
  fwrite( $handle, '</wpml-config>' . PHP_EOL );
249
  fclose( $handle );
250
  }
251
+ // phpcs:enable
252
  }
253
 
254
  /**
includes/classes/class-wcj-invoice.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce Invoice
4
  *
5
- * @version 5.3.6
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/classes
8
  */
@@ -68,27 +68,28 @@ if ( ! class_exists( 'WCJ_Invoice' ) ) :
68
  /**
69
  * Create.
70
  *
71
- * @version 5.3.6
72
  * @todo use mysql transaction enabled (as in "wcj_order_number_use_mysql_transaction_enabled")
73
  * @todo used get_option instead wcj_get_option to get current numbering_counter.
74
  * @param number $date get date.
75
  */
76
  public function create( $date = '' ) {
 
77
  $order_id = $this->order_id;
78
  $invoice_type = $this->invoice_type;
79
- if ( 'yes' == wcj_get_option( 'wcj_invoicing_' . $invoice_type . '_skip_zero_total', 'no' ) ) {
80
  $_order = wc_get_order( $order_id );
81
- if ( 0 == $_order->get_total() ) {
82
  return;
83
  }
84
  }
85
- if ( 'yes' == wcj_get_option( 'wcj_invoicing_' . $invoice_type . '_sequential_enabled', 'no' ) ) {
86
  $the_invoice_number = get_option( 'wcj_invoicing_' . $invoice_type . '_numbering_counter', 1 );
87
  update_option( 'wcj_invoicing_' . $invoice_type . '_numbering_counter', ( $the_invoice_number + 1 ) );
88
  } else {
89
  $the_invoice_number = $order_id;
90
  }
91
- $the_date = ( '' == $date ) ? current_time( 'timestamp' ) : $date;
92
  update_post_meta( $order_id, '_wcj_invoicing_' . $invoice_type . '_number_id', $the_invoice_number );
93
  update_post_meta( $order_id, '_wcj_invoicing_' . $invoice_type . '_date', $the_date );
94
  }
2
  /**
3
  * Booster for WooCommerce Invoice
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/classes
8
  */
68
  /**
69
  * Create.
70
  *
71
+ * @version 5.6.2
72
  * @todo use mysql transaction enabled (as in "wcj_order_number_use_mysql_transaction_enabled")
73
  * @todo used get_option instead wcj_get_option to get current numbering_counter.
74
  * @param number $date get date.
75
  */
76
  public function create( $date = '' ) {
77
+
78
  $order_id = $this->order_id;
79
  $invoice_type = $this->invoice_type;
80
+ if ( 'yes' === wcj_get_option( 'wcj_invoicing_' . $invoice_type . '_skip_zero_total', 'no' ) ) {
81
  $_order = wc_get_order( $order_id );
82
+ if ( 0 === (int) $_order->get_total() ) {
83
  return;
84
  }
85
  }
86
+ if ( 'yes' === wcj_get_option( 'wcj_invoicing_' . $invoice_type . '_sequential_enabled', 'no' ) ) {
87
  $the_invoice_number = get_option( 'wcj_invoicing_' . $invoice_type . '_numbering_counter', 1 );
88
  update_option( 'wcj_invoicing_' . $invoice_type . '_numbering_counter', ( $the_invoice_number + 1 ) );
89
  } else {
90
  $the_invoice_number = $order_id;
91
  }
92
+ $the_date = ( '' === $date ) ? (string) gmdate( 'U' ) : $date;
93
  update_post_meta( $order_id, '_wcj_invoicing_' . $invoice_type . '_number_id', $the_invoice_number );
94
  update_post_meta( $order_id, '_wcj_invoicing_' . $invoice_type . '_date', $the_date );
95
  }
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 5.6.1
6
  * @since 3.6.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/classes
@@ -83,7 +83,7 @@ if ( ! class_exists( 'WCJ_Module_Product_By_Condition' ) ) :
83
  /**
84
  * Get_invisible_products_ids.
85
  *
86
- * @version 4.7.1
87
  * @since 4.7.1
88
  *
89
  * @param null $params Get params.
@@ -100,7 +100,7 @@ if ( ! class_exists( 'WCJ_Module_Product_By_Condition' ) ) :
100
  );
101
  $option_to_check = $params['option_to_check'];
102
  $args = $params['invisible_products_query_args'];
103
- $transient_name = 'wcj_' . $this->id . '_' . md5( serialize( $args ) . '_' . serialize( $option_to_check ) );
104
  $invisible_products = get_transient( $transient_name );
105
  if ( false === $invisible_products ) {
106
  $invisible_products = array();
@@ -118,7 +118,7 @@ if ( ! class_exists( 'WCJ_Module_Product_By_Condition' ) ) :
118
  /**
119
  * Get_invisible_products_query_args.
120
  *
121
- * @version 4.7.1
122
  * @since 4.7.1
123
  *
124
  * @return array
@@ -146,7 +146,7 @@ if ( ! class_exists( 'WCJ_Module_Product_By_Condition' ) ) :
146
  'post_type' => 'product',
147
  'posts_per_page' => - 1,
148
  'fields' => 'ids',
149
- 'meta_query' => $meta_query,
150
  );
151
  return $args;
152
  }
@@ -154,7 +154,7 @@ if ( ! class_exists( 'WCJ_Module_Product_By_Condition' ) ) :
154
  /**
155
  * Delete_invisible_products_transient.
156
  *
157
- * @version 5.1.1
158
  * @since 4.7.1
159
  *
160
  * @param null $params Get params.
@@ -171,12 +171,11 @@ if ( ! class_exists( 'WCJ_Module_Product_By_Condition' ) ) :
171
  if ( 'current_user_roles' === $params['remove_method'] ) {
172
  $option_to_check = $params['option_to_check'];
173
  $args = $params['invisible_products_query_args'];
174
- $transient_name = 'wcj_' . $this->id . '_' . md5( serialize( $args ) . '_' . serialize( $option_to_check ) );
175
  delete_transient( $transient_name );
176
  } elseif ( 'all_roles' === $params['remove_method'] ) {
177
  global $wpdb;
178
- $sql = "delete from {$wpdb->options} where option_name REGEXP %s";
179
- $wpdb->query( $wpdb->prepare( $sql, '^_transient_wcj_' . $this->id ) );
180
  }
181
  }
182
 
@@ -208,14 +207,14 @@ if ( ! class_exists( 'WCJ_Module_Product_By_Condition' ) ) :
208
  /**
209
  * Disables pre_get_posts query when exporting products.
210
  *
211
- * @version 4.7.0
212
  * @since 4.7.0
213
  * @param bool $validation get validations.
214
  */
215
  public function disable_pre_get_posts_on_export( $validation ) {
216
  if (
217
- ! isset( $_REQUEST['action'] ) ||
218
- 'woocommerce_do_ajax_product_export' !== $_REQUEST['action']
219
  ) {
220
  return $validation;
221
  }
@@ -306,7 +305,7 @@ if ( ! class_exists( 'WCJ_Module_Product_By_Condition' ) ) :
306
  /**
307
  * Save_bulk_and_quick_edit_fields.
308
  *
309
- * @version 3.6.0
310
  * @since 3.6.0
311
  * @param int $post_id get post id.
312
  * @param obj|Array $post get post.
@@ -321,7 +320,7 @@ if ( ! class_exists( 'WCJ_Module_Product_By_Condition' ) ) :
321
  return $post_id;
322
  }
323
  // Check nonce.
324
- if ( ! isset( $_REQUEST['woocommerce_quick_edit_nonce'] ) || ! wp_verify_nonce( $_REQUEST['woocommerce_quick_edit_nonce'], 'woocommerce_quick_edit_nonce' ) ) { // WPCS: input var ok, sanitization ok.
325
  return $post_id;
326
  }
327
  // Check bulk or quick edit.
@@ -338,15 +337,15 @@ if ( ! class_exists( 'WCJ_Module_Product_By_Condition' ) ) :
338
  if ( 'invisible' !== apply_filters( 'booster_option', 'visible', wcj_get_option( 'wcj_' . $this->id . '_visibility_method', 'visible' ) ) ) {
339
  if ( ! isset( $_REQUEST[ 'wcj_' . $this->id . '_visible' ] ) ) {
340
  update_post_meta( $post_id, '_wcj_' . $this->id . '_visible', array() );
341
- } elseif ( is_array( $_REQUEST[ 'wcj_' . $this->id . '_visible' ] ) && ! in_array( 'wcj_no_change', $_REQUEST[ 'wcj_' . $this->id . '_visible' ] ) ) {
342
- update_post_meta( $post_id, '_wcj_' . $this->id . '_visible', $_REQUEST[ 'wcj_' . $this->id . '_visible' ] );
343
  }
344
  }
345
  if ( 'visible' !== apply_filters( 'booster_option', 'visible', wcj_get_option( 'wcj_' . $this->id . '_visibility_method', 'visible' ) ) ) {
346
  if ( ! isset( $_REQUEST[ 'wcj_' . $this->id . '_invisible' ] ) ) {
347
  update_post_meta( $post_id, '_wcj_' . $this->id . '_invisible', array() );
348
- } elseif ( is_array( $_REQUEST[ 'wcj_' . $this->id . '_invisible' ] ) && ! in_array( 'wcj_no_change', $_REQUEST[ 'wcj_' . $this->id . '_invisible' ] ) ) {
349
- update_post_meta( $post_id, '_wcj_' . $this->id . '_invisible', $_REQUEST[ 'wcj_' . $this->id . '_invisible' ] );
350
  }
351
  }
352
  do_action( 'save_bulk_and_quick_edit_fields_' . $this->id, $post_id, $post );
@@ -359,7 +358,7 @@ if ( ! class_exists( 'WCJ_Module_Product_By_Condition' ) ) :
359
  * @version 3.6.0
360
  * @since 3.6.0
361
  * @todo (maybe) check if pagination needs to be fixed (as in `$this->pre_get_posts()`)
362
- * @param varchar $query Query object to process.
363
  */
364
  public function products_widget_query( $query_args ) {
365
  remove_action( 'pre_get_posts', array( $this, 'pre_get_posts' ) );
2
  /**
3
  * Booster for WooCommerce - Module - Product by Condition
4
  *
5
+ * @version 5.6.2
6
  * @since 3.6.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/classes
83
  /**
84
  * Get_invisible_products_ids.
85
  *
86
+ * @version 5.6.2
87
  * @since 4.7.1
88
  *
89
  * @param null $params Get params.
100
  );
101
  $option_to_check = $params['option_to_check'];
102
  $args = $params['invisible_products_query_args'];
103
+ $transient_name = 'wcj_' . $this->id . '_' . md5( serialize( $args ) . '_' . serialize( $option_to_check ) ); //phpcs:ignore
104
  $invisible_products = get_transient( $transient_name );
105
  if ( false === $invisible_products ) {
106
  $invisible_products = array();
118
  /**
119
  * Get_invisible_products_query_args.
120
  *
121
+ * @version 5.6.2
122
  * @since 4.7.1
123
  *
124
  * @return array
146
  'post_type' => 'product',
147
  'posts_per_page' => - 1,
148
  'fields' => 'ids',
149
+ 'meta_query' => $meta_query, //phpcs:ignore
150
  );
151
  return $args;
152
  }
154
  /**
155
  * Delete_invisible_products_transient.
156
  *
157
+ * @version 5.6.2
158
  * @since 4.7.1
159
  *
160
  * @param null $params Get params.
171
  if ( 'current_user_roles' === $params['remove_method'] ) {
172
  $option_to_check = $params['option_to_check'];
173
  $args = $params['invisible_products_query_args'];
174
+ $transient_name = 'wcj_' . $this->id . '_' . md5( serialize( $args ) . '_' . serialize( $option_to_check ) ); //phpcs:ignore
175
  delete_transient( $transient_name );
176
  } elseif ( 'all_roles' === $params['remove_method'] ) {
177
  global $wpdb;
178
+ $wpdb->query( $wpdb->prepare( "delete from {$wpdb->options} where option_name REGEXP %s", '^_transient_wcj_' . $this->id ) ); // WPCS: db call ok and cache ok.
 
179
  }
180
  }
181
 
207
  /**
208
  * Disables pre_get_posts query when exporting products.
209
  *
210
+ * @version 5.6.2
211
  * @since 4.7.0
212
  * @param bool $validation get validations.
213
  */
214
  public function disable_pre_get_posts_on_export( $validation ) {
215
  if (
216
+ ! isset( $_REQUEST['action'] ) || // phpcs:ignore WordPress.Security.NonceVerification
217
+ 'woocommerce_do_ajax_product_export' !== $_REQUEST['action'] // phpcs:ignore WordPress.Security.NonceVerification
218
  ) {
219
  return $validation;
220
  }
305
  /**
306
  * Save_bulk_and_quick_edit_fields.
307
  *
308
+ * @version 5.6.2
309
  * @since 3.6.0
310
  * @param int $post_id get post id.
311
  * @param obj|Array $post get post.
320
  return $post_id;
321
  }
322
  // Check nonce.
323
+ if ( ! isset( $_REQUEST['woocommerce_quick_edit_nonce'] ) || ! wp_verify_nonce( $_REQUEST['woocommerce_quick_edit_nonce'], 'woocommerce_quick_edit_nonce' ) ) { //phpcs:ignore
324
  return $post_id;
325
  }
326
  // Check bulk or quick edit.
337
  if ( 'invisible' !== apply_filters( 'booster_option', 'visible', wcj_get_option( 'wcj_' . $this->id . '_visibility_method', 'visible' ) ) ) {
338
  if ( ! isset( $_REQUEST[ 'wcj_' . $this->id . '_visible' ] ) ) {
339
  update_post_meta( $post_id, '_wcj_' . $this->id . '_visible', array() );
340
+ } elseif ( is_array( $_REQUEST[ 'wcj_' . $this->id . '_visible' ] ) && ! in_array( 'wcj_no_change', $_REQUEST[ 'wcj_' . $this->id . '_visible' ], true ) ) {
341
+ update_post_meta( $post_id, '_wcj_' . $this->id . '_visible', sanitize_text_field( wp_unslash( $_REQUEST[ 'wcj_' . $this->id . '_visible' ] ) ) );
342
  }
343
  }
344
  if ( 'visible' !== apply_filters( 'booster_option', 'visible', wcj_get_option( 'wcj_' . $this->id . '_visibility_method', 'visible' ) ) ) {
345
  if ( ! isset( $_REQUEST[ 'wcj_' . $this->id . '_invisible' ] ) ) {
346
  update_post_meta( $post_id, '_wcj_' . $this->id . '_invisible', array() );
347
+ } elseif ( is_array( $_REQUEST[ 'wcj_' . $this->id . '_invisible' ] ) && ! in_array( 'wcj_no_change', $_REQUEST[ 'wcj_' . $this->id . '_invisible' ], true ) ) {
348
+ update_post_meta( $post_id, '_wcj_' . $this->id . '_invisible', sanitize_text_field( wp_unslash( $_REQUEST[ 'wcj_' . $this->id . '_invisible' ] ) ) );
349
  }
350
  }
351
  do_action( 'save_bulk_and_quick_edit_fields_' . $this->id, $post_id, $post );
358
  * @version 3.6.0
359
  * @since 3.6.0
360
  * @todo (maybe) check if pagination needs to be fixed (as in `$this->pre_get_posts()`)
361
+ * @param string $query_args Query object to process.
362
  */
363
  public function products_widget_query( $query_args ) {
364
  remove_action( 'pre_get_posts', array( $this, 'pre_get_posts' ) );
includes/classes/class-wcj-module-shipping-by-condition.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Shipping by Condition
4
  *
5
- * @version 5.6.1
6
  * @since 3.2.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/classes
@@ -51,7 +51,7 @@ if ( ! class_exists( 'WCJ_Module_Shipping_By_Condition' ) ) :
51
  /**
52
  * Available_shipping_methods.
53
  *
54
- * @version 5.3.5
55
  * @since 3.2.0
56
  * @todo apply_filters( 'booster_option' )
57
  * @param Array $rates Get shipping method rates.
@@ -70,8 +70,7 @@ if ( ! class_exists( 'WCJ_Module_Shipping_By_Condition' ) ) :
70
  get_option( 'wcj_shipping_' . $options_id . '_include_' . $rate->method_id, '' )
71
  );
72
  if ( ! empty( $include ) ) {
73
- if ( $this->check( $options_id, $include, 'include', $package ) ) {
74
- } else {
75
  unset( $rates[ $rate_key ] );
76
  }
77
  }
2
  /**
3
  * Booster for WooCommerce - Module - Shipping by Condition
4
  *
5
+ * @version 5.6.2
6
  * @since 3.2.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/classes
51
  /**
52
  * Available_shipping_methods.
53
  *
54
+ * @version 5.6.2
55
  * @since 3.2.0
56
  * @todo apply_filters( 'booster_option' )
57
  * @param Array $rates Get shipping method rates.
70
  get_option( 'wcj_shipping_' . $options_id . '_include_' . $rate->method_id, '' )
71
  );
72
  if ( ! empty( $include ) ) {
73
+ if ( ! $this->check( $options_id, $include, 'include', $package ) ) {
 
74
  unset( $rates[ $rate_key ] );
75
  }
76
  }
includes/classes/class-wcj-module.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce Module
4
  *
5
- * @version 5.6.1
6
  * @since 2.2.0
7
  * @author Pluggabl LLC.
8
  * @todo [dev] maybe should be `abstract` ?
@@ -323,7 +323,7 @@ if ( ! class_exists( 'WCJ_Module' ) ) :
323
  /**
324
  * Save_meta_box_validate_value.
325
  *
326
- * @version 2.9.1
327
  * @since 2.9.1
328
  * @param string $option_value Get option value.
329
  * @param string $option_name Get option name.
@@ -341,8 +341,8 @@ if ( ! class_exists( 'WCJ_Module' ) ) :
341
  'post_type' => 'product',
342
  'post_status' => 'any',
343
  'posts_per_page' => 1,
344
- 'meta_key' => '_' . $this->meta_box_validate_value,
345
- 'meta_value' => 'yes',
346
  'post__not_in' => array( get_the_ID() ),
347
  );
348
  $loop = new WP_Query( $args );
@@ -370,18 +370,18 @@ if ( ! class_exists( 'WCJ_Module' ) ) :
370
  /**
371
  * Validate_value_admin_notices.
372
  *
373
- * @version 2.9.1
374
  * @since 2.9.1
375
  */
376
  public function validate_value_admin_notices() {
377
- if ( ! isset( $_GET[ 'wcj_' . $this->id . '_meta_box_admin_notice' ] ) ) {
378
  return;
379
  }
380
  echo '<div class="error"><p><div class="message">' .
381
  sprintf(
382
- /* translators: %1$s: translators Added */
383
- __( 'Booster: Free plugin\'s version is limited to only one "%1$s" product with settings on per product basis enabled at a time. You will need to get <a href="%2$s" target="_blank">Booster Plus</a> to add unlimited number of "%1$s" products.', 'woocommerce-jetpack' ),
384
- $this->short_desc,
385
  'https://booster.io/plus/'
386
  ) .
387
  '</div></p></div>';
@@ -458,7 +458,7 @@ if ( ! class_exists( 'WCJ_Module' ) ) :
458
  /**
459
  * Save_meta_box_value.
460
  *
461
- * @version 2.5.3
462
  * @since 2.5.3
463
  * @param string $option_value Get option value.
464
  * @param string $option_name Get option name.
@@ -476,8 +476,8 @@ if ( ! class_exists( 'WCJ_Module' ) ) :
476
  'post_type' => 'product',
477
  'post_status' => 'any',
478
  'posts_per_page' => 3,
479
- 'meta_key' => '_' . $this->co,
480
- 'meta_value' => 'yes',
481
  'post__not_in' => array( get_the_ID() ),
482
  );
483
  $loop = new WP_Query( $args );
@@ -505,11 +505,15 @@ if ( ! class_exists( 'WCJ_Module' ) ) :
505
  /**
506
  * Admin_notices.
507
  *
508
- * @version 2.5.3
509
  * @since 2.5.3
510
  */
511
  public function admin_notices() {
512
- if ( ! isset( $_GET[ 'wcj_' . $this->id . '_admin_notice' ] ) ) {
 
 
 
 
513
  return;
514
  }
515
  echo '<div class="error"><p><div class="message">' . wp_kses_post( $this->get_the_notice() ) . '</div></p></div>';
@@ -518,12 +522,13 @@ if ( ! class_exists( 'WCJ_Module' ) ) :
518
  /**
519
  * Reset_settings.
520
  *
521
- * @version 3.7.0
522
  * @since 2.4.0
523
  * @todo (maybe) always `delete_option()` (instead of `update_option()`)
524
  */
525
  public function reset_settings() {
526
- if ( isset( $_GET['wcj_reset_settings'] ) && $this->id === $_GET['wcj_reset_settings'] && wcj_is_user_role( 'administrator' ) && ! isset( $_POST['save'] ) ) {
 
527
  foreach ( $this->get_settings() as $settings ) {
528
  if ( false !== strpos( $settings['id'], '[' ) ) {
529
  $id = explode( '[', $settings['id'] );
@@ -613,29 +618,29 @@ if ( ! class_exists( 'WCJ_Module' ) ) :
613
  /**
614
  * Save_meta_box.
615
  *
616
- * @version 3.9.0
617
  * @since 2.5.0
618
  * @todo (maybe) also order_id in `$the_post_id = ...`
619
  * @param int $post_id Get post id.
620
  * @param Array $__post Get post.
621
  */
622
- function save_meta_box( $post_id, $__post ) {
623
  // Check that we are saving with current metabox displayed.
624
- if ( ! isset( $_POST[ 'woojetpack_' . $this->id . '_save_post' ] ) ) {
625
  return;
626
  }
627
- // Setup post (just in case...)
628
  global $post;
629
- $post = get_post( $post_id );
630
- setup_postdata( $post );
631
- // Save options
632
  foreach ( $this->get_meta_box_options() as $option ) {
633
- if ( 'title' === $option['type'] ) {
634
  continue;
635
  }
636
  $is_enabled = ( isset( $option['enabled'] ) && 'no' === $option['enabled'] ) ? false : true;
637
  if ( $is_enabled ) {
638
- $option_value = ( isset( $_POST[ $option['name'] ] ) ) ? $_POST[ $option['name'] ] : ( isset( $option['default'] ) ? $option['default'] : '' );
639
  $the_post_id = ( isset( $option['product_id'] ) ) ? $option['product_id'] : $post_id;
640
  $the_meta_name = ( isset( $option['meta_name'] ) ) ? $option['meta_name'] : '_' . $option['name'];
641
  if ( isset( $option['convert'] ) && 'from_date_to_timestamp' === $option['convert'] ) {
@@ -644,11 +649,11 @@ if ( ! class_exists( 'WCJ_Module' ) ) :
644
  continue;
645
  }
646
  }
647
- delete_post_meta( $the_post_id, $the_meta_name ); // solves lowercase/uppercase issue
648
  update_post_meta( $the_post_id, $the_meta_name, apply_filters( 'wcj_save_meta_box_value', $option_value, $option['name'], $this->id ) );
649
  }
650
  }
651
- // Reset post
652
  wp_reset_postdata();
653
  }
654
 
@@ -803,7 +808,7 @@ if ( ! class_exists( 'WCJ_Module' ) ) :
803
  /**
804
  * Get_cat_by_section.
805
  *
806
- * @version 5.6.1
807
  * @since 2.2.3
808
  * @param Array $section Get sections.
809
  */
@@ -812,7 +817,7 @@ if ( ! class_exists( 'WCJ_Module' ) ) :
812
  foreach ( $cats as $id => $label_info ) {
813
  if ( ( ! empty( $label_info['all_cat_ids'] ) ) &&
814
  ( is_array( $label_info['all_cat_ids'] ) ) &&
815
- ( in_array( $section, $label_info['all_cat_ids'] ) )
816
  ) {
817
  return $id;
818
  }
2
  /**
3
  * Booster for WooCommerce Module
4
  *
5
+ * @version 5.6.2
6
  * @since 2.2.0
7
  * @author Pluggabl LLC.
8
  * @todo [dev] maybe should be `abstract` ?
323
  /**
324
  * Save_meta_box_validate_value.
325
  *
326
+ * @version 5.6.2
327
  * @since 2.9.1
328
  * @param string $option_value Get option value.
329
  * @param string $option_name Get option name.
341
  'post_type' => 'product',
342
  'post_status' => 'any',
343
  'posts_per_page' => 1,
344
+ 'meta_key' => '_' . $this->meta_box_validate_value, //phpcs:ignore
345
+ 'meta_value' => 'yes', //phpcs:ignore
346
  'post__not_in' => array( get_the_ID() ),
347
  );
348
  $loop = new WP_Query( $args );
370
  /**
371
  * Validate_value_admin_notices.
372
  *
373
+ * @version 5.6.2
374
  * @since 2.9.1
375
  */
376
  public function validate_value_admin_notices() {
377
+ if ( ! isset( $_GET[ 'wcj_' . $this->id . '_meta_box_admin_notice' ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
378
  return;
379
  }
380
  echo '<div class="error"><p><div class="message">' .
381
  sprintf(
382
+ /* translators: %1$s,%2$s: translators Added */
383
+ wp_kses_post( __( 'Booster: Free plugin\'s version is limited to only one "%1$s" product with settings on per product basis enabled at a time. You will need to get <a href="%2$s" target="_blank">Booster Plus</a> to add unlimited number of "%1$s" products.', 'woocommerce-jetpack' ) ),
384
+ wp_kses_post( $this->short_desc ),
385
  'https://booster.io/plus/'
386
  ) .
387
  '</div></p></div>';
458
  /**
459
  * Save_meta_box_value.
460
  *
461
+ * @version 5.6.2
462
  * @since 2.5.3
463
  * @param string $option_value Get option value.
464
  * @param string $option_name Get option name.
476
  'post_type' => 'product',
477
  'post_status' => 'any',
478
  'posts_per_page' => 3,
479
+ 'meta_key' => '_' . $this->co, //phpcs:ignore
480
+ 'meta_value' => 'yes', //phpcs:ignore
481
  'post__not_in' => array( get_the_ID() ),
482
  );
483
  $loop = new WP_Query( $args );
505
  /**
506
  * Admin_notices.
507
  *
508
+ * @version 5.6.2
509
  * @since 2.5.3
510
  */
511
  public function admin_notices() {
512
+ $wpnonce = true;
513
+ if ( function_exists( 'wp_verify_nonce' ) ) {
514
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : 'woocommerce-settings' ) ) : true;
515
+ }
516
+ if ( ! $wpnonce || ! isset( $_GET[ 'wcj_' . $this->id . '_admin_notice' ] ) ) {
517
  return;
518
  }
519
  echo '<div class="error"><p><div class="message">' . wp_kses_post( $this->get_the_notice() ) . '</div></p></div>';
522
  /**
523
  * Reset_settings.
524
  *
525
+ * @version 5.6.2
526
  * @since 2.4.0
527
  * @todo (maybe) always `delete_option()` (instead of `update_option()`)
528
  */
529
  public function reset_settings() {
530
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : 'woocommerce-settings' ), 'woocommerce-settings' ) : true;
531
+ if ( $wpnonce && isset( $_GET['wcj_reset_settings'] ) && $this->id === $_GET['wcj_reset_settings'] && wcj_is_user_role( 'administrator' ) && ! isset( $_POST['save'] ) ) {
532
  foreach ( $this->get_settings() as $settings ) {
533
  if ( false !== strpos( $settings['id'], '[' ) ) {
534
  $id = explode( '[', $settings['id'] );
618
  /**
619
  * Save_meta_box.
620
  *
621
+ * @version 5.6.2
622
  * @since 2.5.0
623
  * @todo (maybe) also order_id in `$the_post_id = ...`
624
  * @param int $post_id Get post id.
625
  * @param Array $__post Get post.
626
  */
627
+ public function save_meta_box( $post_id, $__post ) {
628
  // Check that we are saving with current metabox displayed.
629
+ if ( ! isset( $_POST[ 'woojetpack_' . $this->id . '_save_post' ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
630
  return;
631
  }
632
+ // Setup post (just in case...).
633
  global $post;
634
+ $_post = get_post( $post_id );
635
+ setup_postdata( $_post );
636
+ // Save options.
637
  foreach ( $this->get_meta_box_options() as $option ) {
638
+ if ( ! $option || '' === $option || 'title' === $option['type'] ) {
639
  continue;
640
  }
641
  $is_enabled = ( isset( $option['enabled'] ) && 'no' === $option['enabled'] ) ? false : true;
642
  if ( $is_enabled ) {
643
+ $option_value = ( isset( $_POST[ $option['name'] ] ) ) ? sanitize_text_field( wp_unslash( $_POST[ $option['name'] ] ) ) : ( isset( $option['default'] ) ? $option['default'] : '' ); // phpcs:ignore WordPress.Security.NonceVerification
644
  $the_post_id = ( isset( $option['product_id'] ) ) ? $option['product_id'] : $post_id;
645
  $the_meta_name = ( isset( $option['meta_name'] ) ) ? $option['meta_name'] : '_' . $option['name'];
646
  if ( isset( $option['convert'] ) && 'from_date_to_timestamp' === $option['convert'] ) {
649
  continue;
650
  }
651
  }
652
+ delete_post_meta( $the_post_id, $the_meta_name ); // solves lowercase/uppercase issue.
653
  update_post_meta( $the_post_id, $the_meta_name, apply_filters( 'wcj_save_meta_box_value', $option_value, $option['name'], $this->id ) );
654
  }
655
  }
656
+ // Reset post.
657
  wp_reset_postdata();
658
  }
659
 
808
  /**
809
  * Get_cat_by_section.
810
  *
811
+ * @version 5.6.2
812
  * @since 2.2.3
813
  * @param Array $section Get sections.
814
  */
817
  foreach ( $cats as $id => $label_info ) {
818
  if ( ( ! empty( $label_info['all_cat_ids'] ) ) &&
819
  ( is_array( $label_info['all_cat_ids'] ) ) &&
820
+ ( in_array( $section, $label_info['all_cat_ids'], true ) )
821
  ) {
822
  return $id;
823
  }
includes/classes/class-wcj-pdf-invoice.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce PDF Invoice
4
  *
5
- * @version 5.6.1
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/classes
8
  */
@@ -29,14 +29,14 @@ if ( ! class_exists( 'WCJ_PDF_Invoice' ) ) :
29
  * @param int $order_id Get order id.
30
  * @param string $invoice_type Get invoice type.
31
  */
32
- public function __construct( $order_id, $invoice_type ) {
33
  parent::__construct( $order_id, $invoice_type );
34
  }
35
 
36
  /**
37
  * Prepare_pdf.
38
  *
39
- * @version 5.6.1
40
  * @todo [dev] check `addTTFfont()`
41
  * @todo [dev] maybe `$pdf->SetAuthor( 'Booster for WooCommerce' )`
42
  * @todo [dev] maybe `$pdf->setLanguageArray( $l )`
@@ -49,7 +49,7 @@ if ( ! class_exists( 'WCJ_PDF_Invoice' ) ) :
49
  $invoice_type = $this->invoice_type;
50
 
51
  $page_format = wcj_get_option( 'wcj_invoicing_' . $invoice_type . '_page_format', 'A4' );
52
- if ( 'custom' == $page_format ) {
53
  $page_format = array(
54
  get_option( 'wcj_invoicing_' . $invoice_type . '_page_format_custom_width', 0 ),
55
  get_option( 'wcj_invoicing_' . $invoice_type . '_page_format_custom_height', 0 ),
@@ -74,7 +74,7 @@ if ( ! class_exists( 'WCJ_PDF_Invoice' ) ) :
74
  $invoice_title = $invoice_type;
75
  $invoice_types = wcj_get_invoice_types();
76
  foreach ( $invoice_types as $invoice_type_data ) {
77
- if ( $invoice_type == $invoice_type_data['id'] ) {
78
  $invoice_title = $invoice_type_data['title'];
79
  break;
80
  }
@@ -169,7 +169,8 @@ if ( ! class_exists( 'WCJ_PDF_Invoice' ) ) :
169
  $background_image = do_shortcode( wcj_get_option( 'wcj_invoicing_' . $invoice_type . '_background_image', '' ) );
170
  if ( '' !== $background_image ) {
171
  $parse_bkg_image = wcj_get_option( 'wcj_invoicing_' . $invoice_type . '_background_image_parse', 'yes' );
172
- $background_image = 'yes' === ( $parse_bkg_image ) ? sanitize_text_field( wp_unslash( $_SERVER['DOCUMENT_ROOT'] ) ) . wp_parse_url( $background_image, PHP_URL_PATH ) : $background_image;
 
173
 
174
  $pdf->SetAutoPageBreak( false, 0 );
175
  $pdf->Image( $background_image, 0, 0, $pdf->getPageWidth(), $pdf->getPageHeight(), '', '', '', false, 300, '', false, false, 0 );
@@ -182,7 +183,7 @@ if ( ! class_exists( 'WCJ_PDF_Invoice' ) ) :
182
  /**
183
  * Maybe_replace_tcpdf_method_params.
184
  *
185
- * @version 3.6.0
186
  * @since 3.6.0
187
  * @param mixed $html Get pdf html.
188
  * @param mixed $pdf Get pdfs.
@@ -196,7 +197,7 @@ if ( ! class_exists( 'WCJ_PDF_Invoice' ) ) :
196
  while ( false !== $start ) {
197
  $params_start = $start + $start_str_length;
198
  $params_length = strpos( $html, $end_str ) - $params_start;
199
- $params = $pdf->serializeTCPDFtagParameters( unserialize( substr( $html, $params_start, $params_length ) ) );
200
  $html = substr_replace( $html, 'params="' . $params . '"', $start, $start_str_length + $params_length + $end_str_length );
201
  }
202
  return $html;
@@ -207,7 +208,7 @@ if ( ! class_exists( 'WCJ_PDF_Invoice' ) ) :
207
  *
208
  * Gets invoice content HTML.
209
  *
210
- * @version 4.7.0
211
  * @since 3.5.0
212
  * @todo [dev] pass other params (billing_country, payment_method) as global (same as user_id) instead of $_GET
213
  * @todo [fix] `force_balance_tags()` - there are some bugs and performance issues, see http://wordpress.stackexchange.com/questions/89121/why-doesnt-default-wordpress-page-view-use-force-balance-tags
@@ -222,10 +223,10 @@ if ( ! class_exists( 'WCJ_PDF_Invoice' ) ) :
222
  }
223
  $_GET['order_id'] = $order_id;
224
  $the_order = wc_get_order( $order_id );
225
- if ( ! isset( $_GET['billing_country'] ) ) {
226
  $_GET['billing_country'] = ( WCJ_IS_WC_VERSION_BELOW_3 ? $the_order->billing_country : $the_order->get_billing_country() );
227
  }
228
- if ( ! isset( $_GET['payment_method'] ) ) {
229
  $_GET['payment_method'] = wcj_order_get_payment_method( $the_order );
230
  }
231
  global $wcj_pdf_invoice_data;
@@ -247,7 +248,7 @@ if ( ! class_exists( 'WCJ_PDF_Invoice' ) ) :
247
  /**
248
  * Get_pdf.
249
  *
250
- * @version 5.1.0
251
  * @todo [dev] (maybe) `die()` on success
252
  * @param string $dest define dest.
253
  */
@@ -263,40 +264,40 @@ if ( ! class_exists( 'WCJ_PDF_Invoice' ) ) :
263
  $file_name = $this->get_file_name();
264
  if ( 'F' === $dest ) {
265
  $file_path = wcj_get_invoicing_temp_dir() . '/' . $file_name;
266
- if ( ! file_put_contents( $file_path, $result_pdf ) ) {
267
  return null;
268
  }
269
  return $file_path;
270
- } elseif ( 'D' == $dest || 'I' == $dest ) {
271
- if ( 'D' == $dest ) {
272
  header( 'Content-Type: application/octet-stream' );
273
- header( 'Content-Disposition: attachment; filename=' . urlencode( $file_name ) );
274
  header( 'Content-Type: application/octet-stream' );
275
  header( 'Content-Type: application/download' );
276
  header( 'Content-Description: File Transfer' );
277
  } elseif ( 'I' === $dest ) {
278
  header( 'Content-type: application/pdf' );
279
- header( 'Content-Disposition: inline; filename=' . urlencode( $file_name ) );
280
  }
281
  if ( 'yes' === wcj_get_option( 'wcj_general_advanced_disable_save_sys_temp_dir', 'no' ) ) {
282
  header( 'Content-Length: ' . strlen( $result_pdf ) );
283
- echo $result_pdf;
284
  } else {
285
  $file_path = wcj_get_invoicing_temp_dir() . '/' . $file_name;
286
- if ( ! file_put_contents( $file_path, $result_pdf ) ) {
287
  return null;
288
  }
289
  if ( apply_filters( 'wcj_invoicing_header_content_length', true ) ) {
290
  header( 'Content-Length: ' . filesize( $file_path ) );
291
  }
292
  flush(); // this doesn't really matter.
293
- $fp = fopen( $file_path, 'r' );
294
  if ( false !== ( $fp ) ) {
295
  while ( ! feof( $fp ) ) {
296
- echo fread( $fp, 65536 );
297
  flush(); // this is essential for large downloads.
298
  }
299
- fclose( $fp );
300
  } else {
301
  die( esc_html__( 'Unexpected error', 'woocommerce-jetpack' ) );
302
  }
2
  /**
3
  * Booster for WooCommerce PDF Invoice
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/classes
8
  */
29
  * @param int $order_id Get order id.
30
  * @param string $invoice_type Get invoice type.
31
  */
32
+ public function __construct( $order_id, $invoice_type ) { //phpcs:ignore
33
  parent::__construct( $order_id, $invoice_type );
34
  }
35
 
36
  /**
37
  * Prepare_pdf.
38
  *
39
+ * @version 5.6.2
40
  * @todo [dev] check `addTTFfont()`
41
  * @todo [dev] maybe `$pdf->SetAuthor( 'Booster for WooCommerce' )`
42
  * @todo [dev] maybe `$pdf->setLanguageArray( $l )`
49
  $invoice_type = $this->invoice_type;
50
 
51
  $page_format = wcj_get_option( 'wcj_invoicing_' . $invoice_type . '_page_format', 'A4' );
52
+ if ( 'custom' === $page_format ) {
53
  $page_format = array(
54
  get_option( 'wcj_invoicing_' . $invoice_type . '_page_format_custom_width', 0 ),
55
  get_option( 'wcj_invoicing_' . $invoice_type . '_page_format_custom_height', 0 ),
74
  $invoice_title = $invoice_type;
75
  $invoice_types = wcj_get_invoice_types();
76
  foreach ( $invoice_types as $invoice_type_data ) {
77
+ if ( $invoice_type === $invoice_type_data['id'] ) {
78
  $invoice_title = $invoice_type_data['title'];
79
  break;
80
  }
169
  $background_image = do_shortcode( wcj_get_option( 'wcj_invoicing_' . $invoice_type . '_background_image', '' ) );
170
  if ( '' !== $background_image ) {
171
  $parse_bkg_image = wcj_get_option( 'wcj_invoicing_' . $invoice_type . '_background_image_parse', 'yes' );
172
+ $document_root = isset( $_SERVER['DOCUMENT_ROOT'] ) ? sanitize_text_field( wp_unslash( $_SERVER['DOCUMENT_ROOT'] ) ) : '';
173
+ $background_image = 'yes' === ( $parse_bkg_image ) ? $document_root . wp_parse_url( $background_image, PHP_URL_PATH ) : $background_image;
174
 
175
  $pdf->SetAutoPageBreak( false, 0 );
176
  $pdf->Image( $background_image, 0, 0, $pdf->getPageWidth(), $pdf->getPageHeight(), '', '', '', false, 300, '', false, false, 0 );
183
  /**
184
  * Maybe_replace_tcpdf_method_params.
185
  *
186
+ * @version 5.6.2
187
  * @since 3.6.0
188
  * @param mixed $html Get pdf html.
189
  * @param mixed $pdf Get pdfs.
197
  while ( false !== $start ) {
198
  $params_start = $start + $start_str_length;
199
  $params_length = strpos( $html, $end_str ) - $params_start;
200
+ $params = $pdf->serializeTCPDFtagParameters( unserialize( substr( $html, $params_start, $params_length ) ) ); //phpcs:ignore
201
  $html = substr_replace( $html, 'params="' . $params . '"', $start, $start_str_length + $params_length + $end_str_length );
202
  }
203
  return $html;
208
  *
209
  * Gets invoice content HTML.
210
  *
211
+ * @version 5.6.2
212
  * @since 3.5.0
213
  * @todo [dev] pass other params (billing_country, payment_method) as global (same as user_id) instead of $_GET
214
  * @todo [fix] `force_balance_tags()` - there are some bugs and performance issues, see http://wordpress.stackexchange.com/questions/89121/why-doesnt-default-wordpress-page-view-use-force-balance-tags
223
  }
224
  $_GET['order_id'] = $order_id;
225
  $the_order = wc_get_order( $order_id );
226
+ if ( ! isset( $_GET['billing_country'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
227
  $_GET['billing_country'] = ( WCJ_IS_WC_VERSION_BELOW_3 ? $the_order->billing_country : $the_order->get_billing_country() );
228
  }
229
+ if ( ! isset( $_GET['payment_method'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
230
  $_GET['payment_method'] = wcj_order_get_payment_method( $the_order );
231
  }
232
  global $wcj_pdf_invoice_data;
248
  /**
249
  * Get_pdf.
250
  *
251
+ * @version 5.6.2
252
  * @todo [dev] (maybe) `die()` on success
253
  * @param string $dest define dest.
254
  */
264
  $file_name = $this->get_file_name();
265
  if ( 'F' === $dest ) {
266
  $file_path = wcj_get_invoicing_temp_dir() . '/' . $file_name;
267
+ if ( ! file_put_contents( $file_path, $result_pdf ) ) { //phpcs:ignore
268
  return null;
269
  }
270
  return $file_path;
271
+ } elseif ( 'D' === $dest || 'I' === $dest ) {
272
+ if ( 'D' === $dest ) {
273
  header( 'Content-Type: application/octet-stream' );
274
+ header( 'Content-Disposition: attachment; filename=' . rawurlencode( $file_name ) );
275
  header( 'Content-Type: application/octet-stream' );
276
  header( 'Content-Type: application/download' );
277
  header( 'Content-Description: File Transfer' );
278
  } elseif ( 'I' === $dest ) {
279
  header( 'Content-type: application/pdf' );
280
+ header( 'Content-Disposition: inline; filename=' . rawurlencode( $file_name ) );
281
  }
282
  if ( 'yes' === wcj_get_option( 'wcj_general_advanced_disable_save_sys_temp_dir', 'no' ) ) {
283
  header( 'Content-Length: ' . strlen( $result_pdf ) );
284
+ echo $result_pdf; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
285
  } else {
286
  $file_path = wcj_get_invoicing_temp_dir() . '/' . $file_name;
287
+ if ( ! file_put_contents( $file_path, $result_pdf ) ) { //phpcs:ignore
288
  return null;
289
  }
290
  if ( apply_filters( 'wcj_invoicing_header_content_length', true ) ) {
291
  header( 'Content-Length: ' . filesize( $file_path ) );
292
  }
293
  flush(); // this doesn't really matter.
294
+ $fp = fopen( $file_path, 'r' ); //phpcs:ignore
295
  if ( false !== ( $fp ) ) {
296
  while ( ! feof( $fp ) ) {
297
+ echo fread( $fp, 65536 ); //phpcs:ignore
298
  flush(); // this is essential for large downloads.
299
  }
300
+ fclose( $fp ); //phpcs:ignore
301
  } else {
302
  die( esc_html__( 'Unexpected error', 'woocommerce-jetpack' ) );
303
  }
includes/classes/class-wcj-shortcodes.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Shortcodes
4
  *
5
- * @version 5.4.8
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/classes
8
  */
@@ -91,7 +91,7 @@ if ( ! class_exists( 'WCJ_Shortcodes' ) ) :
91
  /**
92
  * Wcj_shortcode.
93
  *
94
- * @version 5.4.8
95
  * @todo `time` - weekly, e.g. 8:00-19:59;8:00-19:59;8:00-19:59;8:00-19:59;8:00-9:59,12:00-17:59;-;-;
96
  * @todo (maybe) - `return $atts['on_empty'];` everywhere instead of `return '';`
97
  * @todo (maybe) - add `$atts['function']` and `$atts['function_args']` - if set, will be run on shortcode's result
@@ -260,25 +260,31 @@ if ( ! class_exists( 'WCJ_Shortcodes' ) ) :
260
 
261
  // Check if billing country by arg is ok.
262
  if ( '' !== $atts['billing_country'] ) {
263
- $order_id = sanitize_text_field( wp_unslash( $_GET['order_id'] ) );
 
 
 
264
  $orders = new WC_Order( $order_id );
265
  $billing_contry = $orders->get_billing_country();
266
  if ( ! isset( $billing_contry ) ) {
267
 
268
  return '';
269
  }
270
- if ( ! in_array( $billing_contry, $this->custom_explode( $atts['billing_country'] ) ) ) {
271
 
272
  return '';
273
  }
274
  }
275
  // Check if billing country by arg is ok (not in...).
276
  if ( '' !== $atts['not_billing_country'] ) {
277
- $order_id = sanitize_text_field( wp_unslash( $_GET['order_id'] ) );
 
 
 
278
  $orders = new WC_Order( $order_id );
279
  $billing_contry = $orders->get_billing_country();
280
  if ( isset( $billing_contry ) ) {
281
- if ( in_array( $billing_contry, $this->custom_explode( $atts['not_billing_country'] ) ) ) {
282
 
283
  return '';
284
  }
@@ -287,17 +293,17 @@ if ( ! class_exists( 'WCJ_Shortcodes' ) ) :
287
 
288
  // Check if payment method by arg is ok.
289
  if ( '' !== $atts['payment_method'] ) {
290
- if ( ! isset( $_GET['payment_method'] ) ) {
291
  return '';
292
  }
293
- if ( ! in_array( $_GET['payment_method'], $this->custom_explode( $atts['payment_method'] ) ) ) {
294
  return '';
295
  }
296
  }
297
  // Check if payment method by arg is ok (not in...).
298
  if ( '' !== $atts['not_payment_method'] ) {
299
- if ( isset( $_GET['payment_method'] ) ) {
300
- if ( in_array( $_GET['payment_method'], $this->custom_explode( $atts['not_payment_method'] ) ) ) {
301
  return '';
302
  }
303
  }
@@ -365,11 +371,11 @@ if ( ! class_exists( 'WCJ_Shortcodes' ) ) :
365
  /**
366
  * Wcj_get_user_location.
367
  *
368
- * @version 3.1.0
369
  * @todo (maybe) move this to global functions
370
  */
371
  public function wcj_get_user_location() {
372
- return ( isset( $_GET['country'] ) && '' !== $_GET['country'] && wcj_is_user_role( 'administrator' ) ? sanitize_text_field( wp_unslash( $_GET['country'] ) ) : wcj_get_country_by_ip() );
373
  }
374
  }
375
 
2
  /**
3
  * Booster for WooCommerce - Shortcodes
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/classes
8
  */
91
  /**
92
  * Wcj_shortcode.
93
  *
94
+ * @version 5.6.2
95
  * @todo `time` - weekly, e.g. 8:00-19:59;8:00-19:59;8:00-19:59;8:00-19:59;8:00-9:59,12:00-17:59;-;-;
96
  * @todo (maybe) - `return $atts['on_empty'];` everywhere instead of `return '';`
97
  * @todo (maybe) - add `$atts['function']` and `$atts['function_args']` - if set, will be run on shortcode's result
260
 
261
  // Check if billing country by arg is ok.
262
  if ( '' !== $atts['billing_country'] ) {
263
+ if ( ! isset( $_GET['order_id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
264
+ return '';
265
+ }
266
+ $order_id = sanitize_text_field( wp_unslash( $_GET['order_id'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
267
  $orders = new WC_Order( $order_id );
268
  $billing_contry = $orders->get_billing_country();
269
  if ( ! isset( $billing_contry ) ) {
270
 
271
  return '';
272
  }
273
+ if ( ! in_array( $billing_contry, $this->custom_explode( $atts['billing_country'] ), true ) ) {
274
 
275
  return '';
276
  }
277
  }
278
  // Check if billing country by arg is ok (not in...).
279
  if ( '' !== $atts['not_billing_country'] ) {
280
+ if ( ! isset( $_GET['order_id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
281
+ return '';
282
+ }
283
+ $order_id = sanitize_text_field( wp_unslash( $_GET['order_id'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
284
  $orders = new WC_Order( $order_id );
285
  $billing_contry = $orders->get_billing_country();
286
  if ( isset( $billing_contry ) ) {
287
+ if ( in_array( $billing_contry, $this->custom_explode( $atts['not_billing_country'] ), true ) ) {
288
 
289
  return '';
290
  }
293
 
294
  // Check if payment method by arg is ok.
295
  if ( '' !== $atts['payment_method'] ) {
296
+ if ( ! isset( $_GET['payment_method'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
297
  return '';
298
  }
299
+ if ( ! in_array( $_GET['payment_method'], $this->custom_explode( $atts['payment_method'] ), true ) ) { // phpcs:ignore WordPress.Security.NonceVerification
300
  return '';
301
  }
302
  }
303
  // Check if payment method by arg is ok (not in...).
304
  if ( '' !== $atts['not_payment_method'] ) {
305
+ if ( isset( $_GET['payment_method'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
306
+ if ( in_array( $_GET['payment_method'], $this->custom_explode( $atts['not_payment_method'] ), true ) ) { // phpcs:ignore WordPress.Security.NonceVerification
307
  return '';
308
  }
309
  }
371
  /**
372
  * Wcj_get_user_location.
373
  *
374
+ * @version 5.6.2
375
  * @todo (maybe) move this to global functions
376
  */
377
  public function wcj_get_user_location() {
378
+ return ( isset( $_GET['country'] ) && '' !== $_GET['country'] && wcj_is_user_role( 'administrator' ) ? sanitize_text_field( wp_unslash( $_GET['country'] ) ) : wcj_get_country_by_ip() ); // phpcs:ignore WordPress.Security.NonceVerification
379
  }
380
  }
381
 
includes/classes/class-wcj-widget.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Widget
4
  *
5
- * @version 3.1.0
6
  * @since 3.1.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/classes
@@ -38,7 +38,7 @@ if ( ! class_exists( 'WCJ_Widget' ) ) :
38
  /**
39
  * Outputs the content of the widget.
40
  *
41
- * @version 3.1.0
42
  * @since 3.1.0
43
  * @param array $args get widget args.
44
  * @param array $instance Saved values from database.
@@ -51,7 +51,7 @@ if ( ! class_exists( 'WCJ_Widget' ) ) :
51
  }
52
  $html .= $this->get_content( $instance );
53
  $html .= $args['after_widget'];
54
- echo $html;
55
  }
56
 
57
  /**
2
  /**
3
  * Booster for WooCommerce - Widget
4
  *
5
+ * @version 5.6.2
6
  * @since 3.1.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/classes
38
  /**
39
  * Outputs the content of the widget.
40
  *
41
+ * @version 5.6.2
42
  * @since 3.1.0
43
  * @param array $args get widget args.
44
  * @param array $instance Saved values from database.
51
  }
52
  $html .= $this->get_content( $instance );
53
  $html .= $args['after_widget'];
54
+ echo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
55
  }
56
 
57
  /**
includes/core/class-wcj-admin.php CHANGED
@@ -88,7 +88,11 @@ if ( ! class_exists( 'WCJ_Admin' ) ) :
88
  * @param string $footer_text get admin footer texts.
89
  */
90
  public function admin_footer_text( $footer_text ) {
91
- if ( isset( $_GET['page'] ) ) {
 
 
 
 
92
  if ( 'wcj-tools' === $_GET['page'] || ( 'wc-settings' === $_GET['page'] && isset( $_GET['tab'] ) && 'jetpack' === $_GET['tab'] ) ) {
93
  ?>
94
  <div class="wclj_tl_foot">
88
  * @param string $footer_text get admin footer texts.
89
  */
90
  public function admin_footer_text( $footer_text ) {
91
+ $wpnonce = true;
92
+ if ( function_exists( 'wp_verify_nonce' ) ) {
93
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
94
+ }
95
+ if ( isset( $_GET['page'] ) && $wpnonce ) {
96
  if ( 'wcj-tools' === $_GET['page'] || ( 'wc-settings' === $_GET['page'] && isset( $_GET['tab'] ) && 'jetpack' === $_GET['tab'] ) ) {
97
  ?>
98
  <div class="wclj_tl_foot">
includes/core/wcj-loader.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Core - Loader
4
  *
5
- * @version 5.6.1
6
  * @since 3.2.4
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/core
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
14
 
15
  // Debug Mode.
16
  if ( 'yes' === wcj_get_option( 'wcj_debug_tools_enabled', 'no' ) && 'yes' === wcj_get_option( 'wcj_debuging_enabled', 'no' ) ) {
17
- error_reporting( E_ALL );
18
  }
19
 
20
  if ( ! defined( 'WCJ_FREE_PLUGIN_PATH' ) ) {
2
  /**
3
  * Booster for WooCommerce - Core - Loader
4
  *
5
+ * @version 5.6.2
6
  * @since 3.2.4
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/core
14
 
15
  // Debug Mode.
16
  if ( 'yes' === wcj_get_option( 'wcj_debug_tools_enabled', 'no' ) && 'yes' === wcj_get_option( 'wcj_debuging_enabled', 'no' ) ) {
17
+ error_reporting( E_ALL ); //phpcs:ignore
18
  }
19
 
20
  if ( ! defined( 'WCJ_FREE_PLUGIN_PATH' ) ) {
includes/core/wcj-modules.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Modules
4
  *
5
- * @version 5.6.1
6
  * @since 3.2.4
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/core
@@ -80,7 +80,7 @@ $wcj_module_files = array(
80
  'class-wcj-shipping.php',
81
  'class-wcj-shipping-options.php',
82
  'class-wcj-shipping-icons.php',
83
- 'class-wcj-shipping-description.php',
84
  'class-wcj-shipping-time.php',
85
  'class-wcj-left-to-free-shipping.php',
86
  'class-wcj-shipping-calculator.php',
@@ -101,7 +101,7 @@ $wcj_module_files = array(
101
  'class-wcj-emails.php',
102
  'class-wcj-email-options.php',
103
  'class-wcj-emails-verification.php',
104
- 'class-wcj-currency.php',
105
  'class-wcj-multicurrency.php',
106
  'class-wcj-multicurrency-product-base-price.php',
107
  'class-wcj-currency-per-product.php',
2
  /**
3
  * Booster for WooCommerce - Modules
4
  *
5
+ * @version 5.6.2
6
  * @since 3.2.4
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/core
80
  'class-wcj-shipping.php',
81
  'class-wcj-shipping-options.php',
82
  'class-wcj-shipping-icons.php',
83
+ 'class-wcj-shipping-descriptions.php',
84
  'class-wcj-shipping-time.php',
85
  'class-wcj-left-to-free-shipping.php',
86
  'class-wcj-shipping-calculator.php',
101
  'class-wcj-emails.php',
102
  'class-wcj-email-options.php',
103
  'class-wcj-emails-verification.php',
104
+ 'class-wcj-currencies.php',
105
  'class-wcj-multicurrency.php',
106
  'class-wcj-multicurrency-product-base-price.php',
107
  'class-wcj-currency-per-product.php',
includes/core/wcj-options.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Core - Options
4
  *
5
- * @version 3.8.0
6
  * @since 3.2.4
7
  * @author Pluggabl LLC.
8
  * @todo (dev) move version updated stuff to another file
@@ -17,7 +17,7 @@ if ( ! defined( 'ABSPATH' ) ) {
17
  if ( is_admin() ) {
18
  foreach ( $this->modules as $module ) {
19
  // Modules statuses.
20
- if ( '' == $module->parent_id ) { // i.e. not submodule.
21
  $status_settings = $module->add_enable_module_setting( array() );
22
  $this->module_statuses[] = $status_settings[1];
23
  }
2
  /**
3
  * Booster for WooCommerce - Core - Options
4
  *
5
+ * @version 5.6.2
6
  * @since 3.2.4
7
  * @author Pluggabl LLC.
8
  * @todo (dev) move version updated stuff to another file
17
  if ( is_admin() ) {
18
  foreach ( $this->modules as $module ) {
19
  // Modules statuses.
20
+ if ( '' === $module->parent_id ) { // i.e. not submodule.
21
  $status_settings = $module->add_enable_module_setting( array() );
22
  $this->module_statuses[] = $status_settings[1];
23
  }
includes/css/admin-style.css CHANGED
@@ -1 +1,2 @@
1
- @font-face{font-family:Inter-Medium;src:url('fonts/Inter-Medium.eot');src:url('fonts/Inter-Medium.eot?#iefix') format('embedded-opentype'),url('fonts/Inter-Medium.woff2') format('woff2'),url('fonts/Inter-Medium.woff') format('woff'),url('fonts/Inter-Medium.ttf') format('truetype'),url('fonts/Inter-Medium.svg#Inter-Medium') format('svg');font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:Inter-Regular;src:url('fonts/Inter-Regular.eot');src:url('fonts/Inter-Regular.eot?#iefix') format('embedded-opentype'),url('fonts/Inter-Regular.woff2') format('woff2'),url('fonts/Inter-Regular.woff') format('woff'),url('fonts/Inter-Regular.ttf') format('truetype'),url('fonts/Inter-Regular.svg#Inter-Regular') format('svg');font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:Inter-Light;src:url('fonts/Inter-Light.eot');src:url('fonts/Inter-Light.eot?#iefix') format('embedded-opentype'),url('fonts/Inter-Light.woff2') format('woff2'),url('fonts/Inter-Light.woff') format('woff'),url('fonts/Inter-Light.ttf') format('truetype'),url('fonts/Inter-Light.svg#Inter-Light') format('svg');font-weight:300;font-style:normal;font-display:swap}@font-face{font-family:Inter-SemiBold;src:url('fonts/Inter-SemiBold.eot');src:url('fonts/Inter-SemiBold.eot?#iefix') format('embedded-opentype'),url('fonts/Inter-SemiBold.woff2') format('woff2'),url('fonts/Inter-SemiBold.woff') format('woff'),url('fonts/Inter-SemiBold.ttf') format('truetype'),url('fonts/Inter-SemiBold.svg#Inter-SemiBold') format('svg');font-weight:600;font-style:normal;font-display:swap}@font-face{font-family:Inter-Black;src:url('fonts/Inter-Black.eot');src:url('fonts/Inter-Black.eot?#iefix') format('embedded-opentype'),url('fonts/Inter-Black.woff2') format('woff2'),url('fonts/Inter-Black.woff') format('woff'),url('fonts/Inter-Black.ttf') format('truetype'),url('fonts/Inter-Black.svg#Inter-Black') format('svg');font-weight:900;font-style:normal;font-display:swap}@font-face{font-family:Inter-Thin;src:url('fonts/Inter-Thin.eot');src:url('fonts/Inter-Thin.eot?#iefix') format('embedded-opentype'),url('fonts/Inter-Thin.woff2') format('woff2'),url('fonts/Inter-Thin.woff') format('woff'),url('fonts/Inter-Thin.ttf') format('truetype'),url('fonts/Inter-Thin.svg#Inter-Thin') format('svg');font-weight:100;font-style:normal;font-display:swap}@font-face{font-family:Inter-Bold;src:url('fonts/Inter-Bold.eot');src:url('fonts/Inter-Bold.eot?#iefix') format('embedded-opentype'),url('fonts/Inter-Bold.woff2') format('woff2'),url('fonts/Inter-Bold.woff') format('woff'),url('fonts/Inter-Bold.ttf') format('truetype'),url('fonts/Inter-Bold.svg#Inter-Bold') format('svg');font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:Inter-ExtraBold;src:url('fonts/Inter-ExtraBold.eot');src:url('fonts/Inter-ExtraBold.eot?#iefix') format('embedded-opentype'),url('fonts/Inter-ExtraBold.woff2') format('woff2'),url('fonts/Inter-ExtraBold.woff') format('woff'),url('fonts/Inter-ExtraBold.ttf') format('truetype'),url('fonts/Inter-ExtraBold.svg#Inter-ExtraBold') format('svg');font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:Inter-ExtraLight;src:url('fonts/Inter-ExtraLight.eot');src:url('fonts/Inter-ExtraLight.eot?#iefix') format('embedded-opentype'),url('fonts/Inter-ExtraLight.woff2') format('woff2'),url('fonts/Inter-ExtraLight.woff') format('woff'),url('fonts/Inter-ExtraLight.ttf') format('truetype'),url('fonts/Inter-ExtraLight.svg#Inter-ExtraLight') format('svg');font-weight:200;font-style:normal;font-display:swap}h1,h2,h3,h4,h5,h6,p{margin:0}img{vertical-align:middle}.wcj-main-container{width:100%;float:left;background-color:#fff}.wcj-body{display:flex;font-family:Inter-Regular;border-bottom:2px solid rgba(0,0,0,.1)}.wcj-dashboard-header{position:relative;height:50px;width:100%;background:#f46c5e;color:#fff}.wcj-dashboard-header li{list-style:none;display:inline-block;position:relative;padding:0;margin:0;font-size:10pt;text-align:center;text-transform:capitalize;line-height:10px}.wcj-dashboard-header li a{color:#fff;text-decoration:none;font-size:12px;font-family:Inter-Regular;padding:30px 20px;padding:30px 7px;display:flex;flex-wrap:wrap;align-items:center;position:relative}.wcj-dashboard-header li a::before{position:absolute;content:'';background-color:transparent;width:20px;height:4px;border-radius:20px;left:0;right:0;bottom:13px;margin:0 auto}.wcj-dashboard-header li.wcj-header-item.active a::before{background-color:#fff}.wcj-sidebar{width:100%;max-width:305px;height:auto;position:relative;z-index:1;top:0;left:0;background-color:#fff;padding:20px;border-right:2px solid rgba(0,0,0,.1)}.wcj-sidebar li{margin-bottom:18px;color:#000;border-radius:5px;transition:all .5s ease;width:100%;display:flex;flex-wrap:wrap;align-items:center;padding:8px 8px 8px 8px;font-size:14px;padding:8px 16px;margin-bottom:30px}.wcj-sidebar-item a{color:#111;text-decoration:none}.wcj-sidebar-item.active a{color:#fff}li.wcj-sidebar-item.active{background-color:#f46c5e;border-radius:5px}.wcj-body-part{display:flex;margin:2px 8px 2px 2px;padding:15px}.wcj-box{border:1px solid #eee;padding:20px;border-radius:10px;margin:20px 0;background-color:#fff}li.wcj-dashboard-info-li{list-style:disc;margin:10px 20px}.wcj-partitions{border:1px solid #eee;border-radius:20px;margin:0;padding:24px;margin-top:24px;box-shadow:5px 10px 10px #eee}.wcj-updates-ul li{list-style:disc;margin:10px 20px}.wcj-accordion{background-color:#fff;color:#444;cursor:pointer;padding:18px;width:100%;text-align:left;border:none;outline:0;transition:.4s;margin:2px;border-radius:5px;box-shadow:5px 3px 8px #eee}.wcj-accordion:hover{background-color:#f46c5e;color:#fff}.wcj-panel{padding:0;background-color:#fff;display:none;overflow:hidden}.wcj-button{background:#f46c5e;margin:0;color:#fff!important;padding:13px 20px;border-radius:35px;border:none;text-decoration:none}.wcj-button:hover{border:1px solid transparent;color:#fff!important;background:#f46c5e}.wcj-nav-sidebar{width:100%;margin-top:40px}.wcj-body-parts h1,.wcj-partitions h1{font-family:Inter-Bold;color:#000}.wcj-faq-section h3,.wcj-info-section h3{font-family:Inter-Bold;font-size:22px;color:#000}.wcj-nav-sidebar ul{width:100%;display:flex;flex-wrap:wrap}.wcj-nav-sidebar .wcj-button{padding:11px 35px;min-width:130px;font-size:12px;font-family:Inter-Bold;text-transform:uppercase;letter-spacing:2px;margin-top:20px}.wcj-sidebar li span img{max-width:34px;vertical-align:middle;transition:all .5s ease}.wcj-sidebar li span{margin-right:14px}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm{margin:0 .5rem;padding:0;position:relative;border:none;height:1.5rem;width:3rem;border-radius:1.5rem;background-color:#f46c5e;margin-left:0}.wcj-sidebar-swich .example .wcj-btn-toggle{top:50%;transform:translateY(-50%)}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm:before{text-align:left}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm:after,.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm:before{line-height:-.5rem;color:#fff;letter-spacing:.75px;left:.4125rem;width:2.325rem;content:'Off';left:-.5rem;line-height:20px;width:.5rem;text-align:center;font-weight:600;font-size:.55rem;text-transform:uppercase;letter-spacing:2px;position:absolute;bottom:0;transition:opacity .25s;font-family:Inter-Regular;font-weight:400}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm>.handle{position:absolute;top:3px;left:.1875rem;width:15px;height:15px;border-radius:1.125rem;background:#fff;transition:left .25s}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm:after{text-align:left;opacity:0}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm:before{content:'On';right:-.5rem;opacity:1}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm.active:before{opacity:0}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.active{transition:background-color .25s;background-color:#5bbfad}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.active>.handle{left:30px;transition:left .25s}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm.active:after{opacity:1}.wcj-sidebar li.wcj-sidebar-swich:hover{background-color:transparent;color:#000}.wcj-sidebar li.wcj-sidebar-swich:hover img{filter:unset}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm:after,.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm:before{line-height:-.5rem;color:#fff;letter-spacing:.75px;left:.4125rem;width:2.325rem}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm:before{text-align:right}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm.active:before{opacity:1}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm.active:after{opacity:0}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm.active:before{text-align:left}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm.active:before{content:'on'!important}.wcj-body-part .wp-die-message,.wcj-body-part p{font-size:14px;color:#000}li.wcj-dashboard-info-li{font-size:14px}.wcj-no-sub p{font-size:14px;font-family:Inter-Bold;margin:0}.wcj-no-sub p strong{font-family:Inter-Bold}.wcj-no-sub p span{color:#f46c5e}.wcj-info-section.wcj-box ul li{float:left;width:100%}.wcj-info-section.wcj-box{display:flex;flex-wrap:wrap;width:100%;box-sizing:border-box}.wcj-info-section.wcj-box ul.wcj-dashboard-info-ul{margin:0;padding-left:20px}.wcj-body-container{background-color:#fff;width:calc(100% - 305px);float:left;display:flex;flex-wrap:wrap;flex-direction:column}.wcj-body-container header,.wcj-body-part{width:100%}.wcj-body-right{width:100%;max-width:394px;margin-left:24px}.wcj-body-left{width:100%;max-width:calc(100% - 418px)}.wcj-box,.wcj-partitions{border:0;box-shadow:5px 5px 20px rgb(0 0 0 / 10%)}.wcj-partitions h3{font-family:Inter-SemiBold;font-size:20px;color:#000}.wcj-dashboard-header{height:auto;margin:0;width:100%;display:flex;flex-wrap:wrap;padding:0 10px;justify-content:space-between}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm{height:21px;top:3px;cursor:pointer}.wcj-nav-sidebar .wcj-button img{vertical-align:middle}.wcj-nav-sidebar .wcj-button span{padding-left:12px}.wcj-button:hover{border:0;color:#fff!important;background:#f46c5e}*{box-sizing:border-box}.wcj-body-part{padding:40px;flex-wrap:wrap}.wcj-tit{width:100%;display:flex;flex-wrap:wrap}.wcj-tit h1{font-size:24px;font-family:Inter-Bold;color:#000;margin-bottom:20px;margin-top:0;padding:0}.wcj-box{margin-top:24px;margin-bottom:0;padding:24px;border-radius:20px}.wcj-dashboard-info-ul li{font-size:12px;color:rgba(0,0,0,.6);font-family:Inter-Medium;margin-bottom:12px;margin-top:0;list-style:disc}.wcj-tit h3{font-size:20px;font-family:Inter-Bold;color:#000;margin-bottom:20px;margin-top:0}.wcj-accordion{padding:8px 0;box-shadow:none;font-family:Inter-Medium;color:#000;font-size:12px;margin:0;display:flex;flex-wrap:wrap;justify-content:space-between}.wcj-accordion:hover{background-color:transparent;color:#000}.wcj-panel p{font-size:12px;color:rgba(0,0,0,.6);font-family:Inter-Regular;margin-top:0}.wcj-faq-sing-box{width:100%;display:flex;flex-wrap:wrap;margin-bottom:12px}.wcj-faq-sing-box .wcj-accordion img{transition:all .5s ease}.wcj-accordion h6{font-family:Inter-Medium;color:#000;font-size:12px;margin:0;font-weight:400;width:calc(100% - 100px)}.wcj-accordion.active img{transform:rotate(180deg)}.wcj-additional-que{width:100%;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;border-top:1px solid rgba(0,0,0,.2);padding-top:20px}.wcj-additional-que h6{font-size:12px;font-family:Inter-SemiBold;color:#000;margin:0}.wcj-button{font-size:12px;font-family:Inter-Bold;color:#fff;letter-spacing:2px;text-transform:uppercase;padding:11px 20px;min-width:192px;text-align:center}.wcj-socialmedia-connect{width:100%;display:flex;flex-wrap:wrap;margin-top:10px;align-items:center}.wcj-social-icn{padding:0;margin:0;display:flex;flex-wrap:wrap;align-items:center;padding-left:8px;margin:0}.wcj-social-icn li{list-style:none;display:inline-block;padding:0 8px;margin-bottom:0}.wcj-social-icn li a{display:block}.wcj-social-icn li a img{max-width:33px}.wcj-action-sub-part{width:100%;display:flex;flex-wrap:wrap}.wcj-action-sub-sing-box{width:100%;display:flex;flex-wrap:wrap;margin-bottom:30px}.wcj-action-sub-sing-box:last-child{margin-bottom:0}.wcj-action-single-bx{width:calc(50% - 10px);display:flex;flex-wrap:wrap;flex-direction:column;padding-right:10px;margin-right:10px;border-right:1px solid rgba(0,0,0,.2);height:100%}.wcj-action-single-bx:last-child{border-right:0px}.wcj-action-sub-sing-icon{width:100%}.wcj-action-single-bx .wcj-actions-part{width:100%;margin-top:15px}.wcj-action-single-bx .wcj-actions-part h6{font-size:12px;font-weight:500;font-family:Inter-Medium;color:#000;margin:0;margin-bottom:5px}.wcj-action-single-bx .wcj-actions-part p{font-size:12px;font-family:Inter-Regular;color:rgba(0,0,0,.6);margin:0}.wcj-documentation-dtl{width:100%;display:flex;flex-wrap:wrap;padding-left:8px;align-items:center}.wcj-documentation-icon{width:auto}.wcj-documentation-icon img{max-width:105px}.wcj-documentation-sm-rh-dtl{width:calc(100% - 105px);padding-left:18px}.wcj-documentation-sm-rh-dtl p{font-size:12px;color:rgba(0,0,0,.6);font-family:Inter-Regular;margin-bottom:20px;margin-top:0}.wcj-btn-main{width:100%;display:flex;flex-wrap:wrap}.wcj-socialmedia-connect .wcj-btn-main{width:auto}.wcj-partitions-sub-dtl{width:100%}.wcj-partitions-sub-dtl h6{font-size:12px;font-family:Inter-SemiBold;color:#000;margin:0;margin-bottom:10px}.wcj-updates-ul li{font-size:12px;color:rgba(0,0,0,.6);font-family:Inter-Medium;margin:0;margin-bottom:20px;margin-top:0;list-style:disc}.wcj-updates-ul{padding-left:25px;margin:0}.wcj-no-sub p img{margin-left:5px}.wcj-sub-cnt-top{width:100%;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center}.wcj-sub-cnt-top .wcj-btn-main,.wcj-sub-cnt-top-left{width:auto}.wcj-body-sec-part-main{width:100%;display:flex;flex-wrap:wrap}.wcj-footer{width:100%;display:flex;flex-wrap:wrap;padding:40px}.wcj-footer .wcj-review-footer{width:100%;margin:0;border:1px solid rgba(0,0,0,.1);border-radius:0;box-shadow:none;padding:24px;margin-bottom:24PX}.wcj-footer .wcj-review-footer:last-child{margin-bottom:0}.wcj-footer .wcj-review-footer p{font-size:12px;color:#000;font-family:Inter-Regular}.wcj-footer .wcj-review-footer p strong{font-family:Inter-Bold}.wcj-footer .wcj-review-footer p a{color:#1da1f2;text-decoration-line:none}.wcj-review-footer h6{font-size:14px;color:#000;font-family:Inter-Bold;margin-bottom:20px}.wcj-review-footer ul{margin:0;padding:0}.wcj-review-footer ul li{list-style:none;font-size:12px;color:#000;font-family:Inter-Regular;margin-bottom:10px}.wcj-review-footer ul li strong{font-family:Inter-Bold}.wcj-premium-features-footer p{margin-bottom:10px}.wcj-review-footer.wcj-premium-features-footer ul{display:flex;flex-wrap:wrap}.wcj-review-footer.wcj-premium-features-footer ul li{width:50%}.wcj-review-footer .wcj-btn-main{margin-top:10px}.wcj-woo-star{padding:0 4px}.wcj-setting-jetpack h3{font-size:20px;font-family:Inter-Bold;color:#000;margin-bottom:20px}.wcj-setting-jetpack p{font-size:12px;font-family:Inter-Regular;color:#000}.wcj-setting-jetpack-body{width:100%;padding:40px}.wcj-setting-jetpack-body table.widefat.striped{margin:24px 0;padding:24px;border-radius:20px;box-shadow:5px 5px 20px rgb(0 0 0 / 10%);border:0}.wp-core-ui .wcj-setting-jetpack-body .button-primary{background:#f46c5e!important;margin:0;color:#fff!important;border-radius:35px!important;border:none;text-decoration:none;font-size:12px;font-family:Inter-Bold;color:#fff;letter-spacing:2px;text-transform:uppercase;padding:6px 20px 7px;min-width:192px;text-align:center;text-shadow:none!important;box-shadow:none!important}.wcj-setting-jetpack-body .widefat td,.wcj-setting-jetpack-body .widefat th{font-size:12px;font-family:Inter-Regular;color:#000}.wcj-setting-jetpack-body .widefat strong{font-family:Inter-Bold}.wcj-setting-jetpack-body .notice.notice-info.inline{width:100%;margin:0;border:1px solid rgba(0,0,0,.1);border-radius:0;box-shadow:none;padding:24px;margin-bottom:0}.wcj-setting-jetpack-body .notice.notice-info.inline .wcj-review-icon{vertical-align:middle;margin:-6px 0 0 0;font-size:12px;color:#f46c5e;height:12px;width:15px}.wcj-setting-jetpack-body .notice.notice-info.inline p{margin:0;padding:0}.woocommerce-embed-page .notice.notice-info.inline a{text-decoration-line:none;color:#1da1f2;vertical-align:middle;font-family:Inter-Bold}.wcj-setting-jetpack-body table.widefat.striped td label{display:flex;flex-wrap:nowrap}.wcj-setting-jetpack-body table.widefat.striped td label input[type=checkbox],.wcj-setting-jetpack-body table.widefat.striped td label input[type=radio]{margin:2px 8px 0 0}.wcj-active-modules{width:100%}.wcj-setting-jetpack-body a,.wcj-setting-jetpack-body a:hover{color:#1da1f2;text-decoration-line:none}.wcj-setting-jetpack-body .plugin-update-tr.active td,.wcj-setting-jetpack-body .plugins .active th.check-column{border-left:4px solid #f46c5e}.wcj-setting-jetpack-body .plugins .plugins .active td,.wcj-setting-jetpack-body .plugins .plugins .active th{border-color:rgba(0,0,0,.1)}.wcj-setting-jetpack-body table.widefat.striped input.widefat{border-color:rgba(0,0,0,.2);height:40px;border-radius:4px}.wcj-action-single-bx .wcj-actions-part h6 button.button-primary{background-color:transparent;border-color:transparent;font-size:12px;font-weight:500;font-family:Inter-Medium;color:#000;margin:0;padding:0;text-align:left;cursor:pointer}.wp-admin .wcj-actions-part input[type=file]{width:100%}.wcj_tools_cnt_main h3{font-size:20px;font-family:Inter-Bold;color:#000;margin-bottom:20px}.wcj_tools_cnt_main p{font-size:12px;font-family:Inter-Regular;color:#000!important}.wcj-setting-jetpack-body table.widefat.striped>tbody>:nth-child(odd),ul.striped>:nth-child(odd){background-color:rgba(0,0,0,.05)}.wcj-setting-jetpack-body table.widefat.striped td label.wcj_site_key_label{flex-wrap:wrap}.wcj-setting-jetpack-body table.widefat.striped td label.wcj_site_key_label em{margin-top:10px}.woocommerce-layout__header{box-shadow:0 8px 16px 0 rgb(85 93 102 / 10%)}.wcj-sidebar li.wcj-sidebar-item.active span img{filter:invert(10) brightness(30) contrast(30) grayscale(1)}.wcj-sidebar li.wcj-sidebar-item:nth-child(3).active span img{filter:unset}.wcj-setting-jetpack-body input,.wcj-setting-jetpack-body select{border:1px solid rgba(0,0,0,.2);height:38px;border-radius:4px;font-size:12px;font-family:Inter-Regular;color:#000}.wcj-setting-jetpack-body input:focus,.wcj-setting-jetpack-body input:hover,.wcj-setting-jetpack-body select:focus,.wcj-setting-jetpack-body select:hover{border-color:#f46c5e;box-shadow:none}.wp-core-ui .wcj-setting-jetpack-body input:focus,.wp-core-ui .wcj-setting-jetpack-body select:focus{border-color:#f46c5e;color:#000;box-shadow:none}.wp-core-ui .wcj-setting-jetpack-body input:hover,.wp-core-ui .wcj-setting-jetpack-body select:hover{color:#000}.wcj-setting-jetpack-body p.wcj-backlink a{font-size:12px;font-family:Inter-SemiBold;margin-bottom:20px;display:block;color:#f46c5e}input[type=checkbox]:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=radio]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,select:focus,textarea:focus{border-color:#f46c5e;color:#000;box-shadow:0 0 0 1px #f46c5e}input[type=checkbox],input[type=radio]{width:20px;height:20px!important;min-width:20px;position:relative}.wp-admin input[type=file]{border:0}.wc-wp-version-gte-53 .select2-container .select2-selection--single{height:38px;border-color:rgba(0,0,0,.2)!important}.wc-wp-version-gte-53 .select2-container .select2-selection--single:focus,.wc-wp-version-gte-53 .select2-container .select2-selection--single:hover{border-color:#f46c5e!important}.wc-wp-version-gte-53 .select2-container .select2-selection--single .select2-selection__rendered{line-height:38px}.wc-wp-version-gte-53 .select2-container .select2-selection--single .select2-selection__rendered:hover{color:#000}.wc-wp-version-gte-53 .select2-dropdown{border-color:#f46c5e;box-shadow:none}.wc-wp-version-gte-53 .select2-container.select2-container--focus .select2-selection--single,.wc-wp-version-gte-53 .select2-container.select2-container--open .select2-selection--multiple,.wc-wp-version-gte-53 .select2-container.select2-container--open .select2-selection--single{border-color:#f46c5e!important;box-shadow:none}.select2-results__option{font-size:14px;font-family:Inter-Regular;color:rgba(0,0,0,.6);border-bottom:1px solid rgba(255,255,255,.8)}.select2-results__option:last-child{border-bottom:0}.select2-container--default .select2-results__option[aria-selected=true],.select2-container--default .select2-results__option[data-selected=true]{background-color:rgba(243,101,87,.2);color:rgba(0,0,0,.6)}.select2-container--default .select2-results__option--highlighted[aria-selected],.select2-container--default .select2-results__option--highlighted[data-selected]{background-color:rgba(243,101,87,.2);color:rgba(0,0,0,.6)}.form-table label,.form-table th{font-size:12px;color:#000;font-family:Inter-Regular}.form-table th,.form-table th label{font-family:Inter-Bold}b,strong{font-family:Inter-Bold}.wcj-setting-jetpack h2{font-size:20px;font-family:Inter-Bold;color:#000;margin-bottom:20px}.form-table td.forminp.forminp-module_tools code{background-color:rgba(244,108,94,.2);color:#000;font-size:12px;font-family:Inter-Regular}.woocommerce table.form-table .woocommerce-help-tip{color:rgba(244,108,94,.5);font-size:20px}#tiptip_content,.chart-tooltip,.wc_error_tip{background-color:#f46c5e}#tiptip_holder.tip_bottom #tiptip_arrow_inner{border-bottom-color:#f46c5e}#tiptip_holder.tip_top #tiptip_arrow_inner{border-top-color:#f46c5e}.wcj-body-container input[type=checkbox]::before{content:'';margin:0;top:0;left:0;position:absolute;z-index:9;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.wcj-body-container input[type=checkbox]:checked::before{content:url('../../assets/images/check.png')}.wcj-body-container input[type=checkbox]::after{position:absolute;content:'';background-color:transparent;width:100%;height:100%;top:0;left:0}.wcj-body-container input[type=checkbox]:checked::after{background-color:#f46c5e}.wcj-body-container input[type=checkbox],.wcj-body-container input[type=radio]{border-color:#f46c5e;box-shadow:none!important}.form-table.wcj_currency_symbol_table td.forminp.forminp-text p.description{position:absolute;top:20px;left:20px}.form-table.wcj_currency_symbol_table td.forminp.forminp-text{position:relative}.form-table.wcj_currency_symbol_table td.forminp.forminp-text input{height:38px;padding:0 15px 0 31px!important}.form-table.wcj_currency_symbol_table td.forminp.forminp-text p.description{position:absolute;top:31%;left:20px;margin:0}.form-table.wcj_currency_symbol_table th{width:320px}.wcj-setting-jetpack-body p input.button{background:#f46c5e!important;margin:0;color:#fff!important;border-radius:35px!important;border:none;text-decoration:none;font-size:12px;font-family:Inter-Bold;color:#fff;letter-spacing:2px;text-transform:uppercase;padding:8px 20px;min-width:192px;text-align:center;text-shadow:none!important;box-shadow:none!important;margin-top:10px}table.form-table.wcj_custom_surrencies_table th{width:320px}.wcj-setting-jetpack-body table.form-table.wcj_custom_surrencies_table td input{height:38px}.woocommerce .wcj-setting-jetpack-body table.form-table input[type=number]{height:38px}.woocommerce .wcj-setting-jetpack-body table.form-table input[type=text]{height:38px}.wcj-setting-jetpack-body textarea{border:1px solid rgba(0,0,0,.2);border-radius:4px;font-size:12px;font-family:Inter-Regular;color:#000;padding:10px!important}.wcj-setting-jetpack-body textarea:focus,.wcj-setting-jetpack-body textarea:hover{border-color:#f46c5e;box-shadow:none}.form-table td p.description{font-size:12px;color:#000;font-family:Inter-Regular}.wc-wp-version-gte-53 .select2-container .select2-selection--single .select2-selection__arrow{height:35px;transition:all .5s ease}.select2-container--open span.select2-selection__arrow{transform:rotate(180deg)}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:rgba(244,108,94,.6);border:1px solid #f46c5e;color:#fff}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#fff}.select2-container--default .select2-selection--multiple .select2-selection__rendered{display:flex;flex-wrap:wrap;align-items:center;padding:0 5px 5px}.select2-container--default .select2-selection--multiple .select2-selection__rendered li input.select2-search__field{height:auto!important}.select2-container--default .select2-search--dropdown .select2-search__field:focus,.select2-container--default .select2-search--dropdown .select2-search__field:hover{border-color:#f46c5e;box-shadow:none}.wc-wp-version-gte-53 .select2-container .select2-selection--multiple{border-color:rgba(0,0,0,.2)}.wp-core-ui a.button{background-color:#f46c5e;border-color:#f46c5e;font-size:12px;font-family:Inter-Bold;color:#fff;letter-spacing:2px;border-radius:40px;padding:5px 15px}.wp-core-ui a.button:hover{background-color:#f46c5e;border-color:#f46c5e;color:#fff}code,kbd{background-color:rgba(244,108,94,.2);color:#000;font-size:12px;font-family:Inter-Regular}.nav-tab-wrapper.woo-nav-tab-wrapper.wcj_tool_tab_part{display:flex;flex-wrap:nowrap;width:100%;overflow-y:hidden;overflow-x:auto;margin-top:20px;width:calc(100% - 20px)}.wcj_tool_tab_part a:first-child{margin-left:0}.wcj_tool_tab_part::-webkit-scrollbar{width:10px;border:0;border-left:1px solid #c3c4c7;border-right:1px solid #c3c4c7;background-color:#fff}.wcj_tool_tab_part::-webkit-scrollbar-thumb{height:4px;border:6px solid;border-color:transparent;background-clip:padding-box;border-radius:40px;background-color:#f46c5e}.wcj_tool_tab_part::-webkit-scrollbar-button{width:0;height:0;display:none}.wcj_tool_tab_part::-webkit-scrollbar-corner{background-color:transparent}.wcj_invoice_pdf_dtl p{margin-bottom:20px}.wcj-setting-jetpack-body code a,.wcj-setting-jetpack-body kbd a{color:#000}.wcj-setting-jetpack-body.wcj_tools_cnt_main form p{margin-bottom:20px}.wcj-setting-jetpack-body.wcj_tools_cnt_main form{margin-top:15px}.wcj_eu_countries_vat_rates h4{font-size:18px;font-family:Inter-Bold;color:#000;margin:15px 0}.wcj_eu_countries_vat_rates table.widefat{margin:24px 0;padding:24px;border-radius:20px;box-shadow:5px 5px 20px rgb(0 0 0 / 10%);border:0}.wcj_eu_countries_vat_rates table.widefat tr.wcj-row-odd{background-color:#f6f6f6}.wcj_eu_countries_vat_rates table td{padding:10px}.wrap.wcj-setting-jetpack-body.wcj_tools_cnt_main{margin:0}@media screen and (min-width:1190px) and (max-width:1380px){.wcj-body-left{max-width:calc(100% - 290px)}.wcj-social-icn li{padding:0 2px}.wcj-social-icn li a img{max-width:30px}.wcj-body-right{max-width:270px;margin-left:15px}.wcj-documentation-sm-rh-dtl{width:100%;padding-left:0;padding-top:10px}.wcj-partitions.documentation-section{padding:24px 10px}.wcj-documentation-icon img{max-width:65px}.wcj-documentation-sm-rh-dtl{width:calc(100% - 65px);padding-left:3px}.wcj-partitions.documentation-section a.wcj-button{font-size:11px;min-width:175px;padding:11px 7px}}@media screen and (min-width:1190px) and (max-width:1520px){.wcj-dashboard-header li a{font-size:12px;line-height:16px;padding:20px 3px}.wcj-sidebar{max-width:235px;padding:20px 7px}.wcj-body-container{width:calc(100% - 235px)}.wcj-dashboard-header{flex-wrap:nowrap}.nav-tab{padding:5px 8px}}
 
1
+ @font-face{font-family:Inter-Medium;src:url('fonts/Inter-Medium.eot');src:url('fonts/Inter-Medium.eot?#iefix') format('embedded-opentype'),url('fonts/Inter-Medium.woff2') format('woff2'),url('fonts/Inter-Medium.woff') format('woff'),url('fonts/Inter-Medium.ttf') format('truetype'),url('fonts/Inter-Medium.svg#Inter-Medium') format('svg');font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:Inter-Regular;src:url('fonts/Inter-Regular.eot');src:url('fonts/Inter-Regular.eot?#iefix') format('embedded-opentype'),url('fonts/Inter-Regular.woff2') format('woff2'),url('fonts/Inter-Regular.woff') format('woff'),url('fonts/Inter-Regular.ttf') format('truetype'),url('fonts/Inter-Regular.svg#Inter-Regular') format('svg');font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:Inter-Light;src:url('fonts/Inter-Light.eot');src:url('fonts/Inter-Light.eot?#iefix') format('embedded-opentype'),url('fonts/Inter-Light.woff2') format('woff2'),url('fonts/Inter-Light.woff') format('woff'),url('fonts/Inter-Light.ttf') format('truetype'),url('fonts/Inter-Light.svg#Inter-Light') format('svg');font-weight:300;font-style:normal;font-display:swap}@font-face{font-family:Inter-SemiBold;src:url('fonts/Inter-SemiBold.eot');src:url('fonts/Inter-SemiBold.eot?#iefix') format('embedded-opentype'),url('fonts/Inter-SemiBold.woff2') format('woff2'),url('fonts/Inter-SemiBold.woff') format('woff'),url('fonts/Inter-SemiBold.ttf') format('truetype'),url('fonts/Inter-SemiBold.svg#Inter-SemiBold') format('svg');font-weight:600;font-style:normal;font-display:swap}@font-face{font-family:Inter-Black;src:url('fonts/Inter-Black.eot');src:url('fonts/Inter-Black.eot?#iefix') format('embedded-opentype'),url('fonts/Inter-Black.woff2') format('woff2'),url('fonts/Inter-Black.woff') format('woff'),url('fonts/Inter-Black.ttf') format('truetype'),url('fonts/Inter-Black.svg#Inter-Black') format('svg');font-weight:900;font-style:normal;font-display:swap}@font-face{font-family:Inter-Thin;src:url('fonts/Inter-Thin.eot');src:url('fonts/Inter-Thin.eot?#iefix') format('embedded-opentype'),url('fonts/Inter-Thin.woff2') format('woff2'),url('fonts/Inter-Thin.woff') format('woff'),url('fonts/Inter-Thin.ttf') format('truetype'),url('fonts/Inter-Thin.svg#Inter-Thin') format('svg');font-weight:100;font-style:normal;font-display:swap}@font-face{font-family:Inter-Bold;src:url('fonts/Inter-Bold.eot');src:url('fonts/Inter-Bold.eot?#iefix') format('embedded-opentype'),url('fonts/Inter-Bold.woff2') format('woff2'),url('fonts/Inter-Bold.woff') format('woff'),url('fonts/Inter-Bold.ttf') format('truetype'),url('fonts/Inter-Bold.svg#Inter-Bold') format('svg');font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:Inter-ExtraBold;src:url('fonts/Inter-ExtraBold.eot');src:url('fonts/Inter-ExtraBold.eot?#iefix') format('embedded-opentype'),url('fonts/Inter-ExtraBold.woff2') format('woff2'),url('fonts/Inter-ExtraBold.woff') format('woff'),url('fonts/Inter-ExtraBold.ttf') format('truetype'),url('fonts/Inter-ExtraBold.svg#Inter-ExtraBold') format('svg');font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:Inter-ExtraLight;src:url('fonts/Inter-ExtraLight.eot');src:url('fonts/Inter-ExtraLight.eot?#iefix') format('embedded-opentype'),url('fonts/Inter-ExtraLight.woff2') format('woff2'),url('fonts/Inter-ExtraLight.woff') format('woff'),url('fonts/Inter-ExtraLight.ttf') format('truetype'),url('fonts/Inter-ExtraLight.svg#Inter-ExtraLight') format('svg');font-weight:200;font-style:normal;font-display:swap}h1,h2,h3,h4,h5,h6,p{margin:0}img{vertical-align:middle}.wcj-main-container{width:100%;float:left;background-color:#fff}.wcj-body{display:flex;font-family:Inter-Regular;border-bottom:2px solid rgba(0,0,0,.1)}.wcj-dashboard-header{position:relative;height:50px;width:100%;background:#f46c5e;color:#fff}.wcj-dashboard-header li{list-style:none;display:inline-block;position:relative;padding:0;margin:0;font-size:10pt;text-align:center;text-transform:capitalize;line-height:10px}.wcj-dashboard-header li a{color:#fff;text-decoration:none;font-size:12px;font-family:Inter-Regular;padding:30px 20px;padding:30px 7px;display:flex;flex-wrap:wrap;align-items:center;position:relative}.wcj-dashboard-header li a::before{position:absolute;content:'';background-color:transparent;width:20px;height:4px;border-radius:20px;left:0;right:0;bottom:13px;margin:0 auto}.wcj-dashboard-header li.wcj-header-item.active a::before{background-color:#fff}.wcj-sidebar{width:100%;max-width:305px;height:auto;position:relative;z-index:1;top:0;left:0;background-color:#fff;padding:20px;border-right:2px solid rgba(0,0,0,.1)}.wcj-sidebar li{margin-bottom:18px;color:#000;border-radius:5px;transition:all .5s ease;width:100%;display:flex;flex-wrap:wrap;align-items:center;padding:8px 8px 8px 8px;font-size:14px;padding:8px 16px;margin-bottom:30px}.wcj-sidebar-item a{color:#111;text-decoration:none}.wcj-sidebar-item.active a{color:#fff}li.wcj-sidebar-item.active{background-color:#f46c5e;border-radius:5px}.wcj-body-part{display:flex;margin:2px 8px 2px 2px;padding:15px}.wcj-box{border:1px solid #eee;padding:20px;border-radius:10px;margin:20px 0;background-color:#fff}li.wcj-dashboard-info-li{list-style:disc;margin:10px 20px}.wcj-partitions{border:1px solid #eee;border-radius:20px;margin:0;padding:24px;margin-top:24px;box-shadow:5px 10px 10px #eee}.wcj-updates-ul li{list-style:disc;margin:10px 20px}.wcj-accordion{background-color:#fff;color:#444;cursor:pointer;padding:18px;width:100%;text-align:left;border:none;outline:0;transition:.4s;margin:2px;border-radius:5px;box-shadow:5px 3px 8px #eee}.wcj-accordion:hover{background-color:#f46c5e;color:#fff}.wcj-panel{padding:0;background-color:#fff;display:none;overflow:hidden}.wcj-button{background:#f46c5e;margin:0;color:#fff!important;padding:13px 20px;border-radius:35px;border:none;text-decoration:none}.wcj-button:hover{border:1px solid transparent;color:#fff!important;background:#f46c5e}.wcj-nav-sidebar{width:100%;margin-top:40px}.wcj-body-parts h1,.wcj-partitions h1{font-family:Inter-Bold;color:#000}.wcj-faq-section h3,.wcj-info-section h3{font-family:Inter-Bold;font-size:22px;color:#000}.wcj-nav-sidebar ul{width:100%;display:flex;flex-wrap:wrap}.wcj-nav-sidebar .wcj-button{padding:11px 35px;min-width:130px;font-size:12px;font-family:Inter-Bold;text-transform:uppercase;letter-spacing:2px;margin-top:20px}.wcj-sidebar li span img{max-width:34px;vertical-align:middle;transition:all .5s ease}.wcj-sidebar li span{margin-right:14px}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm{margin:0 .5rem;padding:0;position:relative;border:none;height:1.5rem;width:3rem;border-radius:1.5rem;background-color:#f46c5e;margin-left:0}.wcj-sidebar-swich .example .wcj-btn-toggle{top:50%;transform:translateY(-50%)}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm:before{text-align:left}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm:after,.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm:before{line-height:-.5rem;color:#fff;letter-spacing:.75px;left:.4125rem;width:2.325rem;content:'Off';left:-.5rem;line-height:20px;width:.5rem;text-align:center;font-weight:600;font-size:.55rem;text-transform:uppercase;letter-spacing:2px;position:absolute;bottom:0;transition:opacity .25s;font-family:Inter-Regular;font-weight:400}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm>.handle{position:absolute;top:3px;left:.1875rem;width:15px;height:15px;border-radius:1.125rem;background:#fff;transition:left .25s}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm:after{text-align:left;opacity:0}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm:before{content:'On';right:-.5rem;opacity:1}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm.active:before{opacity:0}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.active{transition:background-color .25s;background-color:#5bbfad}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.active>.handle{left:30px;transition:left .25s}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm.active:after{opacity:1}.wcj-sidebar li.wcj-sidebar-swich:hover{background-color:transparent;color:#000}.wcj-sidebar li.wcj-sidebar-swich:hover img{filter:unset}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm:after,.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm:before{line-height:-.5rem;color:#fff;letter-spacing:.75px;left:.4125rem;width:2.325rem}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm:before{text-align:right}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm.active:before{opacity:1}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm.active:after{opacity:0}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm.active:before{text-align:left}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm.wcj-btn-sm.active:before{content:'on'!important}.wcj-body-part .wp-die-message,.wcj-body-part p{font-size:14px;color:#000}li.wcj-dashboard-info-li{font-size:14px}.wcj-no-sub p{font-size:14px;font-family:Inter-Bold;margin:0}.wcj-no-sub p strong{font-family:Inter-Bold}.wcj-no-sub p span{color:#f46c5e}.wcj-info-section.wcj-box ul li{float:left;width:100%}.wcj-info-section.wcj-box{display:flex;flex-wrap:wrap;width:100%;box-sizing:border-box}.wcj-info-section.wcj-box ul.wcj-dashboard-info-ul{margin:0;padding-left:20px}.wcj-body-container{background-color:#fff;width:calc(100% - 305px);float:left;display:flex;flex-wrap:wrap;flex-direction:column}.wcj-body-container header,.wcj-body-part{width:100%}.wcj-body-right{width:100%;max-width:394px;margin-left:24px}.wcj-body-left{width:100%;max-width:calc(100% - 418px)}.wcj-box,.wcj-partitions{border:0;box-shadow:5px 5px 20px rgb(0 0 0 / 10%)}.wcj-partitions h3{font-family:Inter-SemiBold;font-size:20px;color:#000}.wcj-dashboard-header{height:auto;margin:0;width:100%;display:flex;flex-wrap:wrap;padding:0 10px;justify-content:space-between}.wcj-sidebar-swich .wcj-btn-toggle.wcj-btn-sm{height:21px;top:3px;cursor:pointer}.wcj-nav-sidebar .wcj-button img{vertical-align:middle}.wcj-nav-sidebar .wcj-button span{padding-left:12px}.wcj-button:hover{border:0;color:#fff!important;background:#f46c5e}*{box-sizing:border-box}.wcj-body-part{padding:40px;flex-wrap:wrap}.wcj-tit{width:100%;display:flex;flex-wrap:wrap}.wcj-tit h1{font-size:24px;font-family:Inter-Bold;color:#000;margin-bottom:20px;margin-top:0;padding:0}.wcj-box{margin-top:24px;margin-bottom:0;padding:24px;border-radius:20px}.wcj-dashboard-info-ul li{font-size:12px;color:rgba(0,0,0,.6);font-family:Inter-Medium;margin-bottom:12px;margin-top:0;list-style:disc}.wcj-tit h3{font-size:20px;font-family:Inter-Bold;color:#000;margin-bottom:20px;margin-top:0}.wcj-accordion{padding:8px 0;box-shadow:none;font-family:Inter-Medium;color:#000;font-size:12px;margin:0;display:flex;flex-wrap:wrap;justify-content:space-between}.wcj-accordion:hover{background-color:transparent;color:#000}.wcj-panel p{font-size:12px;color:rgba(0,0,0,.6);font-family:Inter-Regular;margin-top:0}.wcj-faq-sing-box{width:100%;display:flex;flex-wrap:wrap;margin-bottom:12px}.wcj-faq-sing-box .wcj-accordion img{transition:all .5s ease}.wcj-accordion h6{font-family:Inter-Medium;color:#000;font-size:12px;margin:0;font-weight:400;width:calc(100% - 100px)}.wcj-accordion.active img{transform:rotate(180deg)}.wcj-additional-que{width:100%;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;border-top:1px solid rgba(0,0,0,.2);padding-top:20px}.wcj-additional-que h6{font-size:12px;font-family:Inter-SemiBold;color:#000;margin:0}.wcj-button{font-size:12px;font-family:Inter-Bold;color:#fff;letter-spacing:2px;text-transform:uppercase;padding:11px 20px;min-width:192px;text-align:center}.wcj-socialmedia-connect{width:100%;display:flex;flex-wrap:wrap;margin-top:10px;align-items:center}.wcj-social-icn{padding:0;margin:0;display:flex;flex-wrap:wrap;align-items:center;padding-left:8px;margin:0}.wcj-social-icn li{list-style:none;display:inline-block;padding:0 8px;margin-bottom:0}.wcj-social-icn li a{display:block}.wcj-social-icn li a img{max-width:33px}.wcj-action-sub-part{width:100%;display:flex;flex-wrap:wrap}.wcj-action-sub-sing-box{width:100%;display:flex;flex-wrap:wrap;margin-bottom:30px}.wcj-action-sub-sing-box:last-child{margin-bottom:0}.wcj-action-single-bx{width:calc(50% - 10px);display:flex;flex-wrap:wrap;flex-direction:column;padding-right:10px;margin-right:10px;border-right:1px solid rgba(0,0,0,.2);height:100%}.wcj-action-single-bx:last-child{border-right:0px}.wcj-action-sub-sing-icon{width:100%}.wcj-action-single-bx .wcj-actions-part{width:100%;margin-top:15px}.wcj-action-single-bx .wcj-actions-part h6{font-size:12px;font-weight:500;font-family:Inter-Medium;color:#000;margin:0;margin-bottom:5px}.wcj-action-single-bx .wcj-actions-part p{font-size:12px;font-family:Inter-Regular;color:rgba(0,0,0,.6);margin:0}.wcj-documentation-dtl{width:100%;display:flex;flex-wrap:wrap;padding-left:8px;align-items:center}.wcj-documentation-icon{width:auto}.wcj-documentation-icon img{max-width:105px}.wcj-documentation-sm-rh-dtl{width:calc(100% - 105px);padding-left:18px}.wcj-documentation-sm-rh-dtl p{font-size:12px;color:rgba(0,0,0,.6);font-family:Inter-Regular;margin-bottom:20px;margin-top:0}.wcj-btn-main{width:100%;display:flex;flex-wrap:wrap}.wcj-socialmedia-connect .wcj-btn-main{width:auto}.wcj-partitions-sub-dtl{width:100%}.wcj-partitions-sub-dtl h6{font-size:12px;font-family:Inter-SemiBold;color:#000;margin:0;margin-bottom:10px}.wcj-updates-ul li{font-size:12px;color:rgba(0,0,0,.6);font-family:Inter-Medium;margin:0;margin-bottom:20px;margin-top:0;list-style:disc}.wcj-updates-ul{padding-left:25px;margin:0}.wcj-no-sub p img{margin-left:5px}.wcj-sub-cnt-top{width:100%;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center}.wcj-sub-cnt-top .wcj-btn-main,.wcj-sub-cnt-top-left{width:auto}.wcj-body-sec-part-main{width:100%;display:flex;flex-wrap:wrap}.wcj-footer{width:100%;display:flex;flex-wrap:wrap;padding:40px}.wcj-footer .wcj-review-footer{width:100%;margin:0;border:1px solid rgba(0,0,0,.1);border-radius:0;box-shadow:none;padding:24px;margin-bottom:24PX}.wcj-footer .wcj-review-footer:last-child{margin-bottom:0}.wcj-footer .wcj-review-footer p{font-size:12px;color:#000;font-family:Inter-Regular}.wcj-footer .wcj-review-footer p strong{font-family:Inter-Bold}.wcj-footer .wcj-review-footer p a{color:#1da1f2;text-decoration-line:none}.wcj-review-footer h6{font-size:14px;color:#000;font-family:Inter-Bold;margin-bottom:20px}.wcj-review-footer ul{margin:0;padding:0}.wcj-review-footer ul li{list-style:none;font-size:12px;color:#000;font-family:Inter-Regular;margin-bottom:10px}.wcj-review-footer ul li strong{font-family:Inter-Bold}.wcj-premium-features-footer p{margin-bottom:10px}.wcj-review-footer.wcj-premium-features-footer ul{display:flex;flex-wrap:wrap}.wcj-review-footer.wcj-premium-features-footer ul li{width:50%}.wcj-review-footer .wcj-btn-main{margin-top:10px}.wcj-woo-star{padding:0 4px}.wcj-setting-jetpack h3{font-size:20px;font-family:Inter-Bold;color:#000;margin-bottom:20px}.wcj-setting-jetpack p{font-size:12px;font-family:Inter-Regular;color:#000}.wcj-setting-jetpack-body{width:100%;padding:40px}.wcj-setting-jetpack-body table.widefat.striped{margin:24px 0;padding:24px;border-radius:20px;box-shadow:5px 5px 20px rgb(0 0 0 / 10%);border:0}.wp-core-ui .wcj-setting-jetpack-body .button-primary{background:#f46c5e!important;margin:0;color:#fff!important;border-radius:35px!important;border:none;text-decoration:none;font-size:12px;font-family:Inter-Bold;color:#fff;letter-spacing:2px;text-transform:uppercase;padding:6px 20px 7px;min-width:192px;text-align:center;text-shadow:none!important;box-shadow:none!important}.wcj-setting-jetpack-body .widefat td,.wcj-setting-jetpack-body .widefat th{font-size:12px;font-family:Inter-Regular;color:#000}.wcj-setting-jetpack-body .widefat strong{font-family:Inter-Bold}.wcj-setting-jetpack-body .notice.notice-info.inline{width:100%;margin:0;border:1px solid rgba(0,0,0,.1);border-radius:0;box-shadow:none;padding:24px;margin-bottom:0}.wcj-setting-jetpack-body .notice.notice-info.inline .wcj-review-icon{vertical-align:middle;margin:-6px 0 0 0;font-size:12px;color:#f46c5e;height:12px;width:15px}.wcj-setting-jetpack-body .notice.notice-info.inline p{margin:0;padding:0}.woocommerce-embed-page .notice.notice-info.inline a{text-decoration-line:none;color:#1da1f2;vertical-align:middle;font-family:Inter-Bold}.wcj-setting-jetpack-body table.widefat.striped td label{display:flex;flex-wrap:nowrap}.wcj-setting-jetpack-body table.widefat.striped td label input[type=checkbox],.wcj-setting-jetpack-body table.widefat.striped td label input[type=radio]{margin:2px 8px 0 0}.wcj-active-modules{width:100%}.wcj-setting-jetpack-body a,.wcj-setting-jetpack-body a:hover{color:#1da1f2;text-decoration-line:none}.wcj-setting-jetpack-body .plugin-update-tr.active td,.wcj-setting-jetpack-body .plugins .active th.check-column{border-left:4px solid #f46c5e}.wcj-setting-jetpack-body .plugins .plugins .active td,.wcj-setting-jetpack-body .plugins .plugins .active th{border-color:rgba(0,0,0,.1)}.wcj-setting-jetpack-body table.widefat.striped input.widefat{border-color:rgba(0,0,0,.2);height:40px;border-radius:4px}.wcj-action-single-bx .wcj-actions-part h6 button.button-primary{background-color:transparent;border-color:transparent;font-size:12px;font-weight:500;font-family:Inter-Medium;color:#000;margin:0;padding:0;text-align:left;cursor:pointer}.wp-admin .wcj-actions-part input[type=file]{width:100%}.wcj_tools_cnt_main h3{font-size:20px;font-family:Inter-Bold;color:#000;margin-bottom:20px}.wcj_tools_cnt_main p{font-size:12px;font-family:Inter-Regular;color:#000!important}.wcj-setting-jetpack-body table.widefat.striped>tbody>:nth-child(odd),ul.striped>:nth-child(odd){background-color:rgba(0,0,0,.05)}.wcj-setting-jetpack-body table.widefat.striped td label.wcj_site_key_label{flex-wrap:wrap}.wcj-setting-jetpack-body table.widefat.striped td label.wcj_site_key_label em{margin-top:10px}.woocommerce-layout__header{box-shadow:0 8px 16px 0 rgb(85 93 102 / 10%)}.wcj-sidebar li.wcj-sidebar-item.active span img{filter:invert(10) brightness(30) contrast(30) grayscale(1)}.wcj-sidebar li.wcj-sidebar-item:nth-child(3).active span img{filter:unset}.wcj-setting-jetpack-body input,.wcj-setting-jetpack-body select{border:1px solid rgba(0,0,0,.2);height:38px;border-radius:4px;font-size:12px;font-family:Inter-Regular;color:#000}.wcj-setting-jetpack-body input:focus,.wcj-setting-jetpack-body input:hover,.wcj-setting-jetpack-body select:focus,.wcj-setting-jetpack-body select:hover{border-color:#f46c5e;box-shadow:none}.wp-core-ui .wcj-setting-jetpack-body input:focus,.wp-core-ui .wcj-setting-jetpack-body select:focus{border-color:#f46c5e;color:#000;box-shadow:none}.wp-core-ui .wcj-setting-jetpack-body input:hover,.wp-core-ui .wcj-setting-jetpack-body select:hover{color:#000}.wcj-setting-jetpack-body p.wcj-backlink a{font-size:12px;font-family:Inter-SemiBold;margin-bottom:20px;display:block;color:#f46c5e}input[type=checkbox]:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=radio]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,select:focus,textarea:focus{border-color:#f46c5e;color:#000;box-shadow:0 0 0 1px #f46c5e}input[type=checkbox],input[type=radio]{width:20px;height:20px!important;min-width:20px;position:relative}.wp-admin input[type=file]{border:0}.wc-wp-version-gte-53 .select2-container .select2-selection--single{height:38px;border-color:rgba(0,0,0,.2)!important}.wc-wp-version-gte-53 .select2-container .select2-selection--single:focus,.wc-wp-version-gte-53 .select2-container .select2-selection--single:hover{border-color:#f46c5e!important}.wc-wp-version-gte-53 .select2-container .select2-selection--single .select2-selection__rendered{line-height:38px}.wc-wp-version-gte-53 .select2-container .select2-selection--single .select2-selection__rendered:hover{color:#000}.wc-wp-version-gte-53 .select2-dropdown{border-color:#f46c5e;box-shadow:none}.wc-wp-version-gte-53 .select2-container.select2-container--focus .select2-selection--single,.wc-wp-version-gte-53 .select2-container.select2-container--open .select2-selection--multiple,.wc-wp-version-gte-53 .select2-container.select2-container--open .select2-selection--single{border-color:#f46c5e!important;box-shadow:none}.select2-results__option{font-size:14px;font-family:Inter-Regular;color:rgba(0,0,0,.6);border-bottom:1px solid rgba(255,255,255,.8)}.select2-results__option:last-child{border-bottom:0}.select2-container--default .select2-results__option[aria-selected=true],.select2-container--default .select2-results__option[data-selected=true]{background-color:rgba(243,101,87,.2);color:rgba(0,0,0,.6)}.select2-container--default .select2-results__option--highlighted[aria-selected],.select2-container--default .select2-results__option--highlighted[data-selected]{background-color:rgba(243,101,87,.2);color:rgba(0,0,0,.6)}.form-table label,.form-table th{font-size:12px;color:#000;font-family:Inter-Regular}.form-table th,.form-table th label{font-family:Inter-Bold}b,strong{font-family:Inter-Bold}.wcj-setting-jetpack h2{font-size:20px;font-family:Inter-Bold;color:#000;margin-bottom:20px}.form-table td.forminp.forminp-module_tools code{background-color:rgba(244,108,94,.2);color:#000;font-size:12px;font-family:Inter-Regular}.woocommerce table.form-table .woocommerce-help-tip{color:rgba(244,108,94,.5);font-size:20px}#tiptip_content,.chart-tooltip,.wc_error_tip{background-color:#f46c5e}#tiptip_holder.tip_bottom #tiptip_arrow_inner{border-bottom-color:#f46c5e}#tiptip_holder.tip_top #tiptip_arrow_inner{border-top-color:#f46c5e}.wcj-body-container input[type=checkbox]::before{content:'';margin:0;top:0;left:0;position:absolute;z-index:9;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.wcj-body-container input[type=checkbox]:checked::before{content:url('../../assets/images/check.png')}.wcj-body-container input[type=checkbox]::after{position:absolute;content:'';background-color:transparent;width:100%;height:100%;top:0;left:0}.wcj-body-container input[type=checkbox]:checked::after{background-color:#f46c5e}.wcj-body-container input[type=checkbox],.wcj-body-container input[type=radio]{border-color:#f46c5e;box-shadow:none!important}.form-table.wcj_currency_symbol_table td.forminp.forminp-text p.description{position:absolute;top:20px;left:20px}.form-table.wcj_currency_symbol_table td.forminp.forminp-text{position:relative}.form-table.wcj_currency_symbol_table td.forminp.forminp-text input{height:38px;padding:0 15px 0 31px!important}.form-table.wcj_currency_symbol_table td.forminp.forminp-text p.description{position:absolute;top:31%;left:20px;margin:0}.form-table.wcj_currency_symbol_table th{width:320px}.wcj-setting-jetpack-body p input.button{background:#f46c5e!important;margin:0;color:#fff!important;border-radius:35px!important;border:none;text-decoration:none;font-size:12px;font-family:Inter-Bold;color:#fff;letter-spacing:2px;text-transform:uppercase;padding:8px 20px;min-width:192px;text-align:center;text-shadow:none!important;box-shadow:none!important;margin-top:10px}table.form-table.wcj_custom_surrencies_table th{width:320px}.wcj-setting-jetpack-body table.form-table.wcj_custom_surrencies_table td input{height:38px}.woocommerce .wcj-setting-jetpack-body table.form-table input[type=number]{height:38px}.woocommerce .wcj-setting-jetpack-body table.form-table input[type=text]{height:38px}.wcj-setting-jetpack-body textarea{border:1px solid rgba(0,0,0,.2);border-radius:4px;font-size:12px;font-family:Inter-Regular;color:#000;padding:10px!important}.wcj-setting-jetpack-body textarea:focus,.wcj-setting-jetpack-body textarea:hover{border-color:#f46c5e;box-shadow:none}.form-table td p.description{font-size:12px;color:#000;font-family:Inter-Regular}.wc-wp-version-gte-53 .select2-container .select2-selection--single .select2-selection__arrow{height:35px;transition:all .5s ease}.select2-container--open span.select2-selection__arrow{transform:rotate(180deg)}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:rgba(244,108,94,.6);border:1px solid #f46c5e;color:#fff}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#fff}.select2-container--default .select2-selection--multiple .select2-selection__rendered{display:flex;flex-wrap:wrap;align-items:center;padding:0 5px 5px}.select2-container--default .select2-selection--multiple .select2-selection__rendered li input.select2-search__field{height:auto!important}.select2-container--default .select2-search--dropdown .select2-search__field:focus,.select2-container--default .select2-search--dropdown .select2-search__field:hover{border-color:#f46c5e;box-shadow:none}.wc-wp-version-gte-53 .select2-container .select2-selection--multiple{border-color:rgba(0,0,0,.2)}.wp-core-ui a.button{background-color:#f46c5e;border-color:#f46c5e;font-size:12px;font-family:Inter-Bold;color:#fff;letter-spacing:2px;border-radius:40px;padding:5px 15px}.wp-core-ui a.button:hover{background-color:#f46c5e;border-color:#f46c5e;color:#fff}code,kbd{background-color:rgba(244,108,94,.2);color:#000;font-size:12px;font-family:Inter-Regular}.nav-tab-wrapper.woo-nav-tab-wrapper.wcj_tool_tab_part{display:flex;flex-wrap:nowrap;width:100%;overflow-y:hidden;overflow-x:auto;margin-top:20px;width:calc(100% - 20px)}.wcj_tool_tab_part a:first-child{margin-left:0}.wcj_tool_tab_part::-webkit-scrollbar{width:10px;border:0;border-left:1px solid #c3c4c7;border-right:1px solid #c3c4c7;background-color:#fff}.wcj_tool_tab_part::-webkit-scrollbar-thumb{height:4px;border:6px solid;border-color:transparent;background-clip:padding-box;border-radius:40px;background-color:#f46c5e}.wcj_tool_tab_part::-webkit-scrollbar-button{width:0;height:0;display:none}.wcj_tool_tab_part::-webkit-scrollbar-corner{background-color:transparent}.wcj_invoice_pdf_dtl p{margin-bottom:20px}.wcj-setting-jetpack-body code a,.wcj-setting-jetpack-body kbd a{color:#000}.wcj-setting-jetpack-body.wcj_tools_cnt_main form p{margin-bottom:20px}.wcj-setting-jetpack-body.wcj_tools_cnt_main form{margin-top:15px}.wcj_eu_countries_vat_rates h4{font-size:18px;font-family:Inter-Bold;color:#000;margin:15px 0}.wcj_eu_countries_vat_rates table.widefat{margin:24px 0;padding:24px;border-radius:20px;box-shadow:5px 5px 20px rgb(0 0 0 / 10%);border:0}.wcj_eu_countries_vat_rates table.widefat tr.wcj-row-odd{background-color:#f6f6f6}.wcj_eu_countries_vat_rates table td{padding:10px}.wrap.wcj-setting-jetpack-body.wcj_tools_cnt_main{margin:0}@media screen and (min-width:1190px) and (max-width:1380px){.wcj-body-left{max-width:calc(100% - 290px)}.wcj-social-icn li{padding:0 2px}.wcj-social-icn li a img{max-width:30px}.wcj-body-right{max-width:270px;margin-left:15px}.wcj-documentation-sm-rh-dtl{width:100%;padding-left:0;padding-top:10px}.wcj-partitions.documentation-section{padding:24px 10px}.wcj-documentation-icon img{max-width:65px}.wcj-documentation-sm-rh-dtl{width:calc(100% - 65px);padding-left:3px}.wcj-partitions.documentation-section a.wcj-button{font-size:11px;min-width:175px;padding:11px 7px}}@media screen and (min-width:1190px) and (max-width:1520px){.wcj-dashboard-header li a{font-size:12px;line-height:16px;padding:20px 3px}.wcj-sidebar{max-width:235px;padding:20px 7px}.wcj-body-container{width:calc(100% - 235px)}.wcj-dashboard-header{flex-wrap:nowrap}.nav-tab{padding:5px 8px}}
2
+ #wpfooter{position: relative;}
includes/css/wcj-offer-price.css CHANGED
@@ -69,8 +69,6 @@
69
  /* Header */
70
  .wcj-offer-modal-header {
71
  padding: 2px 16px;
72
- /* background-color: #5cb85c; */
73
- /* color: white; */
74
  }
75
 
76
  /* Body */
@@ -81,6 +79,4 @@
81
  /* Footer */
82
  .wcj-offer-price-modal-footer {
83
  padding: 2px 16px;
84
- /* background-color: #5cb85c; */
85
- /* color: white; */
86
  }
69
  /* Header */
70
  .wcj-offer-modal-header {
71
  padding: 2px 16px;
 
 
72
  }
73
 
74
  /* Body */
79
  /* Footer */
80
  .wcj-offer-price-modal-footer {
81
  padding: 2px 16px;
 
 
82
  }
includes/emails/class-wc-email-wcj-custom.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * An email sent to recipient list when selected triggers are called.
6
  *
7
- * @version 5.6.1
8
  * @since 2.3.9
9
  * @author Pluggabl LLC.
10
  * @extends WC_Email
@@ -97,7 +97,7 @@ if ( ! class_exists( 'WC_Email_WCJ_Custom' ) ) :
97
  /**
98
  * Proxy to parent's get_option and attempt to localize the result using gettext.
99
  *
100
- * @version 2.4.1
101
  * @since 2.4.1
102
  * @param string $key posted key.
103
  * @param mixed $empty_value get empty value.
@@ -106,7 +106,7 @@ if ( ! class_exists( 'WC_Email_WCJ_Custom' ) ) :
106
  public function get_option( $key, $empty_value = null ) {
107
  $grandparent = get_parent_class( 'WC_Email' );
108
  $value = $grandparent::get_option( $key, $empty_value );
109
- return ( is_array( $value ) ) ? $value : apply_filters( 'woocommerce_email_get_option', __( $value ), $this, $value, $key, $empty_value );
110
  }
111
 
112
  /**
@@ -236,8 +236,8 @@ if ( ! class_exists( 'WC_Email_WCJ_Custom' ) ) :
236
  $status_triggers[ 'woocommerce_order_status_' . $slug . '_notification' ] = sprintf( __( 'Order status updated to %s', 'woocommerce-jetpack' ), $name );
237
  foreach ( $order_statuses as $slug2 => $name2 ) {
238
  if ( $slug !== $slug2 ) {
239
- /* translators: %s: search term */
240
- $status_change_triggers[ 'woocommerce_order_status_' . $slug . '_to_' . $slug2 . '_notification' ] = sprintf( __( 'Order status %s to %s', 'woocommerce-jetpack' ), $name, $name2 );
241
  }
242
  }
243
  }
4
  *
5
  * An email sent to recipient list when selected triggers are called.
6
  *
7
+ * @version 5.6.2
8
  * @since 2.3.9
9
  * @author Pluggabl LLC.
10
  * @extends WC_Email
97
  /**
98
  * Proxy to parent's get_option and attempt to localize the result using gettext.
99
  *
100
+ * @version 5.6.2
101
  * @since 2.4.1
102
  * @param string $key posted key.
103
  * @param mixed $empty_value get empty value.
106
  public function get_option( $key, $empty_value = null ) {
107
  $grandparent = get_parent_class( 'WC_Email' );
108
  $value = $grandparent::get_option( $key, $empty_value );
109
+ return ( is_array( $value ) ) ? $value : apply_filters( 'woocommerce_email_get_option', __( $value ), $this, $value, $key, $empty_value ); // phpcs:ignore
110
  }
111
 
112
  /**
236
  $status_triggers[ 'woocommerce_order_status_' . $slug . '_notification' ] = sprintf( __( 'Order status updated to %s', 'woocommerce-jetpack' ), $name );
237
  foreach ( $order_statuses as $slug2 => $name2 ) {
238
  if ( $slug !== $slug2 ) {
239
+ /* translators: %1$s,%2$s: search term */
240
+ $status_change_triggers[ 'woocommerce_order_status_' . $slug . '_to_' . $slug2 . '_notification' ] = sprintf( __( 'Order status %1$s to %2$s', 'woocommerce-jetpack' ), $name, $name2 );
241
  }
242
  }
243
  }
includes/emails/email-html.php CHANGED
@@ -1,3 +1,4 @@
 
1
  <h1>Email</h1>
2
  <p>
3
  <table>
@@ -28,4 +29,4 @@
28
  </tbody>
29
  </table>
30
  </p>
31
- <p>Payment method: [wcj_order_payment_method]</p>
1
+ <?php //phpcs:ignore ?>
2
  <h1>Email</h1>
3
  <p>
4
  <table>
29
  </tbody>
30
  </table>
31
  </p>
32
+ <p>Payment method: [wcj_order_payment_method]</p>
includes/emails/email-plain.php CHANGED
@@ -1,7 +1,8 @@
 
1
  Order Date: [wcj_order_date]
2
  Order Nr.: [wcj_order_number]
3
  Buyer: [wcj_order_billing_address]
4
  Total (excl. TAX): [wcj_order_total_excl_tax]
5
  Taxes: [wcj_order_total_tax hide_if_zero="no"]
6
  Order Total: [wcj_order_total]
7
- Payment method: [wcj_order_payment_method]
1
+ <?php //phpcs:ignore ?>
2
  Order Date: [wcj_order_date]
3
  Order Nr.: [wcj_order_number]
4
  Buyer: [wcj_order_billing_address]
5
  Total (excl. TAX): [wcj_order_total_excl_tax]
6
  Taxes: [wcj_order_total_tax hide_if_zero="no"]
7
  Order Total: [wcj_order_total]
8
+ Payment method: [wcj_order_payment_method]
includes/exchange-rates/class-wcj-exchange-rates.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce Exchange Rates
4
  *
5
- * @version 3.9.0
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -37,25 +37,29 @@ if ( ! class_exists( 'WCJ_Exchange_Rates' ) ) :
37
  /**
38
  * Wcj_ajax_get_exchange_rates_average.
39
  *
40
- * @version 3.9.0
41
  * @since 3.2.2
42
  */
43
  public function wcj_ajax_get_exchange_rates_average() {
44
- echo wcj_currencyconverterapi_io_get_exchange_rate_average( $_POST['wcj_currency_from'], $_POST['wcj_currency_to'], $_POST['wcj_start_date'], $_POST['wcj_end_date'] );
 
 
 
 
45
  die();
46
  }
47
 
48
  /**
49
  * Register_script.
50
  *
51
- * @version 2.9.0
52
  */
53
  public function register_script() {
54
  if (
55
- isset( $_GET['section'] )
56
  &&
57
  in_array(
58
- $_GET['section'],
59
  array(
60
  'multicurrency',
61
  'multicurrency_base_price',
@@ -63,7 +67,8 @@ if ( ! class_exists( 'WCJ_Exchange_Rates' ) ) :
63
  'price_by_country',
64
  'payment_gateways_currency',
65
  'currency_exchange_rates',
66
- )
 
67
  )
68
  ) {
69
  wp_register_script( 'wcj-exchange-rates-ajax', trailingslashit( wcj_plugin_url() ) . 'includes/js/wcj-ajax-exchange-rates.js', array( 'jquery' ), w_c_j()->version, true );
@@ -80,13 +85,13 @@ if ( ! class_exists( 'WCJ_Exchange_Rates' ) ) :
80
  /**
81
  * Enqueue_exchange_rates_script.
82
  *
83
- * @version 3.2.2
84
  */
85
  public function enqueue_exchange_rates_script() {
86
  if (
87
- isset( $_GET['section'] ) &&
88
  in_array(
89
- $_GET['section'],
90
  array(
91
  'multicurrency',
92
  'multicurrency_base_price',
@@ -94,18 +99,20 @@ if ( ! class_exists( 'WCJ_Exchange_Rates' ) ) :
94
  'price_by_country',
95
  'payment_gateways_currency',
96
  'currency_exchange_rates',
97
- )
 
98
  )
99
  ) {
100
  wp_enqueue_script( 'wcj-exchange-rates-ajax' );
101
  }
102
  if (
103
- isset( $_GET['report'] ) &&
104
  in_array(
105
- $_GET['report'],
106
  array(
107
  'booster_monthly_sales',
108
- )
 
109
  )
110
  ) {
111
  wp_enqueue_script( 'wcj-exchange-rates-ajax-average', trailingslashit( wcj_plugin_url() ) . 'includes/js/wcj-ajax-exchange-rates-average.js', array( 'jquery' ), w_c_j()->version, true );
2
  /**
3
  * Booster for WooCommerce Exchange Rates
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
37
  /**
38
  * Wcj_ajax_get_exchange_rates_average.
39
  *
40
+ * @version 5.6.2
41
  * @since 3.2.2
42
  */
43
  public function wcj_ajax_get_exchange_rates_average() {
44
+ $currency_from = isset( $_POST['wcj_currency_from'] ) ? sanitize_text_field( wp_unslash( $_POST['wcj_currency_from'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
45
+ $currency_to = isset( $_POST['wcj_currency_to'] ) ? sanitize_text_field( wp_unslash( $_POST['wcj_currency_to'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
46
+ $start_date = isset( $_POST['wcj_start_date'] ) ? sanitize_text_field( wp_unslash( $_POST['wcj_start_date'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
47
+ $end_date = isset( $_POST['wcj_end_date'] ) ? sanitize_text_field( wp_unslash( $_POST['wcj_end_date'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
48
+ echo wcj_currencyconverterapi_io_get_exchange_rate_average( $currency_from, $currency_to, $start_date, $end_date ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
49
  die();
50
  }
51
 
52
  /**
53
  * Register_script.
54
  *
55
+ * @version 5.6.2
56
  */
57
  public function register_script() {
58
  if (
59
+ isset( $_GET['section'] ) // phpcs:ignore WordPress.Security.NonceVerification
60
  &&
61
  in_array(
62
+ $_GET['section'], // phpcs:ignore WordPress.Security.NonceVerification
63
  array(
64
  'multicurrency',
65
  'multicurrency_base_price',
67
  'price_by_country',
68
  'payment_gateways_currency',
69
  'currency_exchange_rates',
70
+ ),
71
+ true
72
  )
73
  ) {
74
  wp_register_script( 'wcj-exchange-rates-ajax', trailingslashit( wcj_plugin_url() ) . 'includes/js/wcj-ajax-exchange-rates.js', array( 'jquery' ), w_c_j()->version, true );
85
  /**
86
  * Enqueue_exchange_rates_script.
87
  *
88
+ * @version 5.6.2
89
  */
90
  public function enqueue_exchange_rates_script() {
91
  if (
92
+ isset( $_GET['section'] ) && // phpcs:ignore WordPress.Security.NonceVerification
93
  in_array(
94
+ $_GET['section'], // phpcs:ignore WordPress.Security.NonceVerification
95
  array(
96
  'multicurrency',
97
  'multicurrency_base_price',
99
  'price_by_country',
100
  'payment_gateways_currency',
101
  'currency_exchange_rates',
102
+ ),
103
+ true
104
  )
105
  ) {
106
  wp_enqueue_script( 'wcj-exchange-rates-ajax' );
107
  }
108
  if (
109
+ isset( $_GET['report'] ) && // phpcs:ignore WordPress.Security.NonceVerification
110
  in_array(
111
+ $_GET['report'], // phpcs:ignore WordPress.Security.NonceVerification
112
  array(
113
  'booster_monthly_sales',
114
+ ),
115
+ true
116
  )
117
  ) {
118
  wp_enqueue_script( 'wcj-exchange-rates-ajax-average', trailingslashit( wcj_plugin_url() ) . 'includes/js/wcj-ajax-exchange-rates-average.js', array( 'jquery' ), w_c_j()->version, true );
includes/export/class-wcj-exporter-customers.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce Exporter Customers
4
  *
5
- * @version 3.1.0
6
  * @since 2.5.9
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -34,7 +34,7 @@ if ( ! class_exists( 'WCJ_Exporter_Customers' ) ) :
34
  /**
35
  * Export_customers.
36
  *
37
- * @version 3.0.0
38
  * @since 2.4.8
39
  * @param array $fields_helper defines the fields.
40
  */
@@ -86,7 +86,7 @@ if ( ! class_exists( 'WCJ_Exporter_Customers' ) ) :
86
  $row[] = $customer->last_name;
87
  break;
88
  case 'customer-debug':
89
- $row[] = '<pre>' . print_r( $customer, true ) . '</pre>';
90
  break;
91
  }
92
  }
@@ -98,9 +98,10 @@ if ( ! class_exists( 'WCJ_Exporter_Customers' ) ) :
98
  /**
99
  * Export_customers_from_orders.
100
  *
101
- * @version 3.1.0
102
  * @since 2.4.8
103
  * @todo (maybe) add more order fields (shipping)
 
104
  */
105
  public function export_customers_from_orders( $fields_helper ) {
106
 
2
  /**
3
  * Booster for WooCommerce Exporter Customers
4
  *
5
+ * @version 5.6.2
6
  * @since 2.5.9
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
34
  /**
35
  * Export_customers.
36
  *
37
+ * @version 5.6.2
38
  * @since 2.4.8
39
  * @param array $fields_helper defines the fields.
40
  */
86
  $row[] = $customer->last_name;
87
  break;
88
  case 'customer-debug':
89
+ $row[] = '<pre>' . print_r( $customer, true ) . '</pre>'; // phpcs:ignore
90
  break;
91
  }
92
  }
98
  /**
99
  * Export_customers_from_orders.
100
  *
101
+ * @version 5.6.2
102
  * @since 2.4.8
103
  * @todo (maybe) add more order fields (shipping)
104
+ * @param string | array $fields_helper defines the fields_helper.
105
  */
106
  public function export_customers_from_orders( $fields_helper ) {
107
 
includes/export/class-wcj-exporter-orders.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce Exporter Orders
4
  *
5
- * @version 5.3.6
6
  * @since 2.5.9
7
  * @author Pluggabl LLC.
8
  * @todo filter export by date
@@ -35,8 +35,16 @@ if ( ! class_exists( 'WCJ_Exporter_Orders' ) ) :
35
  /**
36
  * Get_export_orders_row.
37
  *
38
- * @version 5.3.6
39
  * @since 2.5.9
 
 
 
 
 
 
 
 
40
  * @todo added precisions to the price fields.
41
  */
42
  public function get_export_orders_row( $fields_ids, $order_id, $order, $items, $items_product_input_fields, $item, $item_id ) {
@@ -62,7 +70,7 @@ if ( ! class_exists( 'WCJ_Exporter_Orders' ) ) :
62
  $row[] = wcj_get_product_input_fields( $item );
63
  break;
64
  case 'item-debug':
65
- $row[] = '<pre>' . print_r( $item, true ) . '</pre>';
66
  break;
67
  case 'item-name':
68
  $row[] = $item['name'];
@@ -210,12 +218,17 @@ if ( ! class_exists( 'WCJ_Exporter_Orders' ) ) :
210
  /**
211
  * Export_orders.
212
  *
213
- * @version 5.1.0
214
  * @since 2.4.8
 
 
215
  * @todo (maybe) metainfo as separate column
216
  */
217
  public function export_orders( $fields_helper ) {
218
-
 
 
 
219
  // Standard Fields.
220
  $all_fields = $fields_helper->get_order_export_fields();
221
  $fields_ids = wcj_get_option( 'wcj_export_orders_fields', $fields_helper->get_order_export_default_fields_ids() );
@@ -257,7 +270,7 @@ if ( ! class_exists( 'WCJ_Exporter_Orders' ) ) :
257
  continue;
258
  }
259
 
260
- if ( isset( $_POST['wcj_filter_by_order_billing_country'] ) && '' !== $_POST['wcj_filter_by_order_billing_country'] ) {
261
  if ( $order->billing_country !== $_POST['wcj_filter_by_order_billing_country'] ) {
262
  continue;
263
  }
@@ -284,7 +297,7 @@ if ( ! class_exists( 'WCJ_Exporter_Orders' ) ) :
284
  }
285
  }
286
  if ( ! $filter_by_product_title ) {
287
- if ( false !== strpos( $item['name'], $_POST['wcj_filter_by_product_title'] ) ) {
288
  $filter_by_product_title = true;
289
  }
290
  }
@@ -304,12 +317,12 @@ if ( ! class_exists( 'WCJ_Exporter_Orders' ) ) :
304
  $additional_field_value = wcj_get_option( 'wcj_export_orders_fields_additional_value_' . $i, '' );
305
  if ( '' !== ( $additional_field_value ) ) {
306
  if ( 'meta' === wcj_get_option( 'wcj_export_orders_fields_additional_type_' . $i, 'meta' ) ) {
307
- $row[] = $this->safely_get_post_meta( $order_id, $additional_field_value );
308
  } else {
309
  global $post;
310
  $post_data = get_post( $order_id );
311
  setup_postdata( $post_data );
312
- $row[] = do_shortcode( $additional_field_value );
313
  wp_reset_postdata();
314
  }
315
  } else {
@@ -328,11 +341,15 @@ if ( ! class_exists( 'WCJ_Exporter_Orders' ) ) :
328
  /**
329
  * Export_orders_items.
330
  *
331
- * @version 5.1.0
332
  * @since 2.5.9
 
333
  */
334
  public function export_orders_items( $fields_helper ) {
335
-
 
 
 
336
  // Standard Fields.
337
  $all_fields = $fields_helper->get_order_items_export_fields();
338
  $fields_ids = apply_filters( 'wcj_export_orders_items_fields', wcj_get_option( 'wcj_export_orders_items_fields', $fields_helper->get_order_items_export_default_fields_ids() ) );
@@ -374,7 +391,7 @@ if ( ! class_exists( 'WCJ_Exporter_Orders' ) ) :
374
  continue;
375
  }
376
 
377
- if ( isset( $_POST['wcj_filter_by_order_billing_country'] ) && '' !== $_POST['wcj_filter_by_order_billing_country'] ) {
378
  if ( $order->billing_country !== $_POST['wcj_filter_by_order_billing_country'] ) {
379
  continue;
380
  }
@@ -409,7 +426,7 @@ if ( ! class_exists( 'WCJ_Exporter_Orders' ) ) :
409
  global $post;
410
  $post_data = get_post( $order_id );
411
  setup_postdata( $post_data );
412
- $row[] = do_shortcode( $additional_field_value );
413
  wp_reset_postdata();
414
  break;
415
  case 'shortcode_product':
@@ -438,9 +455,11 @@ if ( ! class_exists( 'WCJ_Exporter_Orders' ) ) :
438
  /**
439
  * Safely_get_post_meta.
440
  *
441
- * @version 2.6.0
442
  * @since 2.6.0
443
  * @todo handle multidimensional arrays
 
 
444
  */
445
  public function safely_get_post_meta( $post_id, $key ) {
446
  $meta = get_post_meta( $post_id, $key, true );
2
  /**
3
  * Booster for WooCommerce Exporter Orders
4
  *
5
+ * @version 5.6.2
6
  * @since 2.5.9
7
  * @author Pluggabl LLC.
8
  * @todo filter export by date
35
  /**
36
  * Get_export_orders_row.
37
  *
38
+ * @version 5.6.2
39
  * @since 2.5.9
40
+ * @param array $fields_ids defines the order field ids.
41
+ * @param int $order_id defines the order id.
42
+ * @param object $order defines the order object.
43
+ * @param object $items defines the order items.
44
+ * @param array $items_product_input_fields defines the items product input fields.
45
+ * @param object $item defines the order item.
46
+ * @param int $item_id defines the order item id.
47
+ *
48
  * @todo added precisions to the price fields.
49
  */
50
  public function get_export_orders_row( $fields_ids, $order_id, $order, $items, $items_product_input_fields, $item, $item_id ) {
70
  $row[] = wcj_get_product_input_fields( $item );
71
  break;
72
  case 'item-debug':
73
+ $row[] = '<pre>' . print_r( $item, true ) . '</pre>'; //phpcs:ignore
74
  break;
75
  case 'item-name':
76
  $row[] = $item['name'];
218
  /**
219
  * Export_orders.
220
  *
221
+ * @version 5.6.2
222
  * @since 2.4.8
223
+ * @param object $fields_helper defines the fields helper.
224
+ *
225
  * @todo (maybe) metainfo as separate column
226
  */
227
  public function export_orders( $fields_helper ) {
228
+ $wpnonce = true;
229
+ if ( function_exists( 'wp_verify_nonce' ) ) {
230
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
231
+ }
232
  // Standard Fields.
233
  $all_fields = $fields_helper->get_order_export_fields();
234
  $fields_ids = wcj_get_option( 'wcj_export_orders_fields', $fields_helper->get_order_export_default_fields_ids() );
270
  continue;
271
  }
272
 
273
+ if ( $wpnonce && isset( $_POST['wcj_filter_by_order_billing_country'] ) && '' !== $_POST['wcj_filter_by_order_billing_country'] ) {
274
  if ( $order->billing_country !== $_POST['wcj_filter_by_order_billing_country'] ) {
275
  continue;
276
  }
297
  }
298
  }
299
  if ( ! $filter_by_product_title ) {
300
+ if ( false !== strpos( $item['name'], sanitize_text_field( wp_unslash( $_POST['wcj_filter_by_product_title'] ) ) ) ) {
301
  $filter_by_product_title = true;
302
  }
303
  }
317
  $additional_field_value = wcj_get_option( 'wcj_export_orders_fields_additional_value_' . $i, '' );
318
  if ( '' !== ( $additional_field_value ) ) {
319
  if ( 'meta' === wcj_get_option( 'wcj_export_orders_fields_additional_type_' . $i, 'meta' ) ) {
320
+ $row[] = wp_strip_all_tags( html_entity_decode( $this->safely_get_post_meta( $order_id, $additional_field_value ) ) );
321
  } else {
322
  global $post;
323
  $post_data = get_post( $order_id );
324
  setup_postdata( $post_data );
325
+ $row[] = wp_strip_all_tags( html_entity_decode( do_shortcode( $additional_field_value ) ) );
326
  wp_reset_postdata();
327
  }
328
  } else {
341
  /**
342
  * Export_orders_items.
343
  *
344
+ * @version 5.6.2
345
  * @since 2.5.9
346
+ * @param object $fields_helper defines the fields helper.
347
  */
348
  public function export_orders_items( $fields_helper ) {
349
+ $wpnonce = true;
350
+ if ( function_exists( 'wp_verify_nonce' ) ) {
351
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
352
+ }
353
  // Standard Fields.
354
  $all_fields = $fields_helper->get_order_items_export_fields();
355
  $fields_ids = apply_filters( 'wcj_export_orders_items_fields', wcj_get_option( 'wcj_export_orders_items_fields', $fields_helper->get_order_items_export_default_fields_ids() ) );
391
  continue;
392
  }
393
 
394
+ if ( $wpnonce && isset( $_POST['wcj_filter_by_order_billing_country'] ) && '' !== $_POST['wcj_filter_by_order_billing_country'] ) {
395
  if ( $order->billing_country !== $_POST['wcj_filter_by_order_billing_country'] ) {
396
  continue;
397
  }
426
  global $post;
427
  $post_data = get_post( $order_id );
428
  setup_postdata( $post_data );
429
+ $row[] = wp_strip_all_tags( html_entity_decode( do_shortcode( $additional_field_value ) ) );
430
  wp_reset_postdata();
431
  break;
432
  case 'shortcode_product':
455
  /**
456
  * Safely_get_post_meta.
457
  *
458
+ * @version 5.6.2
459
  * @since 2.6.0
460
  * @todo handle multidimensional arrays
461
+ * @param int $post_id defines the post id.
462
+ * @param string $key defines the key of the post meta.
463
  */
464
  public function safely_get_post_meta( $post_id, $key ) {
465
  $meta = get_post_meta( $post_id, $key, true );
includes/export/class-wcj-exporter-products.php CHANGED
@@ -36,6 +36,8 @@ if ( ! class_exists( 'WCJ_Exporter_Products' ) ) :
36
  *
37
  * @version 2.7.0
38
  * @since 2.5.7
 
 
39
  */
40
  public function get_variable_or_grouped_product_info( $_product, $which_info ) {
41
  $all_variations_data = array();
@@ -65,9 +67,10 @@ if ( ! class_exists( 'WCJ_Exporter_Products' ) ) :
65
  /**
66
  * Export_products.
67
  *
68
- * @version 3.0.0
69
  * @since 2.5.3
70
  * @todo product attributes
 
71
  */
72
  public function export_products( $fields_helper ) {
73
 
@@ -272,7 +275,12 @@ if ( ! class_exists( 'WCJ_Exporter_Products' ) ) :
272
  $additional_field_value = wcj_get_option( 'wcj_export_products_fields_additional_value_' . $i, '' );
273
  if ( '' !== ( $additional_field_value ) ) {
274
  if ( 'meta' === wcj_get_option( 'wcj_export_products_fields_additional_type_' . $i, 'meta' ) ) {
275
- $row[] = get_post_meta( $product_id, $additional_field_value, true );
 
 
 
 
 
276
  } else {
277
  global $post;
278
  $post_data = get_post( $product_id );
36
  *
37
  * @version 2.7.0
38
  * @since 2.5.7
39
+ * @param Array | obj $_product Get product.
40
+ * @param Array $which_info Get product info.
41
  */
42
  public function get_variable_or_grouped_product_info( $_product, $which_info ) {
43
  $all_variations_data = array();
67
  /**
68
  * Export_products.
69
  *
70
+ * @version 5.6.2
71
  * @since 2.5.3
72
  * @todo product attributes
73
+ * @param Array $fields_helper Get fields info.
74
  */
75
  public function export_products( $fields_helper ) {
76
 
275
  $additional_field_value = wcj_get_option( 'wcj_export_products_fields_additional_value_' . $i, '' );
276
  if ( '' !== ( $additional_field_value ) ) {
277
  if ( 'meta' === wcj_get_option( 'wcj_export_products_fields_additional_type_' . $i, 'meta' ) ) {
278
+ $additional_field_data = get_post_meta( $product_id, $additional_field_value, true );
279
+ if ( is_array( $additional_field_data ) ) {
280
+ $row[] = implode( ',', maybe_unserialize( $additional_field_data ) );
281
+ } else {
282
+ $row[] = $additional_field_data;
283
+ }
284
  } else {
285
  global $post;
286
  $post_data = get_post( $product_id );
includes/functions/wcj-functions-admin.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Functions - Admin
4
  *
5
- * @version 5.6.1
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/functions
@@ -91,14 +91,18 @@ if ( ! function_exists( 'wcj_is_admin_product_edit_page' ) ) {
91
  /**
92
  * Wcj_is_admin_product_edit_page.
93
  *
94
- * @version 3.6.0
95
  * @since 3.2.4
96
  * @todo use where appropriate
97
  * @todo (maybe) move to `wcj-functions-conditional.php`
98
  */
99
  function wcj_is_admin_product_edit_page() {
100
  global $pagenow;
101
- if ( is_admin() && 'post.php' === $pagenow && isset( $_GET['action'] ) && 'edit' === $_GET['action'] && 'product' === get_post_type() ) {
 
 
 
 
102
  return true;
103
  } elseif ( is_admin() && defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['action'] ) && 'woocommerce_load_variations' === $_REQUEST['action'] ) {
104
  return true;
2
  /**
3
  * Booster for WooCommerce - Functions - Admin
4
  *
5
+ * @version 5.6.2
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/functions
91
  /**
92
  * Wcj_is_admin_product_edit_page.
93
  *
94
+ * @version 5.6.2
95
  * @since 3.2.4
96
  * @todo use where appropriate
97
  * @todo (maybe) move to `wcj-functions-conditional.php`
98
  */
99
  function wcj_is_admin_product_edit_page() {
100
  global $pagenow;
101
+ $wpnonce = true;
102
+ if ( function_exists( 'wp_verify_nonce' ) ) {
103
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
104
+ }
105
+ if ( $wpnonce && is_admin() && 'post.php' === $pagenow && isset( $_GET['action'] ) && 'edit' === $_GET['action'] && 'product' === get_post_type() ) {
106
  return true;
107
  } elseif ( is_admin() && defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['action'] ) && 'woocommerce_load_variations' === $_REQUEST['action'] ) {
108
  return true;
includes/functions/wcj-functions-booster-core.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Functions - Booster Core
4
  *
5
- * @version 5.6.1
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/functions
@@ -54,7 +54,7 @@ if ( ! function_exists( 'wcj_is_rest' ) ) {
54
  /**
55
  * Checks if the current request is a WP REST API request.
56
  *
57
- * @version 5.5.9
58
  * @since 4.3.0
59
  *
60
  * @author matzeeable
@@ -65,15 +65,18 @@ if ( ! function_exists( 'wcj_is_rest' ) ) {
65
  $prefix = rest_get_url_prefix();
66
  if (
67
  defined( 'REST_REQUEST' ) && REST_REQUEST || // After WP_REST_Request initialisation.
68
- isset( $_GET['rest_route'] ) && 0 === strpos( trim( $_GET['rest_route'], '\\/' ), $prefix, 0 ) // Support "plain" permalink settings.
 
69
  ) {
70
  return true;
71
  }
72
  // URL Path begins with wp-json/ (your REST prefix).
73
  // Also supports WP installations in subfolders.
74
- $rest_url = wp_parse_url( site_url( $prefix ) );
75
- $current_url = wp_parse_url( add_query_arg( array() ) );
76
- return ( 0 === strpos( $current_url['path'], $rest_url['path'], 0 ) );
 
 
77
  }
78
  }
79
 
2
  /**
3
  * Booster for WooCommerce - Functions - Booster Core
4
  *
5
+ * @version 5.6.2
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/functions
54
  /**
55
  * Checks if the current request is a WP REST API request.
56
  *
57
+ * @version 5.6.2
58
  * @since 4.3.0
59
  *
60
  * @author matzeeable
65
  $prefix = rest_get_url_prefix();
66
  if (
67
  defined( 'REST_REQUEST' ) && REST_REQUEST || // After WP_REST_Request initialisation.
68
+ isset( $_GET['rest_route'] ) && 0 === strpos( trim( $_GET['rest_route'], '\\/' ), $prefix, 0 ) // phpcs:ignore
69
+ // Support "plain" permalink settings.
70
  ) {
71
  return true;
72
  }
73
  // URL Path begins with wp-json/ (your REST prefix).
74
  // Also supports WP installations in subfolders.
75
+ $rest_url = wp_parse_url( site_url( $prefix ) );
76
+ $current_url = wp_parse_url( add_query_arg( array() ) );
77
+ $current_url_path = isset( $current_url['path'] ) ? $current_url['path'] : '';
78
+ $rest_url_path = isset( $rest_url['path'] ) ? $rest_url['path'] : '';
79
+ return ( 0 === strpos( $current_url_path, $rest_url_path, 0 ) );
80
  }
81
  }
82
 
includes/functions/wcj-functions-date-time.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Functions - Date and Time
4
  *
5
- * @version 4.9.0
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/functions
@@ -81,14 +81,15 @@ if ( ! function_exists( 'wcj_check_date' ) ) {
81
  /**
82
  * Wcj_check_date.
83
  *
84
- * @version 2.9.1
85
  * @since 2.9.1
86
  * @param string $_date defines the _date.
87
  * @param array $args defines the args.
88
  */
89
  function wcj_check_date( $_date, $args = array() ) {
 
90
  if ( empty( $args ) ) {
91
- $time_now = current_time( 'timestamp' );
92
  $args['day_now'] = intval( gmdate( 'j', $time_now ) );
93
  }
94
  $_date = explode( ',', $_date );
@@ -172,14 +173,14 @@ if ( ! function_exists( 'wcj_check_time' ) ) {
172
  /**
173
  * Wcj_check_time.
174
  *
175
- * @version 2.8.0
176
  * @since 2.8.0
177
  * @param string $_time defines the _time.
178
  * @param array $args defines the args.
179
  */
180
  function wcj_check_time( $_time, $args = array() ) {
181
  if ( empty( $args ) ) {
182
- $time_now = current_time( 'timestamp' );
183
  $args['hours_now'] = intval( gmdate( 'H', $time_now ) );
184
  $args['minutes_now'] = intval( gmdate( 'i', $time_now ) );
185
  }
@@ -300,7 +301,7 @@ if ( ! function_exists( 'wcj_pretty_utc_date' ) ) {
300
  *
301
  * @param string $utc_date get utc_Date.
302
  * @param null $format get format.
303
- *
304
  * @return string
305
  */
306
  function wcj_pretty_utc_date( string $utc_date, $format = null ) {
2
  /**
3
  * Booster for WooCommerce - Functions - Date and Time
4
  *
5
+ * @version 5.6.2
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/functions
81
  /**
82
  * Wcj_check_date.
83
  *
84
+ * @version 5.6.2
85
  * @since 2.9.1
86
  * @param string $_date defines the _date.
87
  * @param array $args defines the args.
88
  */
89
  function wcj_check_date( $_date, $args = array() ) {
90
+
91
  if ( empty( $args ) ) {
92
+ $time_now = (int) gmdate( 'U' );
93
  $args['day_now'] = intval( gmdate( 'j', $time_now ) );
94
  }
95
  $_date = explode( ',', $_date );
173
  /**
174
  * Wcj_check_time.
175
  *
176
+ * @version 5.6.2
177
  * @since 2.8.0
178
  * @param string $_time defines the _time.
179
  * @param array $args defines the args.
180
  */
181
  function wcj_check_time( $_time, $args = array() ) {
182
  if ( empty( $args ) ) {
183
+ $time_now = (int) gmdate( 'U' );
184
  $args['hours_now'] = intval( gmdate( 'H', $time_now ) );
185
  $args['minutes_now'] = intval( gmdate( 'i', $time_now ) );
186
  }
301
  *
302
  * @param string $utc_date get utc_Date.
303
  * @param null $format get format.
304
+ * @throws InvalidArgumentException InvalidArgumentException.
305
  * @return string
306
  */
307
  function wcj_pretty_utc_date( string $utc_date, $format = null ) {
includes/functions/wcj-functions-debug.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Functions - Debug
4
  *
5
- * @version 4.1.0
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/functions
8
  */
@@ -15,7 +15,7 @@ if ( ! function_exists( 'wcj_log' ) ) {
15
  /**
16
  * Wcj_log.
17
  *
18
- * @version 4.1.0
19
  * @param null | string $message defines the message.
20
  * @param bool $do_var_dump defines the do_var_dump.
21
  */
@@ -25,13 +25,13 @@ if ( ! function_exists( 'wcj_log' ) ) {
25
  }
26
  if ( $do_var_dump ) {
27
  ob_start();
28
- var_dump( $message );
29
  $message = ob_get_clean();
30
  } elseif ( is_array( $message ) || is_object( $message ) ) {
31
- $message = print_r( $message, true );
32
  }
33
  if ( 'yes' === wcj_get_option( 'wcj_logging_enabled', 'no' ) ) {
34
- update_option( 'wcj_log', '<span style="color:red;">' . gmdate( 'Y-m-d H:i:s' ) . ' ' . esc_url( $_SERVER['REQUEST_URI'] ) . '</span> <span style="color:orange;">[</span>' . $message . '<span style="color:orange;">]</span> <br>' . wcj_get_option( 'wcj_log', '' ) );
35
  }
36
  // WC log.
37
  if ( 'yes' === wcj_get_option( 'wcj_wc_logging_enabled', 'no' ) && function_exists( 'wc_get_logger' ) ) {
2
  /**
3
  * Booster for WooCommerce - Functions - Debug
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/functions
8
  */
15
  /**
16
  * Wcj_log.
17
  *
18
+ * @version 5.6.2
19
  * @param null | string $message defines the message.
20
  * @param bool $do_var_dump defines the do_var_dump.
21
  */
25
  }
26
  if ( $do_var_dump ) {
27
  ob_start();
28
+ var_dump( $message ); // phpcs:ignore
29
  $message = ob_get_clean();
30
  } elseif ( is_array( $message ) || is_object( $message ) ) {
31
+ $message = print_r( $message, true ); // phpcs:ignore
32
  }
33
  if ( 'yes' === wcj_get_option( 'wcj_logging_enabled', 'no' ) ) {
34
+ update_option( 'wcj_log', '<span style="color:red;">' . gmdate( 'Y-m-d H:i:s' ) . ' ' . ! empty( esc_url( sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) ) . '</span> <span style="color:orange;">[</span>' . $message . '<span style="color:orange;">]</span> <br>' . wcj_get_option( 'wcj_log', '' ) );
35
  }
36
  // WC log.
37
  if ( 'yes' === wcj_get_option( 'wcj_wc_logging_enabled', 'no' ) && function_exists( 'wc_get_logger' ) ) {
includes/functions/wcj-functions-eu-vat.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Functions - EU VAT
4
  *
5
- * @version 5.5.9
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/functions
@@ -16,7 +16,7 @@ if ( ! function_exists( 'wcj_validate_vat_no_soap' ) ) {
16
  /**
17
  * Wcj_validate_vat_no_soap.
18
  *
19
- * @version 5.5.9
20
  * @since 2.5.7
21
  * @return mixed: bool on successful checking (can be true or false), null otherwise
22
  * @param string $country_code defines the country_code.
@@ -38,7 +38,7 @@ if ( ! function_exists( 'wcj_validate_vat_no_soap' ) ) {
38
  switch ( $method ) {
39
  case 'file_get_contents':
40
  if ( ini_get( 'allow_url_fopen' ) ) {
41
- $response = file_get_contents( $api_url );
42
  } else {
43
  return null;
44
  }
2
  /**
3
  * Booster for WooCommerce - Functions - EU VAT
4
  *
5
+ * @version 5.6.2
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/functions
16
  /**
17
  * Wcj_validate_vat_no_soap.
18
  *
19
+ * @version 5.6.2
20
  * @since 2.5.7
21
  * @return mixed: bool on successful checking (can be true or false), null otherwise
22
  * @param string $country_code defines the country_code.
38
  switch ( $method ) {
39
  case 'file_get_contents':
40
  if ( ini_get( 'allow_url_fopen' ) ) {
41
+ $response = file_get_contents( $api_url ); //phpcs:ignore
42
  } else {
43
  return null;
44
  }
includes/functions/wcj-functions-exchange-rates.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Functions - Exchange Rates
4
  *
5
- * @version 5.5.9
6
  * @since 2.7.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/functions
@@ -187,7 +187,7 @@ if ( ! function_exists( 'wcj_get_currency_exchange_rates_url_response' ) ) {
187
  /**
188
  * Wcj_get_currency_exchange_rates_url_response.
189
  *
190
- * @version 3.5.0
191
  * @since 3.2.4
192
  * @todo use where needed
193
  * @param string $url defines the url.
@@ -196,7 +196,7 @@ if ( ! function_exists( 'wcj_get_currency_exchange_rates_url_response' ) ) {
196
  function wcj_get_currency_exchange_rates_url_response( $url, $do_json_decode = true ) {
197
  $response = '';
198
  if ( 'no' === wcj_get_option( 'wcj_currency_exchange_rates_always_curl', 'no' ) && ini_get( 'allow_url_fopen' ) ) {
199
- $response = file_get_contents( $url );
200
  } elseif ( function_exists( 'curl_version' ) ) {
201
  $response = wp_remote_get( $url );
202
  $response = $response['body'];
@@ -462,7 +462,7 @@ if ( ! function_exists( 'wcj_tcmb_get_exchange_rate_try' ) ) {
462
  /**
463
  * Wcj_tcmb_get_exchange_rate_try.
464
  *
465
- * @version 2.7.0
466
  * @since 2.6.0
467
  * @param string | int $currency_from defines the currency_from.
468
  */
@@ -471,6 +471,7 @@ if ( ! function_exists( 'wcj_tcmb_get_exchange_rate_try' ) ) {
471
  return 1;
472
  }
473
  $xml = simplexml_load_file( 'http://www.tcmb.gov.tr/kurlar/today.xml' );
 
474
  if ( isset( $xml->Currency ) ) {
475
  foreach ( $xml->Currency as $the_rate ) {
476
  $attributes = $the_rate->attributes();
@@ -504,6 +505,7 @@ if ( ! function_exists( 'wcj_tcmb_get_exchange_rate_try' ) ) {
504
  }
505
  }
506
  }
 
507
  return false;
508
  }
509
  }
2
  /**
3
  * Booster for WooCommerce - Functions - Exchange Rates
4
  *
5
+ * @version 5.6.2
6
  * @since 2.7.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/functions
187
  /**
188
  * Wcj_get_currency_exchange_rates_url_response.
189
  *
190
+ * @version 35.6.2
191
  * @since 3.2.4
192
  * @todo use where needed
193
  * @param string $url defines the url.
196
  function wcj_get_currency_exchange_rates_url_response( $url, $do_json_decode = true ) {
197
  $response = '';
198
  if ( 'no' === wcj_get_option( 'wcj_currency_exchange_rates_always_curl', 'no' ) && ini_get( 'allow_url_fopen' ) ) {
199
+ $response = file_get_contents( $url ); //phpcs:ignore
200
  } elseif ( function_exists( 'curl_version' ) ) {
201
  $response = wp_remote_get( $url );
202
  $response = $response['body'];
462
  /**
463
  * Wcj_tcmb_get_exchange_rate_try.
464
  *
465
+ * @version 5.6.2
466
  * @since 2.6.0
467
  * @param string | int $currency_from defines the currency_from.
468
  */
471
  return 1;
472
  }
473
  $xml = simplexml_load_file( 'http://www.tcmb.gov.tr/kurlar/today.xml' );
474
+ // phpcs:disable
475
  if ( isset( $xml->Currency ) ) {
476
  foreach ( $xml->Currency as $the_rate ) {
477
  $attributes = $the_rate->attributes();
505
  }
506
  }
507
  }
508
+ // phpcs:enable
509
  return false;
510
  }
511
  }
includes/functions/wcj-functions-general.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Functions - General
4
  *
5
- * @version 5.6.1
6
  * @author Pluggabl LLC.
7
  * @todo add `wcj_add_actions()` and `wcj_add_filters()`
8
  * @package Booster_For_WooCommerce/functions
@@ -124,7 +124,7 @@ if ( ! function_exists( 'wcj_send_file' ) ) {
124
  /**
125
  * Wcj_send_file.
126
  *
127
- * @version 3.5.0
128
  * @since 3.5.0
129
  * @todo use where needed
130
  * @todo add more cases for `$file_type`
@@ -137,7 +137,7 @@ if ( ! function_exists( 'wcj_send_file' ) ) {
137
  switch ( $file_type ) {
138
  default: // 'zip'
139
  header( 'Content-Type: application/octet-stream' );
140
- header( 'Content-Disposition: attachment; filename=' . urlencode( $file_name ) );
141
  header( 'Content-Type: application/octet-stream' );
142
  header( 'Content-Type: application/download' );
143
  header( 'Content-Description: File Transfer' );
@@ -145,15 +145,15 @@ if ( ! function_exists( 'wcj_send_file' ) ) {
145
  break;
146
  }
147
  flush(); // this doesn't really matter.
148
- $fp = fopen( $file_path, 'r' );
149
  if ( false !== ( $fp ) ) {
150
  while ( ! feof( $fp ) ) {
151
- echo fread( $fp, 65536 );
152
  flush(); // this is essential for large downloads.
153
  }
154
- fclose( $fp );
155
  if ( $do_clean_up ) {
156
- @unlink( $file_path );
157
  }
158
  exit();
159
  } else {
@@ -221,7 +221,7 @@ if ( ! function_exists( 'wcj_tcpdf_method' ) ) {
221
  * @param string $params defines the params.
222
  */
223
  function wcj_tcpdf_method( $method, $params ) {
224
- return '<tcpdf method="' . $method . '" wcj_tcpdf_method_params_start' . serialize( $params ) . 'wcj_tcpdf_method_params_end />';
225
  }
226
  }
227
 
@@ -436,19 +436,23 @@ if ( ! function_exists( 'wcj_maybe_add_date_query' ) ) {
436
  /**
437
  * Wcj_maybe_add_date_query.
438
  *
439
- * @version 3.0.0
440
  * @since 3.0.0
441
  * @param array $args defines the args.
442
  */
443
  function wcj_maybe_add_date_query( $args ) {
444
- if ( ( isset( $_GET['start_date'] ) && '' !== $_GET['start_date'] ) || ( isset( $_GET['end_date'] ) && '' !== $_GET['end_date'] ) ) {
 
 
 
 
445
  $date_query = array();
446
  $date_query['inclusive'] = true;
447
- if ( $_GET['start_date'] && '' !== $_GET['start_date'] ) {
448
- $date_query['after'] = $_GET['start_date'];
449
  }
450
- if ( $_GET['end_date'] && '' !== $_GET['end_date'] ) {
451
- $date_query['before'] = $_GET['end_date'];
452
  }
453
  $args['date_query'] = array( $date_query );
454
  }
@@ -496,12 +500,12 @@ if ( ! function_exists( 'wcj_customer_get_country' ) ) {
496
  /**
497
  * Wcj_customer_get_country.
498
  *
499
- * @version 2.8.0
500
  * @since 2.8.0
501
  * @todo (maybe) move to `wcj-functions-users.php`
502
  */
503
  function wcj_customer_get_country() {
504
- return ( WCJ_IS_WC_VERSION_BELOW_3 ? WC()->customer->get_country() : WC()->customer->get_billing_country() );
505
  }
506
  }
507
 
@@ -522,11 +526,11 @@ if ( ! function_exists( 'wcj_is_bot' ) ) {
522
  /**
523
  * Wcj_is_bot.
524
  *
525
- * @version 3.9.0
526
  * @since 2.5.6
527
  */
528
  function wcj_is_bot() {
529
- return ( isset( $_SERVER['HTTP_USER_AGENT'] ) && preg_match( '/Google-Structured-Data-Testing-Tool|bot|crawl|slurp|spider/i', $_SERVER['HTTP_USER_AGENT'] ) );
530
  }
531
  }
532
 
@@ -560,7 +564,7 @@ if ( ! function_exists( 'wcj_variation_radio_button' ) ) {
560
  /**
561
  * Wcj_variation_radio_button.
562
  *
563
- * @version 3.1.0
564
  * @since 2.4.8
565
  * @todo (maybe) check - maybe we can use `$variation['variation_description']` instead of `get_post_meta( $variation_id, '_variation_description', true )`
566
  * @param array $_product defines the _product.
@@ -579,8 +583,8 @@ if ( ! function_exists( 'wcj_variation_radio_button' ) ) {
579
  $attribute_name = substr( $attribute_full_name, strlen( $prefix ) );
580
  }
581
  // Checked.
582
- $checked = ( isset( $_REQUEST[ 'attribute_' . sanitize_title( $attribute_name ) ] ) ) ?
583
- wc_clean( $_REQUEST[ 'attribute_' . sanitize_title( $attribute_name ) ] ) : $_product->get_variation_default_attribute( $attribute_name );
584
  if ( $checked !== $attribute_value ) {
585
  $is_checked = false;
586
  }
@@ -680,7 +684,7 @@ if ( ! function_exists( 'wcj_maybe_unserialize_and_implode' ) ) {
680
  */
681
  function wcj_maybe_unserialize_and_implode( $value, $glue = ' ' ) {
682
  if ( is_serialized( $value ) ) {
683
- $value = unserialize( $value );
684
  if ( is_array( $value ) ) {
685
  $value = implode( $glue, $value );
686
  }
@@ -731,7 +735,7 @@ if ( ! function_exists( 'wcj_get_rates_for_tax_class' ) ) {
731
  * Used by admin settings page.
732
  *
733
  * @return array|null|object
734
- * @version 2.3.10
735
  * @since 2.3.10
736
  * @param string $tax_class defines the tax_class.
737
  */
@@ -739,8 +743,8 @@ if ( ! function_exists( 'wcj_get_rates_for_tax_class' ) ) {
739
  global $wpdb;
740
 
741
  // Get all the rates and locations. Snagging all at once should significantly cut down on the number of queries.
742
- $rates = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM `{$wpdb->prefix}woocommerce_tax_rates` WHERE `tax_rate_class` = %s ORDER BY `tax_rate_order`;", sanitize_title( $tax_class ) ) );
743
- $locations = $wpdb->get_results( "SELECT * FROM `{$wpdb->prefix}woocommerce_tax_rate_locations`" );
744
 
745
  // Set the rates keys equal to their ids.
746
  $rates = array_combine( wp_list_pluck( $rates, 'tax_rate_id' ), $rates );
@@ -790,15 +794,15 @@ if ( ! function_exists( 'wcj_is_frontend' ) ) {
790
  /**
791
  * Wcj_is_frontend()
792
  *
793
- * @since 4.0.0
794
  * @return boolean
795
  */
796
  function wcj_is_frontend() {
797
  if ( ! is_admin() ) {
798
  return true;
799
  } elseif ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
800
- return ( ! isset( $_REQUEST['action'] ) || ! is_string( $_REQUEST['action'] ) || ! in_array(
801
- $_REQUEST['action'],
802
  array(
803
  'woocommerce_load_variations',
804
  ),
@@ -1031,7 +1035,7 @@ if ( ! function_exists( 'wcj_add_allowed_html' ) ) {
1031
  /**
1032
  * Wcj_add_allowed_html.
1033
  *
1034
- * @version 5.6.1
1035
  * @since 5.6.0
1036
  * @param array $allowed_html to get default allowed html.
1037
  * @param string $context to get default context.
@@ -1039,33 +1043,34 @@ if ( ! function_exists( 'wcj_add_allowed_html' ) ) {
1039
  function wcj_add_allowed_html( $allowed_html, $context ) {
1040
  $allowed_extra_html = array(
1041
  'input' => array(
1042
- 'type' => true,
1043
- 'name' => true,
1044
- 'value' => true,
1045
- 'id' => true,
1046
- 'checked' => true,
1047
- 'class' => true,
1048
- 'style' => true,
1049
- 'placeholder' => true,
1050
- 'dateformat' => true,
1051
- 'mindate' => true,
1052
- 'maxdate' => true,
1053
- 'firstday' => true,
1054
- 'display' => true,
1055
- 'required' => true,
1056
- 'min' => true,
1057
- 'max' => true,
1058
- 'disabled' => true,
1059
- 'onchange' => true,
1060
- 'step' => true,
1061
- 'changeyear' => true,
1062
- 'yearrange' => true,
1063
- 'timeformat' => true,
1064
- 'interval' => true,
1065
- 'readonly' => true,
1066
  'data-blocked_dates' => true,
1067
  'currentday_time_limit' => true,
1068
  'data-blocked_dates_format' => true,
 
1069
  ),
1070
  'textarea' => array(
1071
  'name' => true,
@@ -1133,10 +1138,12 @@ if ( ! function_exists( 'wcj_add_allowed_html' ) ) {
1133
  'type' => true,
1134
  ),
1135
  'a' => array(
1136
- 'onclick' => true,
1137
- 'onblur' => true,
1138
- 'onfocus' => true,
1139
- 'onchange' => true,
 
 
1140
  ),
1141
  'button' => array(
1142
  'wcj_data' => true,
2
  /**
3
  * Booster for WooCommerce - Functions - General
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @todo add `wcj_add_actions()` and `wcj_add_filters()`
8
  * @package Booster_For_WooCommerce/functions
124
  /**
125
  * Wcj_send_file.
126
  *
127
+ * @version 5.6.2
128
  * @since 3.5.0
129
  * @todo use where needed
130
  * @todo add more cases for `$file_type`
137
  switch ( $file_type ) {
138
  default: // 'zip'
139
  header( 'Content-Type: application/octet-stream' );
140
+ header( 'Content-Disposition: attachment; filename=' . rawurlencode( $file_name ) );
141
  header( 'Content-Type: application/octet-stream' );
142
  header( 'Content-Type: application/download' );
143
  header( 'Content-Description: File Transfer' );
145
  break;
146
  }
147
  flush(); // this doesn't really matter.
148
+ $fp = fopen( $file_path, 'r' ); //phpcs:ignore
149
  if ( false !== ( $fp ) ) {
150
  while ( ! feof( $fp ) ) {
151
+ echo fread( $fp, 65536 ); //phpcs:ignore
152
  flush(); // this is essential for large downloads.
153
  }
154
+ fclose( $fp ); //phpcs:ignore
155
  if ( $do_clean_up ) {
156
+ @unlink( $file_path ); //phpcs:ignore
157
  }
158
  exit();
159
  } else {
221
  * @param string $params defines the params.
222
  */
223
  function wcj_tcpdf_method( $method, $params ) {
224
+ return '<tcpdf method="' . $method . '" wcj_tcpdf_method_params_start' . serialize( $params ) . 'wcj_tcpdf_method_params_end />'; //phpcs:ignore
225
  }
226
  }
227
 
436
  /**
437
  * Wcj_maybe_add_date_query.
438
  *
439
+ * @version 5.6.2
440
  * @since 3.0.0
441
  * @param array $args defines the args.
442
  */
443
  function wcj_maybe_add_date_query( $args ) {
444
+ $wpnonce = true;
445
+ if ( function_exists( 'wp_verify_nonce' ) ) {
446
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
447
+ }
448
+ if ( ( $wpnonce && isset( $_GET['start_date'] ) && '' !== $_GET['start_date'] ) || ( isset( $_GET['end_date'] ) && '' !== $_GET['end_date'] ) ) {
449
  $date_query = array();
450
  $date_query['inclusive'] = true;
451
+ if ( isset( $_GET['start_date'] ) && '' !== $_GET['start_date'] ) {
452
+ $date_query['after'] = sanitize_text_field( wp_unslash( $_GET['start_date'] ) );
453
  }
454
+ if ( isset( $_GET['end_date'] ) && '' !== $_GET['end_date'] ) {
455
+ $date_query['before'] = sanitize_text_field( wp_unslash( $_GET['end_date'] ) );
456
  }
457
  $args['date_query'] = array( $date_query );
458
  }
500
  /**
501
  * Wcj_customer_get_country.
502
  *
503
+ * @version 5.6.2
504
  * @since 2.8.0
505
  * @todo (maybe) move to `wcj-functions-users.php`
506
  */
507
  function wcj_customer_get_country() {
508
+ return (string) ( WCJ_IS_WC_VERSION_BELOW_3 ? WC()->customer->get_country() : WC()->customer->get_billing_country() );
509
  }
510
  }
511
 
526
  /**
527
  * Wcj_is_bot.
528
  *
529
+ * @version 5.6.2
530
  * @since 2.5.6
531
  */
532
  function wcj_is_bot() {
533
+ return ( isset( $_SERVER['HTTP_USER_AGENT'] ) && preg_match( '/Google-Structured-Data-Testing-Tool|bot|crawl|slurp|spider/i', sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) ) );
534
  }
535
  }
536
 
564
  /**
565
  * Wcj_variation_radio_button.
566
  *
567
+ * @version 5.6.2
568
  * @since 2.4.8
569
  * @todo (maybe) check - maybe we can use `$variation['variation_description']` instead of `get_post_meta( $variation_id, '_variation_description', true )`
570
  * @param array $_product defines the _product.
583
  $attribute_name = substr( $attribute_full_name, strlen( $prefix ) );
584
  }
585
  // Checked.
586
+ $checked = ( isset( $_REQUEST[ 'attribute_' . sanitize_title( $attribute_name ) ] ) ) ? // phpcs:ignore WordPress.Security.NonceVerification
587
+ wc_clean( sanitize_text_field( wp_unslash( $_REQUEST[ 'attribute_' . sanitize_title( $attribute_name ) ] ) ) ) : $_product->get_variation_default_attribute( $attribute_name ); // phpcs:ignore WordPress.Security.NonceVerification
588
  if ( $checked !== $attribute_value ) {
589
  $is_checked = false;
590
  }
684
  */
685
  function wcj_maybe_unserialize_and_implode( $value, $glue = ' ' ) {
686
  if ( is_serialized( $value ) ) {
687
+ $value = unserialize( $value ); //phpcs:ignore
688
  if ( is_array( $value ) ) {
689
  $value = implode( $glue, $value );
690
  }
735
  * Used by admin settings page.
736
  *
737
  * @return array|null|object
738
+ * @version 5.6.2
739
  * @since 2.3.10
740
  * @param string $tax_class defines the tax_class.
741
  */
743
  global $wpdb;
744
 
745
  // Get all the rates and locations. Snagging all at once should significantly cut down on the number of queries.
746
+ $rates = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM `{$wpdb->prefix}woocommerce_tax_rates` WHERE `tax_rate_class` = %s ORDER BY `tax_rate_order`;", sanitize_title( $tax_class ) ) ); // WPCS: db call ok and cache ok.
747
+ $locations = $wpdb->get_results( "SELECT * FROM `{$wpdb->prefix}woocommerce_tax_rate_locations`" ); // WPCS: db call ok and cache ok.
748
 
749
  // Set the rates keys equal to their ids.
750
  $rates = array_combine( wp_list_pluck( $rates, 'tax_rate_id' ), $rates );
794
  /**
795
  * Wcj_is_frontend()
796
  *
797
+ * @since 5.6.2
798
  * @return boolean
799
  */
800
  function wcj_is_frontend() {
801
  if ( ! is_admin() ) {
802
  return true;
803
  } elseif ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
804
+ return ( ! isset( $_REQUEST['action'] ) || ! is_string( $_REQUEST['action'] ) || ! in_array( // phpcs:ignore WordPress.Security.NonceVerification
805
+ $_REQUEST['action'], // phpcs:ignore WordPress.Security.NonceVerification
806
  array(
807
  'woocommerce_load_variations',
808
  ),
1035
  /**
1036
  * Wcj_add_allowed_html.
1037
  *
1038
+ * @version 5.6.2
1039
  * @since 5.6.0
1040
  * @param array $allowed_html to get default allowed html.
1041
  * @param string $context to get default context.
1043
  function wcj_add_allowed_html( $allowed_html, $context ) {
1044
  $allowed_extra_html = array(
1045
  'input' => array(
1046
+ 'type' => true,
1047
+ 'name' => true,
1048
+ 'value' => true,
1049
+ 'id' => true,
1050
+ 'checked' => true,
1051
+ 'class' => true,
1052
+ 'style' => true,
1053
+ 'placeholder' => true,
1054
+ 'dateformat' => true,
1055
+ 'mindate' => true,
1056
+ 'maxdate' => true,
1057
+ 'firstday' => true,
1058
+ 'display' => true,
1059
+ 'required' => true,
1060
+ 'min' => true,
1061
+ 'max' => true,
1062
+ 'disabled' => true,
1063
+ 'onchange' => true,
1064
+ 'step' => true,
1065
+ 'changeyear' => true,
1066
+ 'yearrange' => true,
1067
+ 'timeformat' => true,
1068
+ 'interval' => true,
1069
+ 'readonly' => true,
1070
  'data-blocked_dates' => true,
1071
  'currentday_time_limit' => true,
1072
  'data-blocked_dates_format' => true,
1073
+ 'onclick' => true,
1074
  ),
1075
  'textarea' => array(
1076
  'name' => true,
1138
  'type' => true,
1139
  ),
1140
  'a' => array(
1141
+ 'onclick' => true,
1142
+ 'onblur' => true,
1143
+ 'onfocus' => true,
1144
+ 'onchange' => true,
1145
+ 'target' => true,
1146
+ 'wcj-copy-data' => true,
1147
  ),
1148
  'button' => array(
1149
  'wcj_data' => true,
includes/functions/wcj-functions-html.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Functions - HTML Functions
4
  *
5
- * @version 4.2.0
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/functions
8
  */
@@ -15,7 +15,7 @@ if ( ! function_exists( 'wcj_get_table_html' ) ) {
15
  /**
16
  * Wcj_get_table_html.
17
  *
18
- * @version 4.2.0
19
  * @param array $data defines the data.
20
  * @param array $args defines the args.
21
  */
@@ -29,7 +29,7 @@ if ( ! function_exists( 'wcj_get_table_html' ) ) {
29
  'columns_styles' => array(),
30
  );
31
  $args = array_merge( $defaults, $args );
32
- extract( $args );
33
  $table_class = ( '' === $table_class ) ? '' : ' class="' . $table_class . '"';
34
  $table_style = ( '' === $table_style ) ? '' : ' style="' . $table_style . '"';
35
  $row_styles = ( '' === $row_styles ) ? '' : ' style="' . $row_styles . '"';
2
  /**
3
  * Booster for WooCommerce - Functions - HTML Functions
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/functions
8
  */
15
  /**
16
  * Wcj_get_table_html.
17
  *
18
+ * @version 5.6.2
19
  * @param array $data defines the data.
20
  * @param array $args defines the args.
21
  */
29
  'columns_styles' => array(),
30
  );
31
  $args = array_merge( $defaults, $args );
32
+ extract( $args ); // phpcs:ignore
33
  $table_class = ( '' === $table_class ) ? '' : ' class="' . $table_class . '"';
34
  $table_style = ( '' === $table_style ) ? '' : ' style="' . $table_style . '"';
35
  $row_styles = ( '' === $row_styles ) ? '' : ' style="' . $row_styles . '"';
includes/functions/wcj-functions-invoicing.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Functions - Invoicing
4
  *
5
- * @version 3.6.0
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/functions
8
  */
@@ -49,7 +49,7 @@ if ( ! function_exists( 'wcj_get_invoicing_default_images_directory' ) ) {
49
  /**
50
  * Wcj_get_invoicing_default_images_directory.
51
  *
52
- * @version 3.4.3
53
  * @since 3.4.2
54
  */
55
  function wcj_get_invoicing_default_images_directory() {
@@ -57,7 +57,7 @@ if ( ! function_exists( 'wcj_get_invoicing_default_images_directory' ) ) {
57
  case 'empty':
58
  return '';
59
  case 'document_root':
60
- return $_SERVER['DOCUMENT_ROOT'];
61
  case 'abspath':
62
  return ABSPATH;
63
  default: // tcpdf_default.
@@ -206,7 +206,7 @@ if ( ! function_exists( 'wcj_check_and_maybe_download_tcpdf_fonts' ) ) {
206
  /**
207
  * Wcj_check_and_maybe_download_tcpdf_fonts.
208
  *
209
- * @version 3.6.0
210
  * @since 2.9.0
211
  * @todo (maybe) check file size > 0 or even for exact size (not only if file exists in directory)
212
  * @todo (maybe) use `download_url()` instead of `file_get_contents()` or `curl` (in all Booster files)
@@ -220,11 +220,11 @@ if ( ! function_exists( 'wcj_check_and_maybe_download_tcpdf_fonts' ) ) {
220
  if ( wcj_check_tcpdf_fonts_version( true ) ) {
221
  return true;
222
  }
223
- if ( ( (int) current_time( 'timestamp' ) - wcj_get_option( 'wcj_invoicing_fonts_version_timestamp', null ) ) < 60 * 60 ) {
224
  return false;
225
  }
226
  }
227
- update_option( 'wcj_invoicing_fonts_version_timestamp', (int) current_time( 'timestamp' ) );
228
  $tcpdf_fonts_dir = wcj_get_wcj_uploads_dir( 'tcpdf_fonts' ) . '/';
229
  if ( ! file_exists( $tcpdf_fonts_dir ) ) {
230
  mkdir( $tcpdf_fonts_dir );
@@ -240,9 +240,9 @@ if ( ! function_exists( 'wcj_check_and_maybe_download_tcpdf_fonts' ) ) {
240
  }
241
  $response_file_name = download_url( $url );
242
  if ( ! is_wp_error( $response_file_name ) ) {
243
- $response = file_get_contents( $response_file_name );
244
  if ( $response ) {
245
- if ( ! file_put_contents( $tcpdf_fonts_dir . $tcpdf_fonts_file, $response ) ) {
246
  return false;
247
  }
248
  } else {
@@ -256,7 +256,7 @@ if ( ! function_exists( 'wcj_check_and_maybe_download_tcpdf_fonts' ) ) {
256
  }
257
  if (
258
  update_option( 'wcj_invoicing_fonts_version', wcj_get_tcpdf_fonts_version() ) &&
259
- update_option( 'wcj_invoicing_fonts_version_timestamp', (int) current_time( 'timestamp' ) )
260
  ) {
261
  return true;
262
  }
2
  /**
3
  * Booster for WooCommerce - Functions - Invoicing
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/functions
8
  */
49
  /**
50
  * Wcj_get_invoicing_default_images_directory.
51
  *
52
+ * @version 5.6.2
53
  * @since 3.4.2
54
  */
55
  function wcj_get_invoicing_default_images_directory() {
57
  case 'empty':
58
  return '';
59
  case 'document_root':
60
+ return $_SERVER['DOCUMENT_ROOT']; //phpcs:ignore
61
  case 'abspath':
62
  return ABSPATH;
63
  default: // tcpdf_default.
206
  /**
207
  * Wcj_check_and_maybe_download_tcpdf_fonts.
208
  *
209
+ * @version 5.6.2
210
  * @since 2.9.0
211
  * @todo (maybe) check file size > 0 or even for exact size (not only if file exists in directory)
212
  * @todo (maybe) use `download_url()` instead of `file_get_contents()` or `curl` (in all Booster files)
220
  if ( wcj_check_tcpdf_fonts_version( true ) ) {
221
  return true;
222
  }
223
+ if ( ( (int) gmdate( 'U' ) - wcj_get_option( 'wcj_invoicing_fonts_version_timestamp', null ) ) < 60 * 60 ) {
224
  return false;
225
  }
226
  }
227
+ update_option( 'wcj_invoicing_fonts_version_timestamp', (int) gmdate( 'U' ) );
228
  $tcpdf_fonts_dir = wcj_get_wcj_uploads_dir( 'tcpdf_fonts' ) . '/';
229
  if ( ! file_exists( $tcpdf_fonts_dir ) ) {
230
  mkdir( $tcpdf_fonts_dir );
240
  }
241
  $response_file_name = download_url( $url );
242
  if ( ! is_wp_error( $response_file_name ) ) {
243
+ $response = file_get_contents( $response_file_name ); //phpcs:ignore
244
  if ( $response ) {
245
+ if ( ! file_put_contents( $tcpdf_fonts_dir . $tcpdf_fonts_file, $response ) ) { //phpcs:ignore
246
  return false;
247
  }
248
  } else {
256
  }
257
  if (
258
  update_option( 'wcj_invoicing_fonts_version', wcj_get_tcpdf_fonts_version() ) &&
259
+ update_option( 'wcj_invoicing_fonts_version_timestamp', (int) gmdate( 'U' ) )
260
  ) {
261
  return true;
262
  }
includes/functions/wcj-functions-number-to-words-lt.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Functions - Numbers to Words
4
  *
5
- * @version 2.5.9
6
  * @since 2.5.9
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/functions
@@ -12,7 +12,7 @@ if ( ! function_exists( 'convert_number_to_words_lt' ) ) {
12
  /**
13
  * Convert_number_to_words_lt.
14
  *
15
- * @version 2.5.9
16
  * @since 2.5.9
17
  * @return string
18
  * @param int $number Get Number.
@@ -80,8 +80,8 @@ if ( ! function_exists( 'convert_number_to_words_lt' ) ) {
80
 
81
  if ( ( $number >= 0 && (int) $number < 0 ) || (int) $number < 0 - PHP_INT_MAX ) {
82
  // overflow.
83
- trigger_error(
84
- 'convert_number_to_words_lt only accepts numbers between -' . PHP_INT_MAX . ' and ' . PHP_INT_MAX,
85
  E_USER_WARNING
86
  );
87
  return false;
2
  /**
3
  * Booster for WooCommerce - Functions - Numbers to Words
4
  *
5
+ * @version 5.6.2
6
  * @since 2.5.9
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/functions
12
  /**
13
  * Convert_number_to_words_lt.
14
  *
15
+ * @version 5.6.2
16
  * @since 2.5.9
17
  * @return string
18
  * @param int $number Get Number.
80
 
81
  if ( ( $number >= 0 && (int) $number < 0 ) || (int) $number < 0 - PHP_INT_MAX ) {
82
  // overflow.
83
+ trigger_error( //phpcs:ignore
84
+ 'convert_number_to_words_lt only accepts numbers between -' . PHP_INT_MAX . ' and ' . PHP_INT_MAX, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
85
  E_USER_WARNING
86
  );
87
  return false;
includes/functions/wcj-functions-number-to-words.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Functions - Numbers to Words
4
  *
5
- * @version 2.5.0
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/functions
8
  */
@@ -16,7 +16,7 @@ if ( ! function_exists( 'convert_number_to_words' ) ) {
16
  /**
17
  * Convert_number_to_words.
18
  *
19
- * @version 2.5.0
20
  * @since 2.5.0
21
  * @param int $number Get Number.
22
  */
@@ -70,8 +70,8 @@ if ( ! function_exists( 'convert_number_to_words' ) ) {
70
 
71
  if ( ( $number >= 0 && (int) $number < 0 ) || (int) $number < 0 - PHP_INT_MAX ) {
72
  // overflow.
73
- trigger_error(
74
- 'convert_number_to_words only accepts numbers between -' . PHP_INT_MAX . ' and ' . PHP_INT_MAX,
75
  E_USER_WARNING
76
  );
77
  return false;
2
  /**
3
  * Booster for WooCommerce - Functions - Numbers to Words
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/functions
8
  */
16
  /**
17
  * Convert_number_to_words.
18
  *
19
+ * @version 5.6.2
20
  * @since 2.5.0
21
  * @param int $number Get Number.
22
  */
70
 
71
  if ( ( $number >= 0 && (int) $number < 0 ) || (int) $number < 0 - PHP_INT_MAX ) {
72
  // overflow.
73
+ trigger_error( //phpcs:ignore
74
+ 'convert_number_to_words only accepts numbers between -' . PHP_INT_MAX . ' and ' . PHP_INT_MAX, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
75
  E_USER_WARNING
76
  );
77
  return false;
includes/functions/wcj-functions-orders.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Functions - Orders
4
  *
5
- * @version 5.3.0
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/functions
@@ -16,7 +16,7 @@ if ( ! function_exists( 'wcj_get_adjacent_order_id' ) ) {
16
  /**
17
  * Wcj_get_adjacent_order_id.
18
  *
19
- * @version 3.4.0
20
  * @since 3.4.0
21
  * @todo isn't there an easier way?
22
  * @param int $current_id defines the current_id.
@@ -34,7 +34,7 @@ if ( ! function_exists( 'wcj_get_adjacent_order_id' ) ) {
34
  $loop = new WP_Query( $args );
35
  if ( $loop->have_posts() ) {
36
  foreach ( $loop->posts as $post_id ) {
37
- if ( $current_id === $post_id ) {
38
  return $direction( $loop->posts );
39
  }
40
  next( $loop->posts );
2
  /**
3
  * Booster for WooCommerce - Functions - Orders
4
  *
5
+ * @version 5.6.2
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/functions
16
  /**
17
  * Wcj_get_adjacent_order_id.
18
  *
19
+ * @version 5.6.2
20
  * @since 3.4.0
21
  * @todo isn't there an easier way?
22
  * @param int $current_id defines the current_id.
34
  $loop = new WP_Query( $args );
35
  if ( $loop->have_posts() ) {
36
  foreach ( $loop->posts as $post_id ) {
37
+ if ( $current_id === (string) $post_id ) {
38
  return $direction( $loop->posts );
39
  }
40
  next( $loop->posts );
includes/functions/wcj-functions-price-currency.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Functions - Price and Currency
4
  *
5
- * @version 5.5.8
6
  * @since 2.7.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/functions
@@ -555,7 +555,7 @@ if ( ! function_exists( 'wc_get_variable_product_purchase_price' ) ) {
555
  /**
556
  * Wc_get_product_purchase_price.
557
  *
558
- * @version 4.2.0
559
  * @since 4.2.0
560
  * @param int $product_id defines the product_id.
561
  * @param array $args defines the args.
@@ -581,7 +581,9 @@ if ( ! function_exists( 'wc_get_variable_product_purchase_price' ) ) {
581
  $final_purchase_prices = array();
582
  switch ( $args['search'] ) {
583
  case 'min_variation':
584
- $final_purchase_prices = array( min( $purchase_prices ) );
 
 
585
  break;
586
  case 'max_variation':
587
  $final_purchase_prices = array( max( $purchase_prices ) );
2
  /**
3
  * Booster for WooCommerce - Functions - Price and Currency
4
  *
5
+ * @version 5.6.2
6
  * @since 2.7.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/functions
555
  /**
556
  * Wc_get_product_purchase_price.
557
  *
558
+ * @version 5.6.2
559
  * @since 4.2.0
560
  * @param int $product_id defines the product_id.
561
  * @param array $args defines the args.
581
  $final_purchase_prices = array();
582
  switch ( $args['search'] ) {
583
  case 'min_variation':
584
+ if ( ! empty( $purchase_prices ) ) {
585
+ $final_purchase_prices = array( min( $purchase_prices ) );
586
+ }
587
  break;
588
  case 'max_variation':
589
  $final_purchase_prices = array( max( $purchase_prices ) );
includes/functions/wcj-functions-products.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Functions - Products
4
  *
5
- * @version 5.6.1
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/functions
@@ -32,7 +32,7 @@ if ( ! function_exists( 'wcj_is_enabled_for_product' ) ) {
32
  /**
33
  * Wcj_is_enabled_for_product.
34
  *
35
- * @version 5.6.1
36
  * @since 3.1.0
37
  * @param int $product_id Get product id.
38
  * @param Array $args Get product args.
@@ -42,7 +42,7 @@ if ( ! function_exists( 'wcj_is_enabled_for_product' ) ) {
42
  if ( ! is_array( $args['include_products'] ) ) {
43
  $args['include_products'] = array_map( 'trim', explode( ',', $args['include_products'] ) );
44
  }
45
- if ( ! in_array( $product_id, $args['include_products'] ) ) {
46
  return false;
47
  }
48
  }
@@ -50,7 +50,7 @@ if ( ! function_exists( 'wcj_is_enabled_for_product' ) ) {
50
  if ( ! is_array( $args['exclude_products'] ) ) {
51
  $args['exclude_products'] = array_map( 'trim', explode( ',', $args['exclude_products'] ) );
52
  }
53
- if ( in_array( $product_id, $args['exclude_products'] ) ) {
54
  return false;
55
  }
56
  }
@@ -258,17 +258,17 @@ if ( ! function_exists( 'wcj_get_product_image_url' ) ) {
258
  /**
259
  * Wcj_get_product_image_url.
260
  *
261
- * @version 2.5.7
262
  * @since 2.5.7
263
  * @todo placeholder
264
  * @param int $product_id Get product id.
265
  * @param string $image_size Get images size.
266
  */
267
  function wcj_get_product_image_url( $product_id, $image_size = 'shop_thumbnail' ) {
 
268
  if ( has_post_thumbnail( $product_id ) ) {
269
  $image_url = get_the_post_thumbnail_url( $product_id, $image_size );
270
- $parent_id = wp_get_post_parent_id( $product_id );
271
- } elseif ( ( $parent_id ) && has_post_thumbnail( $parent_id ) ) {
272
  $image_url = get_the_post_thumbnail_url( $parent_id, $image_size );
273
  } else {
274
  $image_url = '';
@@ -505,7 +505,7 @@ if ( ! function_exists( 'wcj_is_product_wholesale_enabled' ) ) {
505
  /**
506
  * Wcj_is_product_wholesale_enabled.
507
  *
508
- * @version 5.6.0
509
  * @param int $product_id Get product id.
510
  */
511
  function wcj_is_product_wholesale_enabled( $product_id ) {
@@ -522,7 +522,7 @@ if ( ! function_exists( 'wcj_is_product_wholesale_enabled' ) ) {
522
  if ( 'no' === wcj_get_option( 'wcj_wholesale_price_per_product_enable', 'yes' ) ) {
523
  $product_cats_to_exclude = wcj_get_option( 'wcj_wholesale_price_product_cats_to_exclude', array() );
524
  if ( ! empty( $product_cats_to_exclude ) && wcj_is_product_term( $product_id, $product_cats_to_exclude, 'product_cat' ) ) {
525
- if ( ! empty( $product_cats_to_exclude ) && in_array( $product_id, $product_cats_to_exclude ) ) {
526
  $is_product_eligible_new = false;
527
  }
528
  return $is_product_eligible_new ?? false;
@@ -530,7 +530,7 @@ if ( ! function_exists( 'wcj_is_product_wholesale_enabled' ) ) {
530
  }
531
 
532
  $products_to_include = wcj_get_option( 'wcj_wholesale_price_products_to_include', array() );
533
- if ( ! empty( $products_to_include ) && in_array( $product_id, $products_to_include ) ) {
534
  $is_product_eligible = true;
535
  } elseif ( empty( $products_to_include ) && empty( $product_cats_to_include ) ) {
536
  $is_product_eligible = true;
@@ -538,7 +538,7 @@ if ( ! function_exists( 'wcj_is_product_wholesale_enabled' ) ) {
538
 
539
  if ( 'no' === wcj_get_option( 'wcj_wholesale_price_per_product_enable', 'yes' ) ) {
540
  $products_to_exclude = wcj_get_option( 'wcj_wholesale_price_products_to_exclude', array() );
541
- if ( ! empty( $products_to_exclude ) && in_array( $product_id, $products_to_exclude ) ) {
542
  $is_product_eligible = false;
543
  }
544
  }
@@ -590,7 +590,7 @@ if ( ! function_exists( 'wcj_is_product_term' ) ) {
590
  return false;
591
  }
592
  foreach ( $product_terms as $product_term ) {
593
- if ( in_array( $product_term->term_id, $term_ids ) ) {
594
  return true;
595
  }
596
  }
2
  /**
3
  * Booster for WooCommerce - Functions - Products
4
  *
5
+ * @version 5.6.2
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/functions
32
  /**
33
  * Wcj_is_enabled_for_product.
34
  *
35
+ * @version 5.6.2
36
  * @since 3.1.0
37
  * @param int $product_id Get product id.
38
  * @param Array $args Get product args.
42
  if ( ! is_array( $args['include_products'] ) ) {
43
  $args['include_products'] = array_map( 'trim', explode( ',', $args['include_products'] ) );
44
  }
45
+ if ( ! in_array( (string) $product_id, $args['include_products'], true ) ) {
46
  return false;
47
  }
48
  }
50
  if ( ! is_array( $args['exclude_products'] ) ) {
51
  $args['exclude_products'] = array_map( 'trim', explode( ',', $args['exclude_products'] ) );
52
  }
53
+ if ( in_array( (string) $product_id, $args['exclude_products'], true ) ) {
54
  return false;
55
  }
56
  }
258
  /**
259
  * Wcj_get_product_image_url.
260
  *
261
+ * @version 5.6.2
262
  * @since 2.5.7
263
  * @todo placeholder
264
  * @param int $product_id Get product id.
265
  * @param string $image_size Get images size.
266
  */
267
  function wcj_get_product_image_url( $product_id, $image_size = 'shop_thumbnail' ) {
268
+ $parent_id = wp_get_post_parent_id( $product_id );
269
  if ( has_post_thumbnail( $product_id ) ) {
270
  $image_url = get_the_post_thumbnail_url( $product_id, $image_size );
271
+ } elseif ( $parent_id && has_post_thumbnail( $parent_id ) ) {
 
272
  $image_url = get_the_post_thumbnail_url( $parent_id, $image_size );
273
  } else {
274
  $image_url = '';
505
  /**
506
  * Wcj_is_product_wholesale_enabled.
507
  *
508
+ * @version 5.6.2
509
  * @param int $product_id Get product id.
510
  */
511
  function wcj_is_product_wholesale_enabled( $product_id ) {
522
  if ( 'no' === wcj_get_option( 'wcj_wholesale_price_per_product_enable', 'yes' ) ) {
523
  $product_cats_to_exclude = wcj_get_option( 'wcj_wholesale_price_product_cats_to_exclude', array() );
524
  if ( ! empty( $product_cats_to_exclude ) && wcj_is_product_term( $product_id, $product_cats_to_exclude, 'product_cat' ) ) {
525
+ if ( ! empty( $product_cats_to_exclude ) && in_array( (string) $product_id, $product_cats_to_exclude, true ) ) {
526
  $is_product_eligible_new = false;
527
  }
528
  return $is_product_eligible_new ?? false;
530
  }
531
 
532
  $products_to_include = wcj_get_option( 'wcj_wholesale_price_products_to_include', array() );
533
+ if ( ! empty( $products_to_include ) && in_array( (string) $product_id, $products_to_include, true ) ) {
534
  $is_product_eligible = true;
535
  } elseif ( empty( $products_to_include ) && empty( $product_cats_to_include ) ) {
536
  $is_product_eligible = true;
538
 
539
  if ( 'no' === wcj_get_option( 'wcj_wholesale_price_per_product_enable', 'yes' ) ) {
540
  $products_to_exclude = wcj_get_option( 'wcj_wholesale_price_products_to_exclude', array() );
541
+ if ( ! empty( $products_to_exclude ) && in_array( (string) $product_id, $products_to_exclude, true ) ) {
542
  $is_product_eligible = false;
543
  }
544
  }
590
  return false;
591
  }
592
  foreach ( $product_terms as $product_term ) {
593
+ if ( in_array( (string) $product_term->term_id, $term_ids, true ) ) {
594
  return true;
595
  }
596
  }
includes/functions/wcj-functions-reports.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Functions - Reports
4
  *
5
- * @version 3.2.4
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/functions
@@ -16,12 +16,12 @@ if ( ! function_exists( 'wcj_get_product_sales_daily_report_columns' ) ) {
16
  /**
17
  * Wcj_get_product_sales_daily_report_columns.
18
  *
19
- * @version 2.9.0
20
  * @since 2.9.0
21
  */
22
  function wcj_get_product_sales_daily_report_columns() {
23
  return array(
24
- 'gmdate' => __( 'gmdate', 'woocommerce-jetpack' ),
25
  'daily_total_sum' => __( 'Daily Total Sum', 'woocommerce-jetpack' ),
26
  'daily_total_quantity' => __( 'Daily Total Quantity', 'woocommerce-jetpack' ),
27
  'product_id' => __( 'Product ID', 'woocommerce-jetpack' ),
@@ -29,7 +29,7 @@ if ( ! function_exists( 'wcj_get_product_sales_daily_report_columns' ) ) {
29
  'item_quantity' => __( 'Quantity', 'woocommerce-jetpack' ),
30
  'sum' => __( 'Sum', 'woocommerce-jetpack' ),
31
  'profit' => __( 'Profit', 'woocommerce-jetpack' ),
32
- 'last_sale' => __( 'Last Sale gmdate', 'woocommerce-jetpack' ),
33
  'last_sale_order_id' => __( 'Last Sale Order ID', 'woocommerce-jetpack' ),
34
  'last_sale_order_status' => __( 'Last Sale Order Status', 'woocommerce-jetpack' ),
35
  );
@@ -40,11 +40,11 @@ if ( ! function_exists( 'wcj_get_reports_standard_ranges' ) ) {
40
  /**
41
  * Wcj_get_reports_standard_ranges.
42
  *
43
- * @version 3.2.4
44
  * @since 2.9.0
45
  */
46
  function wcj_get_reports_standard_ranges() {
47
- $current_time = (int) current_time( 'timestamp' );
48
  return array(
49
  'year' => array(
50
  'title' => __( 'Year', 'woocommerce' ),
@@ -74,12 +74,12 @@ if ( ! function_exists( 'wcj_get_reports_custom_ranges' ) ) {
74
  /**
75
  * Wcj_get_reports_custom_ranges.
76
  *
77
- * @version 3.2.4
78
  * @since 2.9.0
79
  * @todo fix `-1 month` - sometimes it produces the wrong result (e.g. on current gmdate = "2018.03.30")
80
  */
81
  function wcj_get_reports_custom_ranges() {
82
- $current_time = (int) current_time( 'timestamp' );
83
  return array(
84
  'last_14_days' => array(
85
  'title' => __( 'Last 14 days', 'woocommerce-jetpack' ),
2
  /**
3
  * Booster for WooCommerce - Functions - Reports
4
  *
5
+ * @version 5.6.2
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/functions
16
  /**
17
  * Wcj_get_product_sales_daily_report_columns.
18
  *
19
+ * @version 5.6.2
20
  * @since 2.9.0
21
  */
22
  function wcj_get_product_sales_daily_report_columns() {
23
  return array(
24
+ 'date' => __( 'date', 'woocommerce-jetpack' ),
25
  'daily_total_sum' => __( 'Daily Total Sum', 'woocommerce-jetpack' ),
26
  'daily_total_quantity' => __( 'Daily Total Quantity', 'woocommerce-jetpack' ),
27
  'product_id' => __( 'Product ID', 'woocommerce-jetpack' ),
29
  'item_quantity' => __( 'Quantity', 'woocommerce-jetpack' ),
30
  'sum' => __( 'Sum', 'woocommerce-jetpack' ),
31
  'profit' => __( 'Profit', 'woocommerce-jetpack' ),
32
+ 'last_sale' => __( 'Last Sale date', 'woocommerce-jetpack' ),
33
  'last_sale_order_id' => __( 'Last Sale Order ID', 'woocommerce-jetpack' ),
34
  'last_sale_order_status' => __( 'Last Sale Order Status', 'woocommerce-jetpack' ),
35
  );
40
  /**
41
  * Wcj_get_reports_standard_ranges.
42
  *
43
+ * @version 5.6.2
44
  * @since 2.9.0
45
  */
46
  function wcj_get_reports_standard_ranges() {
47
+ $current_time = (int) gmdate( 'U' );
48
  return array(
49
  'year' => array(
50
  'title' => __( 'Year', 'woocommerce' ),
74
  /**
75
  * Wcj_get_reports_custom_ranges.
76
  *
77
+ * @version 5.6.2
78
  * @since 2.9.0
79
  * @todo fix `-1 month` - sometimes it produces the wrong result (e.g. on current gmdate = "2018.03.30")
80
  */
81
  function wcj_get_reports_custom_ranges() {
82
+ $current_time = (int) gmdate( 'U' );
83
  return array(
84
  'last_14_days' => array(
85
  'title' => __( 'Last 14 days', 'woocommerce-jetpack' ),
includes/gateways/class-wc-gateway-wcj-custom.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  /**
3
  * Booster for WooCommerce - Custom Payment Gateway
4
  *
5
- * @version 5.3.4
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
1
+ <?php //phpcs:ignore
2
  /**
3
  * Booster for WooCommerce - Custom Payment Gateway
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
includes/input-fields/class-wcj-product-input-fields-core.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Product Input Fields - Core
4
  *
5
- * @version 5.5.9
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -155,28 +155,29 @@ if ( ! class_exists( 'WCJ_Product_Input_Fields_Core' ) ) :
155
  /**
156
  * Save product input fields on Product Edit.
157
  *
158
- * @version 3.5.0
159
  * @param int $post_id Get post ID.
160
  * @param obj | Array $post Get post.
161
  */
162
  public function save_local_product_input_fields_on_product_edit( $post_id, $post ) {
 
163
  // Check that we are saving with input fields displayed.
164
- if ( ! isset( $_POST['woojetpack_product_input_fields_save_post'] ) ) {
165
  return;
166
  }
167
  // Save values.
168
  $default_total_input_fields = apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_product_input_fields_local_total_number_default', 1 ) );
169
  $total_input_fields_before_saving = apply_filters( 'booster_option', 1, $this->get_value( 'wcj_product_input_fields_local_total_number', $post_id, 1 ) );
170
- $total_input_fields_before_saving = ( '' != $total_input_fields_before_saving ) ? $total_input_fields_before_saving : $default_total_input_fields;
171
  $options = $this->get_options();
172
  $values = array();
173
  $values['local_total_number'] = isset( $_POST['wcj_product_input_fields_local_total_number'] ) ?
174
- $_POST['wcj_product_input_fields_local_total_number'] : $default_total_input_fields;
175
  for ( $i = 1; $i <= $total_input_fields_before_saving; $i++ ) {
176
  foreach ( $options as $option ) {
177
  $option_name = str_replace( 'wcj_product_input_fields_', '', $option['id'] . $i );
178
  if ( isset( $_POST[ $option['id'] . $i ] ) ) {
179
- $values[ $option_name ] = $_POST[ $option['id'] . $i ];
180
  } elseif ( 'checkbox' === $option['type'] ) {
181
  $values[ $option_name ] = 'off';
182
  }
@@ -458,7 +459,7 @@ if ( ! class_exists( 'WCJ_Product_Input_Fields_Core' ) ) :
458
  /**
459
  * Get_value.
460
  *
461
- * @version 3.5.0
462
  * @todo `wcj_get_product_input_field_value()` is almost identical
463
  * @param string $option_name Get option name.
464
  * @param int $product_id Get product id.
@@ -469,7 +470,7 @@ if ( ! class_exists( 'WCJ_Product_Input_Fields_Core' ) ) :
469
  return wcj_get_option( $option_name, $default );
470
  } else { // local.
471
  $options = get_post_meta( $product_id, '_wcj_product_input_fields', true );
472
- if ( '' != ( $options ) ) {
473
  $option_name = str_replace( 'wcj_product_input_fields_', '', $option_name );
474
  return ( isset( $options[ $option_name ] ) ? $options[ $option_name ] : $default );
475
  } else { // Booster version < 3.5.0.
@@ -481,11 +482,18 @@ if ( ! class_exists( 'WCJ_Product_Input_Fields_Core' ) ) :
481
  /**
482
  * Validate_product_input_fields_on_add_to_cart.
483
  *
484
- * @version 3.1.0
485
  * @param bool $passed define passed value.
486
  * @param int $product_id Get product id.
487
  */
488
  public function validate_product_input_fields_on_add_to_cart( $passed, $product_id ) {
 
 
 
 
 
 
 
489
  $total_number = apply_filters( 'booster_option', 1, $this->get_value( 'wcj_product_input_fields_' . $this->scope . '_total_number', $product_id, 1 ) );
490
  for ( $i = 1; $i <= $total_number; $i++ ) {
491
 
@@ -510,20 +518,20 @@ if ( ! class_exists( 'WCJ_Product_Input_Fields_Core' ) ) :
510
  $field_value = '';
511
  }
512
  }
513
- if ( '' == $field_value ) {
514
  $passed = false;
515
  wc_add_notice( $this->get_value( 'wcj_product_input_fields_required_message_' . $this->scope . '_' . $i, $product_id, '' ), 'error' );
516
  }
517
  }
518
 
519
- if ( 'file' === $type && isset( $_FILES[ $field_name ] ) && '' != $_FILES[ $field_name ]['name'] ) {
520
  // Validate file type.
521
  $file_accept = $this->get_value( 'wcj_product_input_fields_type_file_accept_' . $this->scope . '_' . $i, $product_id, '' );
522
- if ( '' != ( $file_accept ) ) {
523
  $file_accept = explode( ',', $file_accept );
524
  if ( is_array( $file_accept ) && ! empty( $file_accept ) ) {
525
  $file_type = '.' . pathinfo( sanitize_text_field( wp_unslash( $_FILES[ $field_name ]['name'] ) ), PATHINFO_EXTENSION );
526
- if ( ! in_array( $file_type, $file_accept ) ) {
527
  $passed = false;
528
  wc_add_notice( __( 'Wrong file type!', 'woocommerce-jetpack' ), 'error' );
529
  }
@@ -532,7 +540,7 @@ if ( ! class_exists( 'WCJ_Product_Input_Fields_Core' ) ) :
532
  // Validate file max size.
533
  $max_file_size = $this->get_value( 'wcj_product_input_fields_type_file_max_size_' . $this->scope . '_' . $i, $product_id, '' );
534
  if ( $max_file_size > 0 ) {
535
- if ( sanitize_text_field( wp_unslash( $_FILES[ $field_name ]['size'] ) ) > $max_file_size ) {
536
  $passed = false;
537
  wc_add_notice( __( 'File is too big!', 'woocommerce-jetpack' ), 'error' );
538
  }
@@ -592,7 +600,7 @@ if ( ! class_exists( 'WCJ_Product_Input_Fields_Core' ) ) :
592
  /**
593
  * Add_product_input_fields_to_frontend.
594
  *
595
- * @version 3.9.1
596
  * @todo `$set_value` - add "default" option for all other types except checkbox
597
  * @todo `$set_value` - 'file' type
598
  * @todo add `required` attributes
@@ -605,6 +613,13 @@ if ( ! class_exists( 'WCJ_Product_Input_Fields_Core' ) ) :
605
  if ( ! $product ) {
606
  return;
607
  }
 
 
 
 
 
 
 
608
  $_product_id = wcj_get_product_id_or_variation_parent_id( $product );
609
  $this->maybe_update_local_input_fields( $_product_id );
610
  $fields = array();
@@ -719,13 +734,13 @@ if ( ! class_exists( 'WCJ_Product_Input_Fields_Core' ) ) :
719
  case 'select':
720
  $select_options_raw = $this->get_value( 'wcj_product_input_fields_type_select_options_' . $this->scope . '_' . $i, $_product_id, '' );
721
  $select_options = wcj_get_select_options( $select_options_raw, false );
722
- if ( '' != $placeholder ) {
723
  $select_options = array_replace( array( '' => $placeholder ), $select_options );
724
  }
725
  $select_options_html = '';
726
  if ( ! empty( $select_options ) ) {
727
  reset( $select_options );
728
- $value = ( '' != $set_value ? $set_value : key( $select_options ) );
729
  foreach ( $select_options as $select_option_key => $select_option_title ) {
730
  $select_options_html .= '<option value="' . $select_option_key . '" ' . selected( $value, $select_option_key, false ) . '>';
731
  $select_options_html .= $select_option_title;
@@ -761,12 +776,12 @@ if ( ! class_exists( 'WCJ_Product_Input_Fields_Core' ) ) :
761
 
762
  case 'country':
763
  $countries = WC()->countries->get_allowed_countries();
764
- if ( sizeof( $countries ) > 1 ) {
765
- $value = ( '' != $set_value ? $set_value : key( $countries ) );
766
  $field = '<select name="' . $field_name . '" id="' . $field_name . '" class="country_to_state country_select wcj_product_input_fields' . $class . '">' .
767
  '<option value="">' . __( 'Select a country&hellip;', 'woocommerce' ) . '</option>';
768
  foreach ( $countries as $ckey => $cvalue ) {
769
- $field .= '<option value="' . esc_attr( $ckey ) . '" ' . selected( $value, $ckey, false ) . '>' . __( $cvalue, 'woocommerce' ) . '</option>';
770
  }
771
  $field .= '</select>';
772
  $html = $field;
@@ -780,7 +795,7 @@ if ( ! class_exists( 'WCJ_Product_Input_Fields_Core' ) ) :
780
  get_option( 'wcj_product_input_fields_field_template', '<p><label for="%field_id%">%field_title%</label> %field_html%</p>' )
781
  );
782
  $field_order = $this->get_value( 'wcj_product_input_fields_order_' . $this->scope . '_' . $i, $_product_id, 0 );
783
- if ( 0 == ( $field_order ) ) {
784
  $field_order = $i;
785
  }
786
  $fields[ $field_order ] = apply_filters(
@@ -801,7 +816,7 @@ if ( ! class_exists( 'WCJ_Product_Input_Fields_Core' ) ) :
801
  }
802
  ksort( $fields );
803
  if ( ! empty( $fields ) ) {
804
- echo wcj_get_option( 'wcj_product_input_fields_start_template', '' ) . wp_kses_post( implode( $fields ) ) . wcj_get_option( 'wcj_product_input_fields_end_template', '' );
805
  $this->are_product_input_fields_displayed = true;
806
  }
807
  }
@@ -811,12 +826,19 @@ if ( ! class_exists( 'WCJ_Product_Input_Fields_Core' ) ) :
811
  *
812
  * From `$_POST` to `$cart_item_data`
813
  *
814
- * @version 3.9.1
815
  * @param Array $cart_item_data Get cart items.
816
  * @param int $product_id Get product id.
817
  * @param int $variation_id Get variation id.
818
  */
819
  public function add_product_input_fields_to_cart_item_data( $cart_item_data, $product_id, $variation_id ) {
 
 
 
 
 
 
 
820
  $total_number = apply_filters( 'booster_option', 1, $this->get_value( 'wcj_product_input_fields_' . $this->scope . '_total_number', $product_id, 1 ) );
821
  for ( $i = 1; $i <= $total_number; $i++ ) {
822
  if ( ! $this->is_enabled( $i, $product_id ) ) {
@@ -826,7 +848,7 @@ if ( ! class_exists( 'WCJ_Product_Input_Fields_Core' ) ) :
826
  $value_name = 'wcj_product_input_fields_' . $this->scope . '_' . $i;
827
  if ( 'file' === $type ) {
828
  if ( isset( $_FILES[ $value_name ] ) ) {
829
- $cart_item_data[ $value_name ] = sanitize_text_field( wp_unslash( $_FILES[ $value_name ] ) );
830
  $tmp_dest_file = tempnam( sys_get_temp_dir(), 'wcj' );
831
  move_uploaded_file( $cart_item_data[ $value_name ]['tmp_name'], $tmp_dest_file );
832
  $cart_item_data[ $value_name ]['tmp_name'] = $tmp_dest_file;
@@ -903,7 +925,7 @@ if ( ! class_exists( 'WCJ_Product_Input_Fields_Core' ) ) :
903
  $value = maybe_unserialize( $value );
904
  $value = ( isset( $value['name'] ) ) ? $value['name'] : '';
905
  }
906
- if ( '' != $value && is_string( $value ) ) {
907
  $name .= str_replace( array( '%title%', '%value%' ), array( $title, $value ), $item_template );
908
  }
909
  }
@@ -1006,7 +1028,7 @@ if ( ! class_exists( 'WCJ_Product_Input_Fields_Core' ) ) :
1006
  /**
1007
  * Add_input_fields_to_order_item_meta.
1008
  *
1009
- * @version 4.2.0
1010
  * @since 3.4.0
1011
  * @param Array $item Get items.
1012
  * @param int $item_id Get item id.
@@ -1031,8 +1053,8 @@ if ( ! class_exists( 'WCJ_Product_Input_Fields_Core' ) ) :
1031
  mkdir( $upload_dir, 0755, true );
1032
  }
1033
  $upload_dir_and_name = $upload_dir . '/' . $name;
1034
- $file_data = file_get_contents( $tmp_name );
1035
- file_put_contents( $upload_dir_and_name, $file_data );
1036
  unlink( $tmp_name );
1037
  $input_field_value['tmp_name'] = addslashes( $upload_dir_and_name );
1038
  $input_field_value['wcj_type'] = 'file';
2
  /**
3
  * Booster for WooCommerce - Product Input Fields - Core
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
155
  /**
156
  * Save product input fields on Product Edit.
157
  *
158
+ * @version 5.6.2
159
  * @param int $post_id Get post ID.
160
  * @param obj | Array $post Get post.
161
  */
162
  public function save_local_product_input_fields_on_product_edit( $post_id, $post ) {
163
+ $wpnonce = wp_verify_nonce( wp_unslash( isset( $_POST['woocommerce_meta_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['woocommerce_meta_nonce'] ) ) : '' ), 'woocommerce_save_data' );
164
  // Check that we are saving with input fields displayed.
165
+ if ( ! $wpnonce || ! isset( $_POST['woojetpack_product_input_fields_save_post'] ) ) {
166
  return;
167
  }
168
  // Save values.
169
  $default_total_input_fields = apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_product_input_fields_local_total_number_default', 1 ) );
170
  $total_input_fields_before_saving = apply_filters( 'booster_option', 1, $this->get_value( 'wcj_product_input_fields_local_total_number', $post_id, 1 ) );
171
+ $total_input_fields_before_saving = ( '' !== $total_input_fields_before_saving ) ? $total_input_fields_before_saving : $default_total_input_fields;
172
  $options = $this->get_options();
173
  $values = array();
174
  $values['local_total_number'] = isset( $_POST['wcj_product_input_fields_local_total_number'] ) ?
175
+ sanitize_text_field( wp_unslash( $_POST['wcj_product_input_fields_local_total_number'] ) ) : $default_total_input_fields;
176
  for ( $i = 1; $i <= $total_input_fields_before_saving; $i++ ) {
177
  foreach ( $options as $option ) {
178
  $option_name = str_replace( 'wcj_product_input_fields_', '', $option['id'] . $i );
179
  if ( isset( $_POST[ $option['id'] . $i ] ) ) {
180
+ $values[ $option_name ] = isset( $_POST[ $option['id'] . $i ] ) ? sanitize_text_field( wp_unslash( $_POST[ $option['id'] . $i ] ) ) : '';
181
  } elseif ( 'checkbox' === $option['type'] ) {
182
  $values[ $option_name ] = 'off';
183
  }
459
  /**
460
  * Get_value.
461
  *
462
+ * @version 5.6.2
463
  * @todo `wcj_get_product_input_field_value()` is almost identical
464
  * @param string $option_name Get option name.
465
  * @param int $product_id Get product id.
470
  return wcj_get_option( $option_name, $default );
471
  } else { // local.
472
  $options = get_post_meta( $product_id, '_wcj_product_input_fields', true );
473
+ if ( '' !== ( $options ) ) {
474
  $option_name = str_replace( 'wcj_product_input_fields_', '', $option_name );
475
  return ( isset( $options[ $option_name ] ) ? $options[ $option_name ] : $default );
476
  } else { // Booster version < 3.5.0.
482
  /**
483
  * Validate_product_input_fields_on_add_to_cart.
484
  *
485
+ * @version 5.6.2
486
  * @param bool $passed define passed value.
487
  * @param int $product_id Get product id.
488
  */
489
  public function validate_product_input_fields_on_add_to_cart( $passed, $product_id ) {
490
+ $wpnonce = true;
491
+ if ( function_exists( 'wp_verify_nonce' ) ) {
492
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
493
+ }
494
+ if ( ! $wpnonce ) {
495
+ return $passed;
496
+ }
497
  $total_number = apply_filters( 'booster_option', 1, $this->get_value( 'wcj_product_input_fields_' . $this->scope . '_total_number', $product_id, 1 ) );
498
  for ( $i = 1; $i <= $total_number; $i++ ) {
499
 
518
  $field_value = '';
519
  }
520
  }
521
+ if ( '' === $field_value ) {
522
  $passed = false;
523
  wc_add_notice( $this->get_value( 'wcj_product_input_fields_required_message_' . $this->scope . '_' . $i, $product_id, '' ), 'error' );
524
  }
525
  }
526
 
527
+ if ( 'file' === $type && isset( $_FILES[ $field_name ] ) && '' !== $_FILES[ $field_name ]['name'] ) {
528
  // Validate file type.
529
  $file_accept = $this->get_value( 'wcj_product_input_fields_type_file_accept_' . $this->scope . '_' . $i, $product_id, '' );
530
+ if ( '' !== ( $file_accept ) ) {
531
  $file_accept = explode( ',', $file_accept );
532
  if ( is_array( $file_accept ) && ! empty( $file_accept ) ) {
533
  $file_type = '.' . pathinfo( sanitize_text_field( wp_unslash( $_FILES[ $field_name ]['name'] ) ), PATHINFO_EXTENSION );
534
+ if ( ! in_array( $file_type, $file_accept, true ) ) {
535
  $passed = false;
536
  wc_add_notice( __( 'Wrong file type!', 'woocommerce-jetpack' ), 'error' );
537
  }
540
  // Validate file max size.
541
  $max_file_size = $this->get_value( 'wcj_product_input_fields_type_file_max_size_' . $this->scope . '_' . $i, $product_id, '' );
542
  if ( $max_file_size > 0 ) {
543
+ if ( isset( $_FILES[ $field_name ]['size'] ) && sanitize_text_field( wp_unslash( $_FILES[ $field_name ]['size'] ) ) > $max_file_size ) {
544
  $passed = false;
545
  wc_add_notice( __( 'File is too big!', 'woocommerce-jetpack' ), 'error' );
546
  }
600
  /**
601
  * Add_product_input_fields_to_frontend.
602
  *
603
+ * @version 5.6.2
604
  * @todo `$set_value` - add "default" option for all other types except checkbox
605
  * @todo `$set_value` - 'file' type
606
  * @todo add `required` attributes
613
  if ( ! $product ) {
614
  return;
615
  }
616
+ $wpnonce = true;
617
+ if ( function_exists( 'wp_verify_nonce' ) ) {
618
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
619
+ }
620
+ if ( ! $wpnonce ) {
621
+ return;
622
+ }
623
  $_product_id = wcj_get_product_id_or_variation_parent_id( $product );
624
  $this->maybe_update_local_input_fields( $_product_id );
625
  $fields = array();
734
  case 'select':
735
  $select_options_raw = $this->get_value( 'wcj_product_input_fields_type_select_options_' . $this->scope . '_' . $i, $_product_id, '' );
736
  $select_options = wcj_get_select_options( $select_options_raw, false );
737
+ if ( '' !== $placeholder ) {
738
  $select_options = array_replace( array( '' => $placeholder ), $select_options );
739
  }
740
  $select_options_html = '';
741
  if ( ! empty( $select_options ) ) {
742
  reset( $select_options );
743
+ $value = ( '' !== $set_value ? $set_value : key( $select_options ) );
744
  foreach ( $select_options as $select_option_key => $select_option_title ) {
745
  $select_options_html .= '<option value="' . $select_option_key . '" ' . selected( $value, $select_option_key, false ) . '>';
746
  $select_options_html .= $select_option_title;
776
 
777
  case 'country':
778
  $countries = WC()->countries->get_allowed_countries();
779
+ if ( count( $countries ) > 1 ) {
780
+ $value = ( '' !== $set_value ? $set_value : key( $countries ) );
781
  $field = '<select name="' . $field_name . '" id="' . $field_name . '" class="country_to_state country_select wcj_product_input_fields' . $class . '">' .
782
  '<option value="">' . __( 'Select a country&hellip;', 'woocommerce' ) . '</option>';
783
  foreach ( $countries as $ckey => $cvalue ) {
784
+ $field .= '<option value="' . esc_attr( $ckey ) . '" ' . selected( $value, $ckey, false ) . '>' . __( $cvalue, 'woocommerce' ) . '</option>'; //phpcs:ignore
785
  }
786
  $field .= '</select>';
787
  $html = $field;
795
  get_option( 'wcj_product_input_fields_field_template', '<p><label for="%field_id%">%field_title%</label> %field_html%</p>' )
796
  );
797
  $field_order = $this->get_value( 'wcj_product_input_fields_order_' . $this->scope . '_' . $i, $_product_id, 0 );
798
+ if ( '0' === (string) $field_order ) {
799
  $field_order = $i;
800
  }
801
  $fields[ $field_order ] = apply_filters(
816
  }
817
  ksort( $fields );
818
  if ( ! empty( $fields ) ) {
819
+ echo wcj_get_option( 'wcj_product_input_fields_start_template', '' ) . wp_kses_post( implode( $fields ) ) . wcj_get_option( 'wcj_product_input_fields_end_template', '' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
820
  $this->are_product_input_fields_displayed = true;
821
  }
822
  }
826
  *
827
  * From `$_POST` to `$cart_item_data`
828
  *
829
+ * @version 5.6.2
830
  * @param Array $cart_item_data Get cart items.
831
  * @param int $product_id Get product id.
832
  * @param int $variation_id Get variation id.
833
  */
834
  public function add_product_input_fields_to_cart_item_data( $cart_item_data, $product_id, $variation_id ) {
835
+ $wpnonce = true;
836
+ if ( function_exists( 'wp_verify_nonce' ) ) {
837
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
838
+ }
839
+ if ( ! $wpnonce ) {
840
+ return $cart_item_data;
841
+ }
842
  $total_number = apply_filters( 'booster_option', 1, $this->get_value( 'wcj_product_input_fields_' . $this->scope . '_total_number', $product_id, 1 ) );
843
  for ( $i = 1; $i <= $total_number; $i++ ) {
844
  if ( ! $this->is_enabled( $i, $product_id ) ) {
848
  $value_name = 'wcj_product_input_fields_' . $this->scope . '_' . $i;
849
  if ( 'file' === $type ) {
850
  if ( isset( $_FILES[ $value_name ] ) ) {
851
+ $cart_item_data[ $value_name ] = array_map( 'sanitize_text_field', wp_unslash( $_FILES[ $value_name ] ) );
852
  $tmp_dest_file = tempnam( sys_get_temp_dir(), 'wcj' );
853
  move_uploaded_file( $cart_item_data[ $value_name ]['tmp_name'], $tmp_dest_file );
854
  $cart_item_data[ $value_name ]['tmp_name'] = $tmp_dest_file;
925
  $value = maybe_unserialize( $value );
926
  $value = ( isset( $value['name'] ) ) ? $value['name'] : '';
927
  }
928
+ if ( '' !== $value && is_string( $value ) ) {
929
  $name .= str_replace( array( '%title%', '%value%' ), array( $title, $value ), $item_template );
930
  }
931
  }
1028
  /**
1029
  * Add_input_fields_to_order_item_meta.
1030
  *
1031
+ * @version 5.6.2
1032
  * @since 3.4.0
1033
  * @param Array $item Get items.
1034
  * @param int $item_id Get item id.
1053
  mkdir( $upload_dir, 0755, true );
1054
  }
1055
  $upload_dir_and_name = $upload_dir . '/' . $name;
1056
+ $file_data = file_get_contents( $tmp_name ); //phpcs:ignore
1057
+ file_put_contents( $upload_dir_and_name, $file_data ); //phpcs:ignore
1058
  unlink( $tmp_name );
1059
  $input_field_value['tmp_name'] = addslashes( $upload_dir_and_name );
1060
  $input_field_value['wcj_type'] = 'file';
includes/js/admin-script.js CHANGED
@@ -1,7 +1,15 @@
 
 
 
 
 
 
 
 
1
  var acc = document.getElementsByClassName( "wcj-accordion" );
2
  var i;
3
-
4
- for (i = 0; i < acc.length; i++) {
5
  acc[i].addEventListener(
6
  "click",
7
  function() {
1
+ /**
2
+ * Admin-script.
3
+ *
4
+ * @version 5.6.2
5
+ *
6
+ * @package Booster_For_WooCommerce/includes/JS
7
+ */
8
+
9
  var acc = document.getElementsByClassName( "wcj-accordion" );
10
  var i;
11
+ var acc_length = acc.length;
12
+ for (i = 0; i < acc_length; i++) {
13
  acc[i].addEventListener(
14
  "click",
15
  function() {
includes/js/wcj-admin.js CHANGED
@@ -1,8 +1,9 @@
1
  /**
2
- * wcj-admin.
3
  *
4
- * @version 5.5.0
5
  * @since 5.4.2
 
6
  */
7
 
8
  jQuery( document ).ready(
@@ -10,13 +11,11 @@ jQuery( document ).ready(
10
  /* Quick Links Footer - Popup */
11
  let circleBadge = document.querySelector( '.circle-badge' ),
12
  subCircles = document.querySelectorAll( '.subCircles > div' );
13
- if (null !== circleBadge) { // ADDED THIS
14
  circleBadge.addEventListener( 'click', showCircles );
15
  function showCircles() {
16
  subCircles.forEach(
17
- circle => {
18
- circle.classList.toggle( "show" );
19
- }
20
  )
21
  };
22
  }
@@ -51,9 +50,9 @@ jQuery( document ).ready(
51
  function (response) {
52
  if (response.success === true) {
53
  if (response.data.is_subscribed === false && response.data.email !== "" ) {
54
- msgId = 1; // Subscribe to the List
55
  } else if (response.data.is_subscribed === true) {
56
- msgId = 2; // Email already subscribed
57
  }
58
  }
59
  window.location = redirectUrl + msgId + "#subscribe-email";
1
  /**
2
+ * Wcj-admin.
3
  *
4
+ * @version 5.6.2
5
  * @since 5.4.2
6
+ * @package Booster_For_WooCommerce/includes/JS
7
  */
8
 
9
  jQuery( document ).ready(
11
  /* Quick Links Footer - Popup */
12
  let circleBadge = document.querySelector( '.circle-badge' ),
13
  subCircles = document.querySelectorAll( '.subCircles > div' );
14
+ if (null !== circleBadge) { // ADDED THIS.
15
  circleBadge.addEventListener( 'click', showCircles );
16
  function showCircles() {
17
  subCircles.forEach(
18
+ circle => { circle.classList.toggle( "show" ); }
 
 
19
  )
20
  };
21
  }
50
  function (response) {
51
  if (response.success === true) {
52
  if (response.data.is_subscribed === false && response.data.email !== "" ) {
53
+ msgId = 1; // Subscribe to the List.
54
  } else if (response.data.is_subscribed === true) {
55
+ msgId = 2; // Email already subscribed.
56
  }
57
  }
58
  window.location = redirectUrl + msgId + "#subscribe-email";
includes/js/wcj-ajax-exchange-rates-average.js CHANGED
@@ -1,9 +1,12 @@
1
  /**
2
- * wcj-ajax-exchange-rates-average.js
3
  *
4
- * @version 3.2.2
5
  * @since 3.2.2
 
 
6
  */
 
7
  jQuery( document ).ready(
8
  function() {
9
  jQuery( ".wcj_grab_average_currency_exchange_rate" ).click(
1
  /**
2
+ * Wcj-ajax-exchange-rates-average.js
3
  *
4
+ * @version 5.6.2
5
  * @since 3.2.2
6
+ *
7
+ * @package Booster_For_WooCommerce/includes/JS
8
  */
9
+
10
  jQuery( document ).ready(
11
  function() {
12
  jQuery( ".wcj_grab_average_currency_exchange_rate" ).click(
includes/js/wcj-ajax-exchange-rates.js CHANGED
@@ -1,8 +1,10 @@
1
  /**
2
- * wcj-ajax-exchange-rates.js
3
  *
4
- * @version 5.3.6
 
5
  */
 
6
  jQuery( document ).ready(
7
  function() {
8
  jQuery( ".exchage_rate_button" ).click(
1
  /**
2
+ * Wcj-ajax-exchange-rates.js
3
  *
4
+ * @version 5.6.2
5
+ * @package Booster_For_WooCommerce/includes/JS
6
  */
7
+
8
  jQuery( document ).ready(
9
  function() {
10
  jQuery( ".exchage_rate_button" ).click(
includes/js/wcj-bookings.js CHANGED
@@ -1,8 +1,10 @@
1
  /**
2
- * wcj-bookings.
3
  *
4
- * version 4.3.0
5
- * since 2.5.0
 
 
6
  */
7
 
8
  var _ajax_object = ajax_object;
1
  /**
2
+ * Wcj-bookings.
3
  *
4
+ * @version 5.6.2
5
+ * @since 2.5.0
6
+ *
7
+ * @package Booster_For_WooCommerce/includes/JS
8
  */
9
 
10
  var _ajax_object = ajax_object;
includes/js/wcj-cart-customization.js CHANGED
@@ -1,9 +1,11 @@
1
  /**
2
- * wcj-cart-customization.
3
  *
4
- * @version 2.8.0
5
  * @since 2.8.0
6
  * @todo (maybe) fix when cart is emptied (i.e. after products removed)
 
 
7
  */
8
 
9
  jQuery( document ).ready(
1
  /**
2
+ * Wcj-cart-customization.
3
  *
4
+ * @version 5.6.2
5
  * @since 2.8.0
6
  * @todo (maybe) fix when cart is emptied (i.e. after products removed)
7
+ *
8
+ * @package Booster_For_WooCommerce/includes/JS
9
  */
10
 
11
  jQuery( document ).ready(
includes/js/wcj-checkout-core-fields.js CHANGED
@@ -1,8 +1,9 @@
1
  /**
2
- * wcj-checkout-core-fields.
3
  *
4
- * @version 5.4.7
5
  * @since 5.4.7
 
6
  */
7
 
8
  jQuery( document ).ready(
1
  /**
2
+ * Wcj-checkout-core-fields.
3
  *
4
+ * @version 5.6.2
5
  * @since 5.4.7
6
+ * @package Booster_For_WooCommerce/includes/JS
7
  */
8
 
9
  jQuery( document ).ready(
includes/js/wcj-checkout-custom-fields.js CHANGED
@@ -1,8 +1,10 @@
1
  /**
2
- * wcj-checkout-custom-fields.
3
  *
4
- * @version 3.6.0
5
  * @since 3.2.0
 
 
6
  */
7
 
8
  jQuery( document ).ready(
1
  /**
2
+ * Wcj-checkout-custom-fields.
3
  *
4
+ * @version 5.6.2
5
  * @since 3.2.0
6
+ *
7
+ * @package Booster_For_WooCommerce/includes/JS
8
  */
9
 
10
  jQuery( document ).ready(
includes/js/wcj-checkout-fees.js CHANGED
@@ -1,8 +1,10 @@
1
  /**
2
- * wcj-checkout-fees.
3
  *
4
- * @version 3.8.0
5
  * @since 3.8.0
 
 
6
  */
7
 
8
  jQuery( 'body' ).on(
1
  /**
2
+ * Wcj-checkout-fees.
3
  *
4
+ * @version 5.6.2
5
  * @since 3.8.0
6
+ *
7
+ * @package Booster_For_WooCommerce/includes/JS
8
  */
9
 
10
  jQuery( 'body' ).on(
includes/js/wcj-checkout.js CHANGED
@@ -1,12 +1,15 @@
1
- /*
2
- * wcj-checkout.js
 
 
 
3
  */
4
 
5
  jQuery(
6
  function( $ ) {
7
- // Define that JavaScript code should be executed in "strict mode"
8
  "use strict";
9
- // Trigger WooCommerce's `update_checkout` function, when customer changes payment method
10
  $( 'body' ).on(
11
  'change',
12
  'input[name="payment_method"]',
1
+ /**
2
+ * Wcj-checkout.js
3
+ *
4
+ * @version 5.6.2
5
+ * @package Booster_For_WooCommerce/includes/JS
6
  */
7
 
8
  jQuery(
9
  function( $ ) {
10
+ // Define that JavaScript code should be executed in "strict mode".
11
  "use strict";
12
+ // Trigger WooCommerce's `update_checkout` function, when customer changes payment method.
13
  $( 'body' ).on(
14
  'change',
15
  'input[name="payment_method"]',
includes/js/wcj-coupons-code-generator.js CHANGED
@@ -1,8 +1,10 @@
1
  /**
2
- * wcj-coupons-code-generator.
3
  *
4
- * @version 3.1.3
5
  * @since 3.1.3
 
 
6
  */
7
 
8
  jQuery( document ).ready(
1
  /**
2
+ * Wcj-coupons-code-generator.
3
  *
4
+ * @version 5.6.2
5
  * @since 3.1.3
6
+ *
7
+ * @package Booster_For_WooCommerce/includes/JS
8
  */
9
 
10
  jQuery( document ).ready(
includes/js/wcj-custom-tabs-yoast-seo.js CHANGED
@@ -1,9 +1,11 @@
1
  /**
2
- * wcj-custom-tabs-yoast-seo.
3
  *
4
- * @version 3.2.4
5
  * @since 3.2.4
6
  * @see https://return-true.com/adding-content-to-yoast-seo-analysis-using-yoastseojs/
 
 
7
  */
8
 
9
  (function($) {
1
  /**
2
+ * Wcj-custom-tabs-yoast-seo.
3
  *
4
+ * @version 5.6.2
5
  * @since 3.2.4
6
  * @see https://return-true.com/adding-content-to-yoast-seo-analysis-using-yoastseojs/
7
+ *
8
+ * @package Booster_For_WooCommerce/includes/JS
9
  */
10
 
11
  (function($) {
includes/js/wcj-datepicker.js CHANGED
@@ -1,9 +1,10 @@
1
  /**
2
- * wcj-datepicker.
3
  *
4
- * @version 5.2.0
5
  * @todo maybe_exclude_dates: `date.getDate()`, `date.getFullYear()`
6
  * @see maybe_exclude_dates: https://stackoverflow.com/questions/501943/can-the-jquery-ui-datepicker-be-made-to-disable-saturdays-and-sundays-and-holid
 
7
  */
8
 
9
  jQuery( document ).ready(
@@ -12,7 +13,7 @@ jQuery( document ).ready(
12
  function () {
13
  var mindate = jQuery( this ).attr( "mindate" );
14
  if (mindate === 'zero') {
15
- mindate = 0;
16
  }
17
  var maxdate = jQuery( this ).attr( "maxdate" );
18
  if (maxdate === 'zero') {
@@ -32,8 +33,9 @@ jQuery( document ).ready(
32
  function maybe_exclude_dates(date){
33
  var exclude_days = jQuery( this ).attr( "excludedays" );
34
  if (typeof exclude_days !== typeof undefined && exclude_days !== false) {
35
- var day = date.getDay();
36
- for (var i = 0; i < exclude_days.length; i++) {
 
37
  if (day == exclude_days[i]) {
38
  return [false];
39
  }
@@ -41,8 +43,9 @@ jQuery( document ).ready(
41
  }
42
  var exclude_months = jQuery( this ).attr( "excludemonths" );
43
  if (typeof exclude_months !== typeof undefined && exclude_months !== false) {
44
- var month = date.getMonth() + 1;
45
- for (var i = 0; i < exclude_months.length; i++) {
 
46
  if (month == exclude_months[i]) {
47
  return [false];
48
  }
1
  /**
2
+ * Wcj-datepicker.
3
  *
4
+ * @version 5.6.2
5
  * @todo maybe_exclude_dates: `date.getDate()`, `date.getFullYear()`
6
  * @see maybe_exclude_dates: https://stackoverflow.com/questions/501943/can-the-jquery-ui-datepicker-be-made-to-disable-saturdays-and-sundays-and-holid
7
+ * @package Booster_For_WooCommerce/includes/JS
8
  */
9
 
10
  jQuery( document ).ready(
13
  function () {
14
  var mindate = jQuery( this ).attr( "mindate" );
15
  if (mindate === 'zero') {
16
+ mindate = 0;
17
  }
18
  var maxdate = jQuery( this ).attr( "maxdate" );
19
  if (maxdate === 'zero') {
33
  function maybe_exclude_dates(date){
34
  var exclude_days = jQuery( this ).attr( "excludedays" );
35
  if (typeof exclude_days !== typeof undefined && exclude_days !== false) {
36
+ var day = date.getDay();
37
+ var exclude_days_length = exclude_days.length;
38
+ for (var i = 0; i < exclude_days_length; i++) {
39
  if (day == exclude_days[i]) {
40
  return [false];
41
  }
43
  }
44
  var exclude_months = jQuery( this ).attr( "excludemonths" );
45
  if (typeof exclude_months !== typeof undefined && exclude_months !== false) {
46
+ var month = date.getMonth() + 1;
47
+ var exclude_months_length = exclude_months.length;
48
+ for (var i = 0; i < exclude_months_length; i++) {
49
  if (month == exclude_months[i]) {
50
  return [false];
51
  }
includes/js/wcj-disable-quantity.js CHANGED
@@ -1,9 +1,11 @@
1
  /**
2
- * wcj-disable-quantity.
3
  *
4
- * version 2.5.2
5
- * since 2.5.2
 
6
  */
 
7
  jQuery( document ).ready(
8
  function() {
9
  jQuery( "div.quantity input.qty" ).each(
1
  /**
2
+ * Wcj-disable-quantity.
3
  *
4
+ * @version 5.6.2
5
+ * @since 2.5.2
6
+ * @package Booster_For_WooCommerce/includes/JS
7
  */
8
+
9
  jQuery( document ).ready(
10
  function() {
11
  jQuery( "div.quantity input.qty" ).each(
includes/js/wcj-eu-vat-number.js CHANGED
@@ -1,7 +1,8 @@
1
  /**
2
- * eu-vat-number.
3
  *
4
- * @version 5.3.7
 
5
  */
6
 
7
  var _ajax_object = ajax_object;
@@ -9,22 +10,22 @@ var _ajax_object = ajax_object;
9
  jQuery(
10
  function ($) {
11
 
12
- // Setup before functions
13
- var inputTimer; // timer identifier
14
- var doneInputInterval = 1000; // time in ms
15
  var $vatInput = $( 'input[name="billing_eu_vat_number"]' );
16
  var $vatParagraph = $( 'p[id="billing_eu_vat_number_field"]' );
17
 
18
- // Add progress text
19
  if ('yes' == _ajax_object.add_progress_text) {
20
  $vatParagraph.append( '<div id="wcj_eu_vat_number_progress"></div>' );
21
  var $progressText = $( 'div[id="wcj_eu_vat_number_progress"]' );
22
  }
23
 
24
- // Initial validate
25
  validateVat();
26
 
27
- // On input, start the countdown
28
  $vatInput.on(
29
  'input',
30
  function () {
@@ -33,7 +34,7 @@ jQuery(
33
  }
34
  );
35
 
36
- // Validate VAT
37
  function validateVat() {
38
  $vatParagraph.removeClass( 'woocommerce-invalid' );
39
  $vatParagraph.removeClass( 'woocommerce-validated' );
@@ -42,7 +43,7 @@ jQuery(
42
  }
43
  var vatNumberToCheck = $vatInput.val();
44
  if ('' != vatNumberToCheck) {
45
- // Validating EU VAT Number through AJAX call
46
  if ('yes' == _ajax_object.add_progress_text) {
47
  $progressText.text( _ajax_object.progress_text_validating );
48
  }
@@ -77,22 +78,22 @@ jQuery(
77
  }
78
  );
79
  } else {
80
- // VAT input is empty
81
  if ('yes' == _ajax_object.add_progress_text) {
82
  $progressText.text( '' );
83
  }
84
  if ($vatParagraph.hasClass( 'validate-required' )) {
85
- // Required
86
  $vatParagraph.addClass( 'woocommerce-invalid' );
87
  } else {
88
- // Not required
89
  $vatParagraph.addClass( 'woocommerce-validated' );
90
  }
91
  $( 'body' ).trigger( 'update_checkout' );
92
  }
93
  };
94
 
95
- // Show VAT Field for EU countries only
96
  var vatFieldContainer = jQuery( '#billing_eu_vat_number_field' );
97
  var vatFieldWrapper = $vatInput.parent();
98
  var vatField = null;
1
  /**
2
+ * Wu-vat-number.
3
  *
4
+ * @version 5.6.2
5
+ * @package Booster_For_WooCommerce/includes/JS
6
  */
7
 
8
  var _ajax_object = ajax_object;
10
  jQuery(
11
  function ($) {
12
 
13
+ // Setup before functions.
14
+ var inputTimer; // timer identifier.
15
+ var doneInputInterval = 1000; // time in ms.
16
  var $vatInput = $( 'input[name="billing_eu_vat_number"]' );
17
  var $vatParagraph = $( 'p[id="billing_eu_vat_number_field"]' );
18
 
19
+ // Add progress text.
20
  if ('yes' == _ajax_object.add_progress_text) {
21
  $vatParagraph.append( '<div id="wcj_eu_vat_number_progress"></div>' );
22
  var $progressText = $( 'div[id="wcj_eu_vat_number_progress"]' );
23
  }
24
 
25
+ // Initial validate.
26
  validateVat();
27
 
28
+ // On input, start the countdown.
29
  $vatInput.on(
30
  'input',
31
  function () {
34
  }
35
  );
36
 
37
+ // Validate VAT.
38
  function validateVat() {
39
  $vatParagraph.removeClass( 'woocommerce-invalid' );
40
  $vatParagraph.removeClass( 'woocommerce-validated' );
43
  }
44
  var vatNumberToCheck = $vatInput.val();
45
  if ('' != vatNumberToCheck) {
46
+ // Validating EU VAT Number through AJAX call.
47
  if ('yes' == _ajax_object.add_progress_text) {
48
  $progressText.text( _ajax_object.progress_text_validating );
49
  }
78
  }
79
  );
80
  } else {
81
+ // VAT input is empty.
82
  if ('yes' == _ajax_object.add_progress_text) {
83
  $progressText.text( '' );
84
  }
85
  if ($vatParagraph.hasClass( 'validate-required' )) {
86
+ // Required.
87
  $vatParagraph.addClass( 'woocommerce-invalid' );
88
  } else {
89
+ // Not required.
90
  $vatParagraph.addClass( 'woocommerce-validated' );
91
  }
92
  $( 'body' ).trigger( 'update_checkout' );
93
  }
94
  };
95
 
96
+ // Show VAT Field for EU countries only.
97
  var vatFieldContainer = jQuery( '#billing_eu_vat_number_field' );
98
  var vatFieldWrapper = $vatInput.parent();
99
  var vatField = null;
includes/js/wcj-new_desing.js CHANGED
@@ -1,9 +1,10 @@
1
  /**
2
- * wcj-admin.
3
  *
4
- * @version 5.4.9
5
  * @since 5.4.2
6
- */
 
7
 
8
  jQuery( document ).ready(
9
  function () {
@@ -14,9 +15,7 @@ jQuery( document ).ready(
14
 
15
  function showCircles() {
16
  subCircles.forEach(
17
- circle => {
18
- circle.classList.toggle( "show" );
19
- }
20
  )
21
  };
22
  }
1
  /**
2
+ * Wcj-New Design.
3
  *
4
+ * @version 5.6.2
5
  * @since 5.4.2
6
+ * @package Booster_For_WooCommerce/includes/JS
7
+ **/
8
 
9
  jQuery( document ).ready(
10
  function () {
15
 
16
  function showCircles() {
17
  subCircles.forEach(
18
+ circle => {circle.classList.toggle( "show" );}
 
 
19
  )
20
  };
21
  }
includes/js/wcj-offer-price.js CHANGED
@@ -1,19 +1,20 @@
1
  /**
2
- * wcj-offer-price.
3
  *
4
- * @version 2.9.0
5
  * @since 2.9.0
 
6
  */
7
 
8
- // Get the modal
9
  var modal = jQuery( '#wcj-offer-price-modal' );
10
 
11
- // When the user clicks on the button, fill in values and open the modal
12
  jQuery( '.wcj-offer-price-button' ).click(
13
  function(){
14
- // Get data
15
  var wcj_data = jQuery.parseJSON( jQuery( this ).attr( 'wcj_data' ) );
16
- // Fill in price input
17
  var price_input = jQuery( '#wcj-offer-price-price' );
18
  price_input.attr( 'step',wcj_data['price_step'] );
19
  price_input.attr( 'min',wcj_data['min_price'] );
@@ -24,23 +25,23 @@ jQuery( '.wcj-offer-price-button' ).click(
24
  price_input.val( wcj_data['default_price'] );
25
  }
26
  jQuery( '#wcj-offer-price-price-label' ).html( wcj_data['price_label'] );
27
- // Fill in form header
28
  jQuery( '#wcj-offer-form-header' ).html( wcj_data['form_header'] );
29
- // Product ID (hidden input)
30
  jQuery( '#wcj-offer-price-product-id' ).val( wcj_data['product_id'] );
31
- // Show the form
32
  modal.css( 'display','block' );
33
  }
34
  );
35
 
36
- // When the user clicks on <span> (x), close the modal
37
  jQuery( '.wcj-offer-price-form-close' ).first().click(
38
  function(){
39
  modal.css( 'display','none' );
40
  }
41
  );
42
 
43
- // When the user clicks anywhere outside of the modal, close it
44
  jQuery( window ).click(
45
  function(e){
46
  if (modal.is( e.target )) {
@@ -49,10 +50,10 @@ jQuery( window ).click(
49
  }
50
  );
51
 
52
- // When the user presses ESC, close the modal
53
  jQuery( document ).keyup(
54
  function(e){
55
- if (27 === e.keyCode) { // esc
56
  modal.css( 'display','none' );
57
  }
58
  }
1
  /**
2
+ * Wcj-offer-price.
3
  *
4
+ * @version 5.6.2
5
  * @since 2.9.0
6
+ * @package Booster_For_WooCommerce/includes/JS
7
  */
8
 
9
+ // Get the modal.
10
  var modal = jQuery( '#wcj-offer-price-modal' );
11
 
12
+ // When the user clicks on the button, fill in values and open the modal.
13
  jQuery( '.wcj-offer-price-button' ).click(
14
  function(){
15
+ // Get data.
16
  var wcj_data = jQuery.parseJSON( jQuery( this ).attr( 'wcj_data' ) );
17
+ // Fill in price input.
18
  var price_input = jQuery( '#wcj-offer-price-price' );
19
  price_input.attr( 'step',wcj_data['price_step'] );
20
  price_input.attr( 'min',wcj_data['min_price'] );
25
  price_input.val( wcj_data['default_price'] );
26
  }
27
  jQuery( '#wcj-offer-price-price-label' ).html( wcj_data['price_label'] );
28
+ // Fill in form header.
29
  jQuery( '#wcj-offer-form-header' ).html( wcj_data['form_header'] );
30
+ // Product ID (hidden input).
31
  jQuery( '#wcj-offer-price-product-id' ).val( wcj_data['product_id'] );
32
+ // Show the form.
33
  modal.css( 'display','block' );
34
  }
35
  );
36
 
37
+ // When the user clicks on <span> (x), close the modal.
38
  jQuery( '.wcj-offer-price-form-close' ).first().click(
39
  function(){
40
  modal.css( 'display','none' );
41
  }
42
  );
43
 
44
+ // When the user clicks anywhere outside of the modal, close it.
45
  jQuery( window ).click(
46
  function(e){
47
  if (modal.is( e.target )) {
50
  }
51
  );
52
 
53
+ // When the user presses ESC, close the modal.
54
  jQuery( document ).keyup(
55
  function(e){
56
+ if (27 === e.keyCode) { // esc.
57
  modal.css( 'display','none' );
58
  }
59
  }
includes/js/wcj-order-quantities.js CHANGED
@@ -1,11 +1,14 @@
1
  /**
2
- * wcj-order-quantities.js
3
  *
4
- * @version 4.2.0
5
- * @since 3.2.2
6
- * @todo [dev] maybe `jQuery('[name=quantity]').val('0')` on `jQuery.isEmptyObject(product_quantities[variation_id])` (instead of `return`)
7
  */
8
 
 
 
 
9
  function check_qty(){
10
  var variation_id = jQuery( '[name=variation_id]' ).val();
11
  if (0 == variation_id) {
@@ -27,7 +30,9 @@ function check_qty(){
27
  jQuery( '[name=quantity]' ).val( product_quantities[variation_id]['max_qty'] );
28
  }
29
  }
30
-
 
 
31
  function check_qty_no_reset(){
32
  var variation_id = jQuery( '[name=variation_id]' ).val();
33
  if (0 == variation_id) {
1
  /**
2
+ * Wcj-order-quantities.js
3
  *
4
+ * @version 5.6.2
5
+ *
6
+ * @package Booster_For_WooCommerce/includes/JS
7
  */
8
 
9
+ /**
10
+ * Check_qty
11
+ */
12
  function check_qty(){
13
  var variation_id = jQuery( '[name=variation_id]' ).val();
14
  if (0 == variation_id) {
30
  jQuery( '[name=quantity]' ).val( product_quantities[variation_id]['max_qty'] );
31
  }
32
  }
33
+ /**
34
+ * Check_qty_no_reset
35
+ */
36
  function check_qty_no_reset(){
37
  var variation_id = jQuery( '[name=variation_id]' ).val();
38
  if (0 == variation_id) {
includes/js/wcj-pdf-invoicing.js CHANGED
@@ -1,9 +1,11 @@
1
  /**
2
- * wcj-pdf-invoicing.
3
  *
4
- * version 2.5.2
5
- * since 2.5.2
 
6
  */
 
7
  jQuery( document ).ready(
8
  function() {
9
  jQuery( 'a.wcj_need_confirmation' ).click(
1
  /**
2
+ * Wcj-pdf-invoicing.
3
  *
4
+ * @version 5.6.2
5
+ * @since 2.5.2
6
+ * @package Booster_For_WooCommerce/includes/JS
7
  */
8
+
9
  jQuery( document ).ready(
10
  function() {
11
  jQuery( 'a.wcj_need_confirmation' ).click(
includes/js/wcj-price-by-user-role-admin.js CHANGED
@@ -1,8 +1,10 @@
1
  /**
2
- * wcj-price-by-user-role-admin.js
3
  *
4
- * @version 3.6.0
5
  * @since 3.6.0
 
 
6
  */
7
 
8
  jQuery( document ).ready(
1
  /**
2
+ * Wcj-price-by-user-role-admin.js
3
  *
4
+ * @version 5.6.2
5
  * @since 3.6.0
6
+ *
7
+ * @package Booster_For_WooCommerce/includes/JS
8
  */
9
 
10
  jQuery( document ).ready(
includes/js/wcj-product-addons.js CHANGED
@@ -1,10 +1,11 @@
1
  /**
2
- * wcj-product-addons.
3
  *
4
- * @version 5.5.6
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
 
8
  */
9
 
10
  var _ajax_object = ajax_object;
@@ -36,7 +37,7 @@ function change_price() {
36
  jQuery( "input[name^='wcj_product_all_products_addons_'], input[name^='wcj_product_per_product_addons_']" ).each(
37
  function () {
38
  if (jQuery( this ).is( ':checked' )) {
39
- data[jQuery( this ).attr( 'name' )] = jQuery( this ).val();
40
  }
41
  if ('text' == jQuery( this ).attr( 'type' ) && jQuery( this ).val() != '') {
42
  data[jQuery( this ).attr( 'name' )] = jQuery( this ).val();
@@ -82,13 +83,15 @@ jQuery( document ).ready(
82
  }
83
  );
84
 
85
- // Handle "Enable by Variation" option
86
  function handle_enable_by_variation() {
87
  sanitize_variation_addon_fields_array();
88
  var addon_pattern = 'wcj_product_per_product_addons_';
89
  function hide_variation_addon_fields() {
90
- for (i = 0; i < _ajax_object.enable_by_variation.length; i++) {
91
- if (Array.isArray( _ajax_object.enable_by_variation[i] )) {
 
 
92
  var addons = jQuery( 'input[name="' + addon_pattern + (i + 1) + '"],label[for*="' + addon_pattern + (i + 1) + '"],*[class*="' + addon_pattern + (i + 1) + '"]' );
93
  addons.each(
94
  function () {
@@ -104,8 +107,10 @@ jQuery( document ).ready(
104
  }
105
  function show_addon_field_by_variation_id(variation_id) {
106
  hide_variation_addon_fields();
107
- for (i = 0; i < _ajax_object.enable_by_variation.length; i++) {
108
- if (Array.isArray( _ajax_object.enable_by_variation[i] ) && _ajax_object.enable_by_variation[i].indexOf( parseInt( variation_id ) ) != -1) {
 
 
109
  var addons = jQuery( 'input[name="' + addon_pattern + (i + 1) + '"],label[for="' + addon_pattern + (i + 1) + '"],*[class*="' + addon_pattern + (i + 1) + '"]' );
110
  addons.each(
111
  function() {
1
  /**
2
+ * Wcj-product-addons.
3
  *
4
+ * @version 5.6.2
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
8
+ * @package Booster_For_WooCommerce/includes/JS
9
  */
10
 
11
  var _ajax_object = ajax_object;
37
  jQuery( "input[name^='wcj_product_all_products_addons_'], input[name^='wcj_product_per_product_addons_']" ).each(
38
  function () {
39
  if (jQuery( this ).is( ':checked' )) {
40
+ data[jQuery( this ).attr( 'name' )] = jQuery( this ).val();
41
  }
42
  if ('text' == jQuery( this ).attr( 'type' ) && jQuery( this ).val() != '') {
43
  data[jQuery( this ).attr( 'name' )] = jQuery( this ).val();
83
  }
84
  );
85
 
86
+ // Handle "Enable by Variation" option.
87
  function handle_enable_by_variation() {
88
  sanitize_variation_addon_fields_array();
89
  var addon_pattern = 'wcj_product_per_product_addons_';
90
  function hide_variation_addon_fields() {
91
+ var enable_by_variation = _ajax_object.enable_by_variation;
92
+ var enable_by_variation_length = _ajax_object.enable_by_variation.length;
93
+ for (i = 0; i < enable_by_variation_length; i++) {
94
+ if (Array.isArray( enable_by_variation[i] )) {
95
  var addons = jQuery( 'input[name="' + addon_pattern + (i + 1) + '"],label[for*="' + addon_pattern + (i + 1) + '"],*[class*="' + addon_pattern + (i + 1) + '"]' );
96
  addons.each(
97
  function () {
107
  }
108
  function show_addon_field_by_variation_id(variation_id) {
109
  hide_variation_addon_fields();
110
+ var enable_by_variation = _ajax_object.enable_by_variation;
111
+ var enable_by_variation_length = _ajax_object.enable_by_variation.length;
112
+ for (i = 0; i < enable_by_variation_length; i++) {
113
+ if (Array.isArray( enable_by_variation[i] ) && enable_by_variation[i].indexOf( parseInt( variation_id ) ) != -1) {
114
  var addons = jQuery( 'input[name="' + addon_pattern + (i + 1) + '"],label[for="' + addon_pattern + (i + 1) + '"],*[class*="' + addon_pattern + (i + 1) + '"]' );
115
  addons.each(
116
  function() {
includes/js/wcj-product-input-fields.js CHANGED
@@ -1,3 +1,12 @@
 
 
 
 
 
 
 
 
 
1
  jQuery( document ).ready(
2
  function() {
3
  jQuery( 'input,textarea' ).focus(
1
+ /**
2
+ * Booster for WooCommerce - Input Fields
3
+ *
4
+ * @author Pluggabl LLC.
5
+ * @version 5.6.2
6
+ *
7
+ * @package Booster_For_WooCommerce/includes/JS
8
+ */
9
+
10
  jQuery( document ).ready(
11
  function() {
12
  jQuery( 'input,textarea' ).focus(
includes/js/wcj-shipping-calculator.js CHANGED
@@ -1,8 +1,10 @@
1
  /**
2
- * wcj-shipping-calculator.
3
  *
4
- * @version 2.5.7
5
  * @since 2.5.7
 
 
6
  */
7
 
8
  jQuery( document ).ready( change_labels );
1
  /**
2
+ * Wcj-shipping-calculator.
3
  *
4
+ * @version 5.6.2
5
  * @since 2.5.7
6
+ *
7
+ * @package Booster_For_WooCommerce/includes/JS
8
  */
9
 
10
  jQuery( document ).ready( change_labels );
includes/js/wcj-timepicker.js CHANGED
@@ -1,9 +1,12 @@
1
  /**
2
  * Booster for WooCommerce - Timepicker JS
3
  *
4
- * @version 2.7.0
5
  * @author Pluggabl LLC.
 
 
6
  */
 
7
  jQuery( document ).ready(
8
  function() {
9
  jQuery( "input[display='time']" ).each(
1
  /**
2
  * Booster for WooCommerce - Timepicker JS
3
  *
4
+ * @version 5.6.2
5
  * @author Pluggabl LLC.
6
+ *
7
+ * @package Booster_For_WooCommerce/includes/JS
8
  */
9
+
10
  jQuery( document ).ready(
11
  function() {
12
  jQuery( "input[display='time']" ).each(
includes/js/wcj-track-users.js CHANGED
@@ -1,8 +1,9 @@
1
  /**
2
- * wcj-track-users.js
3
  *
4
- * @version 2.9.1
5
- * @version 2.9.1
 
6
  */
7
 
8
  jQuery( document ).ready(
1
  /**
2
+ * Wcj-track-users.js
3
  *
4
+ * @version 5.6.2
5
+ *
6
+ * @package Booster_For_WooCommerce/includes/JS
7
  */
8
 
9
  jQuery( document ).ready(
includes/js/wcj-variations-frontend.js CHANGED
@@ -1,8 +1,9 @@
1
  /**
2
  * Booster for WooCommerce - Variations Radio Buttons
3
  *
4
- * @version 4.3.0
5
  * @author Pluggabl LLC.
 
6
  */
7
 
8
  /**
@@ -41,7 +42,7 @@ function select_wc_dropdown_programmatically(variation_id) {
41
  }
42
 
43
  /**
44
- * process_variations.
45
  *
46
  * @version 4.3.0
47
  * @since 2.9.0
@@ -58,7 +59,7 @@ function process_variations(variation_id) {
58
  }
59
 
60
  /**
61
- * hide_all.
62
  *
63
  * @version 2.9.0
64
  * @since 2.9.0
@@ -71,7 +72,7 @@ function hide_all() {
71
  }
72
 
73
  /**
74
- * show_all.
75
  *
76
  * @version 2.9.0
77
  * @since 2.9.0
@@ -84,7 +85,7 @@ function show_all() {
84
  }
85
 
86
  /**
87
- * fill_values.
88
  *
89
  * @version 2.9.0
90
  * @since 2.9.0
@@ -101,13 +102,13 @@ function fill_values(variation_id,radio_element) {
101
  }
102
 
103
  /**
104
- * document ready.
105
  *
106
  * @version 2.9.0
107
  */
108
  jQuery( document ).ready(
109
  function() {
110
- // Initial display
111
  jQuery( "form.variations_form.cart" ).on(
112
  'wc_variation_form',
113
  function(){
@@ -122,7 +123,7 @@ jQuery( document ).ready(
122
  }
123
  }
124
  );
125
- // On change
126
  jQuery( "input:radio[name='wcj_variations']" ).change(
127
  function(){
128
  show_all();
1
  /**
2
  * Booster for WooCommerce - Variations Radio Buttons
3
  *
4
+ * @version 5.6.2
5
  * @author Pluggabl LLC.
6
+ * @package Booster_For_WooCommerce/includes/JS
7
  */
8
 
9
  /**
42
  }
43
 
44
  /**
45
+ * Process_variations.
46
  *
47
  * @version 4.3.0
48
  * @since 2.9.0
59
  }
60
 
61
  /**
62
+ * Hide_all.
63
  *
64
  * @version 2.9.0
65
  * @since 2.9.0
72
  }
73
 
74
  /**
75
+ * Show_all.
76
  *
77
  * @version 2.9.0
78
  * @since 2.9.0
85
  }
86
 
87
  /**
88
+ * Fill_values.
89
  *
90
  * @version 2.9.0
91
  * @since 2.9.0
102
  }
103
 
104
  /**
105
+ * Document ready.
106
  *
107
  * @version 2.9.0
108
  */
109
  jQuery( document ).ready(
110
  function() {
111
+ // Initial display.
112
  jQuery( "form.variations_form.cart" ).on(
113
  'wc_variation_form',
114
  function(){
123
  }
124
  }
125
  );
126
+ // On change.
127
  jQuery( "input:radio[name='wcj_variations']" ).change(
128
  function(){
129
  show_all();
includes/js/wcj-wSelect.js CHANGED
@@ -1,7 +1,10 @@
1
  /**
2
- * wcj-wSelect.
3
  *
4
- * version 2.5.4
5
  * since 2.5.4
 
 
6
  */
 
7
  jQuery( 'select#wcj-country' ).wSelect();
1
  /**
2
+ * Wcj-wSelect.
3
  *
4
+ * Version 5.6.2
5
  * since 2.5.4
6
+ *
7
+ * @package Booster_For_WooCommerce/includes/JS
8
  */
9
+
10
  jQuery( 'select#wcj-country' ).wSelect();
includes/js/wcj-weekpicker.js CHANGED
@@ -1,8 +1,10 @@
1
  /**
2
- * wcj-weekpicker.
3
  *
4
- * version 5.3.6
 
5
  */
 
6
  jQuery( document ).ready(
7
  function() {
8
  jQuery( "input[display='week']" ).each(
@@ -20,7 +22,7 @@ jQuery( document ).ready(
20
  changeMonth: true,
21
  showWeek: true,
22
  beforeShow: function(dateText, inst) {
23
- // for week highighting
24
  jQuery( ".ui-datepicker-calendar tbody" ).on(
25
  "mousemove",
26
  "tr",
@@ -46,7 +48,7 @@ jQuery( document ).ready(
46
  var endDateFormatted = jQuery.datepicker.formatDate( dateFormat, endDate, inst.settings );
47
  jQuery( this ).val( dateText + " - " + endDateFormatted );
48
  }
49
- // disable live listeners so they dont impact other instances
50
  jQuery( '.ui-datepicker-calendar tbody tr' ).off( 'mousemove' );
51
  jQuery( '.ui-datepicker-calendar tbody tr' ).off( 'mouseleave' );
52
  }
1
  /**
2
+ * Wcj-weekpicker.
3
  *
4
+ * @version 5.6.2
5
+ * @package Booster_For_WooCommerce/includes/JS
6
  */
7
+
8
  jQuery( document ).ready(
9
  function() {
10
  jQuery( "input[display='week']" ).each(
22
  changeMonth: true,
23
  showWeek: true,
24
  beforeShow: function(dateText, inst) {
25
+ // for week highighting.
26
  jQuery( ".ui-datepicker-calendar tbody" ).on(
27
  "mousemove",
28
  "tr",
48
  var endDateFormatted = jQuery.datepicker.formatDate( dateFormat, endDate, inst.settings );
49
  jQuery( this ).val( dateText + " - " + endDateFormatted );
50
  }
51
+ // disable live listeners so they dont impact other instances.
52
  jQuery( '.ui-datepicker-calendar tbody tr' ).off( 'mousemove' );
53
  jQuery( '.ui-datepicker-calendar tbody tr' ).off( 'mouseleave' );
54
  }
includes/pdf-invoices/class-wcj-pdf-invoicing-renumerate-tool.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - PDF Invoicing - Renumerate Tool
4
  *
5
- * @version 5.5.6
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -51,21 +51,21 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Renumerate_Tool' ) ) :
51
  /**
52
  * Add Renumerate Invoices tool to WooCommerce menu (the content).
53
  *
54
- * @version 5.5.6
55
  */
56
  public function create_renumerate_invoices_tool() {
57
 
58
- $result_message = '';
59
- $renumerate_result = '';
60
-
61
- $the_invoice_type = ( ! empty( $_POST['invoice_type'] ) ) ? $_POST['invoice_type'] : 'invoice';
62
- $the_start_number = ( ! empty( $_POST['start_number'] ) ) ? $_POST['start_number'] : 0;
63
- $the_start_date = ( ! empty( $_POST['start_date'] ) ) ? $_POST['start_date'] : '';
64
- $the_end_date = ( ! empty( $_POST['end_date'] ) ) ? $_POST['end_date'] : '';
65
- $the_order_statuses = ( ! empty( $_POST['order_statuses'] ) ) ? $_POST['order_statuses'] : array();
66
- $the_delete_all = sanitize_text_field( wp_unslash( $_POST['delete_all'] ) );
67
-
68
- if ( isset( $_POST['renumerate_invoices'] ) ) {
69
  if ( ! empty( $the_order_statuses ) ) {
70
  $renumerate_result = $this->renumerate_invoices( $the_invoice_type, $the_start_number, $the_start_date, $the_end_date, $the_order_statuses, $the_delete_all );
71
  $result_message = '<div class="updated"><p><strong>' . __( 'Invoices successfully renumerated!', 'woocommerce-jetpack' ) . '</strong></p></div>';
@@ -136,8 +136,8 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Renumerate_Tool' ) ) :
136
  '',
137
  );
138
 
139
- // Print all
140
- echo wcj_get_table_html(
141
  $data,
142
  array(
143
  'table_class' => 'widefat striped',
@@ -214,7 +214,7 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Renumerate_Tool' ) ) :
214
 
215
  $order_id = $loop->post->ID;
216
  if (
217
- in_array( $loop->post->post_status, $order_statuses ) &&
218
  strtotime( $loop->post->post_date ) >= strtotime( $start_date ) &&
219
  ( strtotime( $loop->post->post_date ) <= strtotime( $end_date ) || '' === $end_date )
220
  ) {
2
  /**
3
  * Booster for WooCommerce - PDF Invoicing - Renumerate Tool
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
51
  /**
52
  * Add Renumerate Invoices tool to WooCommerce menu (the content).
53
  *
54
+ * @version 5.6.2
55
  */
56
  public function create_renumerate_invoices_tool() {
57
 
58
+ $result_message = '';
59
+ $renumerate_result = '';
60
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : 'woocommerce-settings' ) ) : true;
61
+ $the_invoice_type = ( ! empty( $_POST['invoice_type'] ) ) ? sanitize_text_field( wp_unslash( $_POST['invoice_type'] ) ) : 'invoice';
62
+ $the_start_number = ( ! empty( $_POST['start_number'] ) ) ? sanitize_text_field( wp_unslash( $_POST['start_number'] ) ) : 0;
63
+ $the_start_date = ( ! empty( $_POST['start_date'] ) ) ? sanitize_text_field( wp_unslash( $_POST['start_date'] ) ) : '';
64
+ $the_end_date = ( ! empty( $_POST['end_date'] ) ) ? sanitize_text_field( wp_unslash( $_POST['end_date'] ) ) : '';
65
+ $the_order_statuses = ( ! empty( $_POST['order_statuses'] ) ) ? array_map( 'sanitize_text_field', wp_unslash( $_POST['order_statuses'] ) ) : array();
66
+ $the_delete_all = ( isset( $_POST['delete_all'] ) );
67
+
68
+ if ( $wpnonce && isset( $_POST['renumerate_invoices'] ) ) {
69
  if ( ! empty( $the_order_statuses ) ) {
70
  $renumerate_result = $this->renumerate_invoices( $the_invoice_type, $the_start_number, $the_start_date, $the_end_date, $the_order_statuses, $the_delete_all );
71
  $result_message = '<div class="updated"><p><strong>' . __( 'Invoices successfully renumerated!', 'woocommerce-jetpack' ) . '</strong></p></div>';
136
  '',
137
  );
138
 
139
+ // Print all.
140
+ echo wcj_get_table_html( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
141
  $data,
142
  array(
143
  'table_class' => 'widefat striped',
214
 
215
  $order_id = $loop->post->ID;
216
  if (
217
+ in_array( $loop->post->post_status, $order_statuses, true ) &&
218
  strtotime( $loop->post->post_date ) >= strtotime( $start_date ) &&
219
  ( strtotime( $loop->post->post_date ) <= strtotime( $end_date ) || '' === $end_date )
220
  ) {
includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - PDF Invoicing - Report Tool
4
  *
5
- * @version 5.6.1
6
  * @since 2.2.1
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -75,11 +75,12 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Report_Tool' ) ) :
75
  /**
76
  * Generate_report_zip.
77
  *
78
- * @version 4.0.0
79
  * @since 2.3.10
80
  */
81
  public function generate_report_zip() {
82
- if ( isset( $_POST['get_invoices_report_zip'] ) ) {
 
83
  if ( 'yes' === wcj_get_option( 'wcj_general_advanced_disable_save_sys_temp_dir', 'no' ) ) {
84
  $this->notice = '<div class="error"><p><strong>' . sprintf(
85
  /* translators: %s: search term */
@@ -88,9 +89,9 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Report_Tool' ) ) :
88
  ) .
89
  '</strong></p></div>';
90
  } else {
91
- $_year = ( ! empty( $_POST['report_year'] ) ) ? $_POST['report_year'] : gmdate( 'Y' );
92
- $_month = ( ! empty( $_POST['report_month'] ) ) ? $_POST['report_month'] : gmdate( 'n' );
93
- $_invoice_type = ( ! empty( $_POST['invoice_type'] ) ) ? $_POST['invoice_type'] : 'invoice';
94
  if ( ! empty( $_year ) && ! empty( $_month ) && ! empty( $_invoice_type ) ) {
95
  if ( $this->check_user_roles( $_invoice_type ) ) {
96
  $result = $this->get_invoices_report_zip( $_year, $_month, $_invoice_type );
@@ -110,15 +111,16 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Report_Tool' ) ) :
110
  /**
111
  * Add Invoices Report tool to WooCommerce menu (the content).
112
  *
113
- * @version 5.5.6
114
  */
115
  public function create_invoices_report_tool() {
 
116
  $result_message = '';
117
  $result_message .= $this->notice;
118
- $the_year = ( ! empty( $_POST['report_year'] ) ) ? $_POST['report_year'] : gmdate( 'Y' );
119
- $the_month = ( ! empty( $_POST['report_month'] ) ) ? $_POST['report_month'] : gmdate( 'n' );
120
- $the_invoice_type = ( ! empty( $_POST['invoice_type'] ) ) ? $_POST['invoice_type'] : 'invoice';
121
- if ( isset( $_POST['get_invoices_report'] ) ) {
122
  if ( ! empty( $the_year ) && ! empty( $the_month ) && ! empty( $the_invoice_type ) ) {
123
  $result_message = $this->get_invoices_report( $the_year, $the_month, $the_invoice_type );
124
  } else {
@@ -190,7 +192,7 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Report_Tool' ) ) :
190
  /**
191
  * Get_invoices_report_zip.
192
  *
193
- * @version 3.5.0
194
  * @since 2.3.10
195
  * @param int | string $year Get year.
196
  * @param int | string $month Get month.
@@ -227,9 +229,9 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Report_Tool' ) ) :
227
  'post_status' => 'any',
228
  'posts_per_page' => $block_size,
229
  'orderby' => 'meta_value_num',
230
- 'meta_key' => '_wcj_invoicing_' . $invoice_type_id . '_date',
231
  'order' => 'ASC',
232
- 'meta_query' => array(
233
  array(
234
  'key' => '_wcj_invoicing_' . $invoice_type_id . '_date',
235
  'value' => array( $first_minute, $last_minute ),
@@ -261,18 +263,18 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Report_Tool' ) ) :
261
  return $this->get_no_documents_found_message( $year, $month, $invoice_type_id );
262
  }
263
 
264
- header( 'Content-Disposition: attachment; filename=' . urlencode( $zip_file_name ) );
265
  header( 'Content-Type: application/download' );
266
  header( 'Content-Description: File Transfer' );
267
  header( 'Content-Length: ' . filesize( $zip_file_path ) );
268
  flush(); // this doesn't really matter.
269
- $fp = fopen( $zip_file_path, 'r' );
270
  if ( false !== ( $fp ) ) {
271
  while ( ! feof( $fp ) ) {
272
- echo fread( $fp, 65536 );
273
  flush(); // this is essential for large downloads.
274
  }
275
- fclose( $fp );
276
  exit();
277
  } else {
278
  die( esc_html__( 'Unexpected error', 'woocommerce-jetpack' ) );
@@ -283,7 +285,7 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Report_Tool' ) ) :
283
  /**
284
  * Get_no_documents_found_message.
285
  *
286
- * @version 5.6.1
287
  * @since 3.1.0
288
  * @param int | string $year Get year.
289
  * @param int | string $month Get month.
@@ -291,7 +293,7 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Report_Tool' ) ) :
291
  */
292
  public function get_no_documents_found_message( $year, $month, $invoice_type_id ) {
293
  /* translators: %s: search term */
294
- return sprintf( __( 'No documents (%s) found for %d-%02d.', 'woocommerce-jetpack' ), $invoice_type_id, $year, $month );
295
  }
296
 
297
  /**
@@ -301,10 +303,11 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Report_Tool' ) ) :
301
  * @since 2.5.7
302
  */
303
  public function export_csv() {
304
- $_year = ( ! empty( $_POST['report_year'] ) ) ? $_POST['report_year'] : gmdate( 'Y' );
305
- $_month = ( ! empty( $_POST['report_month'] ) ) ? $_POST['report_month'] : gmdate( 'm' );
306
- $_invoice_type = ( ! empty( $_POST['invoice_type'] ) ) ? $_POST['invoice_type'] : 'invoice';
307
- if ( isset( $_POST['get_invoices_report_csv'] ) ) {
 
308
  $data = $this->get_invoices_report_data( $_year, $_month, $_invoice_type );
309
  if ( empty( $data ) ) {
310
  $this->notice = '<div class="error"><p><strong>' . $this->get_no_documents_found_message( $_year, $_month, $_invoice_type ) . '</strong></p></div>';
@@ -350,7 +353,7 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Report_Tool' ) ) :
350
  /**
351
  * Invoices Report Data function.
352
  *
353
- * @version 4.3.0
354
  * @since 2.5.7
355
  * @param int | string $year Get year.
356
  * @param int | string $month Get month.
@@ -381,9 +384,9 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Report_Tool' ) ) :
381
  'post_status' => 'any',
382
  'posts_per_page' => $block_size,
383
  'orderby' => 'meta_value_num',
384
- 'meta_key' => '_wcj_invoicing_' . $invoice_type_id . '_date',
385
  'order' => 'ASC',
386
- 'meta_query' => array(
387
  array(
388
  'key' => '_wcj_invoicing_' . $invoice_type_id . '_date',
389
  'value' => array( $first_minute, $last_minute ),
@@ -428,8 +431,8 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Report_Tool' ) ) :
428
  $order_cart_total_excl_tax += $item->get_total();
429
  }
430
  $order_shipping_total_excl_tax = $the_order->get_shipping_total();
431
- $order_cart_tax_percent = ( 0 == $order_cart_total_excl_tax ? 0 : $order_cart_tax / $order_cart_total_excl_tax );
432
- $order_shipping_tax_percent = ( 0 == $order_shipping_total_excl_tax ? 0 : $order_shipping_tax / $order_shipping_total_excl_tax );
433
 
434
  $row = array();
435
  foreach ( $columns as $column ) {
2
  /**
3
  * Booster for WooCommerce - PDF Invoicing - Report Tool
4
  *
5
+ * @version 5.6.2
6
  * @since 2.2.1
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
75
  /**
76
  * Generate_report_zip.
77
  *
78
+ * @version 5.6.2
79
  * @since 2.3.10
80
  */
81
  public function generate_report_zip() {
82
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
83
+ if ( $wpnonce && isset( $_POST['get_invoices_report_zip'] ) ) {
84
  if ( 'yes' === wcj_get_option( 'wcj_general_advanced_disable_save_sys_temp_dir', 'no' ) ) {
85
  $this->notice = '<div class="error"><p><strong>' . sprintf(
86
  /* translators: %s: search term */
89
  ) .
90
  '</strong></p></div>';
91
  } else {
92
+ $_year = ( ! empty( $_POST['report_year'] ) ) ? sanitize_text_field( wp_unslash( $_POST['report_year'] ) ) : gmdate( 'Y' );
93
+ $_month = ( ! empty( $_POST['report_month'] ) ) ? sanitize_text_field( wp_unslash( $_POST['report_month'] ) ) : gmdate( 'n' );
94
+ $_invoice_type = ( ! empty( $_POST['invoice_type'] ) ) ? sanitize_text_field( wp_unslash( $_POST['invoice_type'] ) ) : 'invoice';
95
  if ( ! empty( $_year ) && ! empty( $_month ) && ! empty( $_invoice_type ) ) {
96
  if ( $this->check_user_roles( $_invoice_type ) ) {
97
  $result = $this->get_invoices_report_zip( $_year, $_month, $_invoice_type );
111
  /**
112
  * Add Invoices Report tool to WooCommerce menu (the content).
113
  *
114
+ * @version 5.6.2
115
  */
116
  public function create_invoices_report_tool() {
117
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
118
  $result_message = '';
119
  $result_message .= $this->notice;
120
+ $the_year = ( $wpnonce && ! empty( $_POST['report_year'] ) ) ? sanitize_text_field( wp_unslash( $_POST['report_year'] ) ) : gmdate( 'Y' );
121
+ $the_month = ( $wpnonce && ! empty( $_POST['report_month'] ) ) ? sanitize_text_field( wp_unslash( $_POST['report_month'] ) ) : gmdate( 'n' );
122
+ $the_invoice_type = ( $wpnonce && ! empty( $_POST['invoice_type'] ) ) ? sanitize_text_field( wp_unslash( $_POST['invoice_type'] ) ) : 'invoice';
123
+ if ( $wpnonce && isset( $_POST['get_invoices_report'] ) ) {
124
  if ( ! empty( $the_year ) && ! empty( $the_month ) && ! empty( $the_invoice_type ) ) {
125
  $result_message = $this->get_invoices_report( $the_year, $the_month, $the_invoice_type );
126
  } else {
192
  /**
193
  * Get_invoices_report_zip.
194
  *
195
+ * @version 5.6.2
196
  * @since 2.3.10
197
  * @param int | string $year Get year.
198
  * @param int | string $month Get month.
229
  'post_status' => 'any',
230
  'posts_per_page' => $block_size,
231
  'orderby' => 'meta_value_num',
232
+ 'meta_key' => '_wcj_invoicing_' . $invoice_type_id . '_date', //phpcs:ignore
233
  'order' => 'ASC',
234
+ 'meta_query' => array( //phpcs:ignore
235
  array(
236
  'key' => '_wcj_invoicing_' . $invoice_type_id . '_date',
237
  'value' => array( $first_minute, $last_minute ),
263
  return $this->get_no_documents_found_message( $year, $month, $invoice_type_id );
264
  }
265
 
266
+ header( 'Content-Disposition: attachment; filename=' . rawurlencode( $zip_file_name ) );
267
  header( 'Content-Type: application/download' );
268
  header( 'Content-Description: File Transfer' );
269
  header( 'Content-Length: ' . filesize( $zip_file_path ) );
270
  flush(); // this doesn't really matter.
271
+ $fp = fopen( $zip_file_path, 'r' ); //phpcs:ignore
272
  if ( false !== ( $fp ) ) {
273
  while ( ! feof( $fp ) ) {
274
+ echo fread( $fp, 65536 ); //phpcs:ignore
275
  flush(); // this is essential for large downloads.
276
  }
277
+ fclose( $fp ); //phpcs:ignore
278
  exit();
279
  } else {
280
  die( esc_html__( 'Unexpected error', 'woocommerce-jetpack' ) );
285
  /**
286
  * Get_no_documents_found_message.
287
  *
288
+ * @version 5.6.2
289
  * @since 3.1.0
290
  * @param int | string $year Get year.
291
  * @param int | string $month Get month.
293
  */
294
  public function get_no_documents_found_message( $year, $month, $invoice_type_id ) {
295
  /* translators: %s: search term */
296
+ return sprintf( __( 'No documents (%1$s) found for %2$d-%3$02d.', 'woocommerce-jetpack' ), $invoice_type_id, $year, $month );
297
  }
298
 
299
  /**
303
  * @since 2.5.7
304
  */
305
  public function export_csv() {
306
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
307
+ $_year = ( $wpnonce && ! empty( $_POST['report_year'] ) ) ? sanitize_text_field( wp_unslash( $_POST['report_year'] ) ) : gmdate( 'Y' );
308
+ $_month = ( $wpnonce && ! empty( $_POST['report_month'] ) ) ? sanitize_text_field( wp_unslash( $_POST['report_month'] ) ) : gmdate( 'm' );
309
+ $_invoice_type = ( $wpnonce && ! empty( $_POST['invoice_type'] ) ) ? sanitize_text_field( wp_unslash( $_POST['invoice_type'] ) ) : 'invoice';
310
+ if ( $wpnonce && isset( $_POST['get_invoices_report_csv'] ) ) {
311
  $data = $this->get_invoices_report_data( $_year, $_month, $_invoice_type );
312
  if ( empty( $data ) ) {
313
  $this->notice = '<div class="error"><p><strong>' . $this->get_no_documents_found_message( $_year, $_month, $_invoice_type ) . '</strong></p></div>';
353
  /**
354
  * Invoices Report Data function.
355
  *
356
+ * @version 5.6.2
357
  * @since 2.5.7
358
  * @param int | string $year Get year.
359
  * @param int | string $month Get month.
384
  'post_status' => 'any',
385
  'posts_per_page' => $block_size,
386
  'orderby' => 'meta_value_num',
387
+ 'meta_key' => '_wcj_invoicing_' . $invoice_type_id . '_date', //phpcs:ignore
388
  'order' => 'ASC',
389
+ 'meta_query' => array( //phpcs:ignore
390
  array(
391
  'key' => '_wcj_invoicing_' . $invoice_type_id . '_date',
392
  'value' => array( $first_minute, $last_minute ),
431
  $order_cart_total_excl_tax += $item->get_total();
432
  }
433
  $order_shipping_total_excl_tax = $the_order->get_shipping_total();
434
+ $order_cart_tax_percent = ( 0 === $order_cart_total_excl_tax ? 0 : $order_cart_tax / $order_cart_total_excl_tax );
435
+ $order_shipping_tax_percent = ( 0 === $order_shipping_total_excl_tax ? 0 : $order_shipping_tax / $order_shipping_total_excl_tax );
436
 
437
  $row = array();
438
  foreach ( $columns as $column ) {
includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-display.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - PDF Invoicing - Display
4
  *
5
- * @version 5.5.9
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -209,12 +209,12 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Display' ) ) :
209
  /**
210
  * Output custom columns for products
211
  *
212
- * @version 5.5.9
213
  * @param string $column Get order columns.
214
  */
215
  public function render_order_columns( $column ) {
216
  $invoice_types_ids = wcj_get_enabled_invoice_types_ids();
217
- if ( ! in_array( $column, $invoice_types_ids ) ) {
218
  return;
219
  }
220
  $order_id = get_the_ID();
@@ -343,7 +343,7 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Display' ) ) :
343
  /**
344
  * Create_invoices_meta_box.
345
  *
346
- * @version 3.9.0
347
  * @since 2.8.0
348
  */
349
  public function create_invoices_meta_box() {
@@ -351,7 +351,7 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Display' ) ) :
351
  $order_id = wcj_get_order_id( $_order );
352
  $invoice_types = wcj_get_enabled_invoice_types();
353
  if ( empty( $invoice_types ) ) {
354
- echo '<p style="font-style:italic;">' . __( 'You have no document types enabled.', 'woocommerce-jetpack' ) . '</p>';
355
  } else {
356
  foreach ( $invoice_types as $invoice_type ) {
357
  $table_data = array();
@@ -409,7 +409,7 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Display' ) ) :
409
  }
410
  $maybe_toolptip = '';
411
  $_hooks = wcj_get_invoice_create_on( $invoice_type['id'] );
412
- if ( in_array( 'woocommerce_order_partially_refunded_notification', $_hooks ) ) {
413
  $maybe_toolptip = wc_help_tip( __( 'In case of partial refund, you need to reload the page to see created document in this meta box.', 'woocommerce-jetpack' ), true );
414
  }
415
  $table_data[] = array(
@@ -417,7 +417,7 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Display' ) ) :
417
  $invoice_type['title'] . $the_number . $the_date . $maybe_toolptip,
418
  );
419
  $table_data[] = $actions;
420
- echo '<p>' . wcj_get_table_html( $table_data, array( 'table_class' => 'widefat striped' ) ) . '</p>';
421
  }
422
  }
423
  }
2
  /**
3
  * Booster for WooCommerce - PDF Invoicing - Display
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
209
  /**
210
  * Output custom columns for products
211
  *
212
+ * @version 5.6.2
213
  * @param string $column Get order columns.
214
  */
215
  public function render_order_columns( $column ) {
216
  $invoice_types_ids = wcj_get_enabled_invoice_types_ids();
217
+ if ( ! in_array( $column, $invoice_types_ids, true ) ) {
218
  return;
219
  }
220
  $order_id = get_the_ID();
343
  /**
344
  * Create_invoices_meta_box.
345
  *
346
+ * @version 5.6.2
347
  * @since 2.8.0
348
  */
349
  public function create_invoices_meta_box() {
351
  $order_id = wcj_get_order_id( $_order );
352
  $invoice_types = wcj_get_enabled_invoice_types();
353
  if ( empty( $invoice_types ) ) {
354
+ echo '<p style="font-style:italic;">' . wp_kses_post( 'You have no document types enabled.', 'woocommerce-jetpack' ) . '</p>';
355
  } else {
356
  foreach ( $invoice_types as $invoice_type ) {
357
  $table_data = array();
409
  }
410
  $maybe_toolptip = '';
411
  $_hooks = wcj_get_invoice_create_on( $invoice_type['id'] );
412
+ if ( in_array( 'woocommerce_order_partially_refunded_notification', $_hooks, true ) ) {
413
  $maybe_toolptip = wc_help_tip( __( 'In case of partial refund, you need to reload the page to see created document in this meta box.', 'woocommerce-jetpack' ), true );
414
  }
415
  $table_data[] = array(
417
  $invoice_type['title'] . $the_number . $the_date . $maybe_toolptip,
418
  );
419
  $table_data[] = $actions;
420
+ echo '<p>' . wp_kses_post( wcj_get_table_html( $table_data, array( 'table_class' => 'widefat striped' ) ) ) . '</p>';
421
  }
422
  }
423
  }
includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-styling.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - PDF Invoicing - Styling
4
  *
5
- * @version 5.6.1
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -81,24 +81,28 @@ if ( ! class_exists( 'WCJ_PDF_Invoicing_Styling' ) ) :
81
  /**
82
  * Download_fonts.
83
  *
84
- * @version 2.9.0
85
  * @version 2.9.0
86
  * @param int $interval Get time interval.
87
  */
88
  public function download_fonts( $interval ) {
89
- update_option( 'wcj_download_tcpdf_fonts_hook_timestamp', (int) current_time( 'timestamp' ) );
90
  wcj_check_and_maybe_download_tcpdf_fonts( true );
91
  }
92
 
93
  /**
94
  * Manually_download_fonts.
95
  *
96
- * @version 2.9.0
97
  * @version 2.9.0
98
  * @todo add success/error message
99
  */
100
  public function manually_download_fonts() {
101
- if ( isset( $_GET['wcj_download_fonts'] ) ) {
 
 
 
 
102
  delete_option( 'wcj_invoicing_fonts_version' );
103
  delete_option( 'wcj_invoicing_fonts_version_timestamp' );
104
  wcj_check_and_maybe_download_tcpdf_fonts();
2
  /**
3
  * Booster for WooCommerce - PDF Invoicing - Styling
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
81
  /**
82
  * Download_fonts.
83
  *
84
+ * @version 5.6.2
85
  * @version 2.9.0
86
  * @param int $interval Get time interval.
87
  */
88
  public function download_fonts( $interval ) {
89
+ update_option( 'wcj_download_tcpdf_fonts_hook_timestamp', (int) gmdate( 'U' ) );
90
  wcj_check_and_maybe_download_tcpdf_fonts( true );
91
  }
92
 
93
  /**
94
  * Manually_download_fonts.
95
  *
96
+ * @version 5.6.2
97
  * @version 2.9.0
98
  * @todo add success/error message
99
  */
100
  public function manually_download_fonts() {
101
+ $wpnonce = true;
102
+ if ( function_exists( 'wp_verify_nonce' ) ) {
103
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
104
+ }
105
+ if ( isset( $_GET['wcj_download_fonts'] ) && $wpnonce ) {
106
  delete_option( 'wcj_invoicing_fonts_version' );
107
  delete_option( 'wcj_invoicing_fonts_version_timestamp' );
108
  wcj_check_and_maybe_download_tcpdf_fonts();
includes/price-by-country/class-wcj-price-by-country-core.php CHANGED
@@ -2,28 +2,32 @@
2
  /**
3
  * Booster for WooCommerce - Price by Country - Core
4
  *
5
- * @version 5.5.7
6
  * @author Pluggabl LLC.
 
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) {
10
  exit;
11
  }
12
 
13
- if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
14
 
15
- class WCJ_Price_by_Country_Core {
 
 
 
16
 
17
  /**
18
  * Constructor.
19
  *
20
- * @version 5.5.6
21
  * @todo [dev] check if we can just always execute `init()` on `init` hook
22
  */
23
- function __construct() {
24
  $this->customer_country_group_id = null;
25
  if ( ( 'no' === get_option( 'wcj_price_by_country_for_bots_disabled', 'no' ) || ! wcj_is_bot() ) && ! wcj_is_admin_product_edit_page() ) {
26
- if ( in_array( get_option( 'wcj_price_by_country_customer_country_detection_method', 'by_ip' ), array( 'by_user_selection', 'by_ip_then_by_user_selection' ) ) ) {
27
  if ( 'wc' === WCJ_SESSION_TYPE ) {
28
  // `init()` executed on `init` hook because we need to use `WC()->session`
29
  add_action( 'init', array( $this, 'init' ) );
@@ -39,20 +43,30 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
39
  $this->add_hooks();
40
  }
41
  }
42
- // `maybe_init_customer_country_by_ip()` executed on `init` hook - in case we need to call `get_customer_country_by_ip()` `WC_Geolocation` class is ready
43
  add_action( 'init', array( $this, 'maybe_init_customer_country_by_ip' ) );
44
  }
45
  }
46
 
47
  /**
48
- * init.
49
  *
50
- * @version 5.0.0
51
  * @since 2.9.0
52
  */
53
- function init() {
54
  wcj_session_maybe_start();
55
- $req_country = isset( $_REQUEST['wcj-country'] ) && ! empty( $country = $_REQUEST['wcj-country'] ) ? $country : ( isset( $_REQUEST['wcj_country_selector'] ) && ! empty( $country = $_REQUEST['wcj_country_selector'] ) ? $country : null );
 
 
 
 
 
 
 
 
 
 
56
  if ( ! empty( $req_country ) ) {
57
  wcj_session_set( 'wcj-country', $req_country );
58
  do_action( 'wcj_price_by_country_set_country', $req_country, $this->get_currency_by_country( $req_country ) );
@@ -62,28 +76,28 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
62
  /**
63
  * Gets currency by country.
64
  *
65
- * @version 5.5.6
66
  * @since 4.1.0
67
  *
68
- * @param $country
69
  *
70
  * @return bool|mixed|void
71
  */
72
- function get_currency_by_country( $country ) {
73
  $group_id = $this->get_country_group_id( $country );
74
  $country_currency_code = get_option( 'wcj_price_by_country_exchange_rate_currency_group_' . $group_id );
75
- return ( '' != $country_currency_code ? $country_currency_code : false );
76
  }
77
 
78
  /**
79
  * Saves currency on session by country.
80
  *
81
- * @version 4.1.0
82
  * @since 4.1.0
83
  *
84
- * @param $country
85
  */
86
- function save_currency_on_session_by_country( $country ) {
87
  $currency = $this->get_currency_by_country( $country );
88
  if ( ! empty( $currency ) ) {
89
  wcj_session_set( 'wcj-currency', $currency );
@@ -91,15 +105,16 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
91
  }
92
 
93
  /**
94
- * maybe_init_customer_country_by_ip.
95
  *
96
- * @version 5.5.6
97
  * @since 2.9.0
98
  */
99
- function maybe_init_customer_country_by_ip() {
100
  if ( 'by_ip_then_by_user_selection' === get_option( 'wcj_price_by_country_customer_country_detection_method', 'by_ip' ) ) {
101
  if ( null === wcj_session_get( 'wcj-country' ) ) {
102
- if ( null != ( $country = $this->get_customer_country_by_ip() ) ) {
 
103
  wcj_session_set( 'wcj-country', $country );
104
  do_action( 'wcj_price_by_country_set_country', $country, $this->get_currency_by_country( $country ) );
105
  }
@@ -108,26 +123,26 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
108
  }
109
 
110
  /**
111
- * add_hooks.
112
  *
113
- * @version 5.4.5
114
  */
115
- function add_hooks() {
116
 
117
- // Select with flags
118
  if ( 'yes' === get_option( 'wcj_price_by_country_jquery_wselect_enabled', 'no' ) ) {
119
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_wselect_scripts' ) );
120
  }
121
 
122
  $this->price_hooks_priority = wcj_get_module_price_hooks_priority( 'price_by_country' );
123
 
124
- // Price hooks
125
  wcj_add_change_price_hooks( $this, $this->price_hooks_priority );
126
 
127
- // Currency hooks
128
  add_filter( 'woocommerce_currency', array( $this, 'change_currency_code' ), $this->price_hooks_priority, 1 );
129
 
130
- // Price Filter Widget
131
  if ( 'yes' === get_option( 'wcj_price_by_country_price_filter_widget_support_enabled', 'no' ) ) {
132
  add_filter( 'woocommerce_product_query_meta_query', array( $this, 'price_filter_meta_query' ), PHP_INT_MAX, 2 );
133
  add_filter( 'woocommerce_price_filter_sql', array( $this, 'woocommerce_price_filter_sql' ), 10, 3 );
@@ -139,7 +154,7 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
139
  function ( $query ) {
140
  $group_id = $this->get_customer_country_group_id();
141
  $country_exchange_rate = get_option( 'wcj_price_by_country_exchange_rate_group_' . $group_id, 1 );
142
- if ( 1 == (float) $country_exchange_rate ) {
143
  return;
144
  }
145
  wcj_remove_class_filter( 'posts_clauses', 'WC_Query', 'order_by_price_asc_post_clauses', 0 );
@@ -156,7 +171,7 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
156
  );
157
  }
158
 
159
- // Price Format
160
  if ( wcj_is_frontend() ) {
161
  if ( 'wc_get_price_to_display' === get_option( 'wcj_price_by_country_price_format_method', 'get_price' ) ) {
162
  add_filter( 'woocommerce_get_price_including_tax', array( $this, 'format_price_after_including_excluding_tax' ), PHP_INT_MAX, 3 );
@@ -164,32 +179,32 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
164
  }
165
  }
166
 
167
- // Free Shipping
168
  add_filter( 'woocommerce_shipping_free_shipping_instance_option', array( $this, 'convert_free_shipping_min_amount' ), 10, 3 );
169
  add_filter( 'woocommerce_shipping_free_shipping_option', array( $this, 'convert_free_shipping_min_amount' ), 10, 3 );
170
 
171
- // WooCommerce Points and Rewards plugin
172
- add_filter( 'option_' . 'wc_points_rewards_redeem_points_ratio', array( $this, 'handle_wc_points_rewards_settings' ) );
173
- add_filter( 'option_' . 'wc_points_rewards_earn_points_ratio', array( $this, 'handle_wc_points_rewards_settings' ) );
174
 
175
- // Auto set default checkout billing country
176
  add_action( 'default_checkout_billing_country', array( $this, 'set_default_checkout_country' ), 900 );
177
  }
178
 
179
  /**
180
- * set_default_checkout_country.
181
  *
182
- * @version 5.5.6
183
  * @since 5.3.0
184
  *
185
- * @param $default_country
186
  *
187
  * @return array|null|string
188
  */
189
- function set_default_checkout_country( $default_country ) {
190
  if (
191
- 'yes' != get_option( 'wcj_price_by_country_set_dft_checkout_billing_country', 'no' ) ||
192
- empty( $country = null !== ( $country = wcj_session_get( 'wcj-country' ) ) ? $country : ( $country = $this->get_customer_country_by_ip() ) )
193
  ) {
194
  return $default_country;
195
  }
@@ -198,16 +213,16 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
198
  }
199
 
200
  /**
201
- * handle_wc_points_rewards_settings.
202
  *
203
- * @version 5.5.6
204
  * @since 5.2.0
205
  *
206
- * @param $value
207
  *
208
  * @return string
209
  */
210
- function handle_wc_points_rewards_settings( $value ) {
211
  if (
212
  'yes' !== get_option( 'wcj_price_by_country_comp_woo_points_rewards', 'no' )
213
  || empty( $value )
@@ -225,18 +240,18 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
225
  }
226
 
227
  /**
228
- * convert_free_shipping_min_amount.
229
  *
230
- * @version 5.5.6
231
  * @since 5.1.0
232
  *
233
- * @param $option
234
- * @param $key
235
- * @param $method
236
  *
237
  * @return mixed
238
  */
239
- function convert_free_shipping_min_amount( $option, $key, $method ) {
240
  if (
241
  'no' === get_option( 'wcj_price_by_country_compatibility_free_shipping', 'no' )
242
  || 'min_amount' !== $key
@@ -250,13 +265,13 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
250
  }
251
 
252
  /**
253
- * append_price_filter_post_meta_join.
254
  *
255
- * @version 5.1.0
256
  * @since 5.1.0
257
  *
258
- * @param $sql
259
- * @param $country_group_id
260
  *
261
  * @return string
262
  */
@@ -270,12 +285,12 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
270
  }
271
 
272
  /**
273
- * get_price_filter_post_meta_join.
274
  *
275
- * @version 5.1.0
276
  * @since 5.1.0
277
  *
278
- * @param $country_group_id
279
  *
280
  * @return string
281
  */
@@ -285,22 +300,24 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
285
  }
286
 
287
  /**
288
- * price_filter_post_clauses_sort.
289
  *
290
- * @version 5.1.0
291
  * @since 5.1.0
292
  *
293
- * @param $args
294
- * @param $wp_query
295
  *
296
  * @return mixed
297
  */
298
- function price_filter_post_clauses_sort( $args, $wp_query ) {
 
 
299
  if (
300
- ! $wp_query->is_main_query() ||
301
- 'price' !== $wp_query->get( 'orderby' ) ||
302
- empty( $group_id = $this->get_customer_country_group_id() ) ||
303
- 1 == (float) ( $country_exchange_rate = get_option( 'wcj_price_by_country_exchange_rate_group_' . $group_id, 1 ) )
304
  ) {
305
  return $args;
306
  }
@@ -318,26 +335,24 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
318
  }
319
 
320
  /**
321
- * price_filter_post_clauses.
322
  *
323
- * @version 5.1.0
324
  * @since 5.1.0
325
  *
326
  * @see WC_Query::price_filter_post_clauses()
327
  *
328
- * @param $args
329
- * @param $wp_query
330
  *
331
  * @return mixed
332
  */
333
- function price_filter_post_clauses( $args, $wp_query ) {
334
  global $wpdb;
335
- if (
336
- ! $wp_query->is_main_query() ||
337
- ( ! isset( $_GET['max_price'] ) && ! isset( $_GET['min_price'] ) ) ||
338
- empty( $group_id = $this->get_customer_country_group_id() ) ||
339
- 1 == (float) ( $country_exchange_rate = get_option( 'wcj_price_by_country_exchange_rate_group_' . $group_id, 1 ) )
340
- ) {
341
  return $args;
342
  }
343
  $current_min_price = isset( $_GET['min_price'] ) ? floatval( wp_unslash( $_GET['min_price'] ) ) : 0;
@@ -363,10 +378,10 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
363
  *
364
  * @see price-slider.js->init_price_filter()
365
  *
366
- * @version 5.5.6
367
  * @since 5.1.0
368
  */
369
- function add_compatibility_with_price_filter_widget() {
370
  if (
371
  ! is_active_widget( false, false, 'woocommerce_price_filter' )
372
  || 'no' === get_option( 'wcj_price_by_country_price_filter_widget_support_enabled', 'no' )
@@ -377,7 +392,7 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
377
  <?php
378
  $group_id = $this->get_customer_country_group_id();
379
  $exchange_rate = get_option( 'wcj_price_by_country_exchange_rate_group_' . $group_id, 1 );
380
- if ( $exchange_rate == 1 ) {
381
  return;
382
  }
383
  ?>
@@ -468,25 +483,27 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
468
  }
469
 
470
  /**
471
- * woocommerce_price_filter_sql.
472
  *
473
- * @version 5.5.6
474
  * @since 5.1.0
475
  *
476
  * @see WC_Widget_Price_Filter::get_filtered_price()
477
  *
478
- * @param $sql
479
- * @param $meta_query_sql
480
- * @param $tax_query_sql
481
  *
482
  * @return string
483
  */
484
- function woocommerce_price_filter_sql( $sql, $meta_query_sql, $tax_query_sql ) {
 
 
485
  if (
486
  is_admin()
487
  || 'no' === get_option( 'wcj_price_by_country_price_filter_widget_support_enabled', 'no' )
488
- || empty( $group_id = $this->get_customer_country_group_id() )
489
- || 1 == (float) ( $country_exchange_rate = get_option( 'wcj_price_by_country_exchange_rate_group_' . $group_id, 1 ) )
490
  ) {
491
  return $sql;
492
  }
@@ -528,18 +545,18 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
528
  }
529
 
530
  /**
531
- * format_price_after_including_excluding_tax.
532
  *
533
- * @version 5.5.6
534
  * @since 4.4.0
535
  *
536
- * @param $return_price
537
- * @param $qty
538
- * @param $product
539
  *
540
  * @return float|int
541
  */
542
- function format_price_after_including_excluding_tax( $return_price, $qty, $product ) {
543
  $precision = get_option( 'woocommerce_price_num_decimals', 2 );
544
  $return_price = wcj_price_by_country_rounding( $return_price, $precision );
545
  if ( 'yes' === get_option( 'wcj_price_by_country_make_pretty', 'no' ) && $return_price >= 0.5 && $precision > 0 ) {
@@ -549,28 +566,31 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
549
  }
550
 
551
  /**
552
- * enqueue_wselect_scripts.
553
  *
554
- * @version 2.5.4
555
  * @since 2.5.4
556
  */
557
- function enqueue_wselect_scripts() {
558
- wp_enqueue_style( 'wcj-wSelect-style', wcj_plugin_url() . '/includes/lib/wSelect/wSelect.css' );
559
- wp_enqueue_script( 'wcj-wSelect', wcj_plugin_url() . '/includes/lib/wSelect/wSelect.min.js', array(), false, true );
560
- wp_enqueue_script( 'wcj-wcj-wSelect', wcj_plugin_url() . '/includes/js/wcj-wSelect.js', array(), false, true );
561
  }
562
 
563
  /**
564
- * price_filter_meta_query.
565
  *
566
- * @version 2.5.3
567
  * @since 2.5.3
 
 
568
  */
569
- function price_filter_meta_query( $meta_query, $_wc_query ) {
570
  foreach ( $meta_query as $_key => $_query ) {
571
  if ( isset( $_query['price_filter'] ) && true === $_query['price_filter'] && isset( $_query['key'] ) ) {
572
- if ( null != ( $group_id = $this->get_customer_country_group_id() ) ) {
573
- $meta_query[ $_key ]['key'] = '_' . 'wcj_price_by_country_' . $group_id;
 
574
  }
575
  }
576
  }
@@ -578,19 +598,22 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
578
  }
579
 
580
  /**
581
- * change_price_grouped.
582
  *
583
- * @version 5.5.6
584
  * @since 2.5.0
 
 
 
585
  */
586
- function change_price_grouped( $price, $qty, $_product ) {
587
  if ( $_product->is_type( 'grouped' ) ) {
588
  if ( 'yes' === get_option( 'wcj_price_by_country_local_enabled', 'yes' ) ) {
589
  foreach ( $_product->get_children() as $child_id ) {
590
  $the_price = get_post_meta( $child_id, '_price', true );
591
  $the_product = wc_get_product( $child_id );
592
  $the_price = wcj_get_product_display_price( $the_product, $the_price, 1 );
593
- if ( $the_price == $price ) {
594
  return $this->change_price( $price, $child_id );
595
  }
596
  }
@@ -602,19 +625,19 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
602
  }
603
 
604
  /**
605
- * get_customer_country_by_ip.
606
  *
607
- * @version 3.8.0
608
  * @since 2.5.0
609
  */
610
- function get_customer_country_by_ip() {
611
  if ( isset( $this->customer_country_by_ip ) ) {
612
  return $this->customer_country_by_ip;
613
  }
614
  if ( class_exists( 'WC_Geolocation' ) ) {
615
- // Get the country by IP
616
  $location = WC_Geolocation::geolocate_ip( ( 'wc' === get_option( 'wcj_price_by_country_ip_detection_method', 'wc' ) ? '' : wcj_get_the_ip() ) );
617
- // Base fallback
618
  if ( empty( $location['country'] ) ) {
619
  $location = wc_format_country_state_string( apply_filters( 'woocommerce_customer_default_location', get_option( 'woocommerce_default_country' ) ) );
620
  }
@@ -628,12 +651,16 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
628
  }
629
 
630
  /**
631
- * change_price_shipping.
 
 
632
  *
633
- * @version 5.5.6
 
634
  */
635
- function change_price_shipping( $package_rates, $package ) {
636
- if ( null != ( $group_id = $this->get_customer_country_group_id() ) ) {
 
637
  $country_exchange_rate = get_option( 'wcj_price_by_country_exchange_rate_group_' . $group_id, 1 );
638
  return wcj_change_price_shipping_package_rates( $package_rates, $country_exchange_rate );
639
  } else {
@@ -642,43 +669,49 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
642
  }
643
 
644
  /**
645
- * get_customer_country_group_id.
646
  *
647
- * @version 5.5.6
648
  * @todo [feature] (maybe) `( 'cart_and_checkout' === get_option( 'wcj_price_by_country_override_scope', 'all' ) && ( is_cart() || is_checkout() ) ) ||`
649
  */
650
- function get_customer_country_group_id() {
651
 
652
  if ( 'yes' === get_option( 'wcj_price_by_country_revert', 'no' ) && is_checkout() ) {
653
  $this->customer_country_group_id = -1;
654
  return null;
655
  }
656
 
657
- // We already know the group - nothing to calculate - return group
658
  if (
659
  'yes' === get_option( 'wcj_price_by_country_save_country_group_id', 'yes' )
660
- && isset( $this->customer_country_group_id ) && null != $this->customer_country_group_id && $this->customer_country_group_id > 0
661
  ) {
662
  return $this->customer_country_group_id;
663
  }
664
 
665
- // Get the country
666
- if ( isset( $_GET['country'] ) && '' != $_GET['country'] && wcj_is_user_role( 'administrator' ) ) {
667
- $country = $_GET['country'];
668
- } elseif ( 'no' != ( $override_option = get_option( 'wcj_price_by_country_override_on_checkout_with_billing_country', 'no' ) )
669
- && (
 
 
 
 
 
670
  ( 'all' === get_option( 'wcj_price_by_country_override_scope', 'all' ) ) ||
671
  ( 'checkout' === get_option( 'wcj_price_by_country_override_scope', 'all' ) && is_checkout() )
672
  )
673
  && isset( WC()->customer )
674
- && ( ( 'yes' === $override_option && '' != wcj_customer_get_country() ) || ( 'shipping_country' === $override_option && '' != WC()->customer->get_shipping_country() ) )
675
  ) {
676
  $country = ( 'yes' === $override_option ) ? wcj_customer_get_country() : WC()->customer->get_shipping_country();
677
  } else {
 
678
  if ( 'by_ip' === get_option( 'wcj_price_by_country_customer_country_detection_method', 'by_ip' ) ) {
679
  $country = $this->get_customer_country_by_ip();
680
  } elseif ( 'by_ip_then_by_user_selection' === get_option( 'wcj_price_by_country_customer_country_detection_method', 'by_ip' ) ) {
681
- $country = ( null !== ( $session_value = wcj_session_get( 'wcj-country' ) ) ? $session_value : $this->get_customer_country_by_ip() );
682
  } elseif ( 'by_user_selection' === get_option( 'wcj_price_by_country_customer_country_detection_method', 'by_ip' ) ) {
683
  $country = wcj_session_get( 'wcj-country' );
684
  } elseif ( 'by_wpml' === get_option( 'wcj_price_by_country_customer_country_detection_method', 'by_ip' ) ) {
@@ -692,11 +725,11 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
692
  }
693
 
694
  $this->customer_country_group_id = $this->get_country_group_id( $country );
695
- if ( - 1 != $this->customer_country_group_id ) {
696
  return $this->customer_country_group_id;
697
  }
698
 
699
- // No country group found
700
  $this->customer_country_group_id = -1;
701
  return null;
702
  }
@@ -704,15 +737,16 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
704
  /**
705
  * Gets country group id.
706
  *
707
- * @version 5.5.6
708
  * @since 4.1.0
709
- * @param $country
710
  *
711
  * @return int
712
  */
713
- function get_country_group_id( $country ) {
714
- // Get the country group id - go through all the groups, first found group is returned
715
- for ( $i = 1; $i <= apply_filters( 'booster_option', 1, get_option( 'wcj_price_by_country_total_groups_number', 1 ) ); $i ++ ) {
 
716
  switch ( get_option( 'wcj_price_by_country_selection', 'comma_list' ) ) {
717
  case 'comma_list':
718
  $country_exchange_rate_group = get_option( 'wcj_price_by_country_exchange_rate_countries_group_' . $i );
@@ -726,7 +760,7 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
726
  $country_exchange_rate_group = get_option( 'wcj_price_by_country_countries_group_chosen_select_' . $i, '' );
727
  break;
728
  }
729
- if ( is_array( $country_exchange_rate_group ) && in_array( $country, $country_exchange_rate_group ) ) {
730
  return $i;
731
  }
732
  }
@@ -734,39 +768,31 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
734
  }
735
 
736
  /**
737
- * change_currency_code.
 
 
738
  */
739
- function change_currency_code( $currency ) {
740
- if ( null != ( $group_id = $this->get_customer_country_group_id() ) ) {
 
741
  $country_currency_code = get_option( 'wcj_price_by_country_exchange_rate_currency_group_' . $group_id );
742
- if ( '' != $country_currency_code ) {
743
  return $country_currency_code;
744
  }
745
  }
746
  return $currency;
747
  }
748
- /*
749
- function change_currency_code( $currency ) {
750
- if (
751
- null == ( $group_id = $this->get_customer_country_group_id() )
752
- || ( 'no' === get_option( 'wcj_price_by_country_curr_code_admin', 'no' ) && is_admin() )
753
- ) {
754
- return $currency;
755
- }
756
- $country_currency_code = get_option( 'wcj_price_by_country_exchange_rate_currency_group_' . $group_id );
757
- if ( '' != $country_currency_code ) {
758
- return $country_currency_code;
759
- }
760
- return $currency;
761
- }*/
762
 
763
  /**
764
- * get_variation_prices_hash.
765
  *
766
- * @version 4.0.0
767
  * @since 2.4.3
 
 
 
768
  */
769
- function get_variation_prices_hash( $price_hash, $_product, $display ) {
770
  $group_id = $this->get_customer_country_group_id();
771
  $price_hash['wcj_price_by_country_group_id_data'] = array(
772
  $group_id,
@@ -783,18 +809,22 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
783
  }
784
 
785
  /**
786
- * change_price.
787
  *
788
- * @version 5.5.7
 
 
789
  */
790
- function change_price( $price, $product ) {
791
- if ( null != ( $group_id = $this->get_customer_country_group_id() ) ) {
 
 
792
  if ( 'yes' === get_option( 'wcj_price_by_country_compatibility_woo_discount_rules', 'no' ) ) {
793
  global $flycart_woo_discount_rules;
794
  if (
795
  ! empty( $flycart_woo_discount_rules ) &&
796
  ! has_action( 'woocommerce_before_calculate_totals', array( $flycart_woo_discount_rules, 'applyDiscountRules' ) )
797
- && ( $product_cart_id = WC()->cart->generate_cart_id( wcj_get_product_id( $product ) ) ) &&
798
  WC()->cart->find_product_in_cart( $product_cart_id )
799
  ) {
800
  return $price;
@@ -833,11 +863,11 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Core' ) ) :
833
 
834
  return $new_price;
835
  }
836
- // No changes
837
  return $price;
838
  }
839
  }
840
 
841
  endif;
842
 
843
- return new WCJ_Price_by_Country_Core();
2
  /**
3
  * Booster for WooCommerce - Price by Country - Core
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
+ * @package Booster_For_WooCommerce/includes/Price_By_Country
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) {
11
  exit;
12
  }
13
 
14
+ if ( ! class_exists( 'WCJ_Price_By_Country_Core' ) ) :
15
 
16
+ /**
17
+ * WCJ_Price_By_Country_Core.
18
+ */
19
+ class WCJ_Price_By_Country_Core {
20
 
21
  /**
22
  * Constructor.
23
  *
24
+ * @version 5.6.2
25
  * @todo [dev] check if we can just always execute `init()` on `init` hook
26
  */
27
+ public function __construct() {
28
  $this->customer_country_group_id = null;
29
  if ( ( 'no' === get_option( 'wcj_price_by_country_for_bots_disabled', 'no' ) || ! wcj_is_bot() ) && ! wcj_is_admin_product_edit_page() ) {
30
+ if ( in_array( get_option( 'wcj_price_by_country_customer_country_detection_method', 'by_ip' ), array( 'by_ip', 'by_user_selection', 'by_ip_then_by_user_selection' ), true ) ) {
31
  if ( 'wc' === WCJ_SESSION_TYPE ) {
32
  // `init()` executed on `init` hook because we need to use `WC()->session`
33
  add_action( 'init', array( $this, 'init' ) );
43
  $this->add_hooks();
44
  }
45
  }
46
+ // `maybe_init_customer_country_by_ip()` executed on `init` hook - in case we need to call `get_customer_country_by_ip()` `WC_Geolocation` class is ready.
47
  add_action( 'init', array( $this, 'maybe_init_customer_country_by_ip' ) );
48
  }
49
  }
50
 
51
  /**
52
+ * Init.
53
  *
54
+ * @version 5.6.2
55
  * @since 2.9.0
56
  */
57
+ public function init() {
58
  wcj_session_maybe_start();
59
+ $wpnonce = true;
60
+ if ( function_exists( 'wp_verify_nonce' ) ) {
61
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
62
+ }
63
+ $country = isset( $_REQUEST['wcj-country'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['wcj-country'] ) ) : '';
64
+ $req_country = null;
65
+ if ( $wpnonce && ! empty( $country ) ) {
66
+ $req_country = $country;
67
+ } elseif ( isset( $_REQUEST['wcj_country_selector'] ) && ! empty( $_REQUEST['wcj_country_selector'] ) ) {
68
+ $req_country = sanitize_text_field( wp_unslash( $_REQUEST['wcj_country_selector'] ) );
69
+ }
70
  if ( ! empty( $req_country ) ) {
71
  wcj_session_set( 'wcj-country', $req_country );
72
  do_action( 'wcj_price_by_country_set_country', $req_country, $this->get_currency_by_country( $req_country ) );
76
  /**
77
  * Gets currency by country.
78
  *
79
+ * @version 5.6.2
80
  * @since 4.1.0
81
  *
82
+ * @param string $country defines the country.
83
  *
84
  * @return bool|mixed|void
85
  */
86
+ public function get_currency_by_country( $country ) {
87
  $group_id = $this->get_country_group_id( $country );
88
  $country_currency_code = get_option( 'wcj_price_by_country_exchange_rate_currency_group_' . $group_id );
89
+ return ( '' !== $country_currency_code && null !== $country_currency_code ? $country_currency_code : false );
90
  }
91
 
92
  /**
93
  * Saves currency on session by country.
94
  *
95
+ * @version 5.6.2
96
  * @since 4.1.0
97
  *
98
+ * @param string $country defines the country.
99
  */
100
+ public function save_currency_on_session_by_country( $country ) {
101
  $currency = $this->get_currency_by_country( $country );
102
  if ( ! empty( $currency ) ) {
103
  wcj_session_set( 'wcj-currency', $currency );
105
  }
106
 
107
  /**
108
+ * Maybe_init_customer_country_by_ip.
109
  *
110
+ * @version 5.6.2
111
  * @since 2.9.0
112
  */
113
+ public function maybe_init_customer_country_by_ip() {
114
  if ( 'by_ip_then_by_user_selection' === get_option( 'wcj_price_by_country_customer_country_detection_method', 'by_ip' ) ) {
115
  if ( null === wcj_session_get( 'wcj-country' ) ) {
116
+ $country = $this->get_customer_country_by_ip();
117
+ if ( null !== $country && '' !== $country ) {
118
  wcj_session_set( 'wcj-country', $country );
119
  do_action( 'wcj_price_by_country_set_country', $country, $this->get_currency_by_country( $country ) );
120
  }
123
  }
124
 
125
  /**
126
+ * Add_hooks.
127
  *
128
+ * @version 5.6.2
129
  */
130
+ public function add_hooks() {
131
 
132
+ // Select with flags.
133
  if ( 'yes' === get_option( 'wcj_price_by_country_jquery_wselect_enabled', 'no' ) ) {
134
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_wselect_scripts' ) );
135
  }
136
 
137
  $this->price_hooks_priority = wcj_get_module_price_hooks_priority( 'price_by_country' );
138
 
139
+ // Price hooks.
140
  wcj_add_change_price_hooks( $this, $this->price_hooks_priority );
141
 
142
+ // Currency hooks.
143
  add_filter( 'woocommerce_currency', array( $this, 'change_currency_code' ), $this->price_hooks_priority, 1 );
144
 
145
+ // Price Filter Widget.
146
  if ( 'yes' === get_option( 'wcj_price_by_country_price_filter_widget_support_enabled', 'no' ) ) {
147
  add_filter( 'woocommerce_product_query_meta_query', array( $this, 'price_filter_meta_query' ), PHP_INT_MAX, 2 );
148
  add_filter( 'woocommerce_price_filter_sql', array( $this, 'woocommerce_price_filter_sql' ), 10, 3 );
154
  function ( $query ) {
155
  $group_id = $this->get_customer_country_group_id();
156
  $country_exchange_rate = get_option( 'wcj_price_by_country_exchange_rate_group_' . $group_id, 1 );
157
+ if ( (float) 1 === (float) $country_exchange_rate ) {
158
  return;
159
  }
160
  wcj_remove_class_filter( 'posts_clauses', 'WC_Query', 'order_by_price_asc_post_clauses', 0 );
171
  );
172
  }
173
 
174
+ // Price Format.
175
  if ( wcj_is_frontend() ) {
176
  if ( 'wc_get_price_to_display' === get_option( 'wcj_price_by_country_price_format_method', 'get_price' ) ) {
177
  add_filter( 'woocommerce_get_price_including_tax', array( $this, 'format_price_after_including_excluding_tax' ), PHP_INT_MAX, 3 );
179
  }
180
  }
181
 
182
+ // Free Shipping.
183
  add_filter( 'woocommerce_shipping_free_shipping_instance_option', array( $this, 'convert_free_shipping_min_amount' ), 10, 3 );
184
  add_filter( 'woocommerce_shipping_free_shipping_option', array( $this, 'convert_free_shipping_min_amount' ), 10, 3 );
185
 
186
+ // WooCommerce Points and Rewards plugin.
187
+ add_filter( 'option_wc_points_rewards_redeem_points_ratio', array( $this, 'handle_wc_points_rewards_settings' ) );
188
+ add_filter( 'option_wc_points_rewards_earn_points_ratio', array( $this, 'handle_wc_points_rewards_settings' ) );
189
 
190
+ // Auto set default checkout billing country.
191
  add_action( 'default_checkout_billing_country', array( $this, 'set_default_checkout_country' ), 900 );
192
  }
193
 
194
  /**
195
+ * Set_default_checkout_country.
196
  *
197
+ * @version 5.6.2
198
  * @since 5.3.0
199
  *
200
+ * @param string $default_country defins the default country.
201
  *
202
  * @return array|null|string
203
  */
204
+ public function set_default_checkout_country( $default_country ) {
205
  if (
206
+ 'yes' !== get_option( 'wcj_price_by_country_set_dft_checkout_billing_country', 'no' ) ||
207
+ empty( $country = null !== ( $country = wcj_session_get( 'wcj-country' ) ) ? $country : ( $country = $this->get_customer_country_by_ip() ) ) //phpcs:ignore
208
  ) {
209
  return $default_country;
210
  }
213
  }
214
 
215
  /**
216
+ * Handle_wc_points_rewards_settings.
217
  *
218
+ * @version 5.6.2
219
  * @since 5.2.0
220
  *
221
+ * @param string $value defines the value for points reward.
222
  *
223
  * @return string
224
  */
225
+ public function handle_wc_points_rewards_settings( $value ) {
226
  if (
227
  'yes' !== get_option( 'wcj_price_by_country_comp_woo_points_rewards', 'no' )
228
  || empty( $value )
240
  }
241
 
242
  /**
243
+ * Convert_free_shipping_min_amount.
244
  *
245
+ * @version 5.6.2
246
  * @since 5.1.0
247
  *
248
+ * @param string $option defines the option for shipping.
249
+ * @param string $key defines the key for shipping.
250
+ * @param string $method defines the method for shipping.
251
  *
252
  * @return mixed
253
  */
254
+ public function convert_free_shipping_min_amount( $option, $key, $method ) {
255
  if (
256
  'no' === get_option( 'wcj_price_by_country_compatibility_free_shipping', 'no' )
257
  || 'min_amount' !== $key
265
  }
266
 
267
  /**
268
+ * Append_price_filter_post_meta_join.
269
  *
270
+ * @version 5.6.2
271
  * @since 5.1.0
272
  *
273
+ * @param string $sql defines the sql query.
274
+ * @param string $country_group_id defines the country group.
275
  *
276
  * @return string
277
  */
285
  }
286
 
287
  /**
288
+ * Get_price_filter_post_meta_join.
289
  *
290
+ * @version 5.6.2
291
  * @since 5.1.0
292
  *
293
+ * @param string $country_group_id defines the group id of country.
294
  *
295
  * @return string
296
  */
300
  }
301
 
302
  /**
303
+ * Price_filter_post_clauses_sort.
304
  *
305
+ * @version 5.6.2
306
  * @since 5.1.0
307
  *
308
+ * @param array $args defines the arguments.
309
+ * @param object $wp_query defines the wp query object.
310
  *
311
  * @return mixed
312
  */
313
+ public function price_filter_post_clauses_sort( $args, $wp_query ) {
314
+ $group_id = $this->get_customer_country_group_id();
315
+ $country_exchange_rate = get_option( 'wcj_price_by_country_exchange_rate_group_' . $group_id, 1 );
316
  if (
317
+ ! $wp_query->is_main_query()
318
+ || 'price' !== $wp_query->get( 'orderby' )
319
+ || empty( $group_id )
320
+ || (float) 1 === (float) $country_exchange_rate
321
  ) {
322
  return $args;
323
  }
335
  }
336
 
337
  /**
338
+ * Price_filter_post_clauses.
339
  *
340
+ * @version 5.6.2
341
  * @since 5.1.0
342
  *
343
  * @see WC_Query::price_filter_post_clauses()
344
  *
345
+ * @param array $args defines the arguments.
346
+ * @param object $wp_query defines the wp query object.
347
  *
348
  * @return mixed
349
  */
350
+ public function price_filter_post_clauses( $args, $wp_query ) {
351
  global $wpdb;
352
+ $wpnonce = wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) );
353
+ $group_id = $this->get_customer_country_group_id();
354
+ $country_exchange_rate = get_option( 'wcj_price_by_country_exchange_rate_group_' . $group_id, 1 );
355
+ if ( ! $wpnonce || ! $wp_query->is_main_query() || ( ! isset( $_GET['max_price'] ) && ! isset( $_GET['min_price'] ) ) || empty( $group_id ) || (float) 1 === (float) $country_exchange_rate ) {
 
 
356
  return $args;
357
  }
358
  $current_min_price = isset( $_GET['min_price'] ) ? floatval( wp_unslash( $_GET['min_price'] ) ) : 0;
378
  *
379
  * @see price-slider.js->init_price_filter()
380
  *
381
+ * @version 5.6.2
382
  * @since 5.1.0
383
  */
384
+ public function add_compatibility_with_price_filter_widget() {
385
  if (
386
  ! is_active_widget( false, false, 'woocommerce_price_filter' )
387
  || 'no' === get_option( 'wcj_price_by_country_price_filter_widget_support_enabled', 'no' )
392
  <?php
393
  $group_id = $this->get_customer_country_group_id();
394
  $exchange_rate = get_option( 'wcj_price_by_country_exchange_rate_group_' . $group_id, 1 );
395
+ if ( (string) 1 === $exchange_rate ) {
396
  return;
397
  }
398
  ?>
483
  }
484
 
485
  /**
486
+ * Woocommerce_price_filter_sql.
487
  *
488
+ * @version 5.6.2
489
  * @since 5.1.0
490
  *
491
  * @see WC_Widget_Price_Filter::get_filtered_price()
492
  *
493
+ * @param string $sql defines the sql query.
494
+ * @param string $meta_query_sql defines the meta query sql.
495
+ * @param string $tax_query_sql defines the tax query sql.
496
  *
497
  * @return string
498
  */
499
+ public function woocommerce_price_filter_sql( $sql, $meta_query_sql, $tax_query_sql ) {
500
+ $group_id = $this->get_customer_country_group_id();
501
+ $country_exchange_rate = get_option( 'wcj_price_by_country_exchange_rate_group_' . $group_id, 1 );
502
  if (
503
  is_admin()
504
  || 'no' === get_option( 'wcj_price_by_country_price_filter_widget_support_enabled', 'no' )
505
+ || empty( $group_id )
506
+ || (float) 1 === (float) $country_exchange_rate
507
  ) {
508
  return $sql;
509
  }
545
  }
546
 
547
  /**
548
+ * Format_price_after_including_excluding_tax.
549
  *
550
+ * @version 5.6.2
551
  * @since 4.4.0
552
  *
553
+ * @param string $return_price defines the return price.
554
+ * @param int $qty defines the quantity.
555
+ * @param object $product defines the product object.
556
  *
557
  * @return float|int
558
  */
559
+ public function format_price_after_including_excluding_tax( $return_price, $qty, $product ) {
560
  $precision = get_option( 'woocommerce_price_num_decimals', 2 );
561
  $return_price = wcj_price_by_country_rounding( $return_price, $precision );
562
  if ( 'yes' === get_option( 'wcj_price_by_country_make_pretty', 'no' ) && $return_price >= 0.5 && $precision > 0 ) {
566
  }
567
 
568
  /**
569
+ * Enqueue_wselect_scripts.
570
  *
571
+ * @version 5.6.2
572
  * @since 2.5.4
573
  */
574
+ public function enqueue_wselect_scripts() {
575
+ wp_enqueue_style( 'wcj-wSelect-style', wcj_plugin_url() . '/includes/lib/wSelect/wSelect.css', array(), w_c_j()->version );
576
+ wp_enqueue_script( 'wcj-wSelect', wcj_plugin_url() . '/includes/lib/wSelect/wSelect.min.js', array(), w_c_j()->version, true );
577
+ wp_enqueue_script( 'wcj-wcj-wSelect', wcj_plugin_url() . '/includes/js/wcj-wSelect.js', array(), w_c_j()->version, true );
578
  }
579
 
580
  /**
581
+ * Price_filter_meta_query.
582
  *
583
+ * @version 5.6.2
584
  * @since 2.5.3
585
+ * @param string $meta_query defines the meta query.
586
+ * @param string $_wc_query defines the wc query.
587
  */
588
+ public function price_filter_meta_query( $meta_query, $_wc_query ) {
589
  foreach ( $meta_query as $_key => $_query ) {
590
  if ( isset( $_query['price_filter'] ) && true === $_query['price_filter'] && isset( $_query['key'] ) ) {
591
+ $group_id = $this->get_customer_country_group_id();
592
+ if ( null !== $group_id && '' !== $group_id ) {
593
+ $meta_query[ $_key ]['key'] = '_wcj_price_by_country_' . $group_id;
594
  }
595
  }
596
  }
598
  }
599
 
600
  /**
601
+ * Change_price_grouped.
602
  *
603
+ * @version 5.6.2
604
  * @since 2.5.0
605
+ * @param string $price defines the product price.
606
+ * @param string $qty defines the quantity of product.
607
+ * @param object $_product defines the product object.
608
  */
609
+ public function change_price_grouped( $price, $qty, $_product ) {
610
  if ( $_product->is_type( 'grouped' ) ) {
611
  if ( 'yes' === get_option( 'wcj_price_by_country_local_enabled', 'yes' ) ) {
612
  foreach ( $_product->get_children() as $child_id ) {
613
  $the_price = get_post_meta( $child_id, '_price', true );
614
  $the_product = wc_get_product( $child_id );
615
  $the_price = wcj_get_product_display_price( $the_product, $the_price, 1 );
616
+ if ( (string) $the_price === (string) $price ) {
617
  return $this->change_price( $price, $child_id );
618
  }
619
  }
625
  }
626
 
627
  /**
628
+ * Get_customer_country_by_ip.
629
  *
630
+ * @version 5.6.2
631
  * @since 2.5.0
632
  */
633
+ public function get_customer_country_by_ip() {
634
  if ( isset( $this->customer_country_by_ip ) ) {
635
  return $this->customer_country_by_ip;
636
  }
637
  if ( class_exists( 'WC_Geolocation' ) ) {
638
+ // Get the country by IP.
639
  $location = WC_Geolocation::geolocate_ip( ( 'wc' === get_option( 'wcj_price_by_country_ip_detection_method', 'wc' ) ? '' : wcj_get_the_ip() ) );
640
+ // Base fallback.
641
  if ( empty( $location['country'] ) ) {
642
  $location = wc_format_country_state_string( apply_filters( 'woocommerce_customer_default_location', get_option( 'woocommerce_default_country' ) ) );
643
  }
651
  }
652
 
653
  /**
654
+ * Change_price_shipping.
655
+ *
656
+ * @version 5.6.2
657
  *
658
+ * @param string $package_rates defines the rates of the package.
659
+ * @param object $package defines the shipping package object.
660
  */
661
+ public function change_price_shipping( $package_rates, $package ) {
662
+ $group_id = $this->get_customer_country_group_id();
663
+ if ( null !== $group_id && '' !== $group_id ) {
664
  $country_exchange_rate = get_option( 'wcj_price_by_country_exchange_rate_group_' . $group_id, 1 );
665
  return wcj_change_price_shipping_package_rates( $package_rates, $country_exchange_rate );
666
  } else {
669
  }
670
 
671
  /**
672
+ * Get_customer_country_group_id.
673
  *
674
+ * @version 5.6.2
675
  * @todo [feature] (maybe) `( 'cart_and_checkout' === get_option( 'wcj_price_by_country_override_scope', 'all' ) && ( is_cart() || is_checkout() ) ) ||`
676
  */
677
+ public function get_customer_country_group_id() {
678
 
679
  if ( 'yes' === get_option( 'wcj_price_by_country_revert', 'no' ) && is_checkout() ) {
680
  $this->customer_country_group_id = -1;
681
  return null;
682
  }
683
 
684
+ // We already know the group - nothing to calculate - return group.
685
  if (
686
  'yes' === get_option( 'wcj_price_by_country_save_country_group_id', 'yes' )
687
+ && isset( $this->customer_country_group_id ) && null !== $this->customer_country_group_id && $this->customer_country_group_id > 0
688
  ) {
689
  return $this->customer_country_group_id;
690
  }
691
 
692
+ $wpnonce = true;
693
+ if ( function_exists( 'wp_verify_nonce' ) ) {
694
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
695
+ }
696
+
697
+ // Get the country.
698
+ $override_option = get_option( 'wcj_price_by_country_override_on_checkout_with_billing_country', 'no' );
699
+ if ( $wpnonce && isset( $_GET['country'] ) && '' !== $_GET['country'] && wcj_is_user_role( 'administrator' ) ) {
700
+ $country = sanitize_text_field( wp_unslash( $_GET['country'] ) );
701
+ } elseif ( 'no' !== $override_option && (
702
  ( 'all' === get_option( 'wcj_price_by_country_override_scope', 'all' ) ) ||
703
  ( 'checkout' === get_option( 'wcj_price_by_country_override_scope', 'all' ) && is_checkout() )
704
  )
705
  && isset( WC()->customer )
706
+ && ( ( 'yes' === $override_option && '' !== wcj_customer_get_country() ) || ( 'shipping_country' === $override_option && '' !== WC()->customer->get_shipping_country() ) )
707
  ) {
708
  $country = ( 'yes' === $override_option ) ? wcj_customer_get_country() : WC()->customer->get_shipping_country();
709
  } else {
710
+ $session_value = wcj_session_get( 'wcj-country' );
711
  if ( 'by_ip' === get_option( 'wcj_price_by_country_customer_country_detection_method', 'by_ip' ) ) {
712
  $country = $this->get_customer_country_by_ip();
713
  } elseif ( 'by_ip_then_by_user_selection' === get_option( 'wcj_price_by_country_customer_country_detection_method', 'by_ip' ) ) {
714
+ $country = null !== $session_value ? $session_value : $this->get_customer_country_by_ip();
715
  } elseif ( 'by_user_selection' === get_option( 'wcj_price_by_country_customer_country_detection_method', 'by_ip' ) ) {
716
  $country = wcj_session_get( 'wcj-country' );
717
  } elseif ( 'by_wpml' === get_option( 'wcj_price_by_country_customer_country_detection_method', 'by_ip' ) ) {
725
  }
726
 
727
  $this->customer_country_group_id = $this->get_country_group_id( $country );
728
+ if ( - 1 >= $this->customer_country_group_id ) {
729
  return $this->customer_country_group_id;
730
  }
731
 
732
+ // No country group found.
733
  $this->customer_country_group_id = -1;
734
  return null;
735
  }
737
  /**
738
  * Gets country group id.
739
  *
740
+ * @version 5.6.2
741
  * @since 4.1.0
742
+ * @param string $country country code from the group of country.
743
  *
744
  * @return int
745
  */
746
+ public function get_country_group_id( $country ) {
747
+ // Get the country group id - go through all the groups, first found group is returned.
748
+ $wcj_price_by_country_total_groups_number = apply_filters( 'booster_option', 1, get_option( 'wcj_price_by_country_total_groups_number', 1 ) );
749
+ for ( $i = 1; $i <= $wcj_price_by_country_total_groups_number; $i ++ ) {
750
  switch ( get_option( 'wcj_price_by_country_selection', 'comma_list' ) ) {
751
  case 'comma_list':
752
  $country_exchange_rate_group = get_option( 'wcj_price_by_country_exchange_rate_countries_group_' . $i );
760
  $country_exchange_rate_group = get_option( 'wcj_price_by_country_countries_group_chosen_select_' . $i, '' );
761
  break;
762
  }
763
+ if ( is_array( $country_exchange_rate_group ) && in_array( $country, $country_exchange_rate_group, true ) ) {
764
  return $i;
765
  }
766
  }
768
  }
769
 
770
  /**
771
+ * Change_currency_code.
772
+ *
773
+ * @param string $currency contains currency code.
774
  */
775
+ public function change_currency_code( $currency ) {
776
+ $group_id = $this->get_customer_country_group_id();
777
+ if ( null !== $group_id && '' !== $group_id ) {
778
  $country_currency_code = get_option( 'wcj_price_by_country_exchange_rate_currency_group_' . $group_id );
779
+ if ( null !== $country_currency_code && '' !== $country_currency_code ) {
780
  return $country_currency_code;
781
  }
782
  }
783
  return $currency;
784
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
785
 
786
  /**
787
+ * Get_variation_prices_hash.
788
  *
789
+ * @version 5.6.2
790
  * @since 2.4.3
791
+ * @param array $price_hash contains price related data.
792
+ * @param object $_product object of the product.
793
+ * @param bool $display for_display true/false.
794
  */
795
+ public function get_variation_prices_hash( $price_hash, $_product, $display ) {
796
  $group_id = $this->get_customer_country_group_id();
797
  $price_hash['wcj_price_by_country_group_id_data'] = array(
798
  $group_id,
809
  }
810
 
811
  /**
812
+ * Change_price.
813
  *
814
+ * @version 5.6.2
815
+ * @param string $price defines the price for conversion.
816
+ * @param object $product Product Object.
817
  */
818
+ public function change_price( $price, $product ) {
819
+ $group_id = $this->get_customer_country_group_id();
820
+ if ( null !== $group_id && '' !== $group_id ) {
821
+ $product_generated_cart_id = WC()->cart->generate_cart_id( wcj_get_product_id( $product ) );
822
  if ( 'yes' === get_option( 'wcj_price_by_country_compatibility_woo_discount_rules', 'no' ) ) {
823
  global $flycart_woo_discount_rules;
824
  if (
825
  ! empty( $flycart_woo_discount_rules ) &&
826
  ! has_action( 'woocommerce_before_calculate_totals', array( $flycart_woo_discount_rules, 'applyDiscountRules' ) )
827
+ && ( $product_cart_id = $product_generated_cart_id ) && //phpcs:ignore
828
  WC()->cart->find_product_in_cart( $product_cart_id )
829
  ) {
830
  return $price;
863
 
864
  return $new_price;
865
  }
866
+ // No changes.
867
  return $price;
868
  }
869
  }
870
 
871
  endif;
872
 
873
+ return new WCJ_Price_By_Country_Core();
includes/price-by-country/class-wcj-price-by-country-group-generator.php CHANGED
@@ -2,8 +2,9 @@
2
  /**
3
  * Booster for WooCommerce - Price By Country - Group Generator
4
  *
5
- * @version 3.9.0
6
  * @author Pluggabl LLC.
 
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) {
@@ -12,40 +13,49 @@ if ( ! defined( 'ABSPATH' ) ) {
12
 
13
  if ( ! class_exists( 'WCJ_Price_By_Country_Group_Generator' ) ) :
14
 
 
 
 
15
  class WCJ_Price_By_Country_Group_Generator {
16
 
17
  /**
18
  * Constructor.
19
  *
20
- * @version 3.9.0
21
  */
22
- function __construct() {
23
  require_once 'wcj-country-currency.php';
24
  add_action( 'admin_init', array( $this, 'create_all_countries_groups' ) );
25
  add_action( 'admin_notices', array( $this, 'create_all_countries_groups_notices' ) );
26
  }
27
 
28
  /**
29
- * create_all_countries_groups_notices.
30
  *
31
- * @version 3.9.0
32
  * @since 3.9.0
33
  */
34
- function create_all_countries_groups_notices() {
35
- if ( isset( $_GET['wcj_generate_country_groups_finished'] ) ) {
36
- echo '<div class="notice notice-success is-dismissible"><p>' . __( 'Country groups successfully generated.', 'woocommerce-jetpack' ) . '</p></div>';
 
37
  }
38
- if ( isset( $_GET['wcj_generate_country_groups_error'] ) ) {
39
- echo '<div class="notice notice-error"><p>' . __( 'Country groups generation failed.', 'woocommerce-jetpack' ) . '</p></div>';
 
 
 
40
  }
41
  }
42
 
43
  /**
44
- * get_currency_countries.
 
 
45
  *
46
- * @version 3.9.0
47
  */
48
- function get_currency_countries( $limit_currencies = '' ) {
49
  if ( 'paypal_only' === $limit_currencies ) {
50
  $default_currency = get_woocommerce_currency();
51
  $paypal_supported_currencies = wcj_get_paypal_supported_currencies();
@@ -54,7 +64,7 @@ if ( ! class_exists( 'WCJ_Price_By_Country_Group_Generator' ) ) :
54
  $currencies = array();
55
  foreach ( $country_currency as $country => $currency ) {
56
  if ( 'paypal_only' === $limit_currencies ) {
57
- if ( ! in_array( $currency, $paypal_supported_currencies ) ) {
58
  $currency = $default_currency;
59
  }
60
  }
@@ -64,25 +74,29 @@ if ( ! class_exists( 'WCJ_Price_By_Country_Group_Generator' ) ) :
64
  }
65
 
66
  /**
67
- * create_all_countries_groups.
68
  *
69
- * @version 3.9.0
70
  * @todo add nonce verification
71
  */
72
- function create_all_countries_groups() {
73
- // Verification
74
- if ( ! isset( $_GET['wcj_generate_country_groups'] ) ) {
 
 
 
 
75
  return;
76
  }
77
- if ( isset( $_POST['save'] ) ) {
78
  return;
79
  }
80
  if ( ! wcj_is_user_role( 'administrator' ) || 1 === apply_filters( 'booster_option', 1, '' ) ) {
81
  wp_safe_redirect( add_query_arg( 'wcj_generate_country_groups_error', true, remove_query_arg( 'wcj_generate_country_groups' ) ) );
82
  exit;
83
  }
84
- // Generation
85
- $currencies = $this->get_currency_countries( $_GET['wcj_generate_country_groups'] );
86
  $number_of_groups = count( $currencies );
87
  update_option( 'wcj_price_by_country_total_groups_number', $number_of_groups );
88
  $i = 0;
2
  /**
3
  * Booster for WooCommerce - Price By Country - Group Generator
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
+ * @package Booster_For_WooCommerce/includes/Price_By_Country
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) {
13
 
14
  if ( ! class_exists( 'WCJ_Price_By_Country_Group_Generator' ) ) :
15
 
16
+ /**
17
+ * WCJ_Price_By_Country_Group_Generator {.
18
+ */
19
  class WCJ_Price_By_Country_Group_Generator {
20
 
21
  /**
22
  * Constructor.
23
  *
24
+ * @version 5.6.2
25
  */
26
+ public function __construct() {
27
  require_once 'wcj-country-currency.php';
28
  add_action( 'admin_init', array( $this, 'create_all_countries_groups' ) );
29
  add_action( 'admin_notices', array( $this, 'create_all_countries_groups_notices' ) );
30
  }
31
 
32
  /**
33
+ * Create_all_countries_groups_notices.
34
  *
35
+ * @version 5.6.2
36
  * @since 3.9.0
37
  */
38
+ public function create_all_countries_groups_notices() {
39
+ $wpnonce = true;
40
+ if ( function_exists( 'wp_verify_nonce' ) ) {
41
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
42
  }
43
+ if ( $wpnonce && isset( $_GET['wcj_generate_country_groups_finished'] ) ) {
44
+ echo '<div class="notice notice-success is-dismissible"><p>' . esc_html__( 'Country groups successfully generated.', 'woocommerce-jetpack' ) . '</p></div>';
45
+ }
46
+ if ( $wpnonce && isset( $_GET['wcj_generate_country_groups_error'] ) ) {
47
+ echo '<div class="notice notice-error"><p>' . esc_html__( 'Country groups generation failed.', 'woocommerce-jetpack' ) . '</p></div>';
48
  }
49
  }
50
 
51
  /**
52
+ * Get_currency_countries.
53
+ *
54
+ * @version 5.6.2
55
  *
56
+ * @param string $limit_currencies limit of the currencies.
57
  */
58
+ public function get_currency_countries( $limit_currencies = '' ) {
59
  if ( 'paypal_only' === $limit_currencies ) {
60
  $default_currency = get_woocommerce_currency();
61
  $paypal_supported_currencies = wcj_get_paypal_supported_currencies();
64
  $currencies = array();
65
  foreach ( $country_currency as $country => $currency ) {
66
  if ( 'paypal_only' === $limit_currencies ) {
67
+ if ( ! in_array( $currency, $paypal_supported_currencies, true ) ) {
68
  $currency = $default_currency;
69
  }
70
  }
74
  }
75
 
76
  /**
77
+ * Create_all_countries_groups.
78
  *
79
+ * @version 5.6.2
80
  * @todo add nonce verification
81
  */
82
+ public function create_all_countries_groups() {
83
+ $wpnonce = true;
84
+ if ( function_exists( 'wp_verify_nonce' ) ) {
85
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
86
+ }
87
+ // Verification.
88
+ if ( ! $wpnonce || ! isset( $_GET['wcj_generate_country_groups'] ) ) {
89
  return;
90
  }
91
+ if ( $wpnonce && isset( $_POST['save'] ) ) {
92
  return;
93
  }
94
  if ( ! wcj_is_user_role( 'administrator' ) || 1 === apply_filters( 'booster_option', 1, '' ) ) {
95
  wp_safe_redirect( add_query_arg( 'wcj_generate_country_groups_error', true, remove_query_arg( 'wcj_generate_country_groups' ) ) );
96
  exit;
97
  }
98
+ // Generation.
99
+ $currencies = $this->get_currency_countries( sanitize_text_field( wp_unslash( $_GET['wcj_generate_country_groups'] ) ) );
100
  $number_of_groups = count( $currencies );
101
  update_option( 'wcj_price_by_country_total_groups_number', $number_of_groups );
102
  $i = 0;
includes/price-by-country/class-wcj-price-by-country-local.php CHANGED
@@ -2,25 +2,29 @@
2
  /**
3
  * Booster for WooCommerce - Price by Country - Local
4
  *
5
- * @version 4.0.0
6
  * @author Pluggabl LLC.
7
  * @todo (maybe) remove this and leave only standard meta box option (i.e. only `'meta_box' === wcj_get_option( 'wcj_price_by_country_local_options_style', 'inline' )`)
 
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) {
11
  exit;
12
  }
13
 
14
- if ( ! class_exists( 'WCJ_Price_by_Country_Local' ) ) :
15
 
16
- class WCJ_Price_by_Country_Local {
 
 
 
17
 
18
  /**
19
  * Constructor.
20
  *
21
- * @version 2.3.9
22
  */
23
- function __construct() {
24
  add_action( 'woocommerce_ajax_save_product_variations', array( $this, 'save_custom_meta_box_on_product_edit_ajax' ), PHP_INT_MAX, 1 );
25
  add_action( 'save_post_product', array( $this, 'save_custom_meta_box_on_product_edit' ), PHP_INT_MAX, 2 );
26
  add_action( 'woocommerce_product_options_pricing', array( $this, 'add_simple_pricing' ), PHP_INT_MAX, 0 );
@@ -30,25 +34,32 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Local' ) ) :
30
  }
31
 
32
  /**
33
- * add_simple_pricing.
34
  */
35
- function add_simple_pricing() {
36
  $this->create_custom_meta_box( 'simple' );
37
  }
38
 
39
  /**
40
- * add_variable_pricing.
 
 
 
 
41
  */
42
- function add_variable_pricing( $loop, $variation_data, $variation ) {
43
  $this->create_custom_meta_box( 'variable', $variation->ID );
44
  }
45
 
46
  /**
47
- * create_custom_meta_box.
 
 
 
48
  */
49
- function create_custom_meta_box( $simple_or_variable, $product_id = 0 ) {
50
 
51
- $current_post_id = ( $product_id == 0 ) ? get_the_ID() : $product_id;
52
  $the_product = wc_get_product( $current_post_id );
53
  if ( ! $the_product ) {
54
  return;
@@ -56,7 +67,7 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Local' ) ) :
56
 
57
  $total_country_groups_number = $this->get_total_country_groups_number();
58
 
59
- // Start html
60
  $html = '';
61
 
62
  if ( $the_product->is_type( 'variation' ) ) {
@@ -65,29 +76,29 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Local' ) ) :
65
  $html .= $this->get_all_options_html( $simple_or_variable, $current_post_id, $total_country_groups_number );
66
  }
67
 
68
- // Output
69
- echo $html;
70
  }
71
 
72
  /**
73
- * add_hidden_save.
74
  */
75
- function add_hidden_save() {
76
  $meta_box_id = 'price_by_country';
77
- echo '<input type="hidden" name="woojetpack_' . $meta_box_id . '_save_post" value="woojetpack_' . $meta_box_id . '_save_post">';
78
  }
79
 
80
  /**
81
- * get_total_country_groups_number.
82
  */
83
- function get_total_country_groups_number() {
84
  return apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_price_by_country_total_groups_number', 1 ) );
85
  }
86
 
87
  /**
88
- * get_prices_options.
89
  */
90
- function get_prices_options() {
91
 
92
  $meta_box_id = 'price_by_country';
93
  $this->scope = 'local';
@@ -121,13 +132,18 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Local' ) ) :
121
 
122
  /**
123
  * Save options.
 
 
 
 
124
  */
125
- function save_options( $post_id, $total_options_groups, $variation_id_addon = '' ) {
 
126
  $options = $this->get_prices_options();
127
  for ( $i = 1; $i <= $total_options_groups; $i++ ) {
128
  foreach ( $options as $option ) {
129
- if ( isset( $_POST[ $option['id'] . $i . $variation_id_addon ] ) ) {
130
- update_post_meta( $post_id, '_' . $option['id'] . $i, $_POST[ $option['id'] . $i . $variation_id_addon ] );
131
  } elseif ( 'checkbox' === $option['type'] ) {
132
  update_post_meta( $post_id, '_' . $option['id'] . $i, 'off' );
133
  }
@@ -138,22 +154,26 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Local' ) ) :
138
  /**
139
  * Save Custom Meta Box on Product Edit - variations "Save Changes" button (ajax).
140
  *
141
- * @version 2.3.9
142
  * @since 2.3.9
 
143
  */
144
- function save_custom_meta_box_on_product_edit_ajax( $product_id ) {
145
  return $this->save_custom_meta_box_on_product_edit( $product_id, /* 'ajax' */ null );
146
  }
147
 
148
  /**
149
  * Save Custom Meta Box on Product Edit.
 
 
 
150
  */
151
- function save_custom_meta_box_on_product_edit( $post_id, $post ) {
152
-
153
  $meta_box_id = 'price_by_country';
154
 
155
  // Check that we are saving with custom meta box displayed.
156
- if ( ! isset( $_POST[ 'woojetpack_' . $meta_box_id . '_save_post' ] ) ) {
157
  return;
158
  }
159
 
@@ -178,9 +198,14 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Local' ) ) :
178
  }
179
 
180
  /**
181
- * get_option_field_html.
 
 
 
 
 
182
  */
183
- function get_option_field_html( $current_post_id, $option_id, $option, $variation_id_addon = '' ) {
184
  $html = '';
185
  $option_value = get_post_meta( $current_post_id, '_' . $option_id, true );
186
  $option_id .= $variation_id_addon;
@@ -189,16 +214,21 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Local' ) ) :
189
  }
190
 
191
  /**
192
- * get_all_options_html.
 
 
193
  *
194
- * @version 4.0.0
 
 
 
195
  */
196
- function get_all_options_html( $simple_or_variable, $current_post_id, $total_number, $variation_id_addon = '' ) {
197
  $html = '';
198
  $options = $this->get_prices_options();
199
  for ( $i = 1; $i <= $total_number; $i++ ) {
200
 
201
- if ( 'variable' == $simple_or_variable ) {
202
  $html .= '<div>';
203
  }
204
 
@@ -208,10 +238,12 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Local' ) ) :
208
  $countries .= wcj_get_option( 'wcj_price_by_country_exchange_rate_countries_group_' . $i, '' );
209
  break;
210
  case 'multiselect':
211
- $countries .= ( '' != ( $group = wcj_get_option( 'wcj_price_by_country_countries_group_' . $i, '' ) ) ? implode( ',', $group ) : '' );
 
212
  break;
213
  case 'chosen_select':
214
- $countries .= ( '' != ( $group = wcj_get_option( 'wcj_price_by_country_countries_group_chosen_select_' . $i, '' ) ) ? implode( ',', $group ) : '' );
 
215
  break;
216
  }
217
  $admin_title = wcj_get_option( 'wcj_price_by_country_countries_group_admin_title_' . $i, __( 'Group', 'woocommerce-jetpack' ) . ' #' . $i );
@@ -221,23 +253,23 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Local' ) ) :
221
 
222
  foreach ( $options as $option ) {
223
  $option_id = $option['id'] . $i;
224
- if ( 'simple' == $simple_or_variable ) {
225
  $html .= '<p class="form-field ' . $option_id . $variation_id_addon . '_field">';
226
  } else {
227
  $column_position = 'full';
228
- if ( 'checkbox' != $option['type'] ) {
229
  $column_position = ( false !== strpos( $option['id'], '_regular_price_' ) ) ? 'first' : 'last';
230
  }
231
  $html .= '<p class="form-row form-row-' . $column_position . '">';
232
  }
233
  $group_currency_code = wcj_get_option( 'wcj_price_by_country_exchange_rate_currency_group_' . $i );
234
- $currency_code_html = ( 'checkbox' != $option['type'] ) ? ' (' . get_woocommerce_currency_symbol( $group_currency_code ) . ')' : '';
235
  $html .= '<label for="' . $option_id . $variation_id_addon . '">' . $option['title'] . $currency_code_html . '</label>';
236
  $html .= $this->get_option_field_html( $current_post_id, $option_id, $option, $variation_id_addon );
237
  $html .= '</p>';
238
  }
239
 
240
- if ( 'variable' == $simple_or_variable ) {
241
  $html .= '</div>';
242
  }
243
  }
@@ -248,4 +280,4 @@ if ( ! class_exists( 'WCJ_Price_by_Country_Local' ) ) :
248
 
249
  endif;
250
 
251
- return new WCJ_Price_by_Country_Local();
2
  /**
3
  * Booster for WooCommerce - Price by Country - Local
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @todo (maybe) remove this and leave only standard meta box option (i.e. only `'meta_box' === wcj_get_option( 'wcj_price_by_country_local_options_style', 'inline' )`)
8
+ * @package Booster_For_WooCommerce/includes/Price_By_Country
9
  */
10
 
11
  if ( ! defined( 'ABSPATH' ) ) {
12
  exit;
13
  }
14
 
15
+ if ( ! class_exists( 'WCJ_Price_By_Country_Local' ) ) :
16
 
17
+ /**
18
+ * WCJ_Price_By_Country_Local.
19
+ */
20
+ class WCJ_Price_By_Country_Local {
21
 
22
  /**
23
  * Constructor.
24
  *
25
+ * @version 5.6.2
26
  */
27
+ public function __construct() {
28
  add_action( 'woocommerce_ajax_save_product_variations', array( $this, 'save_custom_meta_box_on_product_edit_ajax' ), PHP_INT_MAX, 1 );
29
  add_action( 'save_post_product', array( $this, 'save_custom_meta_box_on_product_edit' ), PHP_INT_MAX, 2 );
30
  add_action( 'woocommerce_product_options_pricing', array( $this, 'add_simple_pricing' ), PHP_INT_MAX, 0 );
34
  }
35
 
36
  /**
37
+ * Add_simple_pricing.
38
  */
39
+ public function add_simple_pricing() {
40
  $this->create_custom_meta_box( 'simple' );
41
  }
42
 
43
  /**
44
+ * Add_variable_pricing.
45
+ *
46
+ * @param object $loop defines the loop.
47
+ * @param object $variation_data defines the variation data.
48
+ * @param object $variation defines the variation.
49
  */
50
+ public function add_variable_pricing( $loop, $variation_data, $variation ) {
51
  $this->create_custom_meta_box( 'variable', $variation->ID );
52
  }
53
 
54
  /**
55
+ * Create_custom_meta_box.
56
+ *
57
+ * @param string $simple_or_variable defines the product us simple or variable product.
58
+ * @param int $product_id defines the product id.
59
  */
60
+ public function create_custom_meta_box( $simple_or_variable, $product_id = 0 ) {
61
 
62
+ $current_post_id = ( 0 === $product_id || null === $product_id || '' === $product_id ) ? get_the_ID() : $product_id;
63
  $the_product = wc_get_product( $current_post_id );
64
  if ( ! $the_product ) {
65
  return;
67
 
68
  $total_country_groups_number = $this->get_total_country_groups_number();
69
 
70
+ // Start html.
71
  $html = '';
72
 
73
  if ( $the_product->is_type( 'variation' ) ) {
76
  $html .= $this->get_all_options_html( $simple_or_variable, $current_post_id, $total_country_groups_number );
77
  }
78
 
79
+ // Output.
80
+ echo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
81
  }
82
 
83
  /**
84
+ * Add_hidden_save.
85
  */
86
+ public function add_hidden_save() {
87
  $meta_box_id = 'price_by_country';
88
+ echo '<input type="hidden" name="woojetpack_' . esc_html( $meta_box_id ) . '_save_post" value="woojetpack_' . esc_html( $meta_box_id ) . '_save_post">';
89
  }
90
 
91
  /**
92
+ * Get_total_country_groups_number.
93
  */
94
+ public function get_total_country_groups_number() {
95
  return apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_price_by_country_total_groups_number', 1 ) );
96
  }
97
 
98
  /**
99
+ * Get_prices_options.
100
  */
101
+ private function get_prices_options() {
102
 
103
  $meta_box_id = 'price_by_country';
104
  $this->scope = 'local';
132
 
133
  /**
134
  * Save options.
135
+ *
136
+ * @param string $post_id defines the post id.
137
+ * @param string $total_options_groups defines the total groups options.
138
+ * @param string $variation_id_addon defines the variation addon id.
139
  */
140
+ private function save_options( $post_id, $total_options_groups, $variation_id_addon = '' ) {
141
+ $wpnonce = wp_verify_nonce( wp_unslash( isset( $_POST['woocommerce_meta_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['woocommerce_meta_nonce'] ) ) : '' ), 'woocommerce_save_data' );
142
  $options = $this->get_prices_options();
143
  for ( $i = 1; $i <= $total_options_groups; $i++ ) {
144
  foreach ( $options as $option ) {
145
+ if ( $wpnonce && isset( $_POST[ $option['id'] . $i . $variation_id_addon ] ) ) {
146
+ update_post_meta( $post_id, '_' . $option['id'] . $i, sanitize_text_field( wp_unslash( $_POST[ $option['id'] . $i . $variation_id_addon ] ) ) );
147
  } elseif ( 'checkbox' === $option['type'] ) {
148
  update_post_meta( $post_id, '_' . $option['id'] . $i, 'off' );
149
  }
154
  /**
155
  * Save Custom Meta Box on Product Edit - variations "Save Changes" button (ajax).
156
  *
157
+ * @version 5.6.2
158
  * @since 2.3.9
159
+ * @param string $product_id defines the product id.
160
  */
161
+ public function save_custom_meta_box_on_product_edit_ajax( $product_id ) {
162
  return $this->save_custom_meta_box_on_product_edit( $product_id, /* 'ajax' */ null );
163
  }
164
 
165
  /**
166
  * Save Custom Meta Box on Product Edit.
167
+ *
168
+ * @param string $post_id defines the post id.
169
+ * @param object $post defines the post object.
170
  */
171
+ public function save_custom_meta_box_on_product_edit( $post_id, $post ) {
172
+ $wpnonce = wp_verify_nonce( wp_unslash( isset( $_POST['woocommerce_meta_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['woocommerce_meta_nonce'] ) ) : '' ), 'woocommerce_save_data' );
173
  $meta_box_id = 'price_by_country';
174
 
175
  // Check that we are saving with custom meta box displayed.
176
+ if ( ! $wpnonce || ! isset( $_POST[ 'woojetpack_' . $meta_box_id . '_save_post' ] ) ) {
177
  return;
178
  }
179
 
198
  }
199
 
200
  /**
201
+ * Get_option_field_html.
202
+ *
203
+ * @param string $current_post_id defines the current post id.
204
+ * @param int $option_id defines the option id.
205
+ * @param array $option defines the option.
206
+ * @param string $variation_id_addon defines the variation addon id.
207
  */
208
+ private function get_option_field_html( $current_post_id, $option_id, $option, $variation_id_addon = '' ) {
209
  $html = '';
210
  $option_value = get_post_meta( $current_post_id, '_' . $option_id, true );
211
  $option_id .= $variation_id_addon;
214
  }
215
 
216
  /**
217
+ * Get_all_options_html.
218
+ *
219
+ * @version 5.6.2
220
  *
221
+ * @param string $simple_or_variable defines the product us simple or variable product.
222
+ * @param string $current_post_id defines the current post id.
223
+ * @param string $total_number defines the total number of options.
224
+ * @param string $variation_id_addon defines the variation addon id.
225
  */
226
+ private function get_all_options_html( $simple_or_variable, $current_post_id, $total_number, $variation_id_addon = '' ) {
227
  $html = '';
228
  $options = $this->get_prices_options();
229
  for ( $i = 1; $i <= $total_number; $i++ ) {
230
 
231
+ if ( 'variable' === $simple_or_variable ) {
232
  $html .= '<div>';
233
  }
234
 
238
  $countries .= wcj_get_option( 'wcj_price_by_country_exchange_rate_countries_group_' . $i, '' );
239
  break;
240
  case 'multiselect':
241
+ $group = wcj_get_option( 'wcj_price_by_country_countries_group_' . $i, '' );
242
+ $countries .= ( '' !== $group ? implode( ',', $group ) : '' );
243
  break;
244
  case 'chosen_select':
245
+ $group = wcj_get_option( 'wcj_price_by_country_countries_group_chosen_select_' . $i, '' );
246
+ $countries .= ( '' !== $group ? implode( ',', $group ) : '' );
247
  break;
248
  }
249
  $admin_title = wcj_get_option( 'wcj_price_by_country_countries_group_admin_title_' . $i, __( 'Group', 'woocommerce-jetpack' ) . ' #' . $i );
253
 
254
  foreach ( $options as $option ) {
255
  $option_id = $option['id'] . $i;
256
+ if ( 'simple' === $simple_or_variable ) {
257
  $html .= '<p class="form-field ' . $option_id . $variation_id_addon . '_field">';
258
  } else {
259
  $column_position = 'full';
260
+ if ( 'checkbox' !== $option['type'] ) {
261
  $column_position = ( false !== strpos( $option['id'], '_regular_price_' ) ) ? 'first' : 'last';
262
  }
263
  $html .= '<p class="form-row form-row-' . $column_position . '">';
264
  }
265
  $group_currency_code = wcj_get_option( 'wcj_price_by_country_exchange_rate_currency_group_' . $i );
266
+ $currency_code_html = ( 'checkbox' !== $option['type'] ) ? ' (' . get_woocommerce_currency_symbol( $group_currency_code ) . ')' : '';
267
  $html .= '<label for="' . $option_id . $variation_id_addon . '">' . $option['title'] . $currency_code_html . '</label>';
268
  $html .= $this->get_option_field_html( $current_post_id, $option_id, $option, $variation_id_addon );
269
  $html .= '</p>';
270
  }
271
 
272
+ if ( 'variable' === $simple_or_variable ) {
273
  $html .= '</div>';
274
  }
275
  }
280
 
281
  endif;
282
 
283
+ return new WCJ_Price_By_Country_Local();
includes/reports/class-wcj-currency-reports.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Reports - Currency
4
  *
5
- * @version 5.5.9
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -29,13 +29,14 @@ if ( ! class_exists( 'WCJ_Currency_Reports' ) ) :
29
  /**
30
  * Add_reports_currency_to_admin_bar.
31
  *
32
- * @version 5.5.9
33
  * @param int | string $wp_admin_bar Difine admin_bar.
34
  */
35
  public function add_reports_currency_to_admin_bar( $wp_admin_bar ) {
36
- if ( isset( $_GET['page'] ) && 'wc-reports' === $_GET['page'] ) {
 
37
 
38
- $the_current_code = isset( $_GET['currency'] ) ? $_GET['currency'] : get_woocommerce_currency();
39
  $parent = 'reports_currency_select';
40
  $args = array(
41
  'parent' => false,
@@ -92,18 +93,19 @@ if ( ! class_exists( 'WCJ_Currency_Reports' ) ) :
92
  /**
93
  * Change_currency_symbol_reports.
94
  *
95
- * @version 3.9.0
96
  * @param string $currency_symbol Get currency symbol.
97
  * @param string $currency Get currency.
98
  */
99
  public function change_currency_symbol_reports( $currency_symbol, $currency ) {
100
- if ( isset( $_GET['page'] ) && 'wc-reports' === $_GET['page'] ) {
 
101
  if ( isset( $_GET['currency'] ) ) {
102
  if ( 'merge' === $_GET['currency'] ) {
103
  return '';
104
  } else {
105
  remove_filter( 'woocommerce_currency_symbol', array( $this, 'change_currency_symbol_reports' ), PHP_INT_MAX, 2 );
106
- $return = get_woocommerce_currency_symbol( $_GET['currency'] );
107
  add_filter( 'woocommerce_currency_symbol', array( $this, 'change_currency_symbol_reports' ), PHP_INT_MAX, 2 );
108
  return $return;
109
  }
@@ -115,18 +117,19 @@ if ( ! class_exists( 'WCJ_Currency_Reports' ) ) :
115
  /**
116
  * Filter_reports.
117
  *
118
- * @version 2.5.7
119
  * @param Array $args Get args.
120
  */
121
  public function filter_reports( $args ) {
122
- if ( isset( $_GET['page'] ) && 'wc-reports' === $_GET['page'] ) {
 
123
  if ( isset( $_GET['currency'] ) && 'merge' === $_GET['currency'] ) {
124
  return $args;
125
  }
126
  $args['where_meta'] = array(
127
  array(
128
- 'meta_key' => '_order_currency',
129
- 'meta_value' => isset( $_GET['currency'] ) ? $_GET['currency'] : get_woocommerce_currency(),
130
  'operator' => '=',
131
  ),
132
  );
2
  /**
3
  * Booster for WooCommerce - Reports - Currency
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
29
  /**
30
  * Add_reports_currency_to_admin_bar.
31
  *
32
+ * @version 5.6.2
33
  * @param int | string $wp_admin_bar Difine admin_bar.
34
  */
35
  public function add_reports_currency_to_admin_bar( $wp_admin_bar ) {
36
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
37
+ if ( $wpnonce && isset( $_GET['page'] ) && 'wc-reports' === $_GET['page'] ) {
38
 
39
+ $the_current_code = isset( $_GET['currency'] ) ? sanitize_text_field( wp_unslash( $_GET['currency'] ) ) : get_woocommerce_currency();
40
  $parent = 'reports_currency_select';
41
  $args = array(
42
  'parent' => false,
93
  /**
94
  * Change_currency_symbol_reports.
95
  *
96
+ * @version 5.6.2
97
  * @param string $currency_symbol Get currency symbol.
98
  * @param string $currency Get currency.
99
  */
100
  public function change_currency_symbol_reports( $currency_symbol, $currency ) {
101
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
102
+ if ( $wpnonce && isset( $_GET['page'] ) && 'wc-reports' === $_GET['page'] ) {
103
  if ( isset( $_GET['currency'] ) ) {
104
  if ( 'merge' === $_GET['currency'] ) {
105
  return '';
106
  } else {
107
  remove_filter( 'woocommerce_currency_symbol', array( $this, 'change_currency_symbol_reports' ), PHP_INT_MAX, 2 );
108
+ $return = get_woocommerce_currency_symbol( sanitize_text_field( wp_unslash( $_GET['currency'] ) ) );
109
  add_filter( 'woocommerce_currency_symbol', array( $this, 'change_currency_symbol_reports' ), PHP_INT_MAX, 2 );
110
  return $return;
111
  }
117
  /**
118
  * Filter_reports.
119
  *
120
+ * @version 5.6.2
121
  * @param Array $args Get args.
122
  */
123
  public function filter_reports( $args ) {
124
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
125
+ if ( $wpnonce && isset( $_GET['page'] ) && 'wc-reports' === $_GET['page'] ) {
126
  if ( isset( $_GET['currency'] ) && 'merge' === $_GET['currency'] ) {
127
  return $args;
128
  }
129
  $args['where_meta'] = array(
130
  array(
131
+ 'meta_key' => '_order_currency', //phpcs:ignore
132
+ 'meta_value' => isset( $_GET['currency'] ) ? sanitize_text_field( wp_unslash( $_GET['currency'] ) ) : get_woocommerce_currency(), //phpcs:ignore
133
  'operator' => '=',
134
  ),
135
  );
includes/reports/{wcj-class-reports-customers.php → class-wcj-reports-customers.php} RENAMED
@@ -37,7 +37,11 @@ if ( ! class_exists( 'WCJ_Reports_Customers' ) ) :
37
  * Get_report function.
38
  */
39
  public function get_report() {
40
- $report_type = isset( $_GET['country'] ) ? $_GET['country'] : 'all_countries';
 
 
 
 
41
 
42
  $html = '';
43
 
37
  * Get_report function.
38
  */
39
  public function get_report() {
40
+ $wpnonce = true;
41
+ if ( function_exists( 'wp_verify_nonce' ) ) {
42
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
43
+ }
44
+ $report_type = $wpnonce && isset( $_GET['country'] ) ? sanitize_text_field( wp_unslash( $_GET['country'] ) ) : 'all_countries';
45
 
46
  $html = '';
47
 
includes/reports/{wcj-class-reports-monthly-sales.php → class-wcj-reports-monthly-sales.php} RENAMED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Reports - Monthly Sales (with Currency Conversion)
4
  *
5
- * @version 5.5.9
6
  * @since 2.4.7
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -35,14 +35,18 @@ if ( ! class_exists( 'WCJ_Reports_Monthly_Sales' ) ) :
35
  /**
36
  * Get_report.
37
  *
38
- * @version 2.9.1
39
  * @since 2.4.7
40
  */
41
  public function get_report() {
42
- $html = '';
43
- if ( isset( $_POST['wcj_save_currency_rates'] ) && isset( $_POST['wcj_save_currency_rates_array'] ) && is_array( $_POST['wcj_save_currency_rates_array'] ) ) {
 
 
 
 
44
  // Save rates.
45
- update_option( 'wcj_reports_currency_rates', array_replace_recursive( wcj_get_option( 'wcj_reports_currency_rates', array() ), $_POST['wcj_save_currency_rates_array'] ) );
46
  $html .= '<div class="notice notice-success is-dismissible"><p><strong>' . __( 'Currency rates saved.', 'woocommerce-jetpack' ) . '</strong></p></div>';
47
  } elseif ( isset( $_POST['wcj_reset_currency_rates'] ) ) {
48
  // Delete rates.
@@ -50,7 +54,7 @@ if ( ! class_exists( 'WCJ_Reports_Monthly_Sales' ) ) :
50
  $html .= '<div class="notice notice-success is-dismissible"><p><strong>' . __( 'Currency rates deleted.', 'woocommerce-jetpack' ) . '</strong></p></div>';
51
  }
52
  // Show report.
53
- $this->year = isset( $_GET['year'] ) ? $_GET['year'] : gmdate( 'Y' );
54
  $html .= $this->get_monthly_sales_report();
55
  return $html;
56
  }
@@ -111,11 +115,15 @@ if ( ! class_exists( 'WCJ_Reports_Monthly_Sales' ) ) :
111
 
112
  $order_currencies_array = array();
113
  $order_currencies_array_totals = array();
114
- $report_currency = ( isset( $_GET['currency'] ) && 'merge' !== isset( $_GET['currency'] ) ) ? $_GET['currency'] : get_woocommerce_currency();
115
- $block_size = 256;
116
- $table_data = array();
117
- $do_forecast = ( 'yes' === wcj_get_option( 'wcj_reports_orders_monthly_sales_forecast', 'no' ) );
118
- $do_include_today = ( 'yes' === wcj_get_option( 'wcj_reports_orders_monthly_sales_include_today', 'no' ) );
 
 
 
 
119
  for ( $i = 1; $i <= 12; $i++ ) {
120
  $current_months_averages = array();
121
  $total_orders = 0;
2
  /**
3
  * Booster for WooCommerce - Reports - Monthly Sales (with Currency Conversion)
4
  *
5
+ * @version 5.6.2
6
  * @since 2.4.7
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
35
  /**
36
  * Get_report.
37
  *
38
+ * @version 5.6.2
39
  * @since 2.4.7
40
  */
41
  public function get_report() {
42
+ $html = '';
43
+ $wpnonce = true;
44
+ if ( function_exists( 'wp_verify_nonce' ) ) {
45
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
46
+ }
47
+ if ( $wpnonce && isset( $_POST['wcj_save_currency_rates'] ) && isset( $_POST['wcj_save_currency_rates_array'] ) && is_array( $_POST['wcj_save_currency_rates_array'] ) ) {
48
  // Save rates.
49
+ update_option( 'wcj_reports_currency_rates', array_replace_recursive( wcj_get_option( 'wcj_reports_currency_rates', array() ), sanitize_text_field( wp_unslash( $_POST['wcj_save_currency_rates_array'] ) ) ) );
50
  $html .= '<div class="notice notice-success is-dismissible"><p><strong>' . __( 'Currency rates saved.', 'woocommerce-jetpack' ) . '</strong></p></div>';
51
  } elseif ( isset( $_POST['wcj_reset_currency_rates'] ) ) {
52
  // Delete rates.
54
  $html .= '<div class="notice notice-success is-dismissible"><p><strong>' . __( 'Currency rates deleted.', 'woocommerce-jetpack' ) . '</strong></p></div>';
55
  }
56
  // Show report.
57
+ $this->year = isset( $_GET['year'] ) ? sanitize_text_field( wp_unslash( $_GET['year'] ) ) : gmdate( 'Y' );
58
  $html .= $this->get_monthly_sales_report();
59
  return $html;
60
  }
115
 
116
  $order_currencies_array = array();
117
  $order_currencies_array_totals = array();
118
+ $wpnonce = true;
119
+ if ( function_exists( 'wp_verify_nonce' ) ) {
120
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
121
+ }
122
+ $report_currency = ( $wpnonce && isset( $_GET['currency'] ) && 'merge' !== isset( $_GET['currency'] ) ) ? sanitize_text_field( wp_unslash( $_GET['currency'] ) ) : get_woocommerce_currency();
123
+ $block_size = 256;
124
+ $table_data = array();
125
+ $do_forecast = ( 'yes' === wcj_get_option( 'wcj_reports_orders_monthly_sales_forecast', 'no' ) );
126
+ $do_include_today = ( 'yes' === wcj_get_option( 'wcj_reports_orders_monthly_sales_include_today', 'no' ) );
127
  for ( $i = 1; $i <= 12; $i++ ) {
128
  $current_months_averages = array();
129
  $total_orders = 0;
includes/reports/{wcj-class-reports-sales-daily.php → class-wcj-reports-product-sales-daily.php} RENAMED
@@ -51,10 +51,14 @@ if ( ! class_exists( 'WCJ_Reports_Product_Sales_Daily' ) ) :
51
  * @since 2.9.0
52
  */
53
  public function get_report_args() {
54
- $current_time = (int) current_time( 'timestamp' );
55
- $this->start_date = isset( $_GET['start_date'] ) ? $_GET['start_date'] : gmdate( 'Y-m-d', strtotime( '-7 days', $current_time ) );
56
- $this->end_date = isset( $_GET['end_date'] ) ? $_GET['end_date'] : gmdate( 'Y-m-d', $current_time );
57
- $this->product_title = isset( $_GET['product_title'] ) ? $_GET['product_title'] : '';
 
 
 
 
58
  }
59
 
60
  /**
@@ -195,11 +199,15 @@ if ( ! class_exists( 'WCJ_Reports_Product_Sales_Daily' ) ) :
195
  $menu .= '</ul>';
196
  $menu .= '<br class="clear">';
197
  // Product and date filter form.
 
 
 
 
198
  $filter_form = '';
199
  $filter_form .= '<form method="get" action="">';
200
- $filter_form .= '<input type="hidden" name="page" value="' . $_GET['page'] . '" />';
201
- $filter_form .= '<input type="hidden" name="tab" value="' . $_GET['tab'] . '" />';
202
- $filter_form .= '<input type="hidden" name="report" value="' . $_GET['report'] . '" />';
203
  $filter_form .= '<label style="font-style:italic;" for="start_date">' . __( 'From:', 'woocommerce-jetpack' ) . '</label> ' .
204
  '<input type="text" display="date" dateformat="' . wcj_date_format_php_to_js( 'Y-m-d' ) . '" name="start_date" title="" value="' . $this->start_date . '" />';
205
  $filter_form .= ' ';
51
  * @since 2.9.0
52
  */
53
  public function get_report_args() {
54
+ $current_time = (int) gmdate( 'U' );
55
+ $wpnonce = true;
56
+ if ( function_exists( 'wp_verify_nonce' ) ) {
57
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
58
+ }
59
+ $this->start_date = $wpnonce && isset( $_GET['start_date'] ) ? sanitize_text_field( wp_unslash( $_GET['start_date'] ) ) : gmdate( 'Y-m-d', strtotime( '-7 days', $current_time ) );
60
+ $this->end_date = isset( $_GET['end_date'] ) ? sanitize_text_field( wp_unslash( $_GET['end_date'] ) ) : gmdate( 'Y-m-d', $current_time );
61
+ $this->product_title = isset( $_GET['product_title'] ) ? sanitize_text_field( wp_unslash( $_GET['product_title'] ) ) : '';
62
  }
63
 
64
  /**
199
  $menu .= '</ul>';
200
  $menu .= '<br class="clear">';
201
  // Product and date filter form.
202
+ $wpnonce = true;
203
+ if ( function_exists( 'wp_verify_nonce' ) ) {
204
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
205
+ }
206
  $filter_form = '';
207
  $filter_form .= '<form method="get" action="">';
208
+ $filter_form .= '<input type="hidden" name="page" value="' . ( $wpnonce && ! empty( $_GET['page'] ) ) . '" />';
209
+ $filter_form .= '<input type="hidden" name="tab" value="' . ( $wpnonce && ! empty( $_GET['tab'] ) ) . '" />';
210
+ $filter_form .= '<input type="hidden" name="report" value="' . ( $wpnonce && ! empty( $_GET['report'] ) ) . '" />';
211
  $filter_form .= '<label style="font-style:italic;" for="start_date">' . __( 'From:', 'woocommerce-jetpack' ) . '</label> ' .
212
  '<input type="text" display="date" dateformat="' . wcj_date_format_php_to_js( 'Y-m-d' ) . '" name="start_date" title="" value="' . $this->start_date . '" />';
213
  $filter_form .= ' ';
includes/reports/{wcj-class-reports-sales.php → class-wcj-reports-sales.php} RENAMED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Reports - Sales
4
  *
5
- * @version 5.5.9
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -34,14 +34,17 @@ if ( ! class_exists( 'WCJ_Reports_Sales' ) ) :
34
  /**
35
  * Get_report.
36
  *
37
- * @version 2.3.9
38
  * @since 2.3.0
39
  */
40
  public function get_report() {
41
- $html = '';
42
-
43
- $this->year = isset( $_GET['year'] ) ? $_GET['year'] : gmdate( 'Y' );
44
- $this->product_title = isset( $_GET['product_title'] ) ? $_GET['product_title'] : '';
 
 
 
45
 
46
  $html .= $this->get_products_sales();
47
 
@@ -79,7 +82,7 @@ if ( ! class_exists( 'WCJ_Reports_Sales' ) ) :
79
  /**
80
  * Get_products_sales.
81
  *
82
- * @version 5.5.9
83
  * @since 2.3.0
84
  * @todo fix when variable and variations are all (wrongfully) counted in total sums
85
  * @todo display more info for "Parent product deleted" and "Product deleted"
@@ -211,7 +214,7 @@ if ( ! class_exists( 'WCJ_Reports_Sales' ) ) :
211
  __( 'Total', 'woocommerce-jetpack' ),
212
  );
213
  foreach ( $years as $year => $value ) {
214
- if ( $year !== $this->year ) {
215
  continue;
216
  }
217
  for ( $i = 12; $i >= 1; $i-- ) {
@@ -243,7 +246,7 @@ if ( ! class_exists( 'WCJ_Reports_Sales' ) ) :
243
  '<strong>' . wc_price( $profit ) . '</strong>',
244
  );
245
  foreach ( $years as $year => $value ) {
246
- if ( $year !== $this->year ) {
247
  continue;
248
  }
249
  for ( $i = 12; $i >= 1; $i-- ) {
@@ -308,7 +311,7 @@ if ( ! class_exists( 'WCJ_Reports_Sales' ) ) :
308
  $totals_sales_by_month = 0;
309
  $totals_sales_by_month_sum = 0;
310
  foreach ( $years as $year => $value ) {
311
- if ( $year !== $this->year ) {
312
  continue;
313
  }
314
  for ( $i = 12; $i >= 1; $i-- ) {
@@ -374,11 +377,19 @@ if ( ! class_exists( 'WCJ_Reports_Sales' ) ) :
374
  $menu .= '</ul>';
375
  $menu .= '<br class="clear">';
376
 
 
 
 
 
 
 
 
 
377
  $filter_form = '';
378
  $filter_form .= '<form method="get" action="">';
379
- $filter_form .= '<input type="hidden" name="page" value="' . $_GET['page'] . '" />';
380
- $filter_form .= '<input type="hidden" name="tab" value="' . $_GET['tab'] . '" />';
381
- $filter_form .= '<input type="hidden" name="report" value="' . $_GET['report'] . '" />';
382
  $filter_form .= '<input type="hidden" name="year" value="' . $this->year . '" />';
383
  $filter_form .= '<input type="text" name="product_title" title="" value="' . $this->product_title . '" />' .
384
  '<input type="submit" value="' . __( 'Filter products', 'woocommerce-jetpack' ) . '" />';
2
  /**
3
  * Booster for WooCommerce - Reports - Sales
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
34
  /**
35
  * Get_report.
36
  *
37
+ * @version 5.6.2
38
  * @since 2.3.0
39
  */
40
  public function get_report() {
41
+ $html = '';
42
+ $wpnonce = true;
43
+ if ( function_exists( 'wp_verify_nonce' ) ) {
44
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
45
+ }
46
+ $this->year = $wpnonce && isset( $_GET['year'] ) ? sanitize_text_field( wp_unslash( $_GET['year'] ) ) : gmdate( 'Y' );
47
+ $this->product_title = $wpnonce && isset( $_GET['product_title'] ) ? sanitize_text_field( wp_unslash( $_GET['product_title'] ) ) : '';
48
 
49
  $html .= $this->get_products_sales();
50
 
82
  /**
83
  * Get_products_sales.
84
  *
85
+ * @version 5.6.2
86
  * @since 2.3.0
87
  * @todo fix when variable and variations are all (wrongfully) counted in total sums
88
  * @todo display more info for "Parent product deleted" and "Product deleted"
214
  __( 'Total', 'woocommerce-jetpack' ),
215
  );
216
  foreach ( $years as $year => $value ) {
217
+ if ( $year !== (int) $this->year ) {
218
  continue;
219
  }
220
  for ( $i = 12; $i >= 1; $i-- ) {
246
  '<strong>' . wc_price( $profit ) . '</strong>',
247
  );
248
  foreach ( $years as $year => $value ) {
249
+ if ( $year !== (int) $this->year ) {
250
  continue;
251
  }
252
  for ( $i = 12; $i >= 1; $i-- ) {
311
  $totals_sales_by_month = 0;
312
  $totals_sales_by_month_sum = 0;
313
  foreach ( $years as $year => $value ) {
314
+ if ( $year !== (int) $this->year ) {
315
  continue;
316
  }
317
  for ( $i = 12; $i >= 1; $i-- ) {
377
  $menu .= '</ul>';
378
  $menu .= '<br class="clear">';
379
 
380
+ $wpnonce = true;
381
+ if ( function_exists( 'wp_verify_nonce' ) ) {
382
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
383
+ }
384
+ $page = $wpnonce && isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : '';
385
+ $tab = $wpnonce && isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : '';
386
+ $report = $wpnonce && isset( $_GET['report'] ) ? sanitize_text_field( wp_unslash( $_GET['report'] ) ) : '';
387
+
388
  $filter_form = '';
389
  $filter_form .= '<form method="get" action="">';
390
+ $filter_form .= '<input type="hidden" name="page" value="' . $page . '" />';
391
+ $filter_form .= '<input type="hidden" name="tab" value="' . $tab . '" />';
392
+ $filter_form .= '<input type="hidden" name="report" value="' . $report . '" />';
393
  $filter_form .= '<input type="hidden" name="year" value="' . $this->year . '" />';
394
  $filter_form .= '<input type="text" name="product_title" title="" value="' . $this->product_title . '" />' .
395
  '<input type="submit" value="' . __( 'Filter products', 'woocommerce-jetpack' ) . '" />';
includes/reports/{wcj-class-reports-stock.php → class-wcj-reports-stock.php} RENAMED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Reports - Stock
4
  *
5
- * @version 3.9.0
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
@@ -270,7 +270,7 @@ if ( ! class_exists( 'WCJ_Reports_Stock' ) ) :
270
  /**
271
  * Get_report_html.
272
  *
273
- * @version 3.9.0
274
  */
275
  public function get_report_html() {
276
  $products_info = $this->data_products;
@@ -311,7 +311,8 @@ if ( ! class_exists( 'WCJ_Reports_Stock' ) ) :
311
 
312
  ( ( 'overstocked' === $report_info['id'] ) &&
313
  ( $product_info['stock'] > 0 ) &&
314
- ( ( current_time( 'timestamp' ) - strtotime( $product_info['date_added'] ) ) > $this->range_days * 24 * 60 * 60 ) &&
 
315
  ( 0 === $product_info['sales_in_period'][ $this->range_days ] ) ) ||
316
 
317
  ( ( 'understocked' === $report_info['id'] ) &&
2
  /**
3
  * Booster for WooCommerce - Reports - Stock
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/includes
8
  */
270
  /**
271
  * Get_report_html.
272
  *
273
+ * @version 5.6.2
274
  */
275
  public function get_report_html() {
276
  $products_info = $this->data_products;
311
 
312
  ( ( 'overstocked' === $report_info['id'] ) &&
313
  ( $product_info['stock'] > 0 ) &&
314
+
315
+ ( ( (int) gmdate( 'U' ) - strtotime( $product_info['date_added'] ) ) > $this->range_days * 24 * 60 * 60 ) &&
316
  ( 0 === $product_info['sales_in_period'][ $this->range_days ] ) ) ||
317
 
318
  ( ( 'understocked' === $report_info['id'] ) &&
includes/reports/wcj-class-reports-sales-gateways.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  /**
3
  * Booster for WooCommerce - Reports - Product Sales - Gateways
4
  *
5
- * @version 5.5.9
6
  * @since 3.6.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -47,13 +47,17 @@ if ( ! class_exists( 'WCJ_Reports_Product_Sales_Gateways' ) ) :
47
  /**
48
  * Get_report_args.
49
  *
50
- * @version 3.6.0
51
  * @since 3.6.0
52
  */
53
  public function get_report_args() {
54
- $current_time = (int) current_time( 'timestamp' );
55
- $this->start_date = isset( $_GET['start_date'] ) ? $_GET['start_date'] : gmdate( 'Y-m-d', strtotime( '-7 days', $current_time ) );
56
- $this->end_date = isset( $_GET['end_date'] ) ? $_GET['end_date'] : gmdate( 'Y-m-d', $current_time );
 
 
 
 
57
  }
58
 
59
  /**
@@ -115,7 +119,7 @@ if ( ! class_exists( 'WCJ_Reports_Product_Sales_Gateways' ) ) :
115
  /**
116
  * Output_report_header.
117
  *
118
- * @version 5.5.9
119
  * @since 3.6.0
120
  */
121
  public function output_report_header() {
@@ -137,14 +141,22 @@ if ( ! class_exists( 'WCJ_Reports_Product_Sales_Gateways' ) ) :
137
  'class="' . ( ( $this->start_date === $custom_range['start_date'] && $this->end_date === $custom_range['end_date'] ) ? 'current' : '' ) . '"' .
138
  '>' . $custom_range['title'] . '</a> | </li>';
139
  }
140
- $menu .= '</ul>';
141
- $menu .= '<br class="clear">';
 
 
 
 
 
 
 
 
142
  // Date filter form.
143
  $filter_form = '';
144
  $filter_form .= '<form method="get" action="">';
145
- $filter_form .= '<input type="hidden" name="page" value="' . $_GET['page'] . '" />';
146
- $filter_form .= '<input type="hidden" name="tab" value="' . $_GET['tab'] . '" />';
147
- $filter_form .= '<input type="hidden" name="report" value="' . $_GET['report'] . '" />';
148
  $filter_form .= '<label style="font-style:italic;" for="start_date">' . __( 'From:', 'woocommerce-jetpack' ) . '</label> ' .
149
  '<input type="text" display="date" dateformat="' . wcj_date_format_php_to_js( 'Y-m-d' ) . '" name="start_date" title="" value="' . $this->start_date . '" />';
150
  $filter_form .= ' ';
1
+ <?php //phpcs:ignore
2
  /**
3
  * Booster for WooCommerce - Reports - Product Sales - Gateways
4
  *
5
+ * @version 5.6.2
6
  * @since 3.6.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
47
  /**
48
  * Get_report_args.
49
  *
50
+ * @version 5.6.2
51
  * @since 3.6.0
52
  */
53
  public function get_report_args() {
54
+ $wpnonce = true;
55
+ if ( function_exists( 'wp_verify_nonce' ) ) {
56
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
57
+ }
58
+ $current_time = (int) gmdate( 'U' );
59
+ $this->start_date = $wpnonce && isset( $_GET['start_date'] ) ? sanitize_text_field( wp_unslash( $_GET['start_date'] ) ) : gmdate( 'Y-m-d', strtotime( '-7 days', $current_time ) );
60
+ $this->end_date = $wpnonce && isset( $_GET['end_date'] ) ? sanitize_text_field( wp_unslash( $_GET['end_date'] ) ) : gmdate( 'Y-m-d', $current_time );
61
  }
62
 
63
  /**
119
  /**
120
  * Output_report_header.
121
  *
122
+ * @version 5.6.2
123
  * @since 3.6.0
124
  */
125
  public function output_report_header() {
141
  'class="' . ( ( $this->start_date === $custom_range['start_date'] && $this->end_date === $custom_range['end_date'] ) ? 'current' : '' ) . '"' .
142
  '>' . $custom_range['title'] . '</a> | </li>';
143
  }
144
+ $menu .= '</ul>';
145
+ $menu .= '<br class="clear">';
146
+ $wpnonce = true;
147
+ if ( function_exists( 'wp_verify_nonce' ) ) {
148
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ), 'woocommerce-settings' ) : true;
149
+ }
150
+ $page = $wpnonce && isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : '';
151
+ $tab = $wpnonce && isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : '';
152
+ $report = $wpnonce && isset( $_GET['report'] ) ? sanitize_text_field( wp_unslash( $_GET['report'] ) ) : '';
153
+
154
  // Date filter form.
155
  $filter_form = '';
156
  $filter_form .= '<form method="get" action="">';
157
+ $filter_form .= '<input type="hidden" name="page" value="' . $page . '" />';
158
+ $filter_form .= '<input type="hidden" name="tab" value="' . $tab . '" />';
159
+ $filter_form .= '<input type="hidden" name="report" value="' . $report . '" />';
160
  $filter_form .= '<label style="font-style:italic;" for="start_date">' . __( 'From:', 'woocommerce-jetpack' ) . '</label> ' .
161
  '<input type="text" display="date" dateformat="' . wcj_date_format_php_to_js( 'Y-m-d' ) . '" name="start_date" title="" value="' . $this->start_date . '" />';
162
  $filter_form .= ' ';
includes/settings/meta-box/wcj-settings-meta-box-price-by-user-role.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings Meta Box - Price based on User Role
4
  *
5
- * @version 5.6.0
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @todo (maybe) add option to disable "Copy to ..." buttons
@@ -47,7 +47,8 @@ if ( 'yes' === get_post_meta( wcj_get_product_id( $_product ), '_wcj_price_by_us
47
  foreach ( $products as $product_id => $desc ) {
48
  foreach ( wcj_get_user_roles() as $role_key => $role_data ) {
49
  if ( ! empty( $visible_roles ) ) {
50
- if ( ! in_array( $role_key, $visible_roles ) ) {
 
51
  continue;
52
  }
53
  }
2
  /**
3
  * Booster for WooCommerce - Settings Meta Box - Price based on User Role
4
  *
5
+ * @version 5.6.2
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @todo (maybe) add option to disable "Copy to ..." buttons
47
  foreach ( $products as $product_id => $desc ) {
48
  foreach ( wcj_get_user_roles() as $role_key => $role_data ) {
49
  if ( ! empty( $visible_roles ) ) {
50
+ if ( ! in_array( $role_key, $visible_roles, true ) ) {
51
+
52
  continue;
53
  }
54
  }
includes/settings/pdf-invoicing/wcj-content-template-credit_note.php CHANGED
@@ -1,3 +1,4 @@
 
1
  <h1>Credit Note</h1>
2
  <p>
3
  <table class="pdf_invoice_heading_table">
@@ -30,4 +31,4 @@
30
  </tbody>
31
  </table>
32
  </p>
33
- <p>Payment method: [wcj_order_payment_method]</p>
1
+ <?php //phpcs:ignore ?>
2
  <h1>Credit Note</h1>
3
  <p>
4
  <table class="pdf_invoice_heading_table">
31
  </tbody>
32
  </table>
33
  </p>
34
+ <p>Payment method: [wcj_order_payment_method]</p>
includes/settings/pdf-invoicing/wcj-content-template-custom_doc.php CHANGED
@@ -1,3 +1,4 @@
 
1
  <h1>Custom Document</h1>
2
  <p>
3
  <table class="pdf_invoice_heading_table">
@@ -31,4 +32,4 @@
31
  </tbody>
32
  </table>
33
  </p>
34
- <p>Payment method: [wcj_order_payment_method]</p>
1
+ <?php //phpcs:ignore ?>
2
  <h1>Custom Document</h1>
3
  <p>
4
  <table class="pdf_invoice_heading_table">
32
  </tbody>
33
  </table>
34
  </p>
35
+ <p>Payment method: [wcj_order_payment_method]</p>
includes/settings/pdf-invoicing/wcj-content-template-invoice.php CHANGED
@@ -1,3 +1,4 @@
 
1
  <h1>Invoice</h1>
2
  <p>
3
  <table class="pdf_invoice_heading_table">
@@ -29,4 +30,4 @@
29
  </tbody>
30
  </table>
31
  </p>
32
- <p>Payment method: [wcj_order_payment_method]</p>
1
+ <?php //phpcs:ignore ?>
2
  <h1>Invoice</h1>
3
  <p>
4
  <table class="pdf_invoice_heading_table">
30
  </tbody>
31
  </table>
32
  </p>
33
+ <p>Payment method: [wcj_order_payment_method]</p>
includes/settings/pdf-invoicing/wcj-content-template-packing_slip.php CHANGED
@@ -1,3 +1,4 @@
 
1
  <h1>Packing Slip</h1>
2
  <p>
3
  <table class="pdf_invoice_heading_table">
@@ -24,4 +25,4 @@
24
  columns="item_number|item_name|item_quantity"
25
  columns_titles="|Item|Qty"
26
  columns_styles="width:5%;|width:80%;|width:15%;text-align:right;"]
27
- </p>
1
+ <?php //phpcs:ignore ?>
2
  <h1>Packing Slip</h1>
3
  <p>
4
  <table class="pdf_invoice_heading_table">
25
  columns="item_number|item_name|item_quantity"
26
  columns_titles="|Item|Qty"
27
  columns_styles="width:5%;|width:80%;|width:15%;text-align:right;"]
28
+ </p>
includes/settings/pdf-invoicing/wcj-content-template-proforma_invoice.php CHANGED
@@ -1,3 +1,4 @@
 
1
  <h1>Proforma Invoice</h1>
2
  <p>
3
  <table class="pdf_invoice_heading_table">
@@ -29,4 +30,4 @@
29
  <tr><th>Order Total</th><td>[wcj_order_total]</td></tr>
30
  </tbody>
31
  </table>
32
- </p>
1
+ <?php //phpcs:ignore ?>
2
  <h1>Proforma Invoice</h1>
3
  <p>
4
  <table class="pdf_invoice_heading_table">
30
  <tr><th>Order Total</th><td>[wcj_order_total]</td></tr>
31
  </tbody>
32
  </table>
33
+ </p>
includes/settings/wcj-settings-admin-orders-list.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - Admin Orders List
4
  *
5
- * @version 5.6.0
6
  * @since 3.2.4
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
@@ -90,7 +90,7 @@ for ( $i = 1; $i <= $total_number; $i++ ) {
90
  'type' => 'select',
91
  'options' => array(
92
  'no' => __( 'No', 'woocommerce-jetpack' ),
93
- 'meta_value' => __( 'By meta (as text)', 'woocommerce-jetpack' ),
94
  'meta_value_num' => __( 'By meta (as numbers)', 'woocommerce-jetpack' ),
95
  ),
96
  ),
2
  /**
3
  * Booster for WooCommerce - Settings - Admin Orders List
4
  *
5
+ * @version 5.6.2
6
  * @since 3.2.4
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
90
  'type' => 'select',
91
  'options' => array(
92
  'no' => __( 'No', 'woocommerce-jetpack' ),
93
+ 'meta_value' => __( 'By meta (as text)', 'woocommerce-jetpack' ), // phpcs:ignore
94
  'meta_value_num' => __( 'By meta (as numbers)', 'woocommerce-jetpack' ),
95
  ),
96
  ),
includes/settings/wcj-settings-admin-tools.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - Admin Tools
4
  *
5
- * @version 5.6.1
6
  * @since 2.7.2
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
@@ -21,8 +21,8 @@ return array(
21
  array(
22
  'title' => __( 'Show Booster Menus Only to Admin', 'woocommerce-jetpack' ),
23
  'desc_tip' => sprintf(
24
- /* translators: %s: translators Added */
25
- __( 'Will require %s capability to see Booster menus (instead of %s capability).', 'woocommerce-jetpack' ),
26
  '<code>manage_options</code>',
27
  '<code>manage_woocommerce</code>'
28
  ),
2
  /**
3
  * Booster for WooCommerce - Settings - Admin Tools
4
  *
5
+ * @version 5.6.2
6
  * @since 2.7.2
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
21
  array(
22
  'title' => __( 'Show Booster Menus Only to Admin', 'woocommerce-jetpack' ),
23
  'desc_tip' => sprintf(
24
+ /* translators: %1$s,%2$s: translators Added */
25
+ __( 'Will require %1$s capability to see Booster menus (instead of %2$s capability).', 'woocommerce-jetpack' ),
26
  '<code>manage_options</code>',
27
  '<code>manage_woocommerce</code>'
28
  ),
includes/settings/wcj-settings-checkout-files-upload.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - Checkout Files Upload
4
  *
5
- * @version 5.6.1
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
@@ -331,7 +331,7 @@ $settings = array_merge(
331
  array(
332
  'title' => __( 'Label', 'woocommerce-jetpack' ),
333
  /* translators: %s: translators Added */
334
- 'desc_tip' => __( 'Replaced values: %field_id%, %field_label%, %required_html%.', 'woocommerce-jetpack' ),
335
  'id' => 'wcj_checkout_files_upload_form_template_label',
336
  /* translators: %s: translators Added */
337
  'default' => '<tr><td colspan="2"><label for="%field_id%">%field_label%</label>%required_html%</td></tr>',
@@ -341,7 +341,7 @@ $settings = array_merge(
341
  array(
342
  'title' => __( 'Field', 'woocommerce-jetpack' ),
343
  /* translators: %s: translators Added */
344
- 'desc_tip' => __( 'Replaced values: %field_html%, %button_html%.', 'woocommerce-jetpack' ),
345
  'id' => 'wcj_checkout_files_upload_form_template_field',
346
  /* translators: %s: translators Added */
347
  'default' => '<tr><td style="width:50%;max-width:50vw;">%field_html%</td><td style="width:50%;">%button_html%</td></tr>',
@@ -409,7 +409,7 @@ $settings = array_merge(
409
  'desc' => __( 'Image style', 'woocommerce-jetpack' ),
410
  'desc_tip' => sprintf(
411
  /* translators: %s: translators Added */
412
- __( 'Ignored, if %s is not included in %s option above.', 'woocommerce-jetpack' ),
413
  '<em>%image%</em>',
414
  '<em>' . __( 'Item', 'woocommerce-jetpack' ) . '</em>'
415
  ),
2
  /**
3
  * Booster for WooCommerce - Settings - Checkout Files Upload
4
  *
5
+ * @version 5.6.2
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
331
  array(
332
  'title' => __( 'Label', 'woocommerce-jetpack' ),
333
  /* translators: %s: translators Added */
334
+ 'desc_tip' => __( 'Replaced values: %field_id%, %field_label%, %required_html%.', 'woocommerce-jetpack' ), // phpcs:ignore
335
  'id' => 'wcj_checkout_files_upload_form_template_label',
336
  /* translators: %s: translators Added */
337
  'default' => '<tr><td colspan="2"><label for="%field_id%">%field_label%</label>%required_html%</td></tr>',
341
  array(
342
  'title' => __( 'Field', 'woocommerce-jetpack' ),
343
  /* translators: %s: translators Added */
344
+ 'desc_tip' => __( 'Replaced values: %field_html%, %button_html%.', 'woocommerce-jetpack' ), // phpcs:ignore
345
  'id' => 'wcj_checkout_files_upload_form_template_field',
346
  /* translators: %s: translators Added */
347
  'default' => '<tr><td style="width:50%;max-width:50vw;">%field_html%</td><td style="width:50%;">%button_html%</td></tr>',
409
  'desc' => __( 'Image style', 'woocommerce-jetpack' ),
410
  'desc_tip' => sprintf(
411
  /* translators: %s: translators Added */
412
+ __( 'Ignored, if %1$s is not included in %2$s option above.', 'woocommerce-jetpack' ),
413
  '<em>%image%</em>',
414
  '<em>' . __( 'Item', 'woocommerce-jetpack' ) . '</em>'
415
  ),
includes/settings/wcj-settings-cross-sells.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - Cross-sells
4
  *
5
- * @version 5.6.1
6
  * @since 3.5.3
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
@@ -134,7 +134,7 @@ if ( ! WCJ_IS_WC_VERSION_BELOW_3 ) {
134
  'desc_tip' => __( 'Enable this, if you want original products to be removed from cart and replaced with cross-sells, if customer adds cross-sells on cart page.', 'woocommerce-jetpack' ) . '<br>' .
135
  sprintf(
136
  /* translators: %s: translators Added */
137
- __( 'Please note that this option will work only if "%s" option is disabled in %s.', 'woocommerce-jetpack' ),
138
  __( 'Enable AJAX add to cart buttons on archives', 'woocommerce' ),
139
  '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=products' ) . '">' .
140
  __( 'WooCommerce > Settings > Products > General > Shop pages > Add to cart behaviour', 'woocommerce-jetpack' ) . '</a>'
2
  /**
3
  * Booster for WooCommerce - Settings - Cross-sells
4
  *
5
+ * @version 5.6.2
6
  * @since 3.5.3
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
134
  'desc_tip' => __( 'Enable this, if you want original products to be removed from cart and replaced with cross-sells, if customer adds cross-sells on cart page.', 'woocommerce-jetpack' ) . '<br>' .
135
  sprintf(
136
  /* translators: %s: translators Added */
137
+ __( 'Please note that this option will work only if "%1$s" option is disabled in %2$s.', 'woocommerce-jetpack' ),
138
  __( 'Enable AJAX add to cart buttons on archives', 'woocommerce' ),
139
  '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=products' ) . '">' .
140
  __( 'WooCommerce > Settings > Products > General > Shop pages > Add to cart behaviour', 'woocommerce-jetpack' ) . '</a>'
includes/settings/wcj-settings-left-to-free-shipping.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - Left to Free Shipping
4
  *
5
- * @version 5.6.1
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
@@ -18,14 +18,14 @@ return array(
18
  'type' => 'title',
19
  'desc' => __( 'This section lets you enable info on cart, mini cart and checkout pages.', 'woocommerce-jetpack' ) . '<br><br>' .
20
  sprintf(
21
- /* translators: %s: translators Added */
22
- __( 'You can also use <em>Booster - Left to Free Shipping</em> widget, %s shortcode or %s function.', 'woocommerce-jetpack' ),
23
  '<code>[wcj_get_left_to_free_shipping content=""]</code>',
24
  '<code>wcj_get_left_to_free_shipping( $content );</code>'
25
  ) . '<br><br>' .
26
  sprintf(
27
- /* translators: %s: translators Added */
28
- __( 'In content replaced values are: %s, %s and %s.', 'woocommerce-jetpack' ),
29
  '<code>%left_to_free%</code>',
30
  '<code>%free_shipping_min_amount%</code>',
31
  '<code>%cart_total%</code>'
2
  /**
3
  * Booster for WooCommerce - Settings - Left to Free Shipping
4
  *
5
+ * @version 5.6.2
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
18
  'type' => 'title',
19
  'desc' => __( 'This section lets you enable info on cart, mini cart and checkout pages.', 'woocommerce-jetpack' ) . '<br><br>' .
20
  sprintf(
21
+ /* translators: %1$s,2$s: translators Added */
22
+ __( 'You can also use <em>Booster - Left to Free Shipping</em> widget, %1$s shortcode or %2$s function.', 'woocommerce-jetpack' ),
23
  '<code>[wcj_get_left_to_free_shipping content=""]</code>',
24
  '<code>wcj_get_left_to_free_shipping( $content );</code>'
25
  ) . '<br><br>' .
26
  sprintf(
27
+ /* translators: %1$s,2$s: translators Added */
28
+ __( 'In content replaced values are: %1$s, %2$s and %3$s.', 'woocommerce-jetpack' ),
29
  '<code>%left_to_free%</code>',
30
  '<code>%free_shipping_min_amount%</code>',
31
  '<code>%cart_total%</code>'
includes/settings/wcj-settings-my-account.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - My Account
4
  *
5
- * @version 5.6.1
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
@@ -126,8 +126,8 @@ $settings = array_merge(
126
  array(
127
  'desc' => __( 'Custom menu items.', 'woocommerce-jetpack' ) . ' ' .
128
  sprintf(
129
- /* translators: %s: translators Added */
130
- __( 'Add in %s format. One per line. E.g.: %s.', 'woocommerce-jetpack' ),
131
  '<code>endpoint|label|link</code>',
132
  '<code>shop|Shop|/shop/</code>'
133
  ),
2
  /**
3
  * Booster for WooCommerce - Settings - My Account
4
  *
5
+ * @version 5.6.2
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
126
  array(
127
  'desc' => __( 'Custom menu items.', 'woocommerce-jetpack' ) . ' ' .
128
  sprintf(
129
+ /* translators: %1$s,%2$s: translators Added */
130
+ __( 'Add in %1$s format. One per line. E.g.: %2$s.', 'woocommerce-jetpack' ),
131
  '<code>endpoint|label|link</code>',
132
  '<code>shop|Shop|/shop/</code>'
133
  ),
includes/settings/wcj-settings-offer-price.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - Offer Price
4
  *
5
- * @version 5.6.1
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
@@ -321,9 +321,9 @@ return array(
321
  'title' => __( 'Email Recipient', 'woocommerce-jetpack' ),
322
  'desc' => __( 'Can be comma separated list.', 'woocommerce-jetpack' ) . ' ' .
323
  sprintf(
324
- /* translators: %s: translators Added */
325
  __(
326
- 'Use %s to send to administrator email: %s.',
327
  'woocommerce-jetpack'
328
  ),
329
  '<code>%admin_email%</code>',
@@ -353,7 +353,7 @@ return array(
353
  /* translators: %s: translators Added */
354
  sprintf( __( 'Offered price: %s', 'woocommerce-jetpack' ), '%offered_price%' ) . '<br>' . PHP_EOL .
355
  /* translators: %s %s: translators Added */
356
- sprintf( __( 'From: %s %s', 'woocommerce-jetpack' ), '%customer_name%', '%customer_email%' ) . '<br>' . PHP_EOL .
357
  /* translators: %s: translators Added */
358
  sprintf( __( 'Message: %s', 'woocommerce-jetpack' ), '%customer_message%' ),
359
  'css' => 'width:100%;height:200px;',
2
  /**
3
  * Booster for WooCommerce - Settings - Offer Price
4
  *
5
+ * @version 5.6.2
6
  * @since 2.9.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
321
  'title' => __( 'Email Recipient', 'woocommerce-jetpack' ),
322
  'desc' => __( 'Can be comma separated list.', 'woocommerce-jetpack' ) . ' ' .
323
  sprintf(
324
+ /* translators: %1$s,%2$s: translators Added */
325
  __(
326
+ 'Use %1$s to send to administrator email: %2$s.',
327
  'woocommerce-jetpack'
328
  ),
329
  '<code>%admin_email%</code>',
353
  /* translators: %s: translators Added */
354
  sprintf( __( 'Offered price: %s', 'woocommerce-jetpack' ), '%offered_price%' ) . '<br>' . PHP_EOL .
355
  /* translators: %s %s: translators Added */
356
+ sprintf( __( 'From: %1$s %2$s', 'woocommerce-jetpack' ), '%customer_name%', '%customer_email%' ) . '<br>' . PHP_EOL .
357
  /* translators: %s: translators Added */
358
  sprintf( __( 'Message: %s', 'woocommerce-jetpack' ), '%customer_message%' ),
359
  'css' => 'width:100%;height:200px;',
includes/settings/wcj-settings-order-min-amount.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - Order Minimum Amount
4
  *
5
- * @version 5.6.1
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
@@ -55,10 +55,10 @@ $settings = array(
55
  array(
56
  'title' => __( 'Error message', 'woocommerce-jetpack' ),
57
  'desc' => apply_filters( 'booster_message', '', 'desc' ),
58
- /* translators: %s: translators Added */
59
- 'desc_tip' => __( 'Message to customer if order is below minimum amount. Default: You must have an order with a minimum of %s to place your order, your current order total is %s.', 'woocommerce-jetpack' ),
60
  'id' => 'wcj_order_minimum_amount_error_message',
61
- /* translators: %s: translators Added */
62
  'default' => 'You must have an order with a minimum of %s to place your order, your current order total is %s.',
63
  'type' => 'textarea',
64
  'custom_attributes' => apply_filters( 'booster_message', '', 'readonly' ),
@@ -75,7 +75,7 @@ $settings = array(
75
  'title' => __( 'Message on cart page', 'woocommerce-jetpack' ),
76
  'desc' => apply_filters( 'booster_message', '', 'desc' ),
77
  /* translators: %s: translators Added */
78
- 'desc_tip' => __( 'Message to customer if order is below minimum amount. Default: You must have an order with a minimum of %s to place your order, your current order total is %s.', 'woocommerce-jetpack' ),
79
  'id' => 'wcj_order_minimum_amount_cart_notice_message',
80
  /* translators: %s: translators Added */
81
  'default' => 'You must have an order with a minimum of %s to place your order, your current order total is %s.',
2
  /**
3
  * Booster for WooCommerce - Settings - Order Minimum Amount
4
  *
5
+ * @version 5.6.2
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
55
  array(
56
  'title' => __( 'Error message', 'woocommerce-jetpack' ),
57
  'desc' => apply_filters( 'booster_message', '', 'desc' ),
58
+ /* translators: %1$s,2$s: translators Added */
59
+ 'desc_tip' => __( 'Message to customer if order is below minimum amount. Default: You must have an order with a minimum of %1$s to place your order, your current order total is %2$s.', 'woocommerce-jetpack' ),
60
  'id' => 'wcj_order_minimum_amount_error_message',
61
+ /* translators: %1$s,2$s: translators Added */
62
  'default' => 'You must have an order with a minimum of %s to place your order, your current order total is %s.',
63
  'type' => 'textarea',
64
  'custom_attributes' => apply_filters( 'booster_message', '', 'readonly' ),
75
  'title' => __( 'Message on cart page', 'woocommerce-jetpack' ),
76
  'desc' => apply_filters( 'booster_message', '', 'desc' ),
77
  /* translators: %s: translators Added */
78
+ 'desc_tip' => __( 'Message to customer if order is below minimum amount. Default: You must have an order with a minimum of %1$s to place your order, your current order total is %2$s.', 'woocommerce-jetpack' ),
79
  'id' => 'wcj_order_minimum_amount_cart_notice_message',
80
  /* translators: %s: translators Added */
81
  'default' => 'You must have an order with a minimum of %s to place your order, your current order total is %s.',
includes/settings/wcj-settings-price-by-country.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - Prices and Currencies by Country
4
  *
5
- * @version 5.6.0
6
  * @since 2.8.1
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
@@ -18,10 +18,10 @@ $autogenerate_buttons_data = array(
18
  'paypal_only' => __( 'PayPal supported currencies only', 'woocommerce-jetpack' ),
19
  );
20
  foreach ( $autogenerate_buttons_data as $autogenerate_button_id => $autogenerate_button_desc ) {
21
- $autogenerate_buttons[] = ( 1 === apply_filters( 'booster_option', 1, '' ) ?
22
  '<a class="button" disabled title="' . __( 'Available in Booster Plus only.', 'woocommerce-jetpack' ) . '">' . $autogenerate_button_desc . '</a>' :
23
  '<a class="button" href="' .
24
- esc_url( add_query_arg( 'wcj_generate_country_groups', $autogenerate_button_id, esc_url( remove_query_arg( 'recalculate_price_filter_products_prices' ) ) ) ) . '"' .
25
  wcj_get_js_confirmation( __( 'All existing country groups will be deleted and new groups will be created. Are you sure?', 'woocommerce-jetpack' ) ) . '>' .
26
  $autogenerate_button_desc .
27
  '</a>' );
@@ -190,7 +190,7 @@ $settings = array(
190
  'title' => __( 'Price Filter Widget and Sorting by Price Support', 'woocommerce-jetpack' ),
191
  'desc' => empty( $message ) ? __( 'Enable', 'woocommerce-jetpack' ) : $message,
192
  'custom_attributes' => apply_filters( 'booster_message', '', 'disabled' ),
193
- 'desc_tip' => '<a href="' . esc_url( add_query_arg( 'recalculate_price_filter_products_prices', '1', esc_url( remove_query_arg( array( 'wcj_generate_country_groups' ) ) ) ) ) . '">' .
194
  __( 'Recalculate price filter widget and sorting by price product prices.', 'woocommerce-jetpack' ) . '</a>',
195
  'id' => 'wcj_price_by_country_price_filter_widget_support_enabled',
196
  'default' => 'no',
2
  /**
3
  * Booster for WooCommerce - Settings - Prices and Currencies by Country
4
  *
5
+ * @version 5.6.2
6
  * @since 2.8.1
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
18
  'paypal_only' => __( 'PayPal supported currencies only', 'woocommerce-jetpack' ),
19
  );
20
  foreach ( $autogenerate_buttons_data as $autogenerate_button_id => $autogenerate_button_desc ) {
21
+ $autogenerate_buttons[] = ( 0 === apply_filters( 'booster_option', 1, '' ) ?
22
  '<a class="button" disabled title="' . __( 'Available in Booster Plus only.', 'woocommerce-jetpack' ) . '">' . $autogenerate_button_desc . '</a>' :
23
  '<a class="button" href="' .
24
+ esc_url( add_query_arg( 'wcj_generate_country_groups', $autogenerate_button_id, remove_query_arg( 'recalculate_price_filter_products_prices' ) ) ) . '"' .
25
  wcj_get_js_confirmation( __( 'All existing country groups will be deleted and new groups will be created. Are you sure?', 'woocommerce-jetpack' ) ) . '>' .
26
  $autogenerate_button_desc .
27
  '</a>' );
190
  'title' => __( 'Price Filter Widget and Sorting by Price Support', 'woocommerce-jetpack' ),
191
  'desc' => empty( $message ) ? __( 'Enable', 'woocommerce-jetpack' ) : $message,
192
  'custom_attributes' => apply_filters( 'booster_message', '', 'disabled' ),
193
+ 'desc_tip' => '<a href="' . esc_url( add_query_arg( 'recalculate_price_filter_products_prices', '1', remove_query_arg( array( 'wcj_generate_country_groups' ) ) ) ) . '">' .
194
  __( 'Recalculate price filter widget and sorting by price product prices.', 'woocommerce-jetpack' ) . '</a>',
195
  'id' => 'wcj_price_by_country_price_filter_widget_support_enabled',
196
  'default' => 'no',
includes/settings/wcj-settings-product-custom-info.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - Product Info
4
  *
5
- * @version 5.6.0
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
@@ -32,10 +32,11 @@ foreach ( $single_or_archive_array as $single_or_archive ) {
32
  $extra_filter = trim( $extra_filter );
33
  if ( '' !== ( $extra_filter ) ) {
34
  $extra_filter = explode( '|', $extra_filter, 2 );
35
- if ( 2 == count( $extra_filter ) ) {
 
36
  $extra_filter_id = trim( $extra_filter[0] );
37
  $extra_filter_title = trim( $extra_filter[1] );
38
- if ( '' != $extra_filter_id && '' != $extra_filter_title ) {
39
  $extra_filters_result[ $extra_filter_id ] = $extra_filter_title;
40
  }
41
  }
2
  /**
3
  * Booster for WooCommerce - Settings - Product Info
4
  *
5
+ * @version 5.6.2
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
32
  $extra_filter = trim( $extra_filter );
33
  if ( '' !== ( $extra_filter ) ) {
34
  $extra_filter = explode( '|', $extra_filter, 2 );
35
+
36
+ if ( 2 === count( $extra_filter ) ) {
37
  $extra_filter_id = trim( $extra_filter[0] );
38
  $extra_filter_title = trim( $extra_filter[1] );
39
+ if ( '' !== $extra_filter_id && '' !== $extra_filter_title ) {
40
  $extra_filters_result[ $extra_filter_id ] = $extra_filter_title;
41
  }
42
  }
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 5.6.1
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @todo [dev] maybe set "Strip slashes" option to `yes` by default (or even remove the option completely and always strip slashes)
@@ -406,8 +406,8 @@ $settings = array_merge(
406
  array(
407
  'title' => __( 'Strip Slashes', 'woocommerce-jetpack' ),
408
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
409
- /* translators: %s: translators Added */
410
- 'desc_tip' => sprintf( __( 'Enable this if you have single quotes %s converted to %s.', 'woocommerce-jetpack' ), '<code>\'</code>', '<code>\\\'</code>' ),
411
  'id' => 'wcj_product_input_fields_stripslashes',
412
  'default' => 'no',
413
  'type' => 'checkbox',
2
  /**
3
  * Booster for WooCommerce - Settings - Product Input Fields
4
  *
5
+ * @version 5.6.2
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @todo [dev] maybe set "Strip slashes" option to `yes` by default (or even remove the option completely and always strip slashes)
406
  array(
407
  'title' => __( 'Strip Slashes', 'woocommerce-jetpack' ),
408
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
409
+ /* translators: %1$s:%2$s: translators Added */
410
+ 'desc_tip' => sprintf( __( 'Enable this if you have single quotes %1$s converted to %2$s.', 'woocommerce-jetpack' ), '<code>\'</code>', '<code>\\\'</code>' ),
411
  'id' => 'wcj_product_input_fields_stripslashes',
412
  'default' => 'no',
413
  'type' => 'checkbox',
includes/settings/wcj-settings-product-price-by-formula.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - Product Price by Formula
4
  *
5
- * @version 5.6.1
6
  * @since 2.8.1
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
@@ -22,8 +22,8 @@ $settings = array(
22
  array(
23
  'title' => __( 'Formula', 'woocommerce-jetpack' ),
24
  'desc' => sprintf(
25
- /* translators: %s: translators Added */
26
- __( 'Use %s variable for product\'s base price. For example: %s.', 'woocommerce-jetpack' ),
27
  '<code> x </code>',
28
  '<code> x+p1*p2 </code>'
29
  ),
2
  /**
3
  * Booster for WooCommerce - Settings - Product Price by Formula
4
  *
5
+ * @version 5.6.2
6
  * @since 2.8.1
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
22
  array(
23
  'title' => __( 'Formula', 'woocommerce-jetpack' ),
24
  'desc' => sprintf(
25
+ /* translators: %1$s,%2$s: translators Added */
26
+ __( 'Use %1$s variable for product\'s base price. For example: %2$s.', 'woocommerce-jetpack' ),
27
  '<code> x </code>',
28
  '<code> x+p1*p2 </code>'
29
  ),
includes/settings/wcj-settings-product-tabs.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce Settings - Product Tabs
4
  *
5
- * @version 5.6.0
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
@@ -203,7 +203,7 @@ for ( $i = 1; $i <= $product_tabs_global_total_num; $i++ ) {
203
  )
204
  );
205
  }
206
- if ( '' != wcj_get_option( 'wcj_custom_product_tabs_title_global_hide_in_cats_ids_' . $i, '' ) ) {
207
  $settings = array_merge(
208
  $settings,
209
  array(
@@ -218,7 +218,8 @@ for ( $i = 1; $i <= $product_tabs_global_total_num; $i++ ) {
218
  )
219
  );
220
  }
221
- if ( '' != wcj_get_option( 'wcj_custom_product_tabs_title_global_show_in_cats_ids_' . $i, '' ) ) {
 
222
  $settings = array_merge(
223
  $settings,
224
  array(
2
  /**
3
  * Booster for WooCommerce Settings - Product Tabs
4
  *
5
+ * @version 5.6.2
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
203
  )
204
  );
205
  }
206
+ if ( '' !== wcj_get_option( 'wcj_custom_product_tabs_title_global_hide_in_cats_ids_' . $i, '' ) ) {
207
  $settings = array_merge(
208
  $settings,
209
  array(
218
  )
219
  );
220
  }
221
+
222
+ if ( '' !== wcj_get_option( 'wcj_custom_product_tabs_title_global_show_in_cats_ids_' . $i, '' ) ) {
223
  $settings = array_merge(
224
  $settings,
225
  array(
includes/settings/wcj-settings-products-per-page.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - Products per Page
4
  *
5
- * @version 5.6.0
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
@@ -64,7 +64,7 @@ return array(
64
  'title' => __( 'Template - Form', 'woocommerce-jetpack' ),
65
  'id' => 'wcj_products_per_page_text',
66
  /* translators: %s: translators Added */
67
- 'default' => __( 'Products <strong>%from% - %to%</strong> from <strong>%total%</strong>. Products on page %select_form%', 'woocommerce-jetpack' ),
68
  'type' => 'custom_textarea',
69
  'css' => 'width:100%',
70
  ),
2
  /**
3
  * Booster for WooCommerce - Settings - Products per Page
4
  *
5
+ * @version 5.6.2
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
64
  'title' => __( 'Template - Form', 'woocommerce-jetpack' ),
65
  'id' => 'wcj_products_per_page_text',
66
  /* translators: %s: translators Added */
67
+ 'default' => __( 'Products <strong>%1$from% - %to%</strong> from <strong>%total%</strong>. Products on page %2$select_form%', 'woocommerce-jetpack' ),
68
  'type' => 'custom_textarea',
69
  'css' => 'width:100%',
70
  ),
includes/settings/wcj-settings-products-xml.php CHANGED
@@ -84,7 +84,7 @@ for ( $i = 1; $i <= $xml_total_files; $i++ ) {
84
  '<code>' . date_i18n( wcj_get_option( 'date_format' ) . ' ' . wcj_get_option( 'time_format' ), wcj_get_option( 'wcj_products_time_file_created_' . $i, '' ) ) . '</code>'
85
  );
86
  }
87
- $default_file_name = ( ( 1 == $i ) ? 'products.xml' : 'products_' . $i . '.xml' );
88
  $settings = array_merge(
89
  $settings,
90
  array(
84
  '<code>' . date_i18n( wcj_get_option( 'date_format' ) . ' ' . wcj_get_option( 'time_format' ), wcj_get_option( 'wcj_products_time_file_created_' . $i, '' ) ) . '</code>'
85
  );
86
  }
87
+ $default_file_name = ( ( 1 === $i ) ? 'products.xml' : 'products_' . $i . '.xml' );
88
  $settings = array_merge(
89
  $settings,
90
  array(
includes/settings/wcj-settings-related-products.php CHANGED
@@ -36,7 +36,7 @@ $orderby_options = array(
36
  'title' => __( 'Title', 'woocommerce-jetpack' ),
37
  );
38
  if ( WCJ_IS_WC_VERSION_BELOW_3 ) {
39
- $orderby_options['meta_value'] = __( 'Meta Value', 'woocommerce-jetpack' );
40
  $orderby_options['meta_value_num'] = __( 'Meta Value (Numeric)', 'woocommerce-jetpack' );
41
  } else {
42
  $orderby_options['id'] = __( 'ID', 'woocommerce-jetpack' );
36
  'title' => __( 'Title', 'woocommerce-jetpack' ),
37
  );
38
  if ( WCJ_IS_WC_VERSION_BELOW_3 ) {
39
+ $orderby_options['meta_value'] = __( 'Meta Value', 'woocommerce-jetpack' ); // phpcs:ignore
40
  $orderby_options['meta_value_num'] = __( 'Meta Value (Numeric)', 'woocommerce-jetpack' );
41
  } else {
42
  $orderby_options['id'] = __( 'ID', 'woocommerce-jetpack' );
includes/settings/wcj-settings-sku.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - SKU
4
  *
5
- * @version 5.6.0
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @todo deprecate `wcj_sku_prefix` and `wcj_sku_suffix` (as user can now add it directly to "Template")
@@ -86,7 +86,7 @@ $settings = array(
86
  'title' => __( 'Attributes Separator', 'woocommerce-jetpack' ),
87
  'desc_tip' => sprintf(
88
  /* translators: %s: translators Added */
89
- __( 'Used in %s, %s, %s and %s.', 'woocommerce-jetpack' ),
90
  '<em>{variation_attributes}</em>',
91
  '<em>{variation_attribute=X}</em>',
92
  '<em>{attribute=X}</em>',
2
  /**
3
  * Booster for WooCommerce - Settings - SKU
4
  *
5
+ * @version 5.6.2
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @todo deprecate `wcj_sku_prefix` and `wcj_sku_suffix` (as user can now add it directly to "Template")
86
  'title' => __( 'Attributes Separator', 'woocommerce-jetpack' ),
87
  'desc_tip' => sprintf(
88
  /* translators: %s: translators Added */
89
+ __( 'Used in %1$s, %2$s, %3$s and %4$s.', 'woocommerce-jetpack' ),
90
  '<em>{variation_attributes}</em>',
91
  '<em>{variation_attribute=X}</em>',
92
  '<em>{attribute=X}</em>',
includes/settings/wcj-settings-stock.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - Stock
4
  *
5
- * @version 5.6.0
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
@@ -48,8 +48,8 @@ return array(
48
  sprintf( __( 'If needed, use %s to insert stock quantity.', 'woocommerce-jetpack' ), '<code>%s</code>' ),
49
  'desc_tip' => __( 'You can also use shortcodes here.', 'woocommerce-jetpack' ) . ' ' .
50
  sprintf(
51
- /* translators: %s: translators Added */
52
- __( 'Used only if %s is selected for %s in %s.', 'woocommerce-jetpack' ),
53
  '<em>' . __( 'Only show quantity remaining in stock when low', 'woocommerce-jetpack' ) . '</em>',
54
  '<em>' . __( 'Stock display format', 'woocommerce' ) . '</em>',
55
  '<em>' . __( 'WooCommerce &gt Settings &gt Products &gt Inventory', 'woocommerce-jetpack' )
2
  /**
3
  * Booster for WooCommerce - Settings - Stock
4
  *
5
+ * @version 5.6.2
6
  * @since 2.8.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/settings
48
  sprintf( __( 'If needed, use %s to insert stock quantity.', 'woocommerce-jetpack' ), '<code>%s</code>' ),
49
  'desc_tip' => __( 'You can also use shortcodes here.', 'woocommerce-jetpack' ) . ' ' .
50
  sprintf(
51
+ /* translators: %1$s:%2$s:%3$s: translators Added */
52
+ __( 'Used only if %1$s is selected for %2$s in %3$s.', 'woocommerce-jetpack' ),
53
  '<em>' . __( 'Only show quantity remaining in stock when low', 'woocommerce-jetpack' ) . '</em>',
54
  '<em>' . __( 'Stock display format', 'woocommerce' ) . '</em>',
55
  '<em>' . __( 'WooCommerce &gt Settings &gt Products &gt Inventory', 'woocommerce-jetpack' )
includes/settings/wcj-settings-template-editor.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Settings - Template Editor
4
  *
5
- * @version 5.6.0
6
  * @since 3.9.0
7
  * @author Pluggabl LLC.
8
  * @todo [dev] (maybe) always use `DIRECTORY_SEPARATOR` (instead of '\\' and '/')
@@ -36,7 +36,8 @@ $settings = array(
36
  'default' => '/woocommerce/templates/',
37
  'css' => 'width:100%;',
38
  'id' => 'wcj_template_editor_paths',
39
- 'desc_tip' => __( 'One path per line relative to: ' . WP_PLUGIN_DIR . '', 'woocommerce-jetpack' ),
 
40
  ),
41
  array(
42
  'type' => 'sectionend',
2
  /**
3
  * Booster for WooCommerce - Settings - Template Editor
4
  *
5
+ * @version 5.6.2
6
  * @since 3.9.0
7
  * @author Pluggabl LLC.
8
  * @todo [dev] (maybe) always use `DIRECTORY_SEPARATOR` (instead of '\\' and '/')
36
  'default' => '/woocommerce/templates/',
37
  'css' => 'width:100%;',
38
  'id' => 'wcj_template_editor_paths',
39
+ /* translators: %s: search term */
40
+ 'desc_tip' => sprintf( __( 'One path per line relative to: %s', 'woocommerce-jetpack' ), WP_PLUGIN_DIR ),
41
  ),
42
  array(
43
  'type' => 'sectionend',
includes/shipping/{class-wc-shipping-wcj-custom.php → class-wc-shipping-wcj-custom-template.php} RENAMED
File without changes
includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  /**
3
  * Booster for WooCommerce - Shipping - Custom Shipping with Shipping Zones
4
  *
5
- * @version 5.6.1
6
  * @since 2.5.6
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -286,7 +286,7 @@ if ( ! class_exists( 'WC_Shipping_WCJ_Custom_W_Zones' ) ) :
286
  'title' => __( 'Apply Formula and Shortcodes to Costs', 'woocommerce' ),
287
  'description' => sprintf(
288
  /* translators: %s: search term */
289
- __( 'You can use %s and %s params in formula, e.g.: %s. Also you can use shortcodes, e.g.: %s.', 'woocommerce-jetpack' ),
290
  '<em>weight</em>',
291
  '<em>quantity</em>',
292
  '<em>2.5+weight</em>',
1
+ <?php //phpcs:ignore
2
  /**
3
  * Booster for WooCommerce - Shipping - Custom Shipping with Shipping Zones
4
  *
5
+ * @version 5.6.2
6
  * @since 2.5.6
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
286
  'title' => __( 'Apply Formula and Shortcodes to Costs', 'woocommerce' ),
287
  'description' => sprintf(
288
  /* translators: %s: search term */
289
+ __( 'You can use %1$s and %2$s params in formula, e.g.: %3$s. Also you can use shortcodes, e.g.: %4$s.', 'woocommerce-jetpack' ),
290
  '<em>weight</em>',
291
  '<em>quantity</em>',
292
  '<em>2.5+weight</em>',
includes/shortcodes/class-wcj-general-shortcodes.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Shortcodes - General
4
  *
5
- * @version 5.5.9
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/shortcodes
8
  */
@@ -121,7 +121,7 @@ if ( ! class_exists( 'WCJ_General_Shortcodes' ) ) :
121
  /**
122
  * Wcj_post_meta_sum.
123
  *
124
- * @version 4.1.0
125
  * @since 4.1.0
126
  * @param array $atts defined shortcode attributes.
127
  */
@@ -130,7 +130,7 @@ if ( ! class_exists( 'WCJ_General_Shortcodes' ) ) :
130
  return '';
131
  }
132
  global $wpdb;
133
- $sum = $wpdb->get_var( $wpdb->prepare( "SELECT sum(meta_value) FROM $wpdb->postmeta WHERE meta_key = %s", $atts['key'] ) );
134
  return ( ! empty( $atts['offset'] ) ? $sum + $atts['offset'] : $sum );
135
  }
136
 
@@ -144,7 +144,6 @@ if ( ! class_exists( 'WCJ_General_Shortcodes' ) ) :
144
  * @param array $atts The user defined shortcode attributes.
145
  */
146
  public function wcj_get_option( $atts ) {
147
- echo 'ssfdjsljdf';
148
  $result = ( isset( $atts['name'] ) ? wcj_get_option( $atts['name'], ( isset( $atts['default'] ) ? $atts['default'] : false ) ) : '' );
149
  return ( is_array( $result ) ?
150
  ( isset( $atts['field'] ) && isset( $result[ $atts['field'] ] ) ? $result[ $atts['field'] ] : implode( ', ', $result ) ) :
@@ -302,12 +301,12 @@ if ( ! class_exists( 'WCJ_General_Shortcodes' ) ) :
302
  /**
303
  * Wcj_request_value.
304
  *
305
- * @version 3.4.0
306
  * @since 3.4.0
307
  * @param array $atts The user defined shortcode attributes.
308
  */
309
  public function wcj_request_value( $atts ) {
310
- return ( ( '' === $atts['key'] || ! isset( $_REQUEST[ $atts['key'] ] ) ) ? '' : $_REQUEST[ $atts['key'] ] );
311
  }
312
 
313
  /**
@@ -400,7 +399,7 @@ if ( ! class_exists( 'WCJ_General_Shortcodes' ) ) :
400
  /**
401
  * Wcj_button_toggle_tax_display.
402
  *
403
- * @version 3.2.4
404
  * @since 3.2.4
405
  * @todo (dev) different style/class for different tax state
406
  * @todo (maybe) `get` instead of `post`
@@ -408,8 +407,8 @@ if ( ! class_exists( 'WCJ_General_Shortcodes' ) ) :
408
  */
409
  public function wcj_button_toggle_tax_display( $atts ) {
410
  $session_value = wcj_session_get( 'wcj_toggle_tax_display' );
411
- $current_value = ( '' == ( $session_value ) ? wcj_get_option( 'woocommerce_tax_display_shop', 'excl' ) : $session_value );
412
- $current_value = '' == $current_value ? 'excl' : $current_value;
413
  $label = $atts[ 'label_' . $current_value ];
414
  return '<form method="post" action=""><input type="submit" name="wcj_button_toggle_tax_display"' .
415
  ' class="' . $atts['class'] . '" style="' . $atts['style'] . '" value="' . $label . '"></form>';
@@ -477,7 +476,7 @@ if ( ! class_exists( 'WCJ_General_Shortcodes' ) ) :
477
  /**
478
  * Wcj_selector.
479
  *
480
- * @version 5.4.3
481
  * @since 3.1.0
482
  * @todo add `default` attribute
483
  * @todo (maybe) add more selector types (e.g.: currency)
@@ -488,8 +487,8 @@ if ( ! class_exists( 'WCJ_General_Shortcodes' ) ) :
488
  $html = '';
489
  $options = '';
490
  $countries = apply_filters( 'booster_option', 'all', wcj_get_option( 'wcj_product_by_country_country_list_shortcode', 'all' ) );
491
- $selected_value = ( ( isset( $_REQUEST[ 'wcj_' . $atts['selector_type'] . '_selector' ] ) ) ?
492
- $_REQUEST[ 'wcj_' . $atts['selector_type'] . '_selector' ] :
493
  wcj_session_get( 'wcj_selected_' . $atts['selector_type'] )
494
  );
495
 
@@ -605,34 +604,34 @@ if ( ! class_exists( 'WCJ_General_Shortcodes' ) ) :
605
  /**
606
  * Wcj_current_time.
607
  *
608
- * @version 2.6.0
609
  * @since 2.6.0
610
  * @param array $atts The user defined shortcode attributes.
611
  */
612
  public function wcj_current_time( $atts ) {
613
- return date_i18n( $atts['time_format'], current_time( 'timestamp' ) );
614
  }
615
 
616
  /**
617
  * Wcj_current_datetime.
618
  *
619
- * @version 2.6.0
620
  * @since 2.6.0
621
  * @param array $atts The user defined shortcode attributes.
622
  */
623
  public function wcj_current_datetime( $atts ) {
624
- return date_i18n( $atts['datetime_format'], current_time( 'timestamp' ) );
625
  }
626
 
627
  /**
628
  * Wcj_current_timestamp.
629
  *
630
- * @version 2.6.0
631
  * @since 2.6.0
632
  * @param array $atts The user defined shortcode attributes.
633
  */
634
  public function wcj_current_timestamp( $atts ) {
635
- return current_time( 'timestamp' );
636
  }
637
 
638
  /**
@@ -1092,7 +1091,7 @@ if ( ! class_exists( 'WCJ_General_Shortcodes' ) ) :
1092
  * @param array $atts The user defined shortcode attributes.
1093
  */
1094
  public function wcj_current_date( $atts ) {
1095
- return date_i18n( $atts['date_format'], current_time( 'timestamp' ) );
1096
  }
1097
 
1098
  /**
2
  /**
3
  * Booster for WooCommerce - Shortcodes - General
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/shortcodes
8
  */
121
  /**
122
  * Wcj_post_meta_sum.
123
  *
124
+ * @version 5.6.2
125
  * @since 4.1.0
126
  * @param array $atts defined shortcode attributes.
127
  */
130
  return '';
131
  }
132
  global $wpdb;
133
+ $sum = $wpdb->get_var( $wpdb->prepare( "SELECT sum(meta_value) FROM $wpdb->postmeta WHERE meta_key = %s", $atts['key'] ) ); // WPCS: db call ok and cache ok.
134
  return ( ! empty( $atts['offset'] ) ? $sum + $atts['offset'] : $sum );
135
  }
136
 
144
  * @param array $atts The user defined shortcode attributes.
145
  */
146
  public function wcj_get_option( $atts ) {
 
147
  $result = ( isset( $atts['name'] ) ? wcj_get_option( $atts['name'], ( isset( $atts['default'] ) ? $atts['default'] : false ) ) : '' );
148
  return ( is_array( $result ) ?
149
  ( isset( $atts['field'] ) && isset( $result[ $atts['field'] ] ) ? $result[ $atts['field'] ] : implode( ', ', $result ) ) :
301
  /**
302
  * Wcj_request_value.
303
  *
304
+ * @version 5.6.2
305
  * @since 3.4.0
306
  * @param array $atts The user defined shortcode attributes.
307
  */
308
  public function wcj_request_value( $atts ) {
309
+ return ( ( '' === $atts['key'] || ! isset( $_REQUEST[ $atts['key'] ] ) ) ? '' : sanitize_text_field( wp_unslash( $_REQUEST[ $atts['key'] ] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification
310
  }
311
 
312
  /**
399
  /**
400
  * Wcj_button_toggle_tax_display.
401
  *
402
+ * @version 5.6.2
403
  * @since 3.2.4
404
  * @todo (dev) different style/class for different tax state
405
  * @todo (maybe) `get` instead of `post`
407
  */
408
  public function wcj_button_toggle_tax_display( $atts ) {
409
  $session_value = wcj_session_get( 'wcj_toggle_tax_display' );
410
+ $current_value = ( ( '' === $session_value || null === $session_value ) ? wcj_get_option( 'woocommerce_tax_display_shop', 'excl' ) : $session_value );
411
+ $current_value = '' === $current_value ? 'excl' : $current_value;
412
  $label = $atts[ 'label_' . $current_value ];
413
  return '<form method="post" action=""><input type="submit" name="wcj_button_toggle_tax_display"' .
414
  ' class="' . $atts['class'] . '" style="' . $atts['style'] . '" value="' . $label . '"></form>';
476
  /**
477
  * Wcj_selector.
478
  *
479
+ * @version 5.6.2
480
  * @since 3.1.0
481
  * @todo add `default` attribute
482
  * @todo (maybe) add more selector types (e.g.: currency)
487
  $html = '';
488
  $options = '';
489
  $countries = apply_filters( 'booster_option', 'all', wcj_get_option( 'wcj_product_by_country_country_list_shortcode', 'all' ) );
490
+ $selected_value = ( ( isset( $_REQUEST[ 'wcj_' . $atts['selector_type'] . '_selector' ] ) ) ? // phpcs:ignore WordPress.Security.NonceVerification
491
+ sanitize_text_field( wp_unslash( $_REQUEST[ 'wcj_' . $atts['selector_type'] . '_selector' ] ) ) : // phpcs:ignore WordPress.Security.NonceVerification
492
  wcj_session_get( 'wcj_selected_' . $atts['selector_type'] )
493
  );
494
 
604
  /**
605
  * Wcj_current_time.
606
  *
607
+ * @version 5.6.2
608
  * @since 2.6.0
609
  * @param array $atts The user defined shortcode attributes.
610
  */
611
  public function wcj_current_time( $atts ) {
612
+ return date_i18n( $atts['time_format'], gmdate( 'U' ) );
613
  }
614
 
615
  /**
616
  * Wcj_current_datetime.
617
  *
618
+ * @version 5.6.2
619
  * @since 2.6.0
620
  * @param array $atts The user defined shortcode attributes.
621
  */
622
  public function wcj_current_datetime( $atts ) {
623
+ return date_i18n( $atts['datetime_format'], gmdate( 'U' ) );
624
  }
625
 
626
  /**
627
  * Wcj_current_timestamp.
628
  *
629
+ * @version 5.6.2
630
  * @since 2.6.0
631
  * @param array $atts The user defined shortcode attributes.
632
  */
633
  public function wcj_current_timestamp( $atts ) {
634
+ return gmdate( 'U' );
635
  }
636
 
637
  /**
1091
  * @param array $atts The user defined shortcode attributes.
1092
  */
1093
  public function wcj_current_date( $atts ) {
1094
+ return date_i18n( $atts['date_format'], gmdate( 'U' ) );
1095
  }
1096
 
1097
  /**
includes/shortcodes/class-wcj-invoices-shortcodes.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Shortcodes - Invoices
4
  *
5
- * @version 5.5.0
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/shortcodes
8
  */
@@ -57,12 +57,21 @@ if ( ! class_exists( 'WCJ_Invoices_Shortcodes' ) ) :
57
  /**
58
  * Init_atts.
59
  *
 
60
  * @param array $atts The user defined shortcode attributes.
61
  */
62
  public function init_atts( $atts ) {
63
  // Atts.
 
 
 
 
64
  if ( 0 === $atts['order_id'] ) {
65
- $atts['order_id'] = ( isset( $_GET['order_id'] ) ) ? $_GET['order_id'] : get_the_ID();
 
 
 
 
66
  if ( 0 === $atts['order_id'] ) {
67
  return false;
68
  }
2
  /**
3
  * Booster for WooCommerce - Shortcodes - Invoices
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/shortcodes
8
  */
57
  /**
58
  * Init_atts.
59
  *
60
+ * @version 5.6.2.
61
  * @param array $atts The user defined shortcode attributes.
62
  */
63
  public function init_atts( $atts ) {
64
  // Atts.
65
+ $wpnonce = true;
66
+ if ( function_exists( 'wp_verify_nonce' ) ) {
67
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
68
+ }
69
  if ( 0 === $atts['order_id'] ) {
70
+ $atts['order_id'] = ( isset( $_GET['order_id'] ) && $wpnonce ) ? sanitize_text_field(
71
+ wp_unslash(
72
+ $_GET['order_id']
73
+ )
74
+ ) : get_the_ID();
75
  if ( 0 === $atts['order_id'] ) {
76
  return false;
77
  }
includes/shortcodes/class-wcj-order-items-shortcodes.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Shortcodes - Order Items
4
  *
5
- * @version 5.3.1
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/shortcodes
8
  */
@@ -32,13 +32,18 @@ if ( ! class_exists( 'WCJ_Order_Items_Shortcodes' ) ) :
32
  /**
33
  * Add_extra_atts.
34
  *
35
- * @version 3.3.0
36
  * @param array $atts The user defined shortcode attributes.
37
  */
38
  public function add_extra_atts( $atts ) {
 
 
 
 
 
39
  $modified_atts = array_merge(
40
  array(
41
- 'order_id' => ( isset( $_GET['order_id'] ) ) ? sanitize_text_field( wp_unslash( $_GET['order_id'] ) ) : get_the_ID(),
42
  'hide_currency' => 'no',
43
  'table_class' => '',
44
  'shipping_as_item' => '', // e.g.: 'Shipping'.
@@ -136,7 +141,7 @@ if ( ! class_exists( 'WCJ_Order_Items_Shortcodes' ) ) :
136
  /**
137
  * Add_item.
138
  *
139
- * @version 2.8.0
140
  * @param array $items The user defined shortcode items.
141
  * @param array $new_item_args The user defined shortcode new_item_args.
142
  */
@@ -144,7 +149,7 @@ if ( ! class_exists( 'WCJ_Order_Items_Shortcodes' ) ) :
144
  if ( empty( $new_item_args ) ) {
145
  return $items;
146
  }
147
- extract( $new_item_args );
148
  // Create item.
149
  if ( WCJ_IS_WC_VERSION_BELOW_3 ) {
150
  $item = array(
@@ -222,7 +227,7 @@ if ( ! class_exists( 'WCJ_Order_Items_Shortcodes' ) ) :
222
  *
223
  * From woocommerce\includes\admin\meta-boxes\views\html-order-item-meta.php
224
  *
225
- * @version 2.5.9
226
  * @since 2.5.8
227
  * @param int $item_id The user defined shortcode item_id.
228
  * @param array | string $the_product The user defined shortcode the_product.
@@ -265,10 +270,10 @@ if ( ! class_exists( 'WCJ_Order_Items_Shortcodes' ) ) :
265
  // Get attribute data.
266
  if ( taxonomy_exists( wc_sanitize_taxonomy_name( $meta['meta_key'] ) ) ) {
267
  $term = get_term_by( 'slug', $meta['meta_value'], wc_sanitize_taxonomy_name( $meta['meta_key'] ) );
268
- $meta['meta_key'] = wc_attribute_label( wc_sanitize_taxonomy_name( $meta['meta_key'] ) );
269
- $meta['meta_value'] = isset( $term->name ) ? $term->name : $meta['meta_value'];
270
  } else {
271
- $meta['meta_key'] = ( is_object( $the_product ) ) ? wc_attribute_label( $meta['meta_key'], $the_product ) : $meta['meta_key'];
272
  }
273
  $meta_info[] = wp_kses_post( rawurldecode( $meta['meta_key'] ) ) . ': ' . wp_kses_post( rawurldecode( $meta['meta_value'] ) );
274
  }
@@ -535,7 +540,7 @@ if ( ! class_exists( 'WCJ_Order_Items_Shortcodes' ) ) :
535
 
536
  case 'item_debug':
537
  case 'debug':
538
- return print_r( $item, true );
539
 
540
  case 'item_regular_price':
541
  case 'product_regular_price':
@@ -555,7 +560,7 @@ if ( ! class_exists( 'WCJ_Order_Items_Shortcodes' ) ) :
555
 
556
  case 'product_categories':
557
  return ( is_object( $the_product ) ) ?
558
- strip_tags( ( WCJ_IS_WC_VERSION_BELOW_3 ? $the_product->get_categories() : wc_get_product_category_list( $item['product_id'] ) ) ) :
559
  '';
560
 
561
  case 'item_tax_class':
2
  /**
3
  * Booster for WooCommerce - Shortcodes - Order Items
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/shortcodes
8
  */
32
  /**
33
  * Add_extra_atts.
34
  *
35
+ * @version 5.6.2
36
  * @param array $atts The user defined shortcode attributes.
37
  */
38
  public function add_extra_atts( $atts ) {
39
+
40
+ $wpnonce = true;
41
+ if ( function_exists( 'wp_verify_nonce' ) ) {
42
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
43
+ }
44
  $modified_atts = array_merge(
45
  array(
46
+ 'order_id' => ( isset( $_GET['order_id'] ) && $wpnonce ) ? sanitize_text_field( wp_unslash( $_GET['order_id'] ) ) : get_the_ID(),
47
  'hide_currency' => 'no',
48
  'table_class' => '',
49
  'shipping_as_item' => '', // e.g.: 'Shipping'.
141
  /**
142
  * Add_item.
143
  *
144
+ * @version 5.6.2
145
  * @param array $items The user defined shortcode items.
146
  * @param array $new_item_args The user defined shortcode new_item_args.
147
  */
149
  if ( empty( $new_item_args ) ) {
150
  return $items;
151
  }
152
+ extract( $new_item_args ); // phpcs:ignore
153
  // Create item.
154
  if ( WCJ_IS_WC_VERSION_BELOW_3 ) {
155
  $item = array(
227
  *
228
  * From woocommerce\includes\admin\meta-boxes\views\html-order-item-meta.php
229
  *
230
+ * @version 5.6.2
231
  * @since 2.5.8
232
  * @param int $item_id The user defined shortcode item_id.
233
  * @param array | string $the_product The user defined shortcode the_product.
270
  // Get attribute data.
271
  if ( taxonomy_exists( wc_sanitize_taxonomy_name( $meta['meta_key'] ) ) ) {
272
  $term = get_term_by( 'slug', $meta['meta_value'], wc_sanitize_taxonomy_name( $meta['meta_key'] ) );
273
+ $meta['meta_key'] = wc_attribute_label( wc_sanitize_taxonomy_name( $meta['meta_key'] ) ); // phpcs:ignore
274
+ $meta['meta_value'] = isset( $term->name ) ? $term->name : $meta['meta_value']; // phpcs:ignore
275
  } else {
276
+ $meta['meta_key'] = ( is_object( $the_product ) ) ? wc_attribute_label( $meta['meta_key'], $the_product ) : $meta['meta_key']; // phpcs:ignore
277
  }
278
  $meta_info[] = wp_kses_post( rawurldecode( $meta['meta_key'] ) ) . ': ' . wp_kses_post( rawurldecode( $meta['meta_value'] ) );
279
  }
540
 
541
  case 'item_debug':
542
  case 'debug':
543
+ return print_r( $item, true ); // phpcs:ignore
544
 
545
  case 'item_regular_price':
546
  case 'product_regular_price':
560
 
561
  case 'product_categories':
562
  return ( is_object( $the_product ) ) ?
563
+ strip_tags( ( WCJ_IS_WC_VERSION_BELOW_3 ? $the_product->get_categories() : wc_get_product_category_list( $item['product_id'] ) ) ) : // phpcs:ignore
564
  '';
565
 
566
  case 'item_tax_class':
includes/shortcodes/class-wcj-orders-shortcodes.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Shortcodes - Orders
4
  *
5
- * @version 5.5.7
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/shortcodes
8
  */
@@ -109,7 +109,7 @@ if ( ! class_exists( 'WCJ_Orders_Shortcodes' ) ) :
109
  /**
110
  * Add_extra_atts.
111
  *
112
- * @version 5.1.0
113
  * @param array $atts The user defined shortcode attributes.
114
  */
115
  public function add_extra_atts( $atts ) {
@@ -135,7 +135,7 @@ if ( ! class_exists( 'WCJ_Orders_Shortcodes' ) ) :
135
  'item_number' => 'all',
136
  'field' => 'name',
137
  'order_user_roles' => '',
138
- 'meta_key' => '',
139
  'tax_class' => '',
140
  'fallback_billing_address' => 'no',
141
  'tax_display' => '',
@@ -200,10 +200,11 @@ if ( ! class_exists( 'WCJ_Orders_Shortcodes' ) ) :
200
  // Atts.
201
  $atts['excl_tax'] = ( 'yes' === $atts['excl_tax'] );
202
  if ( 0 === $atts['order_id'] ) {
203
- $atts['order_id'] = ( isset( $_GET['order_id'] ) ) ? sanitize_text_field( wp_unslash( $_GET['order_id'] ) ) : get_the_ID();
204
  }
205
  if ( 0 === $atts['order_id'] ) {
206
- $atts['order_id'] = ( isset( $_GET['pdf_invoice'] ) ) ? sanitize_text_field( wp_unslash( $_GET['pdf_invoice'] ) ) : 0; // PDF Invoices V1 compatibility.
 
207
  }
208
  if ( 0 === $atts['order_id'] ) {
209
  return false;
@@ -246,12 +247,12 @@ if ( ! class_exists( 'WCJ_Orders_Shortcodes' ) ) :
246
  /**
247
  * Wcj_price_shortcode.
248
  *
249
- * @version 5.4.0
250
  * @param int $raw_price The user defined shortcode raw_price.
251
  * @param array $atts The user defined shortcode attributes.
252
  */
253
  private function wcj_price_shortcode( $raw_price, $atts ) {
254
- if ( 'yes' === $atts['hide_if_zero'] && 0 === $raw_price ) {
255
  return '';
256
  } else {
257
  $order_currency = wcj_get_order_currency( $this->the_order );
@@ -479,12 +480,13 @@ if ( ! class_exists( 'WCJ_Orders_Shortcodes' ) ) :
479
  /**
480
  * Wcj_order_total_refunded.
481
  *
482
- * @version 2.5.3
483
  * @since 2.5.3
484
  * @param array $atts The user defined shortcode attributes.
485
  */
486
  public function wcj_order_total_refunded( $atts ) {
487
- return $this->wcj_price_shortcode( $this->the_order->get_total_refunded(), $atts );
 
488
  }
489
 
490
  /**
2
  /**
3
  * Booster for WooCommerce - Shortcodes - Orders
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/shortcodes
8
  */
109
  /**
110
  * Add_extra_atts.
111
  *
112
+ * @version 5.6.2
113
  * @param array $atts The user defined shortcode attributes.
114
  */
115
  public function add_extra_atts( $atts ) {
135
  'item_number' => 'all',
136
  'field' => 'name',
137
  'order_user_roles' => '',
138
+ 'meta_key' => '', // phpcs:ignore
139
  'tax_class' => '',
140
  'fallback_billing_address' => 'no',
141
  'tax_display' => '',
200
  // Atts.
201
  $atts['excl_tax'] = ( 'yes' === $atts['excl_tax'] );
202
  if ( 0 === $atts['order_id'] ) {
203
+ $atts['order_id'] = ( isset( $_GET['order_id'] ) ) ? sanitize_text_field( wp_unslash( $_GET['order_id'] ) ) : get_the_ID(); // phpcs:ignore WordPress.Security.NonceVerification
204
  }
205
  if ( 0 === $atts['order_id'] ) {
206
+ $atts['order_id'] = ( isset( $_GET['pdf_invoice'] ) ) ? sanitize_text_field( wp_unslash( $_GET['pdf_invoice'] ) ) : 0; // phpcs:ignore WordPress.Security.NonceVerification
207
+ // PDF Invoices V1 compatibility.
208
  }
209
  if ( 0 === $atts['order_id'] ) {
210
  return false;
247
  /**
248
  * Wcj_price_shortcode.
249
  *
250
+ * @version 5.6.2
251
  * @param int $raw_price The user defined shortcode raw_price.
252
  * @param array $atts The user defined shortcode attributes.
253
  */
254
  private function wcj_price_shortcode( $raw_price, $atts ) {
255
+ if ( 'yes' === $atts['hide_if_zero'] && (float) 0 === $raw_price ) {
256
  return '';
257
  } else {
258
  $order_currency = wcj_get_order_currency( $this->the_order );
480
  /**
481
  * Wcj_order_total_refunded.
482
  *
483
+ * @version 5.6.2
484
  * @since 2.5.3
485
  * @param array $atts The user defined shortcode attributes.
486
  */
487
  public function wcj_order_total_refunded( $atts ) {
488
+ $refund_total = ( $atts['excl_tax'] ) ? $this->the_order->get_total_refunded() - $this->the_order->get_total_tax_refunded() : $this->the_order->get_total_refunded();
489
+ return $this->wcj_price_shortcode( $refund_total, $atts );
490
  }
491
 
492
  /**
includes/shortcodes/class-wcj-products-add-form-shortcodes.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Shortcodes - Products Add Form
4
  *
5
- * @version 5.5.9
6
  * @since 2.5.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/shortcodes
@@ -269,18 +269,21 @@ if ( ! class_exists( 'WCJ_Products_Add_Form_Shortcodes' ) ) :
269
  /**
270
  * Wcj_product_add_new.
271
  *
272
- * @version 5.5.9
273
  * @since 2.5.0
274
  * @todo `multipart` only if image
275
  * @param array $atts The user defined shortcode atts.
276
  */
277
  public function wcj_product_add_new( $atts ) {
278
-
279
  $header_html = '';
280
  $notice_html = '';
281
  $input_fields_html = '';
282
  $footer_html = '';
283
 
 
 
 
284
  $args = array(
285
  'title' => ( isset( $_REQUEST['wcj_add_new_product_title'] ) ) ? sanitize_text_field( wp_unslash( $_REQUEST['wcj_add_new_product_title'] ) ) : '',
286
  'desc' => isset( $_REQUEST['wcj_add_new_product_desc'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['wcj_add_new_product_desc'] ) ) : '',
@@ -288,7 +291,7 @@ if ( ! class_exists( 'WCJ_Products_Add_Form_Shortcodes' ) ) :
288
  'regular_price' => isset( $_REQUEST['wcj_add_new_product_regular_price'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['wcj_add_new_product_regular_price'] ) ) : '',
289
  'sale_price' => isset( $_REQUEST['wcj_add_new_product_sale_price'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['wcj_add_new_product_sale_price'] ) ) : '',
290
  'external_url' => isset( $_REQUEST['wcj_add_new_product_external_url'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['wcj_add_new_product_external_url'] ) ) : '',
291
- 'cats' => isset( $_REQUEST['wcj_add_new_product_cats'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['wcj_add_new_product_cats'] ) ) : array(),
292
  'tags' => isset( $_REQUEST['wcj_add_new_product_tags'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['wcj_add_new_product_tags'] ) ) : array(),
293
  'image' => isset( $_FILES['wcj_add_new_product_image'] ) ? sanitize_text_field( wp_unslash( $_FILES['wcj_add_new_product_image'] ) ) : '',
294
  );
2
  /**
3
  * Booster for WooCommerce - Shortcodes - Products Add Form
4
  *
5
+ * @version 5.6.2
6
  * @since 2.5.0
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/shortcodes
269
  /**
270
  * Wcj_product_add_new.
271
  *
272
+ * @version 5.6.2
273
  * @since 2.5.0
274
  * @todo `multipart` only if image
275
  * @param array $atts The user defined shortcode atts.
276
  */
277
  public function wcj_product_add_new( $atts ) {
278
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
279
  $header_html = '';
280
  $notice_html = '';
281
  $input_fields_html = '';
282
  $footer_html = '';
283
 
284
+ if ( ! $wpnonce ) {
285
+ return;
286
+ }
287
  $args = array(
288
  'title' => ( isset( $_REQUEST['wcj_add_new_product_title'] ) ) ? sanitize_text_field( wp_unslash( $_REQUEST['wcj_add_new_product_title'] ) ) : '',
289
  'desc' => isset( $_REQUEST['wcj_add_new_product_desc'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['wcj_add_new_product_desc'] ) ) : '',
291
  'regular_price' => isset( $_REQUEST['wcj_add_new_product_regular_price'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['wcj_add_new_product_regular_price'] ) ) : '',
292
  'sale_price' => isset( $_REQUEST['wcj_add_new_product_sale_price'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['wcj_add_new_product_sale_price'] ) ) : '',
293
  'external_url' => isset( $_REQUEST['wcj_add_new_product_external_url'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['wcj_add_new_product_external_url'] ) ) : '',
294
+ 'cats' => isset( $_REQUEST['wcj_add_new_product_cats'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_REQUEST['wcj_add_new_product_cats'] ) ) : array(),
295
  'tags' => isset( $_REQUEST['wcj_add_new_product_tags'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['wcj_add_new_product_tags'] ) ) : array(),
296
  'image' => isset( $_FILES['wcj_add_new_product_image'] ) ? sanitize_text_field( wp_unslash( $_FILES['wcj_add_new_product_image'] ) ) : '',
297
  );
includes/shortcodes/class-wcj-products-crowdfunding-shortcodes.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Shortcodes - Products Crowdfunding
4
  *
5
- * @version 4.1.0
6
  * @since 2.5.4
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
@@ -51,7 +51,7 @@ if ( ! class_exists( 'WCJ_Products_Crowdfunding_Shortcodes' ) ) :
51
  /**
52
  * Inits shortcode atts and properties.
53
  *
54
- * @version 3.3.0
55
  * @since 2.5.4
56
  * @param array $atts Shortcode atts.
57
  * @return array The (modified) shortcode atts.
@@ -61,14 +61,14 @@ if ( ! class_exists( 'WCJ_Products_Crowdfunding_Shortcodes' ) ) :
61
 
62
  // Atts.
63
  $is_passed_product = false;
64
- if ( 0 == $atts['product_id'] ) {
65
  if ( isset( $this->passed_product ) ) {
66
  $atts['product_id'] = wcj_get_product_id( $this->passed_product );
67
  $is_passed_product = true;
68
  } else {
69
  $atts['product_id'] = get_the_ID();
70
  }
71
- if ( 0 == $atts['product_id'] ) {
72
  return false;
73
  }
74
  }
@@ -89,7 +89,7 @@ if ( ! class_exists( 'WCJ_Products_Crowdfunding_Shortcodes' ) ) :
89
  /**
90
  * Get_product_orders_data.
91
  *
92
- * @version 5.4.0
93
  * @since 2.2.6
94
  * @param string | null $return_value The user defined shortcode return_value.
95
  * @param array $atts The user defined shortcode attributes.
@@ -127,7 +127,7 @@ if ( ! class_exists( 'WCJ_Products_Crowdfunding_Shortcodes' ) ) :
127
  $the_items = $the_order->get_items();
128
  $item_found = false;
129
  foreach ( $the_items as $item ) {
130
- if ( in_array( $item['product_id'], $product_ids ) ) {
131
  $total_sum += $item['line_total'] + $item['line_tax'];
132
  $total_qty += $item['qty'];
133
  $item_found = true;
@@ -217,12 +217,12 @@ if ( ! class_exists( 'WCJ_Products_Crowdfunding_Shortcodes' ) ) :
217
  /**
218
  * Wcj_product_crowdfunding_time_remaining.
219
  *
220
- * @version 2.3.8
221
  * @since 2.2.6
222
  * @param array $atts The user defined shortcode attributes.
223
  */
224
  public function wcj_product_crowdfunding_time_remaining( $atts ) {
225
- $seconds_remaining = strtotime( $this->wcj_product_crowdfunding_deadline( $atts ) ) - current_time( 'timestamp' );
226
  $days_remaining = floor( $seconds_remaining / ( 24 * 60 * 60 ) );
227
  $hours_remaining = floor( $seconds_remaining / ( 60 * 60 ) );
228
  $minutes_remaining = floor( $seconds_remaining / 60 );
@@ -230,21 +230,21 @@ if ( ! class_exists( 'WCJ_Products_Crowdfunding_Shortcodes' ) ) :
230
  return '';
231
  }
232
  if ( $days_remaining > 0 ) {
233
- return ( 1 == $days_remaining ) ? $days_remaining . ' day left' : $days_remaining . ' days left';
234
  }
235
  if ( $hours_remaining > 0 ) {
236
- return ( 1 == $hours_remaining ) ? $hours_remaining . ' hour left' : $hours_remaining . ' hours left';
237
  }
238
  if ( $minutes_remaining > 0 ) {
239
- return ( 1 == $minutes_remaining ) ? $minutes_remaining . ' minute left' : $minutes_remaining . ' minutes left';
240
  }
241
- return ( 1 == $seconds_remaining ) ? $seconds_remaining . ' second left' : $seconds_remaining . ' seconds left';
242
  }
243
 
244
  /**
245
  * Wcj_product_crowdfunding_time_remaining_progress_bar.
246
  *
247
- * @version 2.7.0
248
  * @since 2.5.0
249
  * @param array $atts The user defined shortcode attributes.
250
  */
@@ -252,7 +252,7 @@ if ( ! class_exists( 'WCJ_Products_Crowdfunding_Shortcodes' ) ) :
252
  $deadline_seconds = strtotime( get_post_meta( wcj_get_product_id_or_variation_parent_id( $this->the_product ), '_wcj_crowdfunding_deadline', true ) );
253
  $startdate_seconds = strtotime( get_post_meta( wcj_get_product_id_or_variation_parent_id( $this->the_product ), '_wcj_crowdfunding_startdate', true ) );
254
 
255
- $seconds_remaining = $deadline_seconds - current_time( 'timestamp' );
256
  $seconds_total = $deadline_seconds - $startdate_seconds;
257
 
258
  $current_value = $seconds_remaining;
2
  /**
3
  * Booster for WooCommerce - Shortcodes - Products Crowdfunding
4
  *
5
+ * @version 5.6.2
6
  * @since 2.5.4
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/includes
51
  /**
52
  * Inits shortcode atts and properties.
53
  *
54
+ * @version 5.6.2
55
  * @since 2.5.4
56
  * @param array $atts Shortcode atts.
57
  * @return array The (modified) shortcode atts.
61
 
62
  // Atts.
63
  $is_passed_product = false;
64
+ if ( 0 === $atts['product_id'] ) {
65
  if ( isset( $this->passed_product ) ) {
66
  $atts['product_id'] = wcj_get_product_id( $this->passed_product );
67
  $is_passed_product = true;
68
  } else {
69
  $atts['product_id'] = get_the_ID();
70
  }
71
+ if ( 0 === $atts['product_id'] ) {
72
  return false;
73
  }
74
  }
89
  /**
90
  * Get_product_orders_data.
91
  *
92
+ * @version 5.6.2
93
  * @since 2.2.6
94
  * @param string | null $return_value The user defined shortcode return_value.
95
  * @param array $atts The user defined shortcode attributes.
127
  $the_items = $the_order->get_items();
128
  $item_found = false;
129
  foreach ( $the_items as $item ) {
130
+ if ( in_array( $item['product_id'], $product_ids, true ) ) {
131
  $total_sum += $item['line_total'] + $item['line_tax'];
132
  $total_qty += $item['qty'];
133
  $item_found = true;
217
  /**
218
  * Wcj_product_crowdfunding_time_remaining.
219
  *
220
+ * @version 5.6.2
221
  * @since 2.2.6
222
  * @param array $atts The user defined shortcode attributes.
223
  */
224
  public function wcj_product_crowdfunding_time_remaining( $atts ) {
225
+ $seconds_remaining = strtotime( $this->wcj_product_crowdfunding_deadline( $atts ) ) - gmdate( 'U' );
226
  $days_remaining = floor( $seconds_remaining / ( 24 * 60 * 60 ) );
227
  $hours_remaining = floor( $seconds_remaining / ( 60 * 60 ) );
228
  $minutes_remaining = floor( $seconds_remaining / 60 );
230
  return '';
231
  }
232
  if ( $days_remaining > 0 ) {
233
+ return ( (float) 1 === $days_remaining ) ? $days_remaining . ' day left' : $days_remaining . ' days left';
234
  }
235
  if ( $hours_remaining > 0 ) {
236
+ return ( (float) 1 === $hours_remaining ) ? $hours_remaining . ' hour left' : $hours_remaining . ' hours left';
237
  }
238
  if ( $minutes_remaining > 0 ) {
239
+ return ( (float) 1 === $minutes_remaining ) ? $minutes_remaining . ' minute left' : $minutes_remaining . ' minutes left';
240
  }
241
+ return ( (float) 1 === $seconds_remaining ) ? $seconds_remaining . ' second left' : $seconds_remaining . ' seconds left';
242
  }
243
 
244
  /**
245
  * Wcj_product_crowdfunding_time_remaining_progress_bar.
246
  *
247
+ * @version 5.6.2
248
  * @since 2.5.0
249
  * @param array $atts The user defined shortcode attributes.
250
  */
252
  $deadline_seconds = strtotime( get_post_meta( wcj_get_product_id_or_variation_parent_id( $this->the_product ), '_wcj_crowdfunding_deadline', true ) );
253
  $startdate_seconds = strtotime( get_post_meta( wcj_get_product_id_or_variation_parent_id( $this->the_product ), '_wcj_crowdfunding_startdate', true ) );
254
 
255
+ $seconds_remaining = $deadline_seconds - gmdate( 'U' );
256
  $seconds_total = $deadline_seconds - $startdate_seconds;
257
 
258
  $current_value = $seconds_remaining;
includes/shortcodes/class-wcj-products-shortcodes.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Shortcodes - Products
4
  *
5
- * @version 5.5.9
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/shortcodes
8
  */
@@ -128,7 +128,7 @@ if ( ! class_exists( 'WCJ_Products_Shortcodes' ) ) :
128
  'width' => 0,
129
  'height' => 0,
130
  'color' => 'black',
131
- 'meta_key' => '',
132
  );
133
 
134
  parent::__construct();
@@ -313,7 +313,7 @@ if ( ! class_exists( 'WCJ_Products_Shortcodes' ) ) :
313
  /**
314
  * Wcj_product_time_since_last_sale.
315
  *
316
- * @version 4.0.0
317
  * @since 2.4.0
318
  * @param array $atts Shortcode atts.
319
  */
@@ -345,7 +345,8 @@ if ( ! class_exists( 'WCJ_Products_Shortcodes' ) ) :
345
  // Run through all order's items.
346
  if ( $item['product_id'] === $atts['product_id'] ) {
347
  // Found sale!
348
- return sprintf( __( '%s ago', 'woocommerce-jetpack' ), human_time_diff( get_the_time( 'U', $order_id ), current_time( 'timestamp' ) ) );
 
349
  }
350
  }
351
  }
@@ -714,17 +715,17 @@ if ( ! class_exists( 'WCJ_Products_Shortcodes' ) ) :
714
  /**
715
  * Wcj_product_total_sales.
716
  *
717
- * @version 5.3.8
718
  * @since 2.2.6
719
  * @param array $atts Shortcode atts.
720
  */
721
  public function wcj_product_total_sales( $atts ) {
722
  $product_custom_fields = get_post_custom( wcj_get_product_id_or_variation_parent_id( $this->the_product ) );
723
  $total_sales = ( isset( $product_custom_fields['total_sales'][0] ) ) ? $product_custom_fields['total_sales'][0] : '';
724
- if ( 0 != $atts['offset'] && ! is_numeric( $total_sales ) ) {
725
  $total_sales += $atts['offset'];
726
  }
727
- return ( 0 == $total_sales && 'yes' == $atts['hide_if_zero'] ) ? '' : $total_sales;
728
  }
729
 
730
  /**
@@ -895,7 +896,7 @@ if ( ! class_exists( 'WCJ_Products_Shortcodes' ) ) :
895
  /**
896
  * Get product meta.
897
  *
898
- * @version 5.3.7
899
  * @since 2.5.7
900
  * @return string
901
  * @param array $atts Shortcode atts.
@@ -905,9 +906,9 @@ if ( ! class_exists( 'WCJ_Products_Shortcodes' ) ) :
905
  return '';
906
  }
907
  // Checking get_post_meta type ie. Array or String.
908
- $checking_Postmeta_value = gettype( get_post_meta( $atts['product_id'], $atts['name'], true ) );
909
  // if get_post_meta return Array.
910
- if ( 'array' === $checking_Postmeta_value ) {
911
  // convert Array To String.
912
  return implode( ',', get_post_meta( $atts['product_id'], $atts['name'], true ) );
913
  }
@@ -928,7 +929,7 @@ if ( ! class_exists( 'WCJ_Products_Shortcodes' ) ) :
928
  /**
929
  * Returns product (modified) price.
930
  *
931
- * @version 3.9.0
932
  * @todo variable products: a) not range; and b) price by country.
933
  * @return string The product (modified) price
934
  * @param array $atts Shortcode atts.
@@ -975,9 +976,7 @@ if ( ! class_exists( 'WCJ_Products_Shortcodes' ) ) :
975
  return ( 'min' === $atts['min_or_max'] ? $min : $max );
976
  }
977
  return ( $min !== $max ) ? sprintf( '%s-%s', $min, $max ) : $min;
978
- }
979
- // Simple etc.
980
- else {
981
  $the_price = $this->the_product->get_price();
982
  if ( '' !== $atts['multiply_by'] && is_numeric( $atts['multiply_by'] ) ) {
983
  $the_price = $the_price * $atts['multiply_by'];
2
  /**
3
  * Booster for WooCommerce - Shortcodes - Products
4
  *
5
+ * @version 5.6.2
6
  * @author Pluggabl LLC.
7
  * @package Booster_For_WooCommerce/shortcodes
8
  */
128
  'width' => 0,
129
  'height' => 0,
130
  'color' => 'black',
131
+ 'meta_key' => '', //phpcs:ignore
132
  );
133
 
134
  parent::__construct();
313
  /**
314
  * Wcj_product_time_since_last_sale.
315
  *
316
+ * @version 5.6.2
317
  * @since 2.4.0
318
  * @param array $atts Shortcode atts.
319
  */
345
  // Run through all order's items.
346
  if ( $item['product_id'] === $atts['product_id'] ) {
347
  // Found sale!
348
+ /* translators: %s: search term */
349
+ return sprintf( __( '%s ago', 'woocommerce-jetpack' ), human_time_diff( get_the_time( 'U', $order_id ), (int) gmdate( 'U' ) ) );
350
  }
351
  }
352
  }
715
  /**
716
  * Wcj_product_total_sales.
717
  *
718
+ * @version 5.6.2
719
  * @since 2.2.6
720
  * @param array $atts Shortcode atts.
721
  */
722
  public function wcj_product_total_sales( $atts ) {
723
  $product_custom_fields = get_post_custom( wcj_get_product_id_or_variation_parent_id( $this->the_product ) );
724
  $total_sales = ( isset( $product_custom_fields['total_sales'][0] ) ) ? $product_custom_fields['total_sales'][0] : '';
725
+ if ( '0' !== $atts['offset'] && ! is_numeric( $total_sales ) ) {
726
  $total_sales += $atts['offset'];
727
  }
728
+ return ( '0' === $total_sales && 'yes' === $atts['hide_if_zero'] ) ? '' : $total_sales;
729
  }
730
 
731
  /**
896
  /**
897
  * Get product meta.
898
  *
899
+ * @version 5.6.2
900
  * @since 2.5.7
901
  * @return string
902
  * @param array $atts Shortcode atts.
906
  return '';
907
  }
908
  // Checking get_post_meta type ie. Array or String.
909
+ $checking_postmeta_value = gettype( get_post_meta( $atts['product_id'], $atts['name'], true ) );
910
  // if get_post_meta return Array.
911
+ if ( 'array' === $checking_postmeta_value ) {
912
  // convert Array To String.
913
  return implode( ',', get_post_meta( $atts['product_id'], $atts['name'], true ) );
914
  }
929
  /**
930
  * Returns product (modified) price.
931
  *
932
+ * @version 5.6.2
933
  * @todo variable products: a) not range; and b) price by country.
934
  * @return string The product (modified) price
935
  * @param array $atts Shortcode atts.
976
  return ( 'min' === $atts['min_or_max'] ? $min : $max );
977
  }
978
  return ( $min !== $max ) ? sprintf( '%s-%s', $min, $max ) : $min;
979
+ } else {
 
 
980
  $the_price = $this->the_product->get_price();
981
  if ( '' !== $atts['multiply_by'] && is_numeric( $atts['multiply_by'] ) ) {
982
  $the_price = $the_price * $atts['multiply_by'];
includes/templates/wcj-empty.php CHANGED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Booster for WooCommerce - Wcj Empty
4
+ *
5
+ * @version 5.6.2
6
+ * @author Pluggabl LLC.
7
+ * @package Booster_For_WooCommerce/includes
8
+ */
9
+
10
+
includes/tools/class-wcj-eu-countries-vat-rates-tool.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Tool - EU Countries VAT Rates
4
  *
5
- * @version 5.5.6
6
  * @since 2.3.10
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/tools
@@ -35,11 +35,15 @@ if ( ! class_exists( 'WCJ_EU_Countries_VAT_Rates_Tool' ) ) :
35
  /**
36
  * Add_eu_countries_vat_rates.
37
  *
38
- * @version 2.5.0
39
  * @since 2.3.10
40
  */
41
  public function add_eu_countries_vat_rates() {
42
- if ( ! isset( $_POST['add_eu_countries_vat_rates'] ) ) {
 
 
 
 
43
  return;
44
  }
45
  if ( ! wcj_is_user_role( 'administrator' ) && ! is_shop_manager() ) {
@@ -51,7 +55,7 @@ if ( ! class_exists( 'WCJ_EU_Countries_VAT_Rates_Tool' ) ) :
51
  'tax_rate_country' => $country,
52
  'tax_rate' => $rate,
53
 
54
- 'tax_rate_name' => isset( $_POST['wcj_tax_name'] ) ? $_POST['wcj_tax_name'] : __( 'VAT', 'woocommerce' ),
55
  'tax_rate_priority' => 1,
56
  'tax_rate_compound' => 0,
57
  'tax_rate_shipping' => 1,
@@ -68,7 +72,7 @@ if ( ! class_exists( 'WCJ_EU_Countries_VAT_Rates_Tool' ) ) :
68
  /**
69
  * Create_eu_countries_vat_rates_tool.
70
  *
71
- * @version 5.5.6
72
  * @since 2.3.10
73
  * @param string $header_html Get html data.
74
  */
@@ -78,8 +82,12 @@ if ( ! class_exists( 'WCJ_EU_Countries_VAT_Rates_Tool' ) ) :
78
  $the_tool_html .= '<div class="wcj-setting-jetpack-body wcj_tools_cnt_main">';
79
  $the_tool_html .= $header_html;
80
 
81
- $data = array();
82
- $the_name = ( isset( $_POST['wcj_tax_name'] ) ) ? $_POST['wcj_tax_name'] : __( 'VAT', 'woocommerce' );
 
 
 
 
83
  $data[] = array(
84
  __( 'Name', 'woocommerce-jetpack' ),
85
  '<input class="input-text" type="text" name="wcj_tax_name" value="' . $the_name . '">',
@@ -135,7 +143,7 @@ if ( ! class_exists( 'WCJ_EU_Countries_VAT_Rates_Tool' ) ) :
135
  )
136
  );
137
  $the_tool_html .= '</div>';
138
- echo $the_tool_html;
139
  }
140
  }
141
 
2
  /**
3
  * Booster for WooCommerce - Tool - EU Countries VAT Rates
4
  *
5
+ * @version 5.6.2
6
  * @since 2.3.10
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/tools
35
  /**
36
  * Add_eu_countries_vat_rates.
37
  *
38
+ * @version 5.6.2
39
  * @since 2.3.10
40
  */
41
  public function add_eu_countries_vat_rates() {
42
+ $wpnonce = true;
43
+ if ( function_exists( 'wp_verify_nonce' ) ) {
44
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
45
+ }
46
+ if ( ! $wpnonce || ! isset( $_POST['add_eu_countries_vat_rates'] ) ) {
47
  return;
48
  }
49
  if ( ! wcj_is_user_role( 'administrator' ) && ! is_shop_manager() ) {
55
  'tax_rate_country' => $country,
56
  'tax_rate' => $rate,
57
 
58
+ 'tax_rate_name' => isset( $_POST['wcj_tax_name'] ) ? sanitize_text_field( wp_unslash( $_POST['wcj_tax_name'] ) ) : __( 'VAT', 'woocommerce' ),
59
  'tax_rate_priority' => 1,
60
  'tax_rate_compound' => 0,
61
  'tax_rate_shipping' => 1,
72
  /**
73
  * Create_eu_countries_vat_rates_tool.
74
  *
75
+ * @version 5.6.2
76
  * @since 2.3.10
77
  * @param string $header_html Get html data.
78
  */
82
  $the_tool_html .= '<div class="wcj-setting-jetpack-body wcj_tools_cnt_main">';
83
  $the_tool_html .= $header_html;
84
 
85
+ $data = array();
86
+ $wpnonce = true;
87
+ if ( function_exists( 'wp_verify_nonce' ) ) {
88
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '' ) ) : true;
89
+ }
90
+ $the_name = ( $wpnonce && isset( $_POST['wcj_tax_name'] ) ) ? sanitize_text_field( wp_unslash( $_POST['wcj_tax_name'] ) ) : __( 'VAT', 'woocommerce' );
91
  $data[] = array(
92
  __( 'Name', 'woocommerce-jetpack' ),
93
  '<input class="input-text" type="text" name="wcj_tax_name" value="' . $the_name . '">',
143
  )
144
  );
145
  $the_tool_html .= '</div>';
146
+ echo wp_kses_post( $the_tool_html );
147
  }
148
  }
149
 
includes/tools/class-wcj-order-statuses-tool.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Tool - Order Statuses
4
  *
5
- * @version 5.5.9
6
  * @since 3.2.2
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/tools
@@ -177,7 +177,7 @@ if ( ! class_exists( 'WCJ_Order_Statuses_Tool' ) ) :
177
  /**
178
  * Get_custom_statuses_table.
179
  *
180
- * @version 5.5.9
181
  * @since 3.2.2
182
  */
183
  public function get_custom_statuses_table() {
@@ -205,7 +205,7 @@ if ( ! class_exists( 'WCJ_Order_Statuses_Tool' ) ) :
205
  $text_color_html = '<input disabled type="color" value="' . $icon_data['text_color'] . '">';
206
  $delete_button = '<a class="button-primary" href="' . add_query_arg( 'delete', $status, remove_query_arg( 'edit' ) ) .
207
  '" onclick="return confirm(\'' . __( 'Are you sure?', 'woocommerce-jetpack' ) . '\')">' . __( 'Delete', 'woocommerce-jetpack' ) . '</a>';
208
- $edit_button = '<a class="button-primary"' . ( '' != apply_filters( 'booster_message', '', 'desc' ) ?
209
  ' disabled title="' . __( 'Get Booster Plus to enable.', 'woocommerce-jetpack' ) . '"' :
210
  ' href="' . add_query_arg( 'edit', $status, remove_query_arg( 'delete' ) ) . '"' ) . '>' . __( 'Edit', 'woocommerce-jetpack' ) . '</a>';
211
  $row = array_merge(
@@ -241,11 +241,15 @@ if ( ! class_exists( 'WCJ_Order_Statuses_Tool' ) ) :
241
  /**
242
  * Get_custom_statuses_add_edit_table.
243
  *
244
- * @version 3.9.0
245
  * @since 3.2.2
246
  */
247
  public function get_custom_statuses_add_edit_table() {
248
- $is_editing = sanitize_text_field( wp_unslash( $_GET['edit'] ) );
 
 
 
 
249
  if ( $is_editing ) {
250
  $edit_slug = sanitize_text_field( wp_unslash( $_GET['edit'] ) );
251
  $custom_order_statuses = $this->module->get_custom_order_statuses();
@@ -299,19 +303,28 @@ if ( ! class_exists( 'WCJ_Order_Statuses_Tool' ) ) :
299
  /**
300
  * Process_actions.
301
  *
302
- * @version 3.6.0
303
  * @since 3.2.2
304
  * @todo (maybe) use `init` hook for processing actions
305
  */
306
  public function process_actions() {
 
 
 
 
 
 
 
 
 
307
 
308
- if ( isset( $_POST['add_custom_status'] ) ) {
309
- return $this->add_custom_status( sanitize_text_field( wp_unslash( $_POST['new_status'] ) ), sanitize_text_field( wp_unslash( $_POST['new_status_label'] ) ), sanitize_text_field( wp_unslash( $_POST['new_status_icon_content'] ) ), sanitize_text_field( wp_unslash( $_POST['new_status_icon_color'] ) ), sanitize_text_field( wp_unslash( $_POST['new_status_text_color'] ) ) );
310
- } elseif ( isset( $_POST['edit_custom_status'] ) ) {
311
- return $this->edit_custom_status( sanitize_text_field( wp_unslash( $_POST['new_status'] ) ), sanitize_text_field( wp_unslash( $_POST['new_status_label'] ) ), sanitize_text_field( wp_unslash( $_POST['new_status_icon_content'] ) ), sanitize_text_field( wp_unslash( $_POST['new_status_icon_color'] ) ), sanitize_text_field( wp_unslash( $_POST['new_status_text_color'] ) ) );
312
- } elseif ( isset( $_GET['delete'] ) && '' !== $_GET['delete'] ) {
313
  return $this->delete_custom_status( sanitize_text_field( wp_unslash( $_GET['delete'] ) ) );
314
- } elseif ( isset( $_GET['delete_all'] ) && '' !== $_GET['delete_all'] ) {
315
  return $this->delete_custom_status_all();
316
  }
317
  }
@@ -331,11 +344,12 @@ if ( ! class_exists( 'WCJ_Order_Statuses_Tool' ) ) :
331
  /**
332
  * Create_tool.
333
  *
334
- * @version 5.5.6
335
  * @since 3.2.2
336
  */
337
  public function create_tool() {
338
  $html = '';
 
339
  $html .= '<div class="wrap">';
340
  $html .= $this->process_actions();
341
  $html .= $this->module->get_tool_header_html( $this->id );
@@ -344,7 +358,7 @@ if ( ! class_exists( 'WCJ_Order_Statuses_Tool' ) ) :
344
  $html .= $this->get_delete_all_custom_statuses_button();
345
  $html .= '</div>';
346
  $html .= '</div>';
347
- echo $html;
348
  }
349
  }
350
 
2
  /**
3
  * Booster for WooCommerce - Tool - Order Statuses
4
  *
5
+ * @version 5.6.2
6
  * @since 3.2.2
7
  * @author Pluggabl LLC.
8
  * @package Booster_For_WooCommerce/tools
177
  /**
178
  * Get_custom_statuses_table.
179
  *
180
+ * @version 5.6.2
181
  * @since 3.2.2
182
  */
183
  public function get_custom_statuses_table() {
205
  $text_color_html = '<input disabled type="color" value="' . $icon_data['text_color'] . '">';
206
  $delete_button = '<a class="button-primary" href="' . add_query_arg( 'delete', $status, remove_query_arg( 'edit' ) ) .
207
  '" onclick="return confirm(\'' . __( 'Are you sure?', 'woocommerce-jetpack' ) . '\')">' . __( 'Delete', 'woocommerce-jetpack' ) . '</a>';
208
+ $edit_button = '<a class="button-primary"' . ( '' !== apply_filters( 'booster_message', '', 'desc' ) ?
209
  ' disabled title="' . __( 'Get Booster Plus to enable.', 'woocommerce-jetpack' ) . '"' :
210
  ' href="' . add_query_arg( 'edit', $status, remove_query_arg( 'delete' ) ) . '"' ) . '>' . __( 'Edit', 'woocommerce-jetpack' ) . '</a>';
211
  $row = array_merge(
241
  /**
242
  * Get_custom_statuses_add_edit_table.
243
  *
244
+ * @version 5.6.2
245
  * @since 3.2.2
246
  */
247
  public function get_custom_statuses_add_edit_table() {
248
+ $wpnonce = true;
249
+ if ( function_exists( 'wp_verify_nonce' ) ) {
250
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : 'woocommerce-settings' ) ) : true;
251
+ }
252
+ $is_editing = ( $wpnonce && isset( $_GET['edit'] ) );
253
  if ( $is_editing ) {
254
  $edit_slug = sanitize_text_field( wp_unslash( $_GET['edit'] ) );
255
  $custom_order_statuses = $this->module->get_custom_order_statuses();
303
  /**
304
  * Process_actions.
305
  *
306
+ * @version 5.6.2
307
  * @since 3.2.2
308
  * @todo (maybe) use `init` hook for processing actions
309
  */
310
  public function process_actions() {
311
+ $wpnonce = true;
312
+ if ( function_exists( 'wp_verify_nonce' ) ) {
313
+ $wpnonce = isset( $_REQUEST['_wpnonce'] ) ? wp_verify_nonce( sanitize_key( isset( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : 'woocommerce-settings' ) ) : true;
314
+ }
315
+ $new_status = isset( $_POST['new_status'] ) ? sanitize_text_field( wp_unslash( $_POST['new_status'] ) ) : '';
316
+ $new_status_label = isset( $_POST['new_status_label'] ) ? sanitize_text_field( wp_unslash( $_POST['new_status_label'] ) ) : '';
317
+ $new_status_icon_content = isset( $_POST['new_status_icon_content'] ) ? sanitize_text_field( wp_unslash( $_POST['new_status_icon_content'] ) ) : '';
318
+ $new_status_icon_color = isset( $_POST['new_status_icon_color'] ) ? sanitize_text_field( wp_unslash( $_POST['new_status_icon_color'] ) ) : '';
319
+ $new_status_text_color = isset( $_POST['new_status_text_color'] ) ? sanitize_text_field( wp_unslash( $_POST['new_status_text_color'] ) ) : '';
320
 
321
+ if ( $wpnonce && isset( $_POST['add_custom_status'] ) ) {
322
+ return $this->add_custom_status( $new_status, $new_status_label, $new_status_icon_content, $new_status_icon_color, $new_status_text_color );
323
+ } elseif ( $wpnonce && isset( $_POST['edit_custom_status'] ) ) {
324
+ return $this->edit_custom_status( $new_status, $new_status_label, $new_status_icon_content, $new_status_icon_color, $new_status_text_color );
325
+ } elseif ( $wpnonce && isset( $_GET['delete'] ) && '' !== $_GET['delete'] ) {
326
  return $this->delete_custom_status( sanitize_text_field( wp_unslash( $_GET['delete'] ) ) );
327
+ } elseif ( $wpnonce && isset( $_GET['delete_all'] ) && '' !== $_GET['delete_all'] ) {
328
  return $this->delete_custom_status_all();
329
  }
330
  }
344
  /**
345
  * Create_tool.
346
  *
347
+ * @version 5.6.2
348
  * @since 3.2.2
349
  */
350
  public function create_tool() {
351
  $html = '';
352
+ $html .= '<div class="wcj-setting-jetpack-body wcj_tools_cnt_main">';
353
  $html .= '<div class="wrap">';
354
  $html .= $this->process_actions();
355
  $html .= $this->module->get_tool_header_html( $this->id );
358
  $html .= $this->get_delete_all_custom_statuses_button();
359
  $html .= '</div>';
360
  $html .= '</div>';
361
+ echo wp_kses_post( $html );
362
  }
363
  }
364
 
langs/woocommerce-jetpack.pot CHANGED
@@ -21,89 +21,89 @@ msgstr ""
21
  "X-Poedit-SearchPathExcluded-1: .idea\n"
22
  "X-Poedit-SearchPathExcluded-2: .git\n"
23
 
24
- #: includes/add-to-cart/class-wcj-add-to-cart-per-product.php:96
25
  msgid "Booster: Custom Add to Cart"
26
  msgstr ""
27
 
28
- #: includes/add-to-cart/class-wcj-add-to-cart-per-product.php:112
29
  msgid "Single product view"
30
  msgstr ""
31
 
32
- #: includes/add-to-cart/class-wcj-add-to-cart-per-product.php:113
33
  msgid "Product category (archive) view"
34
  msgstr ""
35
 
36
  #: includes/admin/class-wc-settings-jetpack.php:33
37
- #: includes/admin/class-wc-settings-jetpack.php:388
38
  #: includes/class-wcj-admin-bar.php:299
39
  #: includes/class-wcj-checkout-files-upload.php:270
40
- #: includes/class-wcj-eu-vat-number.php:175
41
- #: includes/class-wcj-max-products-per-user.php:204
42
- #: includes/class-wcj-orders.php:131 includes/class-wcj-orders.php:160
43
- #: includes/class-wcj-payment-gateways.php:101
44
- #: includes/class-wcj-track-users.php:174 includes/class-wcj-track-users.php:266
45
- #: includes/classes/class-wcj-module.php:667
46
- #: includes/classes/class-wcj-module.php:876
47
  #: includes/settings/wcj-settings-price-by-country.php:259
48
  msgid "Booster"
49
  msgstr ""
50
 
51
- #: includes/admin/class-wc-settings-jetpack.php:86
52
  #, php-format
53
  msgid ""
54
  "You're using Booster free version. To unlock more features please consider <a "
55
  "target=\"_blank\" href=\"%s\">Upgrade Booster to unlock this feature</a>."
56
  msgstr ""
57
 
58
- #: includes/admin/class-wc-settings-jetpack.php:110
59
  #, php-format
60
  msgid ""
61
- "Please rate <strong>Booster for WooCommerce</strong> %s on <a href=\"%s\" "
62
  "target=\"_blank\">WordPress.org</a> to help us spread the word. Thank you "
63
  "from Booster team!"
64
  msgstr ""
65
 
66
- #: includes/admin/class-wc-settings-jetpack.php:169
67
  #, php-format
68
  msgid ""
69
- "Please rate <strong>Booster for WooCommerce</strong> %s on <a href=\"%s\" "
70
- "target=\"_blank\">WordPress.org</a> to help us spread the word. Thank you "
71
  "from Booster team!"
72
  msgstr ""
73
 
74
- #: includes/admin/class-wc-settings-jetpack.php:242
75
- #: includes/admin/class-wc-settings-jetpack.php:308
76
- #: includes/admin/class-wc-settings-jetpack.php:893
77
  #: includes/admin/wcj-modules-cats.php:17 includes/class-wcj-admin-bar.php:234
78
  #: includes/class-wcj-my-account.php:39
79
  msgid "Dashboard"
80
  msgstr ""
81
 
82
- #: includes/admin/class-wc-settings-jetpack.php:243
83
  msgid "All Module"
84
  msgstr ""
85
 
86
- #: includes/admin/class-wc-settings-jetpack.php:244
87
  msgid "Active Modules"
88
  msgstr ""
89
 
90
- #: includes/admin/class-wc-settings-jetpack.php:245
91
  #: includes/class-wcj-admin-bar.php:167
92
  msgid "Manage Settings"
93
  msgstr ""
94
 
95
- #: includes/admin/class-wc-settings-jetpack.php:356
96
  #, php-format
97
  msgid ""
98
- "Please note that current <em>%s</em> module is deprecated and will be removed "
99
- "in future updates. Please use <em>%s</em> module instead."
100
  msgstr ""
101
 
102
- #: includes/admin/class-wc-settings-jetpack.php:362
103
  msgid "Module will be removed from the module's list as soon as you disable it."
104
  msgstr ""
105
 
106
- #: includes/admin/class-wc-settings-jetpack.php:373
107
  #, php-format
108
  msgid ""
109
  "Please note that <em>%s</em> module is currently under development. Until "
@@ -111,253 +111,253 @@ msgid ""
111
  "be moved to paid plugin version."
112
  msgstr ""
113
 
114
- #: includes/admin/class-wc-settings-jetpack.php:384
115
  #: includes/class-wcj-admin-bar.php:411
116
  #: includes/settings/wcj-settings-emails-verification.php:152
117
  #: includes/settings/wcj-settings-price-by-country.php:258
118
  msgid "WooCommerce"
119
  msgstr ""
120
 
121
- #: includes/admin/class-wc-settings-jetpack.php:386
122
- #: includes/admin/class-wc-settings-jetpack.php:609
123
  #: includes/class-wcj-admin-bar.php:184 includes/class-wcj-admin-bar.php:535
124
- #: includes/class-wcj-admin-bar.php:635 includes/core/class-wcj-admin.php:139
125
  msgid "Settings"
126
  msgstr ""
127
 
128
- #: includes/admin/class-wc-settings-jetpack.php:439
129
  msgid ""
130
  "This section lets you export, import or reset all Booster's modules settings."
131
  msgstr ""
132
 
133
- #: includes/admin/class-wc-settings-jetpack.php:463
134
- #: includes/admin/class-wc-settings-jetpack.php:1011
135
  #: includes/class-wcj-export-import.php:31
136
  msgid "Export"
137
  msgstr ""
138
 
139
- #: includes/admin/class-wc-settings-jetpack.php:464
140
  msgid "Export all Booster's options to a file."
141
  msgstr ""
142
 
143
- #: includes/admin/class-wc-settings-jetpack.php:467
144
- #: includes/admin/class-wc-settings-jetpack.php:1002
145
- #: includes/class-wcj-purchase-data.php:120
146
  msgid "Import"
147
  msgstr ""
148
 
149
- #: includes/admin/class-wc-settings-jetpack.php:469
150
  msgid "Import all Booster's options from a file."
151
  msgstr ""
152
 
153
- #: includes/admin/class-wc-settings-jetpack.php:473
154
  msgid ""
155
  "This will reset settings to defaults for all Booster modules. Are you sure?"
156
  msgstr ""
157
 
158
- #: includes/admin/class-wc-settings-jetpack.php:474
159
- #: includes/admin/class-wc-settings-jetpack.php:1022
160
  msgid "Reset"
161
  msgstr ""
162
 
163
- #: includes/admin/class-wc-settings-jetpack.php:475
164
  msgid "Reset all Booster's options."
165
  msgstr ""
166
 
167
- #: includes/admin/class-wc-settings-jetpack.php:479
168
  msgid "This will delete all Booster meta. Are you sure?"
169
  msgstr ""
170
 
171
- #: includes/admin/class-wc-settings-jetpack.php:480
172
- #: includes/admin/class-wc-settings-jetpack.php:1031
173
  msgid "Reset meta"
174
  msgstr ""
175
 
176
- #: includes/admin/class-wc-settings-jetpack.php:481
177
  msgid "Reset all Booster's meta."
178
  msgstr ""
179
 
180
- #: includes/admin/class-wc-settings-jetpack.php:534
181
  msgid "Version"
182
  msgstr ""
183
 
184
- #: includes/admin/class-wc-settings-jetpack.php:561
185
- #: includes/admin/class-wc-settings-jetpack.php:570
186
  msgid "Select All"
187
  msgstr ""
188
 
189
- #: includes/admin/class-wc-settings-jetpack.php:563
190
- #: includes/admin/class-wc-settings-jetpack.php:571
191
  msgid "Module"
192
  msgstr ""
193
 
194
- #: includes/admin/class-wc-settings-jetpack.php:565
195
- #: includes/admin/class-wc-settings-jetpack.php:574
196
  #: includes/export/class-wcj-export-fields-helper.php:297
197
  #: includes/gateways/class-wc-gateway-wcj-custom.php:67
198
  #: includes/settings/wcj-settings-checkout-custom-fields.php:181
199
  #: includes/settings/wcj-settings-eu-vat-number.php:37
200
  #: includes/settings/wcj-settings-product-by-user.php:16
201
  #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:190
202
- #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:369
203
  msgid "Description"
204
  msgstr ""
205
 
206
- #: includes/admin/class-wc-settings-jetpack.php:611
207
- #: includes/admin/class-wc-settings-jetpack.php:1040
208
  #: includes/class-wcj-admin-bar.php:188
209
- #: includes/classes/class-wcj-module.php:1024
210
  msgid "Documentation"
211
  msgstr ""
212
 
213
- #: includes/admin/class-wc-settings-jetpack.php:622
214
  msgid "No active modules found."
215
  msgstr ""
216
 
217
- #: includes/admin/class-wc-settings-jetpack.php:628
218
  msgid "Total Modules:"
219
  msgstr ""
220
 
221
- #: includes/admin/class-wc-settings-jetpack.php:692
222
  msgid "Autoload Booster's Options"
223
  msgstr ""
224
 
225
- #: includes/admin/class-wc-settings-jetpack.php:694
226
  msgid ""
227
  "Choose if you want Booster's options to be autoloaded when calling "
228
  "add_option. After saving this option, you need to Reset all Booster's "
229
  "settings. Leave default value (i.e. Enabled) if not sure."
230
  msgstr ""
231
 
232
- #: includes/admin/class-wc-settings-jetpack.php:699
233
  msgid "Load Modules on Init Hook"
234
  msgstr ""
235
 
236
- #: includes/admin/class-wc-settings-jetpack.php:701
237
  msgid "Choose if you want to load Booster Modules on Init hook."
238
  msgstr ""
239
 
240
- #: includes/admin/class-wc-settings-jetpack.php:701
241
  msgid ""
242
  "It will load the locale appropriately if users change it from the profile "
243
  "page."
244
  msgstr ""
245
 
246
- #: includes/admin/class-wc-settings-jetpack.php:706
247
  msgid "Use List Instead of Comma Separated Text for Products in Settings"
248
  msgstr ""
249
 
250
- #: includes/admin/class-wc-settings-jetpack.php:709
251
- #: includes/admin/class-wc-settings-jetpack.php:729
252
- #: includes/admin/class-wc-settings-jetpack.php:744
253
  #, php-format
254
  msgid "Supported modules: %s."
255
  msgstr ""
256
 
257
- #: includes/admin/class-wc-settings-jetpack.php:713
258
  #: includes/class-wcj-payment-gateways-per-category.php:31
259
  msgid "Gateways per Product or Category"
260
  msgstr ""
261
 
262
- #: includes/admin/class-wc-settings-jetpack.php:714
263
  #: includes/class-wcj-global-discount.php:38
264
  #: includes/settings/wcj-settings-product-addons.php:275
265
  msgid "Global Discount"
266
  msgstr ""
267
 
268
- #: includes/admin/class-wc-settings-jetpack.php:715
269
- #: includes/admin/class-wc-settings-jetpack.php:733
270
- #: includes/admin/class-wc-settings-jetpack.php:748
271
  #: includes/class-wcj-product-custom-info.php:29
272
- #: includes/functions/wcj-functions-general.php:484
273
  msgid "Product Info"
274
  msgstr ""
275
 
276
- #: includes/admin/class-wc-settings-jetpack.php:716
277
  #: includes/admin/wcj-welcome-screen-content.php:82
278
  #: includes/class-wcj-product-input-fields.php:29
279
- #: includes/input-fields/class-wcj-product-input-fields-core.php:213
280
  msgid "Product Input Fields"
281
  msgstr ""
282
 
283
- #: includes/admin/class-wc-settings-jetpack.php:717
284
  msgid "Products XML"
285
  msgstr ""
286
 
287
- #: includes/admin/class-wc-settings-jetpack.php:718
288
  #: includes/class-wcj-related-products.php:52
289
  #: includes/settings/meta-box/wcj-settings-meta-box-related-products.php:33
290
  #: includes/settings/wcj-settings-free-price.php:23
291
  msgid "Related Products"
292
  msgstr ""
293
 
294
- #: includes/admin/class-wc-settings-jetpack.php:726
295
  msgid ""
296
  "Use List Instead of Comma Separated Text for Products Categories in Settings"
297
  msgstr ""
298
 
299
- #: includes/admin/class-wc-settings-jetpack.php:741
300
  msgid "Use List Instead of Comma Separated Text for Products Tags in Settings"
301
  msgstr ""
302
 
303
- #: includes/admin/class-wc-settings-jetpack.php:773
304
- #: includes/core/class-wcj-admin.php:123
305
  msgid "Booster for WooCommerce"
306
  msgstr ""
307
 
308
- #: includes/admin/class-wc-settings-jetpack.php:852
309
  msgid "Need Help?"
310
  msgstr ""
311
 
312
- #: includes/admin/class-wc-settings-jetpack.php:879
313
  #: includes/class-wcj-my-account.php:32
314
  msgid "My Account"
315
  msgstr ""
316
 
317
- #: includes/admin/class-wc-settings-jetpack.php:883
318
  msgid "Get Booster Plus"
319
  msgstr ""
320
 
321
- #: includes/admin/class-wc-settings-jetpack.php:890
322
  msgid "Getting Started"
323
  msgstr ""
324
 
325
- #: includes/admin/class-wc-settings-jetpack.php:894
326
  msgid "Navigating Categories"
327
  msgstr ""
328
 
329
- #: includes/admin/class-wc-settings-jetpack.php:895
330
  msgid "How to get started with booster"
331
  msgstr ""
332
 
333
- #: includes/admin/class-wc-settings-jetpack.php:900
334
  msgid "Frequently Asked Questions"
335
  msgstr ""
336
 
337
- #: includes/admin/class-wc-settings-jetpack.php:905
338
  msgid "Do I need to have coding skills to use Booster Plus?"
339
  msgstr ""
340
 
341
- #: includes/admin/class-wc-settings-jetpack.php:909
342
  msgid ""
343
  "Absolutely not. You can configure pretty much everything Booster Plus has to "
344
  "offer without any coding knowledge."
345
  msgstr ""
346
 
347
- #: includes/admin/class-wc-settings-jetpack.php:914
348
  msgid "Will Booster Plus slow down my website?"
349
  msgstr ""
350
 
351
- #: includes/admin/class-wc-settings-jetpack.php:918
352
  msgid ""
353
  "Absolutely not. Booster Plus is carefully built with performance in mind."
354
  msgstr ""
355
 
356
- #: includes/admin/class-wc-settings-jetpack.php:923
357
  msgid "Do you offer refunds?"
358
  msgstr ""
359
 
360
- #: includes/admin/class-wc-settings-jetpack.php:927
361
  #, php-format
362
  msgid ""
363
  "If you are not completely satisfied with Booster Plus within the fist 30 "
@@ -365,38 +365,38 @@ msgid ""
365
  "no questions asked."
366
  msgstr ""
367
 
368
- #: includes/admin/class-wc-settings-jetpack.php:932
369
  msgid "Can I use Booster Plus on client sites?"
370
  msgstr ""
371
 
372
- #: includes/admin/class-wc-settings-jetpack.php:936
373
  msgid ""
374
  "Yes, you can use Booster Plus on client sites. You can purchase the multiple "
375
  "sites license of Booster Plus."
376
  msgstr ""
377
 
378
- #: includes/admin/class-wc-settings-jetpack.php:941
379
  msgid "Do you have an affiliate program?"
380
  msgstr ""
381
 
382
- #: includes/admin/class-wc-settings-jetpack.php:945
383
  msgid "Yes, We do have an affiliate program. "
384
  msgstr ""
385
 
386
- #: includes/admin/class-wc-settings-jetpack.php:945
387
  msgid "Click here"
388
  msgstr ""
389
 
390
- #: includes/admin/class-wc-settings-jetpack.php:945
391
  msgid " for the details."
392
  msgstr ""
393
 
394
- #: includes/admin/class-wc-settings-jetpack.php:950
395
  msgid ""
396
  "Why should I choose the Booster Plus suite over other individual plugins?"
397
  msgstr ""
398
 
399
- #: includes/admin/class-wc-settings-jetpack.php:954
400
  msgid ""
401
  "Oh, that's an easy one! Implementing just a few modules from the Booster Plus "
402
  "suite is more cost-effective than using dozens of individual plugins often "
@@ -408,228 +408,228 @@ msgid ""
408
  "your WooCommerce site easily."
409
  msgstr ""
410
 
411
- #: includes/admin/class-wc-settings-jetpack.php:959
412
  msgid "What features does Booster Plus have?"
413
  msgstr ""
414
 
415
- #: includes/admin/class-wc-settings-jetpack.php:963
416
  msgid "You can see all the features at "
417
  msgstr ""
418
 
419
- #: includes/admin/class-wc-settings-jetpack.php:963
420
  msgid "About Booster"
421
  msgstr ""
422
 
423
- #: includes/admin/class-wc-settings-jetpack.php:963
424
  msgid " page."
425
  msgstr ""
426
 
427
- #: includes/admin/class-wc-settings-jetpack.php:967
428
  msgid "Still have a question?"
429
  msgstr ""
430
 
431
- #: includes/admin/class-wc-settings-jetpack.php:968
432
  msgid "CONTACT BOOSTER SUPPORT"
433
  msgstr ""
434
 
435
- #: includes/admin/class-wc-settings-jetpack.php:974
436
  msgid "Connect with Booster"
437
  msgstr ""
438
 
439
- #: includes/admin/class-wc-settings-jetpack.php:978
440
  msgid "BOOSTER WEBSITE"
441
  msgstr ""
442
 
443
- #: includes/admin/class-wc-settings-jetpack.php:992
444
- #: includes/class-wcj-general.php:236 includes/class-wcj-product-by-user.php:275
445
  #: includes/settings/wcj-settings-pdf-invoicing-advanced.php:166
446
  #: includes/tools/class-wcj-order-statuses-tool.php:191
447
- #: includes/tools/class-wcj-order-statuses-tool.php:271
448
  msgid "Actions"
449
  msgstr ""
450
 
451
- #: includes/admin/class-wc-settings-jetpack.php:1003
452
  msgid "Import Booster options"
453
  msgstr ""
454
 
455
- #: includes/admin/class-wc-settings-jetpack.php:1012
456
  msgid "Export Booster options"
457
  msgstr ""
458
 
459
- #: includes/admin/class-wc-settings-jetpack.php:1023
460
  msgid "Reset all Booster's options"
461
  msgstr ""
462
 
463
- #: includes/admin/class-wc-settings-jetpack.php:1032
464
  msgid "Reset all Booster's meta"
465
  msgstr ""
466
 
467
- #: includes/admin/class-wc-settings-jetpack.php:1047
468
  msgid "Here you can find all documentation of Booster"
469
  msgstr ""
470
 
471
- #: includes/admin/class-wc-settings-jetpack.php:1049
472
  msgid "See Documentation"
473
  msgstr ""
474
 
475
- #: includes/admin/class-wc-settings-jetpack.php:1056
476
  msgid "Latest updates"
477
  msgstr ""
478
 
479
- #: includes/admin/class-wc-settings-jetpack.php:1059
480
  msgid "Version "
481
  msgstr ""
482
 
483
- #: includes/admin/class-wc-settings-jetpack.php:1064
484
  msgid "SEE MORE"
485
  msgstr ""
486
 
487
- #: includes/admin/class-wc-settings-jetpack.php:1075
488
- #: includes/core/class-wcj-admin.php:97
489
  msgid "Please rate "
490
  msgstr ""
491
 
492
- #: includes/admin/class-wc-settings-jetpack.php:1075
493
- #: includes/core/class-wcj-admin.php:97
494
  msgid "Booster for Woocommerce"
495
  msgstr ""
496
 
497
- #: includes/admin/class-wc-settings-jetpack.php:1083
498
- #: includes/core/class-wcj-admin.php:105
499
  msgid "WordPress.org"
500
  msgstr ""
501
 
502
- #: includes/admin/class-wc-settings-jetpack.php:1083
503
- #: includes/core/class-wcj-admin.php:105
504
  msgid " to help us spread the word. Thank you from Booster team!"
505
  msgstr ""
506
 
507
- #: includes/admin/class-wc-settings-jetpack.php:1087
508
  msgid "Upgrade today to unlock these popular premium features:"
509
  msgstr ""
510
 
511
- #: includes/admin/class-wc-settings-jetpack.php:1089
512
  msgid "+ PDF Invoices and Packing slips –"
513
  msgstr ""
514
 
515
- #: includes/admin/class-wc-settings-jetpack.php:1089
516
  msgid ""
517
  "Add ability to create Proforma Invoices, Credit Notes and Packaging slips"
518
  msgstr ""
519
 
520
- #: includes/admin/class-wc-settings-jetpack.php:1090
521
  msgid "+ Empty Cart –"
522
  msgstr ""
523
 
524
- #: includes/admin/class-wc-settings-jetpack.php:1090
525
  msgid ""
526
  "customize empty cart button text, different button positions on cart page"
527
  msgstr ""
528
 
529
- #: includes/admin/class-wc-settings-jetpack.php:1091
530
  msgid "+ Cart and checkout –"
531
  msgstr ""
532
 
533
- #: includes/admin/class-wc-settings-jetpack.php:1091
534
  msgid "add multiple – custom fields, custom info blocks, check out file uploads"
535
  msgstr ""
536
 
537
- #: includes/admin/class-wc-settings-jetpack.php:1092
538
  msgid "+ Mini cart –"
539
  msgstr ""
540
 
541
- #: includes/admin/class-wc-settings-jetpack.php:1092
542
  msgid "More custom information options"
543
  msgstr ""
544
 
545
- #: includes/admin/class-wc-settings-jetpack.php:1093
546
  msgid "+ Prices and currencies –"
547
  msgstr ""
548
 
549
- #: includes/admin/class-wc-settings-jetpack.php:1093
550
  msgid "add more unlimited number of currencies to WooCommerce"
551
  msgstr ""
552
 
553
- #: includes/admin/class-wc-settings-jetpack.php:1094
554
  msgid "+ Export options –"
555
  msgstr ""
556
 
557
- #: includes/admin/class-wc-settings-jetpack.php:1094
558
  msgid "more fields enabled"
559
  msgstr ""
560
 
561
- #: includes/admin/class-wc-settings-jetpack.php:1095
562
  msgid "+ Add to cart –"
563
  msgstr ""
564
 
565
- #: includes/admin/class-wc-settings-jetpack.php:1095
566
  msgid ""
567
  "customize add to cart messages, Button labels - multiple category groups "
568
  "allowed+ +"
569
  msgstr ""
570
 
571
- #: includes/admin/class-wc-settings-jetpack.php:1096
572
  msgid "+ More configuration options for payments and shipping"
573
  msgstr ""
574
 
575
- #: includes/admin/class-wc-settings-jetpack.php:1099
576
  msgid "Upgrade to Booster Plus"
577
  msgstr ""
578
 
579
  #: includes/admin/class-wcj-settings-custom-fields.php:79
580
  #, php-format
581
- msgid "Grab raw %s rate from %s."
582
  msgstr ""
583
 
584
  #: includes/admin/class-wcj-settings-custom-fields.php:80
585
  msgid "Doesn't apply rounding, offset etc."
586
  msgstr ""
587
 
588
- #: includes/admin/class-wcj-settings-custom-fields.php:347
589
  msgid "Save changes"
590
  msgstr ""
591
 
592
- #: includes/admin/class-wcj-settings-manager.php:67
593
  msgid "Please upload a file to import!"
594
  msgstr ""
595
 
596
- #: includes/admin/class-wcj-settings-manager.php:78
597
- #: includes/admin/class-wcj-settings-manager.php:83
598
  msgid "Wrong file format!"
599
  msgstr ""
600
 
601
- #: includes/admin/class-wcj-settings-manager.php:93
602
  #, php-format
603
  msgid "%d options successfully imported."
604
  msgstr ""
605
 
606
- #: includes/admin/class-wcj-settings-manager.php:148
607
  #, php-format
608
  msgid "%d meta successfully deleted."
609
  msgstr ""
610
 
611
- #: includes/admin/class-wcj-settings-manager.php:167
612
  #, php-format
613
  msgid "%d options successfully deleted."
614
  msgstr ""
615
 
616
- #: includes/admin/class-wcj-tools.php:55
617
  msgid "Booster for WooCommerce Tools"
618
  msgstr ""
619
 
620
- #: includes/admin/class-wcj-tools.php:56
621
  msgid "Booster Tools"
622
  msgstr ""
623
 
624
- #: includes/admin/class-wcj-tools.php:77
625
  msgid "Tools Dashboard"
626
  msgstr ""
627
 
628
- #: includes/admin/class-wcj-tools.php:100
629
  msgid "Booster for WooCommerce Tools - Dashboard"
630
  msgstr ""
631
 
632
- #: includes/admin/class-wcj-tools.php:101
633
  msgid ""
634
  "This dashboard lets you check statuses and short descriptions of all "
635
  "available Booster for WooCommerce tools. Tools can be enabled through "
@@ -637,8 +637,8 @@ msgid ""
637
  "above."
638
  msgstr ""
639
 
640
- #: includes/admin/class-wcj-welcome.php:52
641
- #: includes/admin/class-wcj-welcome.php:53
642
  msgid "Welcome to Booster"
643
  msgstr ""
644
 
@@ -670,9 +670,9 @@ msgstr ""
670
 
671
  #: includes/admin/wcj-modules-cats.php:61 includes/class-wcj-admin-bar.php:493
672
  #: includes/class-wcj-admin-bar.php:497 includes/class-wcj-admin-bar.php:543
673
- #: includes/class-wcj-product-bulk-meta-editor.php:285
674
- #: includes/class-wcj-product-by-user.php:177
675
- #: includes/class-wcj-product-by-user.php:214
676
  #: includes/class-wcj-shipping-by-products.php:40
677
  #: includes/settings/wcj-settings-reports.php:181
678
  #: includes/settings/wcj-settings-shipping-options.php:77
@@ -882,32 +882,39 @@ msgstr ""
882
  msgid "Don't miss updates from us!"
883
  msgstr ""
884
 
885
- #: includes/admin/wcj-welcome-screen-content.php:153
886
- #, php-format
887
- msgid "%s"
 
 
 
 
 
 
 
888
  msgstr ""
889
 
890
- #: includes/admin/wcj-welcome-screen-content.php:158
891
  msgid "Contact Us"
892
  msgstr ""
893
 
894
- #: includes/admin/wcj-welcome-screen-content.php:160
895
  msgid ""
896
  "Booster Plus customers get access to Premium Support and we respond within 24 "
897
  "business hours."
898
  msgstr ""
899
 
900
- #: includes/admin/wcj-welcome-screen-content.php:161
901
  msgid "Booster Plus Premium Support"
902
  msgstr ""
903
 
904
- #: includes/admin/wcj-welcome-screen-content.php:164
905
  msgid ""
906
  "Free users post on WordPress Plugin Support forum here. We check these "
907
  "threads twice every week Mon and Frid to respond."
908
  msgstr ""
909
 
910
- #: includes/admin/wcj-welcome-screen-content.php:165
911
  msgid "Booster Free Plugin Support"
912
  msgstr ""
913
 
@@ -986,7 +993,7 @@ msgstr ""
986
 
987
  #: includes/class-wcj-admin-bar.php:267 includes/class-wcj-admin-bar.php:311
988
  #: includes/class-wcj-admin-bar.php:659
989
- #: includes/classes/class-wcj-module.php:847
990
  #: includes/settings/wcj-settings-wpml.php:97
991
  msgid "Tools"
992
  msgstr ""
@@ -1040,7 +1047,7 @@ msgstr ""
1040
 
1041
  #: includes/class-wcj-admin-bar.php:353
1042
  #: includes/functions/wcj-functions-reports.php:50
1043
- #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:144
1044
  msgid "Year"
1045
  msgstr ""
1046
 
@@ -1051,7 +1058,7 @@ msgstr ""
1051
  #: includes/class-wcj-admin-bar.php:418 includes/class-wcj-admin-bar.php:422
1052
  #: includes/class-wcj-admin-bar.php:440 includes/class-wcj-my-account.php:40
1053
  #: includes/class-wcj-my-account.php:48 includes/class-wcj-orders.php:31
1054
- #: includes/reports/wcj-class-reports-sales-gateways.php:171
1055
  #: includes/settings/wcj-settings-reports.php:24
1056
  #: includes/settings/wcj-settings-reports.php:62
1057
  #: includes/settings/wcj-settings-reports.php:103
@@ -1082,7 +1089,7 @@ msgid "Customer list"
1082
  msgstr ""
1083
 
1084
  #: includes/class-wcj-admin-bar.php:459 includes/class-wcj-stock.php:35
1085
- #: includes/reports/wcj-class-reports-stock.php:292
1086
  #: includes/settings/wcj-settings-reports.php:159
1087
  #: includes/settings/wcj-settings-reports.php:165
1088
  #: includes/settings/wcj-settings-reports.php:171
@@ -1096,7 +1103,7 @@ msgstr ""
1096
  #: includes/class-wcj-admin-bar.php:467
1097
  #: includes/settings/wcj-settings-offer-price.php:53
1098
  #: includes/settings/wcj-settings-stock.php:111
1099
- #: includes/shortcodes/class-wcj-products-shortcodes.php:645
1100
  msgid "Out of stock"
1101
  msgstr ""
1102
 
@@ -1104,7 +1111,7 @@ msgstr ""
1104
  msgid "Most Stocked"
1105
  msgstr ""
1106
 
1107
- #: includes/class-wcj-admin-bar.php:477 includes/class-wcj-eu-vat-number.php:239
1108
  msgid "Taxes"
1109
  msgstr ""
1110
 
@@ -1120,11 +1127,11 @@ msgstr ""
1120
  msgid "Add product"
1121
  msgstr ""
1122
 
1123
- #: includes/class-wcj-admin-bar.php:505 includes/class-wcj-sku.php:710
1124
  #: includes/export/class-wcj-export-fields-helper.php:322
1125
  #: includes/settings/wcj-settings-product-by-user.php:22
1126
  #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:196
1127
- #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:433
1128
  msgid "Categories"
1129
  msgstr ""
1130
 
@@ -1132,7 +1139,7 @@ msgstr ""
1132
  #: includes/export/class-wcj-export-fields-helper.php:323
1133
  #: includes/settings/wcj-settings-product-by-user.php:23
1134
  #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:197
1135
- #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:443
1136
  msgid "Tags"
1137
  msgstr ""
1138
 
@@ -1277,21 +1284,21 @@ msgstr ""
1277
  msgid "Not Completed"
1278
  msgstr ""
1279
 
1280
- #: includes/class-wcj-admin-orders-list.php:256
1281
  msgid "Trash"
1282
  msgstr ""
1283
 
1284
- #: includes/class-wcj-admin-orders-list.php:342
1285
  #: includes/class-wcj-product-by-country.php:192
1286
  #: includes/class-wcj-product-by-country.php:228
1287
  msgid "All countries"
1288
  msgstr ""
1289
 
1290
- #: includes/class-wcj-admin-orders-list.php:351
1291
  msgid "All currencies"
1292
  msgstr ""
1293
 
1294
- #: includes/class-wcj-admin-orders-list.php:393
1295
  #: includes/export/class-wcj-export-fields-helper.php:52
1296
  #: includes/export/class-wcj-export-fields-helper.php:136
1297
  #: includes/export/class-wcj-export-fields-helper.php:219
@@ -1299,7 +1306,7 @@ msgstr ""
1299
  msgid "Billing Country"
1300
  msgstr ""
1301
 
1302
- #: includes/class-wcj-admin-orders-list.php:396
1303
  #: includes/settings/wcj-settings-admin-orders-list.php:37
1304
  msgid "Currency Code"
1305
  msgstr ""
@@ -1366,22 +1373,22 @@ msgstr ""
1366
  msgid "Item Meta Value"
1367
  msgstr ""
1368
 
1369
- #: includes/class-wcj-admin-tools.php:290 includes/class-wcj-admin-tools.php:335
1370
- #: includes/class-wcj-admin-tools.php:345
1371
- #: includes/class-wcj-product-bulk-meta-editor.php:374
1372
- #: includes/class-wcj-sku.php:709
1373
- #: includes/reports/wcj-class-reports-sales.php:209
1374
- #: includes/reports/wcj-class-reports-stock.php:289
1375
  msgid "Product"
1376
  msgstr ""
1377
 
1378
- #: includes/class-wcj-admin-tools.php:291 includes/class-wcj-admin-tools.php:336
1379
- #: includes/class-wcj-admin-tools.php:346
1380
- #: includes/reports/wcj-class-reports-stock.php:290
1381
  msgid "Category"
1382
  msgstr ""
1383
 
1384
- #: includes/class-wcj-admin-tools.php:364
1385
  msgid "Total Products:"
1386
  msgstr ""
1387
 
@@ -1485,7 +1492,7 @@ msgstr ""
1485
  #: includes/class-wcj-checkout-custom-fields.php:48
1486
  #: includes/class-wcj-product-input-fields.php:45
1487
  #, php-format
1488
- msgid "<strong>PHP code:</strong> by using %s function,<br> e.g.: %s"
1489
  msgstr ""
1490
 
1491
  #: includes/class-wcj-checkout-custom-info.php:30
@@ -1547,7 +1554,7 @@ msgstr ""
1547
  msgid "Add fees to WooCommerce cart & checkout."
1548
  msgstr ""
1549
 
1550
- #: includes/class-wcj-checkout-fees.php:248
1551
  #: includes/settings/wcj-settings-checkout-fees.php:46
1552
  #: includes/settings/wcj-settings-checkout-fees.php:67
1553
  msgid "Fee"
@@ -1582,8 +1589,8 @@ msgstr ""
1582
 
1583
  #: includes/class-wcj-checkout-files-upload.php:232
1584
  #: includes/class-wcj-checkout-files-upload.php:247
1585
- #: includes/class-wcj-checkout-files-upload.php:507
1586
- #: includes/class-wcj-checkout-files-upload.php:523
1587
  #: includes/settings/wcj-settings-checkout-files-upload.php:120
1588
  #, php-format
1589
  msgid "Wrong file type: \"%s\"!"
@@ -1625,29 +1632,29 @@ msgstr ""
1625
  msgid "File Removed"
1626
  msgstr ""
1627
 
1628
- #: includes/class-wcj-checkout-files-upload.php:543
1629
  #: includes/settings/wcj-settings-checkout-files-upload.php:135
1630
  #, php-format
1631
  msgid "File \"%s\" was successfully uploaded."
1632
  msgstr ""
1633
 
1634
- #: includes/class-wcj-checkout-files-upload.php:558
1635
  msgid "File Uploaded"
1636
  msgstr ""
1637
 
1638
- #: includes/class-wcj-checkout-files-upload.php:586
1639
  #: includes/settings/wcj-settings-checkout-files-upload.php:141
1640
  msgid "Please select file to upload!"
1641
  msgstr ""
1642
 
1643
- #: includes/class-wcj-checkout-files-upload.php:893
1644
- #: includes/class-wcj-checkout-files-upload.php:894
1645
  #: includes/settings/wcj-settings-checkout-files-upload.php:105
1646
  msgid "Upload"
1647
  msgstr ""
1648
 
1649
- #: includes/class-wcj-checkout-files-upload.php:909
1650
- #: includes/class-wcj-checkout-files-upload.php:910
1651
  #: includes/settings/wcj-settings-checkout-files-upload.php:111
1652
  #: includes/settings/wcj-settings-price-by-user-role.php:81
1653
  #: includes/settings/wcj-settings-price-by-user-role.php:89
@@ -1763,241 +1770,241 @@ msgid ""
1763
  "\">Product Open Pricing (Name Your Price) module</a>."
1764
  msgstr ""
1765
 
1766
- #: includes/class-wcj-currency-exchange-rates.php:29
1767
- msgid "Currency Exchange Rates"
1768
- msgstr ""
1769
-
1770
- #: includes/class-wcj-currency-exchange-rates.php:30
1771
- msgid ""
1772
- "Automatic currency exchange rates for WooCommerce (1 allowed in free "
1773
- "version). If you want to change the currency rate with real conversion then "
1774
- "enable it"
1775
- msgstr ""
1776
-
1777
- #: includes/class-wcj-currency-exchange-rates.php:31
1778
- msgid ""
1779
- "Automatic currency exchange rates for WooCommerce. If you want to change the "
1780
- "currency rate with real conversion then enable it"
1781
- msgstr ""
1782
-
1783
- #: includes/class-wcj-currency-exchange-rates.php:218
1784
- #: includes/settings/wcj-settings-currency-exchange-rates.php:52
1785
- msgid "Exchange Rates Server"
1786
- msgstr ""
1787
-
1788
- #: includes/class-wcj-currency-exchange-rates.php:224
1789
- #, php-format
1790
- msgid "Use default: %s"
1791
- msgstr ""
1792
-
1793
- #: includes/class-wcj-currency-exchange-rates.php:251
1794
- msgid "Exchange Rates Offset (Percent)"
1795
- msgstr ""
1796
-
1797
- #: includes/class-wcj-currency-exchange-rates.php:257
1798
- #, php-format
1799
- msgid "Use default: %s%%"
1800
- msgstr ""
1801
-
1802
- #: includes/class-wcj-currency-exchange-rates.php:258
1803
- msgid "Custom offset"
1804
- msgstr ""
1805
-
1806
- #: includes/class-wcj-currency-exchange-rates.php:262
1807
- msgid "Custom offset (Percent)"
1808
- msgstr ""
1809
-
1810
- #: includes/class-wcj-currency-exchange-rates.php:263
1811
- msgid "Used when \"Custom offset\" option is selected above."
1812
- msgstr ""
1813
-
1814
- #: includes/class-wcj-currency-external-products.php:28
1815
- msgid "Currency for External Products"
1816
- msgstr ""
1817
-
1818
- #: includes/class-wcj-currency-external-products.php:29
1819
- msgid "Set different currency for external products."
1820
- msgstr ""
1821
-
1822
- #: includes/class-wcj-currency-per-product.php:31
1823
- #: includes/settings/wcj-settings-currency-per-product.php:61
1824
- msgid "Currency per Product"
1825
- msgstr ""
1826
-
1827
- #: includes/class-wcj-currency-per-product.php:32
1828
- msgid ""
1829
- "Display prices for products in different currencies (1 currency allowed in "
1830
- "free version)."
1831
- msgstr ""
1832
-
1833
- #: includes/class-wcj-currency-per-product.php:33
1834
- msgid "Display prices for products in different currencies."
1835
- msgstr ""
1836
-
1837
- #: includes/class-wcj-currency-per-product.php:185
1838
- #: includes/settings/wcj-settings-currency-per-product.php:40
1839
- msgid ""
1840
- "Only one product can be added to the cart. Clear the cart or finish the "
1841
- "order, before adding another product to the cart."
1842
- msgstr ""
1843
-
1844
- #: includes/class-wcj-currency-per-product.php:205
1845
- #: includes/settings/wcj-settings-currency-per-product.php:47
1846
- msgid ""
1847
- "Only products with same currency can be added to the cart. Clear the cart or "
1848
- "finish the order, before adding products with another currency to the cart."
1849
- msgstr ""
1850
-
1851
- #: includes/class-wcj-currency-per-product.php:250
1852
- #, php-format
1853
- msgctxt "Price range: from-to"
1854
- msgid "%1$s&ndash;%2$s"
1855
- msgstr ""
1856
-
1857
- #: includes/class-wcj-currency.php:32
1858
  msgid "Currencies"
1859
  msgstr ""
1860
 
1861
- #: includes/class-wcj-currency.php:33
1862
  msgid ""
1863
  "Add all world currencies and cryptocurrencies to your store; change currency "
1864
  "symbol (Plus); add custom currencies (1 allowed in free version)."
1865
  msgstr ""
1866
 
1867
- #: includes/class-wcj-currency.php:34
1868
  msgid ""
1869
  "Add all world currencies and cryptocurrencies to your store; change currency "
1870
  "symbol; add custom currencies."
1871
  msgstr ""
1872
 
1873
- #: includes/class-wcj-currency.php:74
1874
  msgid "Auroracoin"
1875
  msgstr ""
1876
 
1877
- #: includes/class-wcj-currency.php:75
1878
  msgid "BitConnect"
1879
  msgstr ""
1880
 
1881
- #: includes/class-wcj-currency.php:76
1882
  msgid "Bitcoin Cash"
1883
  msgstr ""
1884
 
1885
- #: includes/class-wcj-currency.php:77
1886
  msgid "Coinye"
1887
  msgstr ""
1888
 
1889
- #: includes/class-wcj-currency.php:78
1890
  msgid "DigitalNote"
1891
  msgstr ""
1892
 
1893
- #: includes/class-wcj-currency.php:79
1894
  msgid "Emercoin"
1895
  msgstr ""
1896
 
1897
- #: includes/class-wcj-currency.php:80
1898
  msgid "Ethereum Classic"
1899
  msgstr ""
1900
 
1901
- #: includes/class-wcj-currency.php:81
1902
  msgid "Ethereum"
1903
  msgstr ""
1904
 
1905
- #: includes/class-wcj-currency.php:82
1906
  msgid "Freemasoncoin"
1907
  msgstr ""
1908
 
1909
- #: includes/class-wcj-currency.php:83
1910
  msgid "Gridcoin"
1911
  msgstr ""
1912
 
1913
- #: includes/class-wcj-currency.php:84
1914
  msgid "IOTA"
1915
  msgstr ""
1916
 
1917
- #: includes/class-wcj-currency.php:85
1918
  msgid "Litecoin"
1919
  msgstr ""
1920
 
1921
- #: includes/class-wcj-currency.php:86
1922
  msgid "MazaCoin"
1923
  msgstr ""
1924
 
1925
- #: includes/class-wcj-currency.php:87
1926
  msgid "Monero"
1927
  msgstr ""
1928
 
1929
- #: includes/class-wcj-currency.php:88
1930
  msgid "Namecoin"
1931
  msgstr ""
1932
 
1933
- #: includes/class-wcj-currency.php:89
1934
  msgid "NEM"
1935
  msgstr ""
1936
 
1937
- #: includes/class-wcj-currency.php:90
1938
  msgid "Nxt"
1939
  msgstr ""
1940
 
1941
- #: includes/class-wcj-currency.php:91
1942
  msgid "Omni"
1943
  msgstr ""
1944
 
1945
- #: includes/class-wcj-currency.php:92
1946
  msgid "Peercoin"
1947
  msgstr ""
1948
 
1949
- #: includes/class-wcj-currency.php:93
1950
  msgid "PotCoin"
1951
  msgstr ""
1952
 
1953
- #: includes/class-wcj-currency.php:94
1954
  msgid "Primecoin"
1955
  msgstr ""
1956
 
1957
- #: includes/class-wcj-currency.php:95
1958
  msgid "Ripple"
1959
  msgstr ""
1960
 
1961
- #: includes/class-wcj-currency.php:96
1962
  msgid "SixEleven"
1963
  msgstr ""
1964
 
1965
- #: includes/class-wcj-currency.php:97
1966
  msgid "Synereo AMP"
1967
  msgstr ""
1968
 
1969
- #: includes/class-wcj-currency.php:98
1970
  msgid "Titcoin"
1971
  msgstr ""
1972
 
1973
- #: includes/class-wcj-currency.php:99
1974
  msgid "Ubiq"
1975
  msgstr ""
1976
 
1977
- #: includes/class-wcj-currency.php:100
1978
  msgid "Vertcoin"
1979
  msgstr ""
1980
 
1981
- #: includes/class-wcj-currency.php:101
1982
  msgid "Zcash"
1983
  msgstr ""
1984
 
1985
- #: includes/class-wcj-currency.php:103
1986
  msgid "Special Drawing Rights"
1987
  msgstr ""
1988
 
1989
- #: includes/class-wcj-currency.php:105
1990
  msgid "myCred"
1991
  msgstr ""
1992
 
1993
- #: includes/class-wcj-currency.php:190
1994
  msgid "Booster: Currency Symbol"
1995
  msgstr ""
1996
 
1997
- #: includes/class-wcj-currency.php:191
1998
  msgid "This sets the currency symbol."
1999
  msgstr ""
2000
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2001
  #: includes/class-wcj-custom-css.php:33
2002
  msgid "Custom CSS"
2003
  msgstr ""
@@ -2027,9 +2034,9 @@ msgstr ""
2027
  #, php-format
2028
  msgid ""
2029
  "Please note that if you enable the module and enter non-valid PHP code here, "
2030
- "your site will become unavailable. To fix this you will have to add %s "
2031
  "attribute to the URL (you must be logged as shop manager or admin (for this "
2032
- "reason custom PHP code is not executed on %s page))."
2033
  msgstr ""
2034
 
2035
  #: includes/class-wcj-custom-php.php:42
@@ -2039,37 +2046,37 @@ msgstr ""
2039
  msgid "E.g.: %s"
2040
  msgstr ""
2041
 
2042
- #: includes/class-wcj-debug-tools.php:30
2043
  msgid "Debug Tools"
2044
  msgstr ""
2045
 
2046
- #: includes/class-wcj-debug-tools.php:31
2047
  msgid "Booster for WooCommerce debug and log tools."
2048
  msgstr ""
2049
 
2050
- #: includes/class-wcj-debug-tools.php:38
2051
  #: includes/settings/wcj-settings-debug-tools.php:22
2052
  msgid "Log"
2053
  msgstr ""
2054
 
2055
- #: includes/class-wcj-debug-tools.php:39
2056
  msgid "Log."
2057
  msgstr ""
2058
 
2059
- #: includes/class-wcj-debug-tools.php:63
2060
  msgid "Delete Log"
2061
  msgstr ""
2062
 
2063
- #: includes/class-wcj-debug-tools.php:67
2064
  #, php-format
2065
  msgid "Now: %s"
2066
  msgstr ""
2067
 
2068
- #: includes/class-wcj-debug-tools.php:72
2069
  msgid "Log is empty."
2070
  msgstr ""
2071
 
2072
- #: includes/class-wcj-debug-tools.php:104
2073
  msgid "NOT DEFINED"
2074
  msgstr ""
2075
 
@@ -2235,7 +2242,7 @@ msgstr ""
2235
  #: includes/settings/wcj-settings-emails.php:44
2236
  #: includes/settings/wcj-settings-pdf-invoicing-page.php:41
2237
  #: includes/settings/wcj-settings-shipping.php:77
2238
- #: includes/shipping/class-wc-shipping-wcj-custom.php:45
2239
  msgid "Custom"
2240
  msgstr ""
2241
 
@@ -2245,7 +2252,7 @@ msgid "Booster: Send Email: %s"
2245
  msgstr ""
2246
 
2247
  #: includes/class-wcj-empty-cart-button.php:30
2248
- #: includes/shortcodes/class-wcj-general-shortcodes.php:600
2249
  msgid "Empty Cart Button"
2250
  msgstr ""
2251
 
@@ -2262,7 +2269,7 @@ msgid ""
2262
  msgstr ""
2263
 
2264
  #: includes/class-wcj-eu-vat-number.php:30
2265
- #: includes/class-wcj-eu-vat-number.php:330
2266
  #: includes/settings/wcj-settings-eu-vat-number.php:25
2267
  #: includes/settings/wcj-settings-eu-vat-number.php:32
2268
  msgid "EU VAT Number"
@@ -2290,45 +2297,45 @@ msgstr ""
2290
  msgid "Add all EU countries VAT standard rates to WooCommerce."
2291
  msgstr ""
2292
 
2293
- #: includes/class-wcj-eu-vat-number.php:227
2294
  msgid "Customer IP"
2295
  msgstr ""
2296
 
2297
- #: includes/class-wcj-eu-vat-number.php:231 includes/class-wcj-orders.php:160
2298
  #: includes/settings/wcj-settings-orders.php:129
2299
  #: includes/settings/wcj-settings-payment-gateways-by-country.php:30
2300
  msgid "Country by IP"
2301
  msgstr ""
2302
 
2303
- #: includes/class-wcj-eu-vat-number.php:235
2304
  msgid "Customer EU VAT Number"
2305
  msgstr ""
2306
 
2307
- #: includes/class-wcj-eu-vat-number.php:443
2308
  #: includes/settings/wcj-settings-eu-vat-number.php:169
2309
  msgid "Validating VAT. Please wait..."
2310
  msgstr ""
2311
 
2312
- #: includes/class-wcj-eu-vat-number.php:444
2313
  #: includes/settings/wcj-settings-eu-vat-number.php:176
2314
  msgid "VAT is valid."
2315
  msgstr ""
2316
 
2317
- #: includes/class-wcj-eu-vat-number.php:445
2318
  #: includes/settings/wcj-settings-eu-vat-number.php:183
2319
  msgid "VAT is not valid."
2320
  msgstr ""
2321
 
2322
- #: includes/class-wcj-eu-vat-number.php:446
2323
  #: includes/settings/wcj-settings-eu-vat-number.php:191
2324
  msgid "Validation failed. Please try again."
2325
  msgstr ""
2326
 
2327
- #: includes/class-wcj-eu-vat-number.php:584
2328
  msgid "<strong>Billing EU VAT Number</strong>is a required field."
2329
  msgstr ""
2330
 
2331
- #: includes/class-wcj-eu-vat-number.php:603
2332
  #: includes/settings/wcj-settings-eu-vat-number.php:78
2333
  msgid "<strong>EU VAT Number</strong> is not valid."
2334
  msgstr ""
@@ -2390,32 +2397,32 @@ msgstr ""
2390
  msgid "Export Products."
2391
  msgstr ""
2392
 
2393
- #: includes/class-wcj-export-import.php:236
2394
- #: includes/class-wcj-export-import.php:242
2395
  msgid "Filter by Billing Country"
2396
  msgstr ""
2397
 
2398
- #: includes/class-wcj-export-import.php:237
2399
  msgid "Filter by Product Title"
2400
  msgstr ""
2401
 
2402
- #: includes/class-wcj-export-import.php:256
2403
- #: includes/reports/wcj-class-reports-sales-daily.php:211
2404
- #: includes/reports/wcj-class-reports-sales-gateways.php:154
2405
  #: includes/settings/wcj-settings-orders.php:48
2406
  msgid "Filter"
2407
  msgstr ""
2408
 
2409
- #: includes/class-wcj-export-import.php:284
2410
  #: includes/class-wcj-track-users.php:45
2411
  msgid "All time"
2412
  msgstr ""
2413
 
2414
- #: includes/class-wcj-export-import.php:303
2415
  msgid "Custom:"
2416
  msgstr ""
2417
 
2418
- #: includes/class-wcj-export-import.php:308
2419
  msgid "Go"
2420
  msgstr ""
2421
 
@@ -2463,13 +2470,13 @@ msgstr ""
2463
  msgid "Current PHP time limit: %s seconds."
2464
  msgstr ""
2465
 
2466
- #: includes/class-wcj-general.php:134
2467
  msgid "Booster User Role"
2468
  msgstr ""
2469
 
2470
- #: includes/class-wcj-general.php:236 includes/class-wcj-general.php:251
2471
- #: includes/class-wcj-sku.php:708
2472
- #: includes/reports/wcj-class-reports-sales.php:208
2473
  #: includes/settings/wcj-settings-cross-sells.php:46
2474
  #: includes/settings/wcj-settings-order-numbers.php:172
2475
  #: includes/settings/wcj-settings-product-by-user.php:175
@@ -2479,25 +2486,25 @@ msgstr ""
2479
  msgid "ID"
2480
  msgstr ""
2481
 
2482
- #: includes/class-wcj-general.php:236 includes/class-wcj-general.php:252
2483
- #: includes/class-wcj-offer-price.php:177
2484
  #: includes/export/class-wcj-export-fields-helper.php:287
2485
- #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:84
2486
- #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:124
2487
  msgid "Name"
2488
  msgstr ""
2489
 
2490
- #: includes/class-wcj-general.php:236 includes/class-wcj-general.php:253
2491
  msgid "Capabilities"
2492
  msgstr ""
2493
 
2494
- #: includes/class-wcj-general.php:243
2495
- #: includes/class-wcj-payment-gateways.php:133
2496
- #: includes/class-wcj-product-bulk-meta-editor.php:402
2497
- #: includes/class-wcj-product-by-user.php:284
2498
  #: includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-display.php:162
2499
  #: includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-display.php:384
2500
- #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:391
2501
  #: includes/tools/class-wcj-order-statuses-tool.php:207
2502
  msgid "Delete"
2503
  msgstr ""
@@ -2553,40 +2560,40 @@ msgid ""
2553
  "status listed in module's \"Order Status\" option."
2554
  msgstr ""
2555
 
2556
- #: includes/class-wcj-max-products-per-user.php:126
2557
- #: includes/class-wcj-max-products-per-user.php:372
2558
  #: includes/settings/wcj-settings-max-products-per-user.php:77
2559
  msgid ""
2560
  "You can only buy maximum %max_qty% pcs. of %product_title% (you already "
2561
  "bought %qty_already_bought% pcs.)."
2562
  msgstr ""
2563
 
2564
- #: includes/class-wcj-max-products-per-user.php:145
2565
  msgid "Data re-calculated."
2566
  msgstr ""
2567
 
2568
- #: includes/class-wcj-max-products-per-user.php:147
2569
  #, php-format
2570
  msgid "%s order(s) processed."
2571
  msgstr ""
2572
 
2573
- #: includes/class-wcj-max-products-per-user.php:204
2574
  msgid "Maximum Products per User: Sales Data"
2575
  msgstr ""
2576
 
2577
- #: includes/class-wcj-max-products-per-user.php:222
2578
  msgid "User ID"
2579
  msgstr ""
2580
 
2581
- #: includes/class-wcj-max-products-per-user.php:222
2582
  msgid "User Name"
2583
  msgstr ""
2584
 
2585
- #: includes/class-wcj-max-products-per-user.php:222
2586
  msgid "Qty Bought"
2587
  msgstr ""
2588
 
2589
- #: includes/class-wcj-max-products-per-user.php:225
2590
  #: includes/functions/wcj-functions-users.php:179
2591
  #: includes/functions/wcj-functions-users.php:215
2592
  msgid "Guest"
@@ -2667,7 +2674,7 @@ msgstr ""
2667
  #: includes/class-wcj-multicurrency.php:59
2668
  #: includes/class-wcj-purchase-data.php:49
2669
  #, php-format
2670
- msgid "<strong>PHP code:</strong> by using %s function, e.g.: %s"
2671
  msgstr ""
2672
 
2673
  #: includes/class-wcj-my-account.php:33
@@ -2715,12 +2722,12 @@ msgstr ""
2715
  msgid "Lost password"
2716
  msgstr ""
2717
 
2718
- #: includes/class-wcj-my-account.php:329
2719
  #, php-format
2720
  msgid "Hello %1$s (not %1$s? <a href=\"%2$s\">Log out</a>)"
2721
  msgstr ""
2722
 
2723
- #: includes/class-wcj-my-account.php:339
2724
  #, php-format
2725
  msgid ""
2726
  "From your account dashboard you can view your <a href=\"%1$s\">recent orders</"
@@ -2728,7 +2735,7 @@ msgid ""
2728
  "href=\"%3$s\">edit your password and account details</a>."
2729
  msgstr ""
2730
 
2731
- #: includes/class-wcj-my-account.php:448
2732
  msgid "User role"
2733
  msgstr ""
2734
 
@@ -2746,11 +2753,11 @@ msgstr ""
2746
  msgid "Let your customers suggest their price for products."
2747
  msgstr ""
2748
 
2749
- #: includes/class-wcj-offer-price.php:158
2750
  msgid "Booster: Offer Price History"
2751
  msgstr ""
2752
 
2753
- #: includes/class-wcj-offer-price.php:174
2754
  #: includes/settings/wcj-settings-cross-sells.php:47
2755
  #: includes/settings/wcj-settings-order-numbers.php:173
2756
  #: includes/settings/wcj-settings-products-xml.php:244
@@ -2759,9 +2766,9 @@ msgstr ""
2759
  msgid "Date"
2760
  msgstr ""
2761
 
2762
- #: includes/class-wcj-offer-price.php:175
2763
  #: includes/export/class-wcj-export-fields-helper.php:293
2764
- #: includes/reports/wcj-class-reports-stock.php:291
2765
  #: includes/settings/meta-box/wcj-settings-meta-box-wholesale-price.php:71
2766
  #: includes/settings/wcj-settings-cross-sells.php:50
2767
  #: includes/settings/wcj-settings-product-add-to-cart.php:310
@@ -2770,7 +2777,7 @@ msgstr ""
2770
  msgid "Price"
2771
  msgstr ""
2772
 
2773
- #: includes/class-wcj-offer-price.php:176
2774
  #: includes/settings/wcj-settings-coupon-by-user-role.php:63
2775
  #: includes/settings/wcj-settings-currency-per-product.php:38
2776
  #: includes/settings/wcj-settings-currency-per-product.php:45
@@ -2780,115 +2787,116 @@ msgstr ""
2780
  msgid "Message"
2781
  msgstr ""
2782
 
2783
- #: includes/class-wcj-offer-price.php:178
2784
  #: includes/export/class-wcj-export-fields-helper.php:83
2785
  #: includes/input-fields/wcj-product-input-fields-options.php:47
2786
- #: includes/reports/wcj-class-reports-customers.php:98
2787
  #: includes/settings/wcj-settings-checkout-custom-fields.php:156
2788
  msgid "Email"
2789
  msgstr ""
2790
 
2791
- #: includes/class-wcj-offer-price.php:179
2792
  #: includes/export/class-wcj-export-fields-helper.php:82
2793
  msgid "Customer ID"
2794
  msgstr ""
2795
 
2796
- #: includes/class-wcj-offer-price.php:180
2797
  msgid "User IP"
2798
  msgstr ""
2799
 
2800
- #: includes/class-wcj-offer-price.php:181
2801
  msgid "User Agent"
2802
  msgstr ""
2803
 
2804
- #: includes/class-wcj-offer-price.php:182
2805
  msgid "Sent to"
2806
  msgstr ""
2807
 
2808
- #: includes/class-wcj-offer-price.php:195
2809
  msgid "No price offers yet."
2810
  msgstr ""
2811
 
2812
- #: includes/class-wcj-offer-price.php:257
2813
  #, php-format
2814
- msgid "Average offer: %s (from %s offer(s))"
2815
  msgstr ""
2816
 
2817
- #: includes/class-wcj-offer-price.php:265
2818
  msgid "Update product after checking the box."
2819
  msgstr ""
2820
 
2821
- #: includes/class-wcj-offer-price.php:346
2822
  #: includes/settings/wcj-settings-offer-price.php:169
2823
  #, php-format
2824
  msgid "Your price (%s)"
2825
  msgstr ""
2826
 
2827
- #: includes/class-wcj-offer-price.php:353
2828
  #: includes/settings/wcj-settings-offer-price.php:241
2829
  #, php-format
2830
  msgid "Suggest your price for %s"
2831
  msgstr ""
2832
 
2833
- #: includes/class-wcj-offer-price.php:411
2834
  #: includes/settings/wcj-settings-offer-price.php:208
2835
  msgid "Your email"
2836
  msgstr ""
2837
 
2838
- #: includes/class-wcj-offer-price.php:415
2839
  #: includes/settings/wcj-settings-offer-price.php:216
2840
  msgid "Your name"
2841
  msgstr ""
2842
 
2843
- #: includes/class-wcj-offer-price.php:419
2844
  #: includes/settings/wcj-settings-offer-price.php:224
2845
  msgid "Your message"
2846
  msgstr ""
2847
 
2848
- #: includes/class-wcj-offer-price.php:423
2849
  #: includes/settings/wcj-settings-offer-price.php:248
2850
  msgid "Send"
2851
  msgstr ""
2852
 
2853
- #: includes/class-wcj-offer-price.php:425
2854
  #: includes/settings/wcj-settings-offer-price.php:232
2855
  msgid "Send a copy to your email"
2856
  msgstr ""
2857
 
2858
- #: includes/class-wcj-offer-price.php:493
2859
  #: includes/settings/wcj-settings-offer-price.php:72
2860
  msgid "Make an offer"
2861
  msgstr ""
2862
 
2863
- #: includes/class-wcj-offer-price.php:556
2864
  #: includes/settings/wcj-settings-offer-price.php:352
2865
  #, php-format
2866
  msgid "Product: %s"
2867
  msgstr ""
2868
 
2869
- #: includes/class-wcj-offer-price.php:558
2870
  #: includes/settings/wcj-settings-offer-price.php:354
2871
  #, php-format
2872
  msgid "Offered price: %s"
2873
  msgstr ""
2874
 
2875
- #: includes/class-wcj-offer-price.php:560
 
2876
  #, php-format
2877
  msgid "From: %1$s %2$s"
2878
  msgstr ""
2879
 
2880
- #: includes/class-wcj-offer-price.php:562
2881
  #: includes/settings/wcj-settings-offer-price.php:358
2882
  #, php-format
2883
  msgid "Message: %s"
2884
  msgstr ""
2885
 
2886
- #: includes/class-wcj-offer-price.php:576
2887
  #: includes/settings/wcj-settings-offer-price.php:342
2888
  msgid "Price Offer"
2889
  msgstr ""
2890
 
2891
- #: includes/class-wcj-offer-price.php:586
2892
  #: includes/settings/wcj-settings-offer-price.php:269
2893
  msgid "Your price offer has been sent."
2894
  msgstr ""
@@ -2909,54 +2917,54 @@ msgstr ""
2909
  msgid "Tool removes old slugs/permalinks from database."
2910
  msgstr ""
2911
 
2912
- #: includes/class-wcj-old-slugs.php:55
2913
  msgid "Old slug"
2914
  msgstr ""
2915
 
2916
- #: includes/class-wcj-old-slugs.php:56
2917
  msgid "Post title"
2918
  msgstr ""
2919
 
2920
- #: includes/class-wcj-old-slugs.php:57
2921
  msgid "Post id"
2922
  msgstr ""
2923
 
2924
- #: includes/class-wcj-old-slugs.php:58
2925
  msgid "Post type"
2926
  msgstr ""
2927
 
2928
- #: includes/class-wcj-old-slugs.php:59
2929
  msgid "Current slug"
2930
  msgstr ""
2931
 
2932
- #: includes/class-wcj-old-slugs.php:93
2933
  #, php-format
2934
  msgid ""
2935
  "Removing old slugs from database finished! <strong>%d</strong> old slug(s) "
2936
  "deleted."
2937
  msgstr ""
2938
 
2939
- #: includes/class-wcj-old-slugs.php:95
2940
  msgid "Please <a href=\"\">refresh</a> the page."
2941
  msgstr ""
2942
 
2943
- #: includes/class-wcj-old-slugs.php:120
2944
  msgid "Old products slugs found:"
2945
  msgstr ""
2946
 
2947
- #: includes/class-wcj-old-slugs.php:123
2948
  msgid "Remove all old product slugs"
2949
  msgstr ""
2950
 
2951
- #: includes/class-wcj-old-slugs.php:126
2952
  msgid "Old non-products slugs found:"
2953
  msgstr ""
2954
 
2955
- #: includes/class-wcj-old-slugs.php:129
2956
  msgid "Remove all old non-product slugs"
2957
  msgstr ""
2958
 
2959
- #: includes/class-wcj-old-slugs.php:143
2960
  msgid "No old slugs found."
2961
  msgstr ""
2962
 
@@ -3049,23 +3057,23 @@ msgstr ""
3049
  msgid "Tool renumerates all orders."
3050
  msgstr ""
3051
 
3052
- #: includes/class-wcj-order-numbers.php:348
3053
  msgid "Orders successfully renumerated!"
3054
  msgstr ""
3055
 
3056
- #: includes/class-wcj-order-numbers.php:353
3057
  #, php-format
3058
  msgid "Sequential number generation is enabled. Next order number will be %s."
3059
  msgstr ""
3060
 
3061
- #: includes/class-wcj-order-numbers.php:366
3062
  #, php-format
3063
  msgid ""
3064
  "Press the button below to renumerate all existing orders starting from order "
3065
  "counter settings in <a href=\"%s\">Order Numbers</a> module."
3066
  msgstr ""
3067
 
3068
- #: includes/class-wcj-order-numbers.php:374
3069
  msgid "Renumerate orders"
3070
  msgstr ""
3071
 
@@ -3079,42 +3087,42 @@ msgid ""
3079
  "decimal quantities etc."
3080
  msgstr ""
3081
 
3082
- #: includes/class-wcj-order-quantities.php:287
3083
  #: includes/settings/wcj-settings-order-quantities.php:297
3084
  msgid ""
3085
  "Only one item can be added to the cart. Clear the cart or finish the order, "
3086
  "before adding another item to the cart."
3087
  msgstr ""
3088
 
3089
- #: includes/class-wcj-order-quantities.php:481
3090
  #: includes/settings/wcj-settings-order-quantities.php:182
3091
  msgid ""
3092
  "Maximum allowed order quantity is %max_cart_total_quantity%. Your current "
3093
  "order quantity is %cart_total_quantity%."
3094
  msgstr ""
3095
 
3096
- #: includes/class-wcj-order-quantities.php:492
3097
  #: includes/settings/wcj-settings-order-quantities.php:109
3098
  msgid ""
3099
  "Minimum allowed order quantity is %min_cart_total_quantity%. Your current "
3100
  "order quantity is %cart_total_quantity%."
3101
  msgstr ""
3102
 
3103
- #: includes/class-wcj-order-quantities.php:504
3104
  #: includes/settings/wcj-settings-order-quantities.php:220
3105
  msgid ""
3106
  "Maximum allowed quantity for %product_title% is %max_per_item_quantity%. Your "
3107
  "current item quantity is %item_quantity%."
3108
  msgstr ""
3109
 
3110
- #: includes/class-wcj-order-quantities.php:519
3111
  #: includes/settings/wcj-settings-order-quantities.php:146
3112
  msgid ""
3113
  "Minimum allowed quantity for %product_title% is %min_per_item_quantity%. Your "
3114
  "current item quantity is %item_quantity%."
3115
  msgstr ""
3116
 
3117
- #: includes/class-wcj-order-quantities.php:531
3118
  #: includes/settings/wcj-settings-order-quantities.php:271
3119
  msgid ""
3120
  "Required step for %product_title% is %required_step%. Your current item "
@@ -3133,23 +3141,23 @@ msgid ""
3133
  "regenerate download permissions for orders."
3134
  msgstr ""
3135
 
3136
- #: includes/class-wcj-orders.php:131
3137
  msgid "Order Navigation"
3138
  msgstr ""
3139
 
3140
- #: includes/class-wcj-orders.php:147
3141
  msgid "Previous order"
3142
  msgstr ""
3143
 
3144
- #: includes/class-wcj-orders.php:148
3145
  msgid "Next order"
3146
  msgstr ""
3147
 
3148
- #: includes/class-wcj-orders.php:239
3149
  msgid "Regenerate download permissions"
3150
  msgstr ""
3151
 
3152
- #: includes/class-wcj-orders.php:254
3153
  #, php-format
3154
  msgid "Download permissions regenerated for %s order."
3155
  msgid_plural "Download permissions regenerated for %s orders."
@@ -3272,12 +3280,12 @@ msgstr ""
3272
  msgid "Add multiple custom payment gateways to WooCommerce."
3273
  msgstr ""
3274
 
3275
- #: includes/class-wcj-payment-gateways.php:76
3276
  #, php-format
3277
  msgid "<strong>%s</strong> is a required field."
3278
  msgstr ""
3279
 
3280
- #: includes/class-wcj-payment-gateways.php:101
3281
  #, php-format
3282
  msgid "%s Fields"
3283
  msgstr ""
@@ -3327,6 +3335,11 @@ msgstr ""
3327
  msgid "Merge (Print)"
3328
  msgstr ""
3329
 
 
 
 
 
 
3330
  #: includes/class-wcj-price-by-country.php:44
3331
  msgid "Prices and Currencies by Country"
3332
  msgstr ""
@@ -3341,7 +3354,7 @@ msgstr ""
3341
  msgid "Change product price and currency automatically by customer's country."
3342
  msgstr ""
3343
 
3344
- #: includes/class-wcj-price-by-country.php:162
3345
  msgid "Price filter widget product prices recalculated."
3346
  msgstr ""
3347
 
@@ -3378,7 +3391,7 @@ msgstr ""
3378
  msgid "Copy price to all %s"
3379
  msgstr ""
3380
 
3381
- #: includes/class-wcj-price-by-user-role.php:254
3382
  msgid ""
3383
  "Booster: Free plugin's version is limited to only one price by user role per "
3384
  "products settings product enabled at a time. You will need to get <a href="
@@ -3435,9 +3448,9 @@ msgstr ""
3435
 
3436
  #: includes/class-wcj-price-labels.php:46
3437
  #: includes/class-wcj-product-by-country.php:201
3438
- #: includes/class-wcj-product-by-user-role.php:61
3439
  #: includes/class-wcj-product-info.php:255
3440
- #: includes/class-wcj-product-price-by-formula.php:170
3441
  #: includes/class-wcj-shipping-by-products.php:214
3442
  #: includes/class-wcj-shipping-options.php:191
3443
  #: includes/classes/class-wcj-module.php:221
@@ -3653,8 +3666,8 @@ msgstr ""
3653
  #: includes/settings/wcj-settings-product-price-by-formula.php:102
3654
  #: includes/settings/wcj-settings-product-price-by-formula.php:145
3655
  #: includes/settings/wcj-settings-product-tabs.php:47
3656
- #: includes/settings/wcj-settings-product-tabs.php:253
3657
- #: includes/settings/wcj-settings-product-tabs.php:261
3658
  #: includes/settings/wcj-settings-products-xml.php:99
3659
  #: includes/settings/wcj-settings-purchase-data.php:25
3660
  #: includes/settings/wcj-settings-purchase-data.php:32
@@ -3735,7 +3748,7 @@ msgstr ""
3735
  msgid "Hide for all variations"
3736
  msgstr ""
3737
 
3738
- #: includes/class-wcj-price-labels.php:143
3739
  msgid "Booster: Custom Price Labels"
3740
  msgstr ""
3741
 
@@ -3853,51 +3866,51 @@ msgid ""
3853
  "product's edit page."
3854
  msgstr ""
3855
 
3856
- #: includes/class-wcj-product-bookings.php:156
3857
- #: includes/class-wcj-product-bookings.php:283
3858
  #: includes/settings/wcj-settings-product-bookings.php:80
3859
  msgid "\"Date to\" must be after \"Date from\""
3860
  msgstr ""
3861
 
3862
- #: includes/class-wcj-product-bookings.php:170
3863
- #: includes/class-wcj-product-open-pricing.php:289
3864
  #: includes/settings/wcj-settings-add-to-cart.php:153
3865
  #: includes/settings/wcj-settings-add-to-cart.php:185
3866
  #: includes/settings/wcj-settings-add-to-cart.php:220
3867
  msgid "Read more"
3868
  msgstr ""
3869
 
3870
- #: includes/class-wcj-product-bookings.php:236
3871
  #: includes/settings/wcj-settings-product-bookings.php:52
3872
  msgid "Period"
3873
  msgstr ""
3874
 
3875
- #: includes/class-wcj-product-bookings.php:273
3876
  #: includes/settings/wcj-settings-product-bookings.php:66
3877
  msgid "\"Date from\" must be set"
3878
  msgstr ""
3879
 
3880
- #: includes/class-wcj-product-bookings.php:277
3881
  #: includes/settings/wcj-settings-product-bookings.php:73
3882
  msgid "\"Date to\" must be set"
3883
  msgstr ""
3884
 
3885
- #: includes/class-wcj-product-bookings.php:414
3886
  #: includes/settings/wcj-settings-product-bookings.php:38
3887
  msgid "Date from"
3888
  msgstr ""
3889
 
3890
- #: includes/class-wcj-product-bookings.php:418
3891
  #: includes/settings/wcj-settings-product-bookings.php:45
3892
  msgid "Date to"
3893
  msgstr ""
3894
 
3895
- #: includes/class-wcj-product-bookings.php:443
3896
  #: includes/settings/wcj-settings-product-bookings.php:59
3897
  msgid "/ day"
3898
  msgstr ""
3899
 
3900
- #: includes/class-wcj-product-bookings.php:525
3901
  msgid ""
3902
  "Booster: Free plugin's version is limited to only one bookings product "
3903
  "enabled at a time. You will need to get <a href=\"https://booster.io/plus/\" "
@@ -3922,30 +3935,30 @@ msgstr ""
3922
  msgid "Product Bulk Meta Editor Tool."
3923
  msgstr ""
3924
 
3925
- #: includes/class-wcj-product-bulk-meta-editor.php:172
3926
  msgid "Please enter meta key."
3927
  msgstr ""
3928
 
3929
- #: includes/class-wcj-product-bulk-meta-editor.php:194
3930
  #, php-format
3931
  msgid "Meta for <strong>%d</strong> product(s) was updated."
3932
  msgstr ""
3933
 
3934
- #: includes/class-wcj-product-bulk-meta-editor.php:198
3935
  #, php-format
3936
  msgid "Meta for <strong>%d</strong> product(s) was not updated."
3937
  msgstr ""
3938
 
3939
- #: includes/class-wcj-product-bulk-meta-editor.php:243
3940
  msgid "Meta key"
3941
  msgstr ""
3942
 
3943
- #: includes/class-wcj-product-bulk-meta-editor.php:246
3944
  #, php-format
3945
  msgid "for example %s"
3946
  msgstr ""
3947
 
3948
- #: includes/class-wcj-product-bulk-meta-editor.php:252
3949
  #: includes/settings/meta-box/wcj-settings-meta-box-add-to-cart-button-visibility.php:22
3950
  #: includes/settings/meta-box/wcj-settings-meta-box-add-to-cart-button-visibility.php:41
3951
  #: includes/settings/wcj-settings-price-by-user-role.php:73
@@ -3954,33 +3967,33 @@ msgstr ""
3954
  msgid "Show"
3955
  msgstr ""
3956
 
3957
- #: includes/class-wcj-product-bulk-meta-editor.php:256
3958
- #: includes/class-wcj-product-bulk-meta-editor.php:375
3959
  #: includes/settings/wcj-settings-product-add-to-cart.php:312
3960
  msgid "Meta"
3961
  msgstr ""
3962
 
3963
- #: includes/class-wcj-product-bulk-meta-editor.php:281
3964
  msgid ""
3965
  "Hold <strong>Control</strong> key to select multiple products. Press "
3966
  "<strong>Control</strong> + <strong>A</strong> to select all products."
3967
  msgstr ""
3968
 
3969
- #: includes/class-wcj-product-bulk-meta-editor.php:306
3970
- #: includes/class-wcj-product-by-user.php:284
3971
- #: includes/class-wcj-purchase-data.php:121
3972
- #: includes/classes/class-wcj-module.php:989
3973
  #: includes/functions/wcj-functions-general.php:208
3974
  #: includes/functions/wcj-functions-html.php:131
3975
- #: includes/reports/wcj-class-reports-monthly-sales.php:385
3976
  #: includes/settings/wcj-settings-empty-cart.php:88
3977
- #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:391
3978
  #: includes/tools/class-wcj-order-statuses-tool.php:207
3979
- #: includes/tools/class-wcj-order-statuses-tool.php:327
3980
  msgid "Are you sure?"
3981
  msgstr ""
3982
 
3983
- #: includes/class-wcj-product-bulk-meta-editor.php:323
3984
  #: includes/settings/wcj-settings-admin-orders-list.php:79
3985
  #: includes/settings/wcj-settings-admin-products-list.php:64
3986
  #: includes/settings/wcj-settings-checkout-fees.php:81
@@ -3991,45 +4004,45 @@ msgstr ""
3991
  msgid "Value"
3992
  msgstr ""
3993
 
3994
- #: includes/class-wcj-product-bulk-meta-editor.php:328
3995
  msgid "Set"
3996
  msgstr ""
3997
 
3998
- #: includes/class-wcj-product-bulk-meta-editor.php:332
3999
  msgid "Set Meta for All Products"
4000
  msgstr ""
4001
 
4002
- #: includes/class-wcj-product-bulk-meta-editor.php:351
4003
  msgid "Save all"
4004
  msgstr ""
4005
 
4006
- #: includes/class-wcj-product-bulk-meta-editor.php:354
4007
  msgid "Delete all"
4008
  msgstr ""
4009
 
4010
- #: includes/class-wcj-product-bulk-meta-editor.php:399
4011
  msgid "Save"
4012
  msgstr ""
4013
 
4014
- #: includes/class-wcj-product-bulk-meta-editor.php:426
4015
- #: includes/class-wcj-purchase-data.php:104
4016
  #: includes/export/class-wcj-export-fields-helper.php:285
4017
  #: includes/functions/wcj-functions-reports.php:27
4018
  #: includes/settings/wcj-settings-product-bulk-meta-editor.php:45
4019
  msgid "Product ID"
4020
  msgstr ""
4021
 
4022
- #: includes/class-wcj-product-bulk-meta-editor.php:429
4023
  #: includes/settings/wcj-settings-product-bulk-meta-editor.php:46
4024
  msgid "Product status"
4025
  msgstr ""
4026
 
4027
- #: includes/class-wcj-product-bulk-meta-editor.php:432
4028
  #: includes/settings/wcj-settings-product-bulk-meta-editor.php:47
4029
  msgid "Meta keys"
4030
  msgstr ""
4031
 
4032
- #: includes/class-wcj-product-bulk-meta-editor.php:457
4033
  msgid "Show all"
4034
  msgstr ""
4035
 
@@ -4046,74 +4059,74 @@ msgstr ""
4046
  msgid "Bulk Price Converter Tool."
4047
  msgstr ""
4048
 
4049
- #: includes/class-wcj-product-bulk-price-converter.php:257
4050
  msgid "Multiply value must be above zero."
4051
  msgstr ""
4052
 
4053
- #: includes/class-wcj-product-bulk-price-converter.php:263
4054
  msgid "Prices changed successfully!"
4055
  msgstr ""
4056
 
4057
- #: includes/class-wcj-product-bulk-price-converter.php:288
4058
  msgid "Multiply all product prices by"
4059
  msgstr ""
4060
 
4061
- #: includes/class-wcj-product-bulk-price-converter.php:296
4062
  msgid "Price type to modify"
4063
  msgstr ""
4064
 
4065
- #: includes/class-wcj-product-bulk-price-converter.php:298
4066
  msgid "Both"
4067
  msgstr ""
4068
 
4069
- #: includes/class-wcj-product-bulk-price-converter.php:300
4070
  msgid "Sale prices only"
4071
  msgstr ""
4072
 
4073
- #: includes/class-wcj-product-bulk-price-converter.php:302
4074
  msgid "Regular prices only"
4075
  msgstr ""
4076
 
4077
- #: includes/class-wcj-product-bulk-price-converter.php:309
4078
  msgid "Products category"
4079
  msgstr ""
4080
 
4081
- #: includes/class-wcj-product-bulk-price-converter.php:311
4082
- #: includes/shortcodes/class-wcj-products-shortcodes.php:375
4083
  msgid "Any"
4084
  msgstr ""
4085
 
4086
- #: includes/class-wcj-product-bulk-price-converter.php:313
4087
  #: includes/settings/wcj-settings-global-discount.php:113
4088
  msgid "None"
4089
  msgstr ""
4090
 
4091
- #: includes/class-wcj-product-bulk-price-converter.php:320
4092
  msgid "\"Pretty prices\" threshold"
4093
  msgstr ""
4094
 
4095
- #: includes/class-wcj-product-bulk-price-converter.php:321
4096
  #: includes/settings/wcj-settings-payment-gateways-min-max.php:90
4097
  msgid "Leave zero to disable."
4098
  msgstr ""
4099
 
4100
- #: includes/class-wcj-product-bulk-price-converter.php:322
4101
  msgid ""
4102
  "Otherwise - all prices below \"threshold\" will end with 0,99 and all prices "
4103
  "above or equal to \"threshold\" will end with 9,00."
4104
  msgstr ""
4105
 
4106
- #: includes/class-wcj-product-bulk-price-converter.php:323
4107
  msgid ""
4108
  "E.g.: if you set \"threshold\" to 100, then all prices below 100 will be like "
4109
  "45,99 and all other prices will be like 109,00."
4110
  msgstr ""
4111
 
4112
- #: includes/class-wcj-product-bulk-price-converter.php:331
4113
  msgid "Preview Prices"
4114
  msgstr ""
4115
 
4116
- #: includes/class-wcj-product-bulk-price-converter.php:338
4117
  msgid "Change Prices"
4118
  msgstr ""
4119
 
@@ -4159,7 +4172,7 @@ msgstr ""
4159
  #, php-format
4160
  msgid ""
4161
  "If \"Manually\" option is selected, you can add country selection drop box to "
4162
- "frontend with \"%s\" widget or %s shortcode."
4163
  msgstr ""
4164
 
4165
  #: includes/class-wcj-product-by-country.php:165
@@ -4234,19 +4247,19 @@ msgstr ""
4234
  msgid "Set product availability by date."
4235
  msgstr ""
4236
 
4237
- #: includes/class-wcj-product-by-date.php:125
4238
  #: includes/settings/wcj-settings-product-by-date.php:119
4239
  msgid "%product_title% is not available until %direct_date%."
4240
  msgstr ""
4241
 
4242
- #: includes/class-wcj-product-by-date.php:136
4243
- #: includes/class-wcj-product-by-date.php:139
4244
  #: includes/settings/wcj-settings-product-by-date.php:106
4245
  msgid "%product_title% is not available this month."
4246
  msgstr ""
4247
 
4248
- #: includes/class-wcj-product-by-date.php:145
4249
- #: includes/class-wcj-product-by-date.php:149
4250
  #: includes/settings/wcj-settings-product-by-date.php:94
4251
  msgid "%product_title% is available only on %date_this_month% this month."
4252
  msgstr ""
@@ -4264,17 +4277,17 @@ msgstr ""
4264
  msgid "Set product availability by time."
4265
  msgstr ""
4266
 
4267
- #: includes/class-wcj-product-by-time.php:100
4268
  #: includes/settings/wcj-settings-product-by-time.php:95
4269
  msgid "%product_title% is not available today."
4270
  msgstr ""
4271
 
4272
- #: includes/class-wcj-product-by-time.php:103
4273
  msgid "<p >%product_title% is not available today."
4274
  msgstr ""
4275
 
4276
- #: includes/class-wcj-product-by-time.php:108
4277
- #: includes/class-wcj-product-by-time.php:111
4278
  #: includes/settings/wcj-settings-product-by-time.php:84
4279
  msgid "%product_title% is available only at %time_today% today."
4280
  msgstr ""
@@ -4304,19 +4317,19 @@ msgstr ""
4304
  msgid "User Roles"
4305
  msgstr ""
4306
 
4307
- #: includes/class-wcj-product-by-user-role.php:53
4308
  msgid "User Options"
4309
  msgstr ""
4310
 
4311
- #: includes/class-wcj-product-by-user-role.php:58
4312
  msgid "Skip Editable Roles Filter"
4313
  msgstr ""
4314
 
4315
- #: includes/class-wcj-product-by-user-role.php:60
4316
  msgid "Ignores <code>editable_roles</code> filter on admin."
4317
  msgstr ""
4318
 
4319
- #: includes/class-wcj-product-by-user-role.php:60
4320
  #, php-format
4321
  msgid ""
4322
  "Enable this option for example if the shop manager can't see some role but "
@@ -4344,18 +4357,18 @@ msgid ""
4344
  "form to frontend."
4345
  msgstr ""
4346
 
4347
- #: includes/class-wcj-product-by-user.php:233
4348
- #: includes/class-wcj-product-by-user.php:242
4349
  msgid "Wrong user ID!"
4350
  msgstr ""
4351
 
4352
- #: includes/class-wcj-product-by-user.php:275
4353
  #: includes/export/class-wcj-export-fields-helper.php:298
4354
  msgid "Status"
4355
  msgstr ""
4356
 
4357
- #: includes/class-wcj-product-by-user.php:275
4358
- #: includes/class-wcj-product-tabs.php:651
4359
  #: includes/gateways/class-wc-gateway-wcj-custom.php:59
4360
  #: includes/input-fields/wcj-product-input-fields-options.php:53
4361
  #: includes/settings/meta-box/wcj-settings-meta-box-product-addons.php:104
@@ -4370,16 +4383,16 @@ msgstr ""
4370
  #: includes/settings/wcj-settings-product-addons.php:107
4371
  #: includes/settings/wcj-settings-product-by-user.php:181
4372
  #: includes/settings/wcj-settings-product-tabs.php:78
4373
- #: includes/settings/wcj-settings-product-tabs.php:416
4374
- #: includes/settings/wcj-settings-product-tabs.php:437
4375
- #: includes/settings/wcj-settings-product-tabs.php:458
4376
  #: includes/settings/wcj-settings-products-xml.php:247
4377
  #: includes/settings/wcj-settings-purchase-data.php:82
4378
  #: includes/settings/wcj-settings-related-products.php:36
4379
  #: includes/settings/wcj-settings-upsells.php:45
 
4380
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:223
4381
- #: includes/shipping/class-wc-shipping-wcj-custom.php:122
4382
- #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:361
4383
  #: includes/widgets/class-wcj-widget-country-switcher.php:77
4384
  #: includes/widgets/class-wcj-widget-left-to-free-shipping.php:63
4385
  #: includes/widgets/class-wcj-widget-multicurrency.php:85
@@ -4387,10 +4400,10 @@ msgstr ""
4387
  msgid "Title"
4388
  msgstr ""
4389
 
4390
- #: includes/class-wcj-product-by-user.php:283
4391
- #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:470
4392
  #: includes/tools/class-wcj-order-statuses-tool.php:210
4393
- #: includes/tools/class-wcj-order-statuses-tool.php:286
4394
  msgid "Edit"
4395
  msgstr ""
4396
 
@@ -4426,19 +4439,19 @@ msgstr ""
4426
  #: includes/class-wcj-product-custom-visibility.php:37
4427
  #, php-format
4428
  msgid ""
4429
- "You can add selection drop box to frontend with \"%s\" widget (set \"Product "
4430
- "custom visibility\" as \"Selector Type\") or %s shortcode."
4431
  msgstr ""
4432
 
4433
  #: includes/class-wcj-product-custom-visibility.php:42
4434
  msgid "Custom Visibility"
4435
  msgstr ""
4436
 
4437
- #: includes/class-wcj-product-custom-visibility.php:100
4438
  msgid "Options List"
4439
  msgstr ""
4440
 
4441
- #: includes/class-wcj-product-custom-visibility.php:105
4442
  #: includes/settings/wcj-settings-admin-bar.php:17
4443
  #: includes/settings/wcj-settings-breadcrumbs.php:17
4444
  #: includes/settings/wcj-settings-cart-customization.php:17
@@ -4471,11 +4484,11 @@ msgstr ""
4471
  msgid "Options"
4472
  msgstr ""
4473
 
4474
- #: includes/class-wcj-product-custom-visibility.php:106
4475
  msgid "One per line."
4476
  msgstr ""
4477
 
4478
- #: includes/class-wcj-product-custom-visibility.php:107
4479
  msgid ""
4480
  "Can not be empty. Options will be added to each product's admin edit page and "
4481
  "to the selection drop box on frontend."
@@ -4496,33 +4509,33 @@ msgstr ""
4496
  #: includes/class-wcj-product-info.php:129
4497
  #: includes/settings/wcj-settings-offer-price.php:121
4498
  #: includes/settings/wcj-settings-product-add-to-cart.php:335
4499
- #: includes/settings/wcj-settings-product-custom-info.php:154
4500
  msgid "Before product"
4501
  msgstr ""
4502
 
4503
  #: includes/class-wcj-product-info.php:130
4504
  #: includes/settings/wcj-settings-product-add-to-cart.php:336
4505
- #: includes/settings/wcj-settings-product-custom-info.php:155
4506
  msgid "Before product title"
4507
  msgstr ""
4508
 
4509
  #: includes/class-wcj-product-info.php:131
4510
  #: includes/settings/wcj-settings-offer-price.php:122
4511
  #: includes/settings/wcj-settings-product-add-to-cart.php:337
4512
- #: includes/settings/wcj-settings-product-custom-info.php:158
4513
  msgid "After product"
4514
  msgstr ""
4515
 
4516
  #: includes/class-wcj-product-info.php:132
4517
  #: includes/settings/wcj-settings-product-add-to-cart.php:338
4518
- #: includes/settings/wcj-settings-product-custom-info.php:157
4519
  msgid "After product title"
4520
  msgstr ""
4521
 
4522
  #: includes/class-wcj-product-info.php:144
4523
  #: includes/settings/wcj-settings-offer-price.php:100
4524
  #: includes/settings/wcj-settings-product-add-to-cart.php:296
4525
- #: includes/settings/wcj-settings-product-custom-info.php:143
4526
  #: includes/settings/wcj-settings-upsells.php:63
4527
  msgid "Inside single product summary"
4528
  msgstr ""
@@ -4530,7 +4543,7 @@ msgstr ""
4530
  #: includes/class-wcj-product-info.php:145
4531
  #: includes/settings/wcj-settings-offer-price.php:99
4532
  #: includes/settings/wcj-settings-product-add-to-cart.php:295
4533
- #: includes/settings/wcj-settings-product-custom-info.php:142
4534
  #: includes/settings/wcj-settings-upsells.php:62
4535
  msgid "Before single product summary"
4536
  msgstr ""
@@ -4538,7 +4551,7 @@ msgstr ""
4538
  #: includes/class-wcj-product-info.php:146
4539
  #: includes/settings/wcj-settings-offer-price.php:103
4540
  #: includes/settings/wcj-settings-product-add-to-cart.php:297
4541
- #: includes/settings/wcj-settings-product-custom-info.php:144
4542
  #: includes/settings/wcj-settings-upsells.php:64
4543
  msgid "After single product summary"
4544
  msgstr ""
@@ -4554,7 +4567,7 @@ msgstr ""
4554
  #: includes/settings/wcj-settings-my-account.php:303
4555
  #: includes/settings/wcj-settings-product-add-to-cart.php:290
4556
  #: includes/settings/wcj-settings-product-add-to-cart.php:330
4557
- #: includes/settings/wcj-settings-product-custom-info.php:134
4558
  #: includes/settings/wcj-settings-product-info.php:59
4559
  #: includes/settings/wcj-settings-product-info.php:92
4560
  #: includes/settings/wcj-settings-product-msrp.php:43
@@ -4567,9 +4580,9 @@ msgstr ""
4567
  #: includes/settings/wcj-settings-product-info.php:70
4568
  #: includes/settings/wcj-settings-product-info.php:103
4569
  #: includes/settings/wcj-settings-product-tabs.php:92
4570
- #: includes/settings/wcj-settings-product-tabs.php:426
4571
- #: includes/settings/wcj-settings-product-tabs.php:447
4572
- #: includes/settings/wcj-settings-product-tabs.php:468
4573
  msgid "Priority (i.e. Order)"
4574
  msgstr ""
4575
 
@@ -4579,14 +4592,14 @@ msgid ""
4579
  "number."
4580
  msgstr ""
4581
 
4582
- #: includes/class-wcj-product-info.php:309
4583
  msgid ""
4584
  "[wcj_product_you_save before=\"You save: <strong>\" hide_if_zero=\"yes\" "
4585
  "after=\"</strong>\"][wcj_product_you_save_percent hide_if_zero=\"yes\" before="
4586
  "\" (\" after=\"%)\"]"
4587
  msgstr ""
4588
 
4589
- #: includes/class-wcj-product-info.php:312
4590
  msgid "[wcj_product_total_sales before=\"Total sales: \"]"
4591
  msgstr ""
4592
 
@@ -4670,22 +4683,22 @@ msgstr ""
4670
  msgid "Open Pricing"
4671
  msgstr ""
4672
 
4673
- #: includes/class-wcj-product-open-pricing.php:372
4674
  #: includes/settings/wcj-settings-product-open-pricing.php:79
4675
  msgid "Price is required!"
4676
  msgstr ""
4677
 
4678
- #: includes/class-wcj-product-open-pricing.php:384
4679
  #: includes/settings/wcj-settings-product-open-pricing.php:87
4680
  msgid "Entered price is too small!"
4681
  msgstr ""
4682
 
4683
- #: includes/class-wcj-product-open-pricing.php:399
4684
  #: includes/settings/wcj-settings-product-open-pricing.php:95
4685
  msgid "Entered price is too big!"
4686
  msgstr ""
4687
 
4688
- #: includes/class-wcj-product-open-pricing.php:507
4689
  #: includes/settings/wcj-settings-product-open-pricing.php:32
4690
  msgid "Name Your Price"
4691
  msgstr ""
@@ -4704,26 +4717,26 @@ msgstr ""
4704
  msgid "Set formula for automatic product price calculation."
4705
  msgstr ""
4706
 
4707
- #: includes/class-wcj-product-price-by-formula.php:127
4708
  msgid "Booking cost"
4709
  msgstr ""
4710
 
4711
- #: includes/class-wcj-product-price-by-formula.php:142
4712
  #, php-format
4713
  msgid "From: %s"
4714
  msgstr ""
4715
 
4716
- #: includes/class-wcj-product-price-by-formula.php:169
4717
  msgid "Reset products"
4718
  msgstr ""
4719
 
4720
- #: includes/class-wcj-product-price-by-formula.php:175
4721
  msgid ""
4722
  "If enabled will also reset formula related settings on products when "
4723
  "<code>Reset Settings</code> button is pressed."
4724
  msgstr ""
4725
 
4726
- #: includes/class-wcj-product-price-by-formula.php:175
4727
  msgid ""
4728
  "It's necessary to <code>Save changes</code> first with the option enabled so "
4729
  "the <code>Reset settings</code> can be pressed."
@@ -4746,33 +4759,33 @@ msgid ""
4746
  "remove WooCommerce default product tabs."
4747
  msgstr ""
4748
 
4749
- #: includes/class-wcj-product-tabs.php:607
4750
  msgid "Booster: Custom Tabs"
4751
  msgstr ""
4752
 
4753
- #: includes/class-wcj-product-tabs.php:635
4754
  msgid "Total number of custom tabs"
4755
  msgstr ""
4756
 
4757
- #: includes/class-wcj-product-tabs.php:641
4758
- #: includes/input-fields/class-wcj-product-input-fields-core.php:242
4759
  msgid "Click \"Update\" product after you change this number."
4760
  msgstr ""
4761
 
4762
- #: includes/class-wcj-product-tabs.php:656
4763
  #: includes/settings/wcj-settings-checkout-custom-fields.php:132
4764
  #: includes/settings/wcj-settings-product-tabs.php:85
4765
  msgid "Key"
4766
  msgstr ""
4767
 
4768
- #: includes/class-wcj-product-tabs.php:661
4769
  #: includes/input-fields/wcj-product-input-fields-options.php:24
4770
  #: includes/settings/wcj-settings-related-products.php:71
4771
  #: includes/settings/wcj-settings-related-products.php:101
4772
  msgid "Order"
4773
  msgstr ""
4774
 
4775
- #: includes/class-wcj-product-tabs.php:666
4776
  #: includes/settings/wcj-settings-add-to-cart-button-visibility.php:50
4777
  #: includes/settings/wcj-settings-add-to-cart-button-visibility.php:76
4778
  #: includes/settings/wcj-settings-add-to-cart-button-visibility.php:125
@@ -4785,38 +4798,38 @@ msgstr ""
4785
  #: includes/settings/wcj-settings-mini-cart.php:45
4786
  #: includes/settings/wcj-settings-my-account.php:198
4787
  #: includes/settings/wcj-settings-my-account.php:295
4788
- #: includes/settings/wcj-settings-product-custom-info.php:126
4789
  #: includes/settings/wcj-settings-product-tabs.php:99
4790
  #: includes/widgets/class-wcj-widget-left-to-free-shipping.php:70
4791
  msgid "Content"
4792
  msgstr ""
4793
 
4794
- #: includes/class-wcj-product-tabs.php:671
4795
  #: includes/settings/wcj-settings-cart-customization.php:66
4796
  #: includes/settings/wcj-settings-product-tabs.php:107
4797
  msgid "Link"
4798
  msgstr ""
4799
 
4800
- #: includes/class-wcj-product-tabs.php:673
4801
  #: includes/settings/wcj-settings-product-tabs.php:108
4802
  msgid ""
4803
  "If you wish to forward tab to new link, enter it here. In this case content "
4804
  "is ignored. Leave blank to show content."
4805
  msgstr ""
4806
 
4807
- #: includes/class-wcj-product-tabs.php:677
4808
  #: includes/settings/wcj-settings-product-tabs.php:115
4809
  msgid "Link - Open in New Window"
4810
  msgstr ""
4811
 
4812
- #: includes/class-wcj-product-tabs.php:680
4813
  #: includes/input-fields/wcj-product-input-fields-options.php:93
4814
  #: includes/settings/meta-box/wcj-settings-meta-box-custom-css.php:23
4815
  #: includes/settings/meta-box/wcj-settings-meta-box-multicurrency.php:66
4816
  #: includes/settings/meta-box/wcj-settings-meta-box-offer-price.php:23
4817
  #: includes/settings/meta-box/wcj-settings-meta-box-price-by-country.php:74
4818
  #: includes/settings/meta-box/wcj-settings-meta-box-price-by-user-role.php:40
4819
- #: includes/settings/meta-box/wcj-settings-meta-box-price-by-user-role.php:151
4820
  #: includes/settings/meta-box/wcj-settings-meta-box-product-add-to-cart.php:26
4821
  #: includes/settings/meta-box/wcj-settings-meta-box-product-add-to-cart.php:51
4822
  #: includes/settings/meta-box/wcj-settings-meta-box-product-addons.php:22
@@ -4839,14 +4852,14 @@ msgstr ""
4839
  msgid "No"
4840
  msgstr ""
4841
 
4842
- #: includes/class-wcj-product-tabs.php:681
4843
  #: includes/input-fields/wcj-product-input-fields-options.php:86
4844
  #: includes/settings/meta-box/wcj-settings-meta-box-custom-css.php:22
4845
  #: includes/settings/meta-box/wcj-settings-meta-box-multicurrency.php:67
4846
  #: includes/settings/meta-box/wcj-settings-meta-box-offer-price.php:22
4847
  #: includes/settings/meta-box/wcj-settings-meta-box-price-by-country.php:75
4848
  #: includes/settings/meta-box/wcj-settings-meta-box-price-by-user-role.php:39
4849
- #: includes/settings/meta-box/wcj-settings-meta-box-price-by-user-role.php:150
4850
  #: includes/settings/meta-box/wcj-settings-meta-box-product-add-to-cart.php:25
4851
  #: includes/settings/meta-box/wcj-settings-meta-box-product-add-to-cart.php:50
4852
  #: includes/settings/meta-box/wcj-settings-meta-box-product-addons.php:21
@@ -4877,7 +4890,7 @@ msgstr ""
4877
  msgid "Yes"
4878
  msgstr ""
4879
 
4880
- #: includes/class-wcj-product-tabs.php:689
4881
  #: includes/settings/meta-box/wcj-settings-meta-box-product-by-date.php:25
4882
  #: includes/settings/meta-box/wcj-settings-meta-box-product-by-time.php:22
4883
  #: includes/settings/wcj-settings-checkout-core-fields.php:89
@@ -4888,9 +4901,9 @@ msgstr ""
4888
  msgid "Disabled"
4889
  msgstr ""
4890
 
4891
- #: includes/class-wcj-product-tabs.php:692
4892
  #: includes/settings/wcj-settings-product-tabs.php:77
4893
- #: includes/settings/wcj-settings-product-tabs.php:295
4894
  msgid "Custom Product Tab"
4895
  msgstr ""
4896
 
@@ -4908,11 +4921,11 @@ msgstr ""
4908
  msgid "Add \"products per page\" selector to WooCommerce."
4909
  msgstr ""
4910
 
4911
- #: includes/class-wcj-products-per-page.php:96
4912
  #: includes/settings/wcj-settings-products-per-page.php:67
4913
  msgid ""
4914
- "Products <strong>%from% - %to%</strong> from <strong>%total%</strong>. "
4915
- "Products on page %select_form%"
4916
  msgstr ""
4917
 
4918
  #: includes/class-wcj-products-xml.php:31
@@ -4976,50 +4989,50 @@ msgstr ""
4976
  msgid "Import products costs from \"WooCommerce Cost of Goods\"."
4977
  msgstr ""
4978
 
4979
- #: includes/class-wcj-purchase-data.php:105
4980
  msgid "Product Title"
4981
  msgstr ""
4982
 
4983
- #: includes/class-wcj-purchase-data.php:106
4984
  msgid "WooCommerce Cost of Goods (source)"
4985
  msgstr ""
4986
 
4987
- #: includes/class-wcj-purchase-data.php:107
4988
  msgid "Booster: Product cost (destination)"
4989
  msgstr ""
4990
 
4991
- #: includes/class-wcj-purchase-data.php:151
 
 
4992
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:163
4993
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:241
4994
- #: includes/shipping/class-wc-shipping-wcj-custom.php:137
4995
- #: includes/shipping/class-wc-shipping-wcj-custom.php:194
4996
  msgid "Cost"
4997
  msgstr ""
4998
 
4999
- #: includes/class-wcj-purchase-data.php:154
5000
- #: includes/class-wcj-purchase-data.php:219
5001
- #: includes/class-wcj-purchase-data.php:308
5002
  #: includes/functions/wcj-functions-reports.php:31
5003
  #: includes/settings/wcj-settings-purchase-data.php:152
5004
  #: includes/settings/wcj-settings-purchase-data.php:180
5005
  msgid "Profit"
5006
  msgstr ""
5007
 
5008
- #: includes/class-wcj-purchase-data.php:222
5009
  #: includes/settings/wcj-settings-purchase-data.php:161
5010
  #: includes/settings/wcj-settings-purchase-data.php:187
5011
  msgid "Purchase Cost"
5012
  msgstr ""
5013
 
5014
- #: includes/class-wcj-purchase-data.php:305
5015
  msgid "Selling"
5016
  msgstr ""
5017
 
5018
- #: includes/class-wcj-purchase-data.php:306
5019
  msgid "Buying"
5020
  msgstr ""
5021
 
5022
- #: includes/class-wcj-purchase-data.php:322
5023
  msgid "Report"
5024
  msgstr ""
5025
 
@@ -5050,51 +5063,51 @@ msgstr ""
5050
  msgid "Stock, sales, customers etc. reports."
5051
  msgstr ""
5052
 
5053
- #: includes/class-wcj-reports.php:92
5054
  msgid "Booster: More Ranges - Months"
5055
  msgstr ""
5056
 
5057
- #: includes/class-wcj-reports.php:94 includes/class-wcj-reports.php:144
5058
  msgid "Select Range"
5059
  msgstr ""
5060
 
5061
- #: includes/class-wcj-reports.php:142
5062
  msgid "Booster: More Ranges"
5063
  msgstr ""
5064
 
5065
- #: includes/class-wcj-reports.php:252
5066
  msgid "Booster: Product Sales (Daily)"
5067
  msgstr ""
5068
 
5069
- #: includes/class-wcj-reports.php:259
5070
  msgid "Booster: Product Sales (Monthly)"
5071
  msgstr ""
5072
 
5073
- #: includes/class-wcj-reports.php:266
5074
  msgid "Booster: Monthly Sales (with Currency Conversion)"
5075
  msgstr ""
5076
 
5077
- #: includes/class-wcj-reports.php:273
5078
  msgid "Booster: Payment Gateways"
5079
  msgstr ""
5080
 
5081
- #: includes/class-wcj-reports.php:290
5082
  msgid "Booster: All in stock"
5083
  msgstr ""
5084
 
5085
- #: includes/class-wcj-reports.php:297
5086
  msgid "Booster: Understocked"
5087
  msgstr ""
5088
 
5089
- #: includes/class-wcj-reports.php:304
5090
  msgid "Booster: Overstocked"
5091
  msgstr ""
5092
 
5093
- #: includes/class-wcj-reports.php:321
5094
  msgid "Booster: Customers by Country"
5095
  msgstr ""
5096
 
5097
- #: includes/class-wcj-reports.php:328
5098
  msgid "Booster: Customers by Country Sets"
5099
  msgstr ""
5100
 
@@ -5307,15 +5320,15 @@ msgstr ""
5307
  #: includes/settings/wcj-settings-product-by-condition.php:115
5308
  #: includes/settings/wcj-settings-product-by-user.php:122
5309
  #: includes/settings/wcj-settings-product-open-pricing.php:131
5310
- #: includes/settings/wcj-settings-product-tabs.php:268
5311
  #: includes/settings/wcj-settings-purchase-data.php:153
5312
  #: includes/settings/wcj-settings-purchase-data.php:162
5313
  #: includes/settings/wcj-settings-purchase-data.php:181
5314
  #: includes/settings/wcj-settings-purchase-data.php:188
5315
  #: includes/settings/wcj-settings-sku.php:314
5316
  #: includes/settings/wcj-settings-sku.php:341
5317
- #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:470
5318
- #: includes/tools/class-wcj-order-statuses-tool.php:286
5319
  msgid "Add"
5320
  msgstr ""
5321
 
@@ -5362,7 +5375,8 @@ msgstr ""
5362
  #: includes/class-wcj-shipping-by-time.php:149
5363
  #, php-format
5364
  msgid ""
5365
- "According to current time, your time input will be parsed as: from %s to %s."
 
5366
  msgstr ""
5367
 
5368
  #: includes/class-wcj-shipping-by-time.php:155
@@ -5429,17 +5443,17 @@ msgstr ""
5429
  msgid "Customize WooCommerce shipping calculator on cart page."
5430
  msgstr ""
5431
 
5432
- #: includes/class-wcj-shipping-description.php:33
5433
  msgid "Shipping Descriptions"
5434
  msgstr ""
5435
 
5436
- #: includes/class-wcj-shipping-description.php:34
5437
  msgid ""
5438
  "Add descriptions to shipping methods on frontend. Description visibility "
5439
  "(Plus). Description position (Plus)."
5440
  msgstr ""
5441
 
5442
- #: includes/class-wcj-shipping-description.php:35
5443
  msgid "Add descriptions to shipping methods on frontend."
5444
  msgstr ""
5445
 
@@ -5528,8 +5542,8 @@ msgstr ""
5528
  #: includes/class-wcj-shipping.php:31
5529
  #: includes/settings/wcj-settings-shipping.php:19
5530
  #: includes/settings/wcj-settings-shipping.php:27
 
5531
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:226
5532
- #: includes/shipping/class-wc-shipping-wcj-custom.php:125
5533
  msgid "Custom Shipping"
5534
  msgstr ""
5535
 
@@ -5537,7 +5551,7 @@ msgstr ""
5537
  msgid "Add multiple custom shipping methods to WooCommerce."
5538
  msgstr ""
5539
 
5540
- #: includes/class-wcj-sku.php:30 includes/class-wcj-sku.php:711
5541
  #: includes/export/class-wcj-export-fields-helper.php:288
5542
  msgid "SKU"
5543
  msgstr ""
@@ -5561,33 +5575,33 @@ msgstr ""
5561
  msgid "The tool generates and sets product SKUs for existing products."
5562
  msgstr ""
5563
 
5564
- #: includes/class-wcj-sku.php:712
5565
  msgid "Old SKU"
5566
  msgstr ""
5567
 
5568
- #: includes/class-wcj-sku.php:718
5569
  msgid "SKUs generated and set successfully!"
5570
  msgstr ""
5571
 
5572
- #: includes/class-wcj-sku.php:729
5573
  msgid "Preview SKUs"
5574
  msgstr ""
5575
 
5576
- #: includes/class-wcj-sku.php:731
5577
  msgid "Set SKUs"
5578
  msgstr ""
5579
 
5580
- #: includes/class-wcj-sku.php:734
5581
  msgid ""
5582
  "You can optionally limit affected products by main product's ID (set option "
5583
  "to zero to ignore):"
5584
  msgstr ""
5585
 
5586
- #: includes/class-wcj-sku.php:736
5587
  msgid "Min ID"
5588
  msgstr ""
5589
 
5590
- #: includes/class-wcj-sku.php:739
5591
  msgid "Max ID"
5592
  msgstr ""
5593
 
@@ -5698,26 +5712,26 @@ msgstr ""
5698
  msgid "Type:"
5699
  msgstr ""
5700
 
5701
- #: includes/class-wcj-track-users.php:268
5702
  #, php-format
5703
  msgid "Top %d countries by visits"
5704
  msgstr ""
5705
 
5706
- #: includes/class-wcj-track-users.php:342
5707
  #: includes/input-fields/wcj-product-input-fields-options.php:46
5708
  #: includes/settings/wcj-settings-checkout-custom-fields.php:154
5709
- #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:102
5710
- #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:122
5711
  msgid "Country"
5712
  msgstr ""
5713
 
5714
- #: includes/class-wcj-track-users.php:342
5715
  msgid "Visits"
5716
  msgstr ""
5717
 
5718
  #: includes/class-wcj-track-users.php:373
5719
  #, php-format
5720
- msgid "Stats generated at %s. Next update is scheduled at %s."
5721
  msgstr ""
5722
 
5723
  #: includes/class-wcj-track-users.php:374
@@ -5779,16 +5793,16 @@ msgstr ""
5779
  msgid "File wpml-config.xml successfully regenerated!"
5780
  msgstr ""
5781
 
5782
- #: includes/classes/class-wcj-module-product-by-condition.php:279
5783
  msgid "— No change —"
5784
  msgstr ""
5785
 
5786
- #: includes/classes/class-wcj-module-product-by-condition.php:286
5787
  #: includes/settings/meta-box/wcj-settings-meta-box-product-by-condition.php:35
5788
  msgid "Visible"
5789
  msgstr ""
5790
 
5791
- #: includes/classes/class-wcj-module-product-by-condition.php:297
5792
  #: includes/settings/meta-box/wcj-settings-meta-box-product-by-condition.php:53
5793
  msgid "Invisible"
5794
  msgstr ""
@@ -5818,58 +5832,58 @@ msgid ""
5818
  "\" products."
5819
  msgstr ""
5820
 
5821
- #: includes/classes/class-wcj-module.php:761
5822
  #, php-format
5823
  msgid "Selected: %s."
5824
  msgstr ""
5825
 
5826
- #: includes/classes/class-wcj-module.php:832
5827
  msgid "Back to Module Settings"
5828
  msgstr ""
5829
 
5830
- #: includes/classes/class-wcj-module.php:853
5831
  #: includes/settings/wcj-settings-wpml.php:102
5832
  msgid "Module Tools"
5833
  msgstr ""
5834
 
5835
- #: includes/classes/class-wcj-module.php:931
5836
  #: includes/settings/wcj-settings-checkout-core-fields.php:82
5837
  msgid "enabled"
5838
  msgstr ""
5839
 
5840
- #: includes/classes/class-wcj-module.php:932
5841
  msgid "disabled"
5842
  msgstr ""
5843
 
5844
- #: includes/classes/class-wcj-module.php:940
5845
  #: includes/settings/wcj-settings-product-tabs.php:181
5846
  #: includes/settings/wcj-settings-product-tabs.php:196
5847
  #: includes/settings/wcj-settings-product-tabs.php:211
5848
- #: includes/settings/wcj-settings-product-tabs.php:226
5849
  msgid "Deprecated"
5850
  msgstr ""
5851
 
5852
- #: includes/classes/class-wcj-module.php:979
5853
  msgid "Reset Settings"
5854
  msgstr ""
5855
 
5856
- #: includes/classes/class-wcj-module.php:985
5857
  msgid "Reset Module to Default Settings"
5858
  msgstr ""
5859
 
5860
- #: includes/classes/class-wcj-module.php:986
5861
  msgid "Reset Submodule to Default Settings"
5862
  msgstr ""
5863
 
5864
- #: includes/classes/class-wcj-module.php:990
5865
  msgid "Reset settings"
5866
  msgstr ""
5867
 
5868
- #: includes/classes/class-wcj-module.php:1028
5869
  msgid "Module Options"
5870
  msgstr ""
5871
 
5872
- #: includes/classes/class-wcj-module.php:1035
5873
  msgid "Enable Module"
5874
  msgstr ""
5875
 
@@ -5878,13 +5892,13 @@ msgstr ""
5878
  msgid "Company Name"
5879
  msgstr ""
5880
 
5881
- #: includes/classes/class-wcj-pdf-invoice.php:301
5882
- #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:278
5883
  msgid "Unexpected error"
5884
  msgstr ""
5885
 
5886
  #: includes/classes/class-wcj-shortcodes.php:156
5887
- #: includes/shortcodes/class-wcj-general-shortcodes.php:600
5888
  #, php-format
5889
  msgid "\"%s\" module is not enabled!"
5890
  msgstr ""
@@ -5910,19 +5924,19 @@ msgstr ""
5910
  msgid "Click <a target=\"_blank\" href=\"%s\">here</a> for more info."
5911
  msgstr ""
5912
 
5913
- #: includes/core/class-wcj-admin.php:124
5914
  msgid "Booster Settings"
5915
  msgstr ""
5916
 
5917
- #: includes/core/class-wcj-admin.php:140
5918
  msgid "Docs"
5919
  msgstr ""
5920
 
5921
- #: includes/core/class-wcj-admin.php:143
5922
  msgid "Unlock all"
5923
  msgstr ""
5924
 
5925
- #: includes/core/class-wcj-admin.php:145
5926
  msgid "Support"
5927
  msgstr ""
5928
 
@@ -5952,7 +5966,7 @@ msgstr ""
5952
 
5953
  #: includes/emails/class-wc-email-wcj-custom.php:240
5954
  #, php-format
5955
- msgid "Order status %s to %s"
5956
  msgstr ""
5957
 
5958
  #: includes/emails/class-wc-email-wcj-custom.php:247
@@ -5961,7 +5975,7 @@ msgstr ""
5961
  #: includes/settings/wcj-settings-admin-products-list.php:86
5962
  #: includes/settings/wcj-settings-checkout-custom-fields.php:130
5963
  #: includes/settings/wcj-settings-checkout-fees.php:51
5964
- #: includes/shipping/class-wc-shipping-wcj-custom.php:116
5965
  msgid "Enable/Disable"
5966
  msgstr ""
5967
 
@@ -6220,7 +6234,7 @@ msgid "URL"
6220
  msgstr ""
6221
 
6222
  #: includes/export/class-wcj-export-fields-helper.php:89
6223
- #: includes/reports/wcj-class-reports-customers.php:100
6224
  msgid "Registered"
6225
  msgstr ""
6226
 
@@ -6415,22 +6429,22 @@ msgid "Stock Quantity"
6415
  msgstr ""
6416
 
6417
  #: includes/export/class-wcj-export-fields-helper.php:291
6418
- #: includes/price-by-country/class-wcj-price-by-country-local.php:99
6419
  #: includes/settings/meta-box/wcj-settings-meta-box-multicurrency.php:44
6420
- #: includes/settings/meta-box/wcj-settings-meta-box-price-by-user-role.php:107
6421
  #: includes/settings/wcj-settings-product-by-user.php:19
6422
  #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:193
6423
- #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:405
6424
  msgid "Regular Price"
6425
  msgstr ""
6426
 
6427
  #: includes/export/class-wcj-export-fields-helper.php:292
6428
- #: includes/price-by-country/class-wcj-price-by-country-local.php:106
6429
  #: includes/settings/meta-box/wcj-settings-meta-box-multicurrency.php:53
6430
- #: includes/settings/meta-box/wcj-settings-meta-box-price-by-user-role.php:116
6431
  #: includes/settings/wcj-settings-product-by-user.php:20
6432
  #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:194
6433
- #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:414
6434
  msgid "Sale Price"
6435
  msgstr ""
6436
 
@@ -6446,8 +6460,8 @@ msgstr ""
6446
  #: includes/settings/wcj-settings-product-addons.php:95
6447
  #: includes/settings/wcj-settings-purchase-data.php:89
6448
  #: includes/settings/wcj-settings-shipping-options.php:85
 
6449
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:231
6450
- #: includes/shipping/class-wc-shipping-wcj-custom.php:129
6451
  #: includes/widgets/class-wcj-widget-multicurrency.php:92
6452
  msgid "Type"
6453
  msgstr ""
@@ -6460,7 +6474,7 @@ msgstr ""
6460
  #: includes/export/class-wcj-export-fields-helper.php:296
6461
  #: includes/settings/wcj-settings-product-by-user.php:17
6462
  #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:191
6463
- #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:378
6464
  msgid "Short Description"
6465
  msgstr ""
6466
 
@@ -6569,22 +6583,22 @@ msgstr ""
6569
  msgid "Availability Class"
6570
  msgstr ""
6571
 
6572
- #: includes/functions/wcj-functions-admin.php:144
6573
  #, php-format
6574
  msgid ""
6575
  "<strong>Booster for WooCommerce</strong> plugin was successfully updated to "
6576
  "version <strong>%s</strong>."
6577
  msgstr ""
6578
 
6579
- #: includes/functions/wcj-functions-admin.php:191
6580
  msgid "Search&hellip;"
6581
  msgstr ""
6582
 
6583
- #: includes/functions/wcj-functions-admin.php:242
6584
  msgid "Enter comma separated list of IDs."
6585
  msgstr ""
6586
 
6587
- #: includes/functions/wcj-functions-admin.php:323
6588
  #: includes/settings/wcj-settings-emails-verification.php:79
6589
  #: includes/settings/wcj-settings-emails-verification.php:88
6590
  #: includes/settings/wcj-settings-emails-verification.php:136
@@ -6592,60 +6606,60 @@ msgstr ""
6592
  msgid "Replaced value: %s"
6593
  msgstr ""
6594
 
6595
- #: includes/functions/wcj-functions-admin.php:323
6596
  #, php-format
6597
  msgid "Replaced values: %s"
6598
  msgstr ""
6599
 
6600
- #: includes/functions/wcj-functions-admin.php:355
6601
  msgid "Upgrade Booster to unlock this feature"
6602
  msgstr ""
6603
 
6604
- #: includes/functions/wcj-functions-admin.php:358
6605
  #, php-format
6606
  msgid ""
6607
  "Some settings fields are locked and you will need %s to modify all locked "
6608
  "fields."
6609
  msgstr ""
6610
 
6611
- #: includes/functions/wcj-functions-admin.php:362
6612
  msgid "Buy now"
6613
  msgstr ""
6614
 
6615
- #: includes/functions/wcj-functions-admin.php:362
6616
  msgid "Visit Booster Site"
6617
  msgstr ""
6618
 
6619
- #: includes/functions/wcj-functions-admin.php:368
6620
  #, php-format
6621
  msgid "Upgrade <a href=\"%s\" target=\"_blank\">Booster</a> to change value."
6622
  msgstr ""
6623
 
6624
- #: includes/functions/wcj-functions-admin.php:372
6625
  #, php-format
6626
  msgid ""
6627
  "Upgrade <a href=\"%1$s\" target=\"_blank\">Booster to unlock this feature</a> "
6628
  "to enable \"%2$s\" option."
6629
  msgstr ""
6630
 
6631
- #: includes/functions/wcj-functions-admin.php:376
6632
  #, php-format
6633
  msgid "Upgrade Booster to to enable \"%s\" option."
6634
  msgstr ""
6635
 
6636
- #: includes/functions/wcj-functions-admin.php:380
6637
  #, php-format
6638
  msgid ""
6639
  "Upgrade <a href=\"%s\" target=\"_blank\">Booster</a> to change values below."
6640
  msgstr ""
6641
 
6642
- #: includes/functions/wcj-functions-admin.php:384
6643
  #, php-format
6644
  msgid ""
6645
  "Upgrade <a href=\"%s\" target=\"_blank\">Booster </a> to change values above."
6646
  msgstr ""
6647
 
6648
- #: includes/functions/wcj-functions-admin.php:387
6649
  msgid "Upgrade Booster to change value."
6650
  msgstr ""
6651
 
@@ -7731,92 +7745,92 @@ msgstr ""
7731
  msgid "CoinMarketCap"
7732
  msgstr ""
7733
 
7734
- #: includes/functions/wcj-functions-general.php:702
7735
  #: includes/settings/wcj-settings-cross-sells.php:78
7736
  #: includes/settings/wcj-settings-empty-cart.php:50
7737
  msgid "Before cart"
7738
  msgstr ""
7739
 
7740
- #: includes/functions/wcj-functions-general.php:703
7741
  msgid "Before cart table"
7742
  msgstr ""
7743
 
7744
- #: includes/functions/wcj-functions-general.php:704
7745
  msgid "Before cart contents"
7746
  msgstr ""
7747
 
7748
- #: includes/functions/wcj-functions-general.php:705
7749
  msgid "Cart contents"
7750
  msgstr ""
7751
 
7752
- #: includes/functions/wcj-functions-general.php:706
7753
  msgid "Cart coupon"
7754
  msgstr ""
7755
 
7756
- #: includes/functions/wcj-functions-general.php:707
7757
  msgid "Cart actions"
7758
  msgstr ""
7759
 
7760
- #: includes/functions/wcj-functions-general.php:708
7761
  msgid "After cart contents"
7762
  msgstr ""
7763
 
7764
- #: includes/functions/wcj-functions-general.php:709
7765
  msgid "After cart table"
7766
  msgstr ""
7767
 
7768
- #: includes/functions/wcj-functions-general.php:710
7769
  #: includes/settings/wcj-settings-cross-sells.php:79
7770
  msgid "Cart collaterals"
7771
  msgstr ""
7772
 
7773
- #: includes/functions/wcj-functions-general.php:711
7774
  #: includes/settings/wcj-settings-cross-sells.php:80
7775
  #: includes/settings/wcj-settings-empty-cart.php:59
7776
  msgid "After cart"
7777
  msgstr ""
7778
 
7779
- #: includes/functions/wcj-functions-general.php:713
7780
  msgid "Before cart totals"
7781
  msgstr ""
7782
 
7783
- #: includes/functions/wcj-functions-general.php:714
7784
  #: includes/settings/wcj-settings-empty-cart.php:52
7785
  msgid "Cart totals: Before shipping"
7786
  msgstr ""
7787
 
7788
- #: includes/functions/wcj-functions-general.php:715
7789
  #: includes/settings/wcj-settings-empty-cart.php:53
7790
  msgid "Cart totals: After shipping"
7791
  msgstr ""
7792
 
7793
- #: includes/functions/wcj-functions-general.php:716
7794
  #: includes/settings/wcj-settings-empty-cart.php:54
7795
  msgid "Cart totals: Before order total"
7796
  msgstr ""
7797
 
7798
- #: includes/functions/wcj-functions-general.php:717
7799
  #: includes/settings/wcj-settings-empty-cart.php:55
7800
  msgid "Cart totals: After order total"
7801
  msgstr ""
7802
 
7803
- #: includes/functions/wcj-functions-general.php:718
7804
  msgid "Proceed to checkout"
7805
  msgstr ""
7806
 
7807
- #: includes/functions/wcj-functions-general.php:719
7808
  msgid "After cart totals"
7809
  msgstr ""
7810
 
7811
- #: includes/functions/wcj-functions-general.php:721
7812
  msgid "Before shipping calculator"
7813
  msgstr ""
7814
 
7815
- #: includes/functions/wcj-functions-general.php:722
7816
  msgid "After shipping calculator"
7817
  msgstr ""
7818
 
7819
- #: includes/functions/wcj-functions-general.php:724
7820
  msgid "If cart is empty"
7821
  msgstr ""
7822
 
@@ -7846,7 +7860,7 @@ msgid "Custom Document"
7846
  msgstr ""
7847
 
7848
  #: includes/functions/wcj-functions-reports.php:24
7849
- msgid "gmdate"
7850
  msgstr ""
7851
 
7852
  #: includes/functions/wcj-functions-reports.php:25
@@ -7872,7 +7886,7 @@ msgid "Sum"
7872
  msgstr ""
7873
 
7874
  #: includes/functions/wcj-functions-reports.php:32
7875
- msgid "Last Sale gmdate"
7876
  msgstr ""
7877
 
7878
  #: includes/functions/wcj-functions-reports.php:33
@@ -7947,8 +7961,8 @@ msgid "Enable Custom Payment"
7947
  msgstr ""
7948
 
7949
  #: includes/gateways/class-wc-gateway-wcj-custom.php:61
 
7950
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:225
7951
- #: includes/shipping/class-wc-shipping-wcj-custom.php:124
7952
  msgid "This controls the title which the user sees during checkout."
7953
  msgstr ""
7954
 
@@ -8078,29 +8092,29 @@ msgstr ""
8078
  msgid "Booster for WooCommerce: Custom Payment Gateway"
8079
  msgstr ""
8080
 
8081
- #: includes/input-fields/class-wcj-product-input-fields-core.php:196
8082
  msgid "Booster: Product Input Fields"
8083
  msgstr ""
8084
 
8085
- #: includes/input-fields/class-wcj-product-input-fields-core.php:236
8086
  msgid "Total number of "
8087
  msgstr ""
8088
 
8089
- #: includes/input-fields/class-wcj-product-input-fields-core.php:252
8090
- #: includes/input-fields/class-wcj-product-input-fields-core.php:450
8091
  #: includes/settings/wcj-settings-product-input-fields.php:96
8092
  msgid "Product Input Field"
8093
  msgstr ""
8094
 
8095
- #: includes/input-fields/class-wcj-product-input-fields-core.php:528
8096
  msgid "Wrong file type!"
8097
  msgstr ""
8098
 
8099
- #: includes/input-fields/class-wcj-product-input-fields-core.php:537
8100
  msgid "File is too big!"
8101
  msgstr ""
8102
 
8103
- #: includes/input-fields/class-wcj-product-input-fields-core.php:767
8104
  msgid "Select a country&hellip;"
8105
  msgstr ""
8106
 
@@ -8488,7 +8502,7 @@ msgid "Clear all invoices before renumerating"
8488
  msgstr ""
8489
 
8490
  #: includes/pdf-invoices/class-wcj-pdf-invoicing-renumerate-tool.php:121
8491
- #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:154
8492
  msgid "Document Type"
8493
  msgstr ""
8494
 
@@ -8510,7 +8524,7 @@ msgstr ""
8510
  msgid "Total documents deleted: %d"
8511
  msgstr ""
8512
 
8513
- #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:86
8514
  #, php-format
8515
  msgid ""
8516
  "This option is disabled with \"Disable Saving PDFs in PHP directory for "
@@ -8518,41 +8532,41 @@ msgid ""
8518
  "Settings > Booster > PDF Invoicing & Packing Slips > Advanced</a>."
8519
  msgstr ""
8520
 
8521
- #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:98
8522
  msgid "Sorry, but something went wrong..."
8523
  msgstr ""
8524
 
8525
- #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:104
8526
- #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:125
8527
  msgid "Please fill year and month values."
8528
  msgstr ""
8529
 
8530
- #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:149
8531
  msgid "Month"
8532
  msgstr ""
8533
 
8534
- #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:161
8535
  msgid "Display monthly documents table"
8536
  msgstr ""
8537
 
8538
- #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:167
8539
  msgid "Download all monthly documents PDFs in single ZIP file"
8540
  msgstr ""
8541
 
8542
- #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:173
8543
  msgid "Download monthly documents CSV"
8544
  msgstr ""
8545
 
8546
- #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:203
8547
  #, php-format
8548
  msgid ""
8549
  "Booster: %s class is not accessible on your server. Please contact your "
8550
  "hosting provider."
8551
  msgstr ""
8552
 
8553
- #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:294
8554
  #, php-format
8555
- msgid "No documents (%s) found for %d-%02d."
8556
  msgstr ""
8557
 
8558
  #: includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-advanced.php:33
@@ -8660,10 +8674,6 @@ msgstr ""
8660
  msgid "Booster: PDF Invoices"
8661
  msgstr ""
8662
 
8663
- #: includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-display.php:354
8664
- msgid "You have no document types enabled."
8665
- msgstr ""
8666
-
8667
  #: includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-display.php:413
8668
  msgid ""
8669
  "In case of partial refund, you need to reload the page to see created "
@@ -8695,25 +8705,25 @@ msgid "Styling"
8695
  msgstr ""
8696
 
8697
  #: includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-templates.php:30
8698
- #: includes/settings/wcj-settings-template-editor.php:46
8699
  msgid "Templates"
8700
  msgstr ""
8701
 
8702
- #: includes/price-by-country/class-wcj-price-by-country-group-generator.php:36
8703
  msgid "Country groups successfully generated."
8704
  msgstr ""
8705
 
8706
- #: includes/price-by-country/class-wcj-price-by-country-group-generator.php:39
8707
  msgid "Country groups generation failed."
8708
  msgstr ""
8709
 
8710
- #: includes/price-by-country/class-wcj-price-by-country-local.php:113
8711
  #: includes/settings/meta-box/wcj-settings-meta-box-price-by-country.php:77
8712
  #: includes/settings/wcj-settings-price-by-country.php:449
8713
  msgid "Make empty price"
8714
  msgstr ""
8715
 
8716
- #: includes/price-by-country/class-wcj-price-by-country-local.php:217
8717
  #: includes/settings/meta-box/wcj-settings-meta-box-price-by-country.php:21
8718
  #: includes/settings/wcj-settings-add-to-cart.php:59
8719
  #: includes/settings/wcj-settings-price-by-country.php:334
@@ -8724,307 +8734,307 @@ msgstr ""
8724
  msgid "Group"
8725
  msgstr ""
8726
 
8727
- #: includes/reports/class-wcj-currency-reports.php:43
8728
  msgid "Reports currency:"
8729
  msgstr ""
8730
 
8731
- #: includes/reports/class-wcj-currency-reports.php:45
8732
- #: includes/reports/class-wcj-currency-reports.php:85
8733
  msgid "Show reports only in"
8734
  msgstr ""
8735
 
8736
- #: includes/reports/wcj-class-reports-customers.php:48
8737
  msgid "No customers found."
8738
  msgstr ""
8739
 
8740
- #: includes/reports/wcj-class-reports-customers.php:84
8741
  msgid "Non Available"
8742
  msgstr ""
8743
 
8744
- #: includes/reports/wcj-class-reports-customers.php:97
8745
  #: includes/settings/wcj-settings-offer-price.php:212
8746
  msgid "Customer Name"
8747
  msgstr ""
8748
 
8749
- #: includes/reports/wcj-class-reports-customers.php:99
8750
  msgid "Total Spent"
8751
  msgstr ""
8752
 
8753
- #: includes/reports/wcj-class-reports-customers.php:143
8754
  msgid "Total customers"
8755
  msgstr ""
8756
 
8757
- #: includes/reports/wcj-class-reports-customers.php:147
8758
  msgid "Country Code"
8759
  msgstr ""
8760
 
8761
- #: includes/reports/wcj-class-reports-customers.php:148
8762
  msgid "Customers Count"
8763
  msgstr ""
8764
 
8765
- #: includes/reports/wcj-class-reports-customers.php:149
8766
  msgid "Percent of total"
8767
  msgstr ""
8768
 
8769
- #: includes/reports/wcj-class-reports-customers.php:171
8770
  msgid "Report for:"
8771
  msgstr ""
8772
 
8773
- #: includes/reports/wcj-class-reports-monthly-sales.php:46
8774
  msgid "Currency rates saved."
8775
  msgstr ""
8776
 
8777
- #: includes/reports/wcj-class-reports-monthly-sales.php:50
8778
  msgid "Currency rates deleted."
8779
  msgstr ""
8780
 
8781
- #: includes/reports/wcj-class-reports-monthly-sales.php:97
8782
  msgid "Days"
8783
  msgstr ""
8784
 
8785
- #: includes/reports/wcj-class-reports-monthly-sales.php:98
8786
  msgid "Total Orders"
8787
  msgstr ""
8788
 
8789
- #: includes/reports/wcj-class-reports-monthly-sales.php:99
8790
  msgid "Orders Average / Day"
8791
  msgstr ""
8792
 
8793
- #: includes/reports/wcj-class-reports-monthly-sales.php:100
8794
- #: includes/reports/wcj-class-reports-sales.php:344
8795
  msgid "Total Sum"
8796
  msgstr ""
8797
 
8798
- #: includes/reports/wcj-class-reports-monthly-sales.php:101
8799
  msgid "Total Sum (excl. TAX)"
8800
  msgstr ""
8801
 
8802
- #: includes/reports/wcj-class-reports-monthly-sales.php:102
8803
  msgid "Average / Order (excl. TAX)"
8804
  msgstr ""
8805
 
8806
- #: includes/reports/wcj-class-reports-monthly-sales.php:103
8807
  msgid "Average / Day (excl. TAX)"
8808
  msgstr ""
8809
 
8810
- #: includes/reports/wcj-class-reports-monthly-sales.php:104
8811
  msgid "Currency Rates"
8812
  msgstr ""
8813
 
8814
- #: includes/reports/wcj-class-reports-monthly-sales.php:105
8815
  msgid "Orders by Currency"
8816
  msgstr ""
8817
 
8818
- #: includes/reports/wcj-class-reports-monthly-sales.php:214
8819
- #: includes/reports/wcj-class-reports-monthly-sales.php:230
8820
- #: includes/reports/wcj-class-reports-monthly-sales.php:302
8821
- #: includes/reports/wcj-class-reports-monthly-sales.php:307
8822
  #, php-format
8823
  msgid "Forecast: %s"
8824
  msgstr ""
8825
 
8826
- #: includes/reports/wcj-class-reports-monthly-sales.php:254
8827
  msgid "Grab average rate"
8828
  msgstr ""
8829
 
8830
- #: includes/reports/wcj-class-reports-monthly-sales.php:313
8831
  msgid "Totals"
8832
  msgstr ""
8833
 
8834
- #: includes/reports/wcj-class-reports-monthly-sales.php:357
8835
  msgid "Report currency"
8836
  msgstr ""
8837
 
8838
- #: includes/reports/wcj-class-reports-monthly-sales.php:377
8839
  #, php-format
8840
  msgid "Report generated in: %s s"
8841
  msgstr ""
8842
 
8843
- #: includes/reports/wcj-class-reports-monthly-sales.php:381
8844
  msgid "Save Currency Rates"
8845
  msgstr ""
8846
 
8847
- #: includes/reports/wcj-class-reports-monthly-sales.php:385
8848
  msgid "Reset Currency Rates"
8849
  msgstr ""
8850
 
8851
- #: includes/reports/wcj-class-reports-sales-daily.php:179
8852
- #: includes/reports/wcj-class-reports-sales-gateways.php:124
8853
- #: includes/reports/wcj-class-reports-sales.php:364
8854
  msgid "Reports Settings"
8855
  msgstr ""
8856
 
8857
- #: includes/reports/wcj-class-reports-sales-daily.php:203
8858
- #: includes/reports/wcj-class-reports-sales-gateways.php:148
8859
  msgid "From:"
8860
  msgstr ""
8861
 
8862
- #: includes/reports/wcj-class-reports-sales-daily.php:206
8863
- #: includes/reports/wcj-class-reports-sales-gateways.php:151
8864
  msgid "To:"
8865
  msgstr ""
8866
 
8867
- #: includes/reports/wcj-class-reports-sales-daily.php:209
8868
  msgid "Product:"
8869
  msgstr ""
8870
 
8871
- #: includes/reports/wcj-class-reports-sales-daily.php:299
8872
  #, php-format
8873
  msgid "Total: %d"
8874
  msgstr ""
8875
 
8876
- #: includes/reports/wcj-class-reports-sales-daily.php:304
8877
- #: includes/reports/wcj-class-reports-sales-daily.php:309
8878
  #, php-format
8879
  msgid "Total: %s"
8880
  msgstr ""
8881
 
8882
- #: includes/reports/wcj-class-reports-sales-daily.php:328
8883
- #: includes/reports/wcj-class-reports-sales-gateways.php:184
8884
  #, php-format
8885
  msgid "Total orders: %d"
8886
  msgstr ""
8887
 
8888
- #: includes/reports/wcj-class-reports-sales-daily.php:329
8889
- #: includes/reports/wcj-class-reports-sales-gateways.php:186
8890
- #: includes/reports/wcj-class-reports-sales.php:389
8891
  msgid "No sales data for current period."
8892
  msgstr ""
8893
 
8894
- #: includes/reports/wcj-class-reports-sales-gateways.php:94
8895
- #: includes/reports/wcj-class-reports-stock.php:121
8896
- #: includes/reports/wcj-class-reports-stock.php:197
8897
- msgid "N/A"
8898
- msgstr ""
8899
-
8900
- #: includes/reports/wcj-class-reports-sales-gateways.php:170
8901
- msgid "Gateway"
8902
- msgstr ""
8903
-
8904
- #: includes/reports/wcj-class-reports-sales.php:140
8905
  msgid "Variation"
8906
  msgstr ""
8907
 
8908
- #: includes/reports/wcj-class-reports-sales.php:210
8909
  msgid "Last Sale"
8910
  msgstr ""
8911
 
8912
- #: includes/reports/wcj-class-reports-sales.php:211
8913
  msgid "Total"
8914
  msgstr ""
8915
 
8916
- #: includes/reports/wcj-class-reports-sales.php:333
8917
  msgid "Total Items"
8918
  msgstr ""
8919
 
8920
- #: includes/reports/wcj-class-reports-sales.php:355
8921
  msgid "Total Profit"
8922
  msgstr ""
8923
 
8924
- #: includes/reports/wcj-class-reports-sales.php:384
8925
  msgid "Filter products"
8926
  msgstr ""
8927
 
8928
- #: includes/reports/wcj-class-reports-stock.php:45
8929
  msgid "All Products on Stock"
8930
  msgstr ""
8931
 
8932
- #: includes/reports/wcj-class-reports-stock.php:46
8933
  msgid "Report shows all products that are on stock and some sales info."
8934
  msgstr ""
8935
 
8936
- #: includes/reports/wcj-class-reports-stock.php:50
8937
  msgid "Understocked"
8938
  msgstr ""
8939
 
8940
- #: includes/reports/wcj-class-reports-stock.php:51
8941
  msgid ""
8942
  "Report shows all products that are low in stock calculated on product's sales "
8943
  "data."
8944
  msgstr ""
8945
 
8946
- #: includes/reports/wcj-class-reports-stock.php:52
8947
  msgid ""
8948
  "Threshold for minimum stock is equal to half of the sales in selected days "
8949
  "range."
8950
  msgstr ""
8951
 
8952
- #: includes/reports/wcj-class-reports-stock.php:56
8953
  msgid "Overstocked"
8954
  msgstr ""
8955
 
8956
- #: includes/reports/wcj-class-reports-stock.php:57
8957
  msgid ""
8958
  "Report shows all products that are on stock, but have no sales in selected "
8959
  "period. Only products added before the start date of selected period are "
8960
  "accounted."
8961
  msgstr ""
8962
 
8963
- #: includes/reports/wcj-class-reports-stock.php:293
 
 
 
 
 
 
8964
  msgid "Stock price"
8965
  msgstr ""
8966
 
8967
- #: includes/reports/wcj-class-reports-stock.php:294
8968
  msgid "Total stock price"
8969
  msgstr ""
8970
 
8971
- #: includes/reports/wcj-class-reports-stock.php:295
8972
  msgid "Last sale"
8973
  msgstr ""
8974
 
8975
- #: includes/reports/wcj-class-reports-stock.php:297
8976
  #, php-format
8977
  msgid "Sales in last %s days"
8978
  msgstr ""
8979
 
8980
- #: includes/reports/wcj-class-reports-stock.php:298
8981
  msgid "Total sales"
8982
  msgstr ""
8983
 
8984
- #: includes/reports/wcj-class-reports-stock.php:300
8985
  msgid "Stock to minimum"
8986
  msgstr ""
8987
 
8988
- #: includes/reports/wcj-class-reports-stock.php:329
8989
  msgid "purchase price:"
8990
  msgstr ""
8991
 
8992
- #: includes/reports/wcj-class-reports-stock.php:333
8993
  msgid "stock purchase price:"
8994
  msgstr ""
8995
 
8996
- #: includes/reports/wcj-class-reports-stock.php:338
8997
  msgid "No sales yet"
8998
  msgstr ""
8999
 
9000
- #: includes/reports/wcj-class-reports-stock.php:341
9001
  msgid "profit:"
9002
  msgstr ""
9003
 
9004
- #: includes/reports/wcj-class-reports-stock.php:361
9005
  msgid "Total current stock value"
9006
  msgstr ""
9007
 
9008
- #: includes/reports/wcj-class-reports-stock.php:362
9009
  msgid "Total stock value"
9010
  msgstr ""
9011
 
9012
- #: includes/reports/wcj-class-reports-stock.php:363
9013
  msgid "Product stock value average"
9014
  msgstr ""
9015
 
9016
- #: includes/reports/wcj-class-reports-stock.php:364
9017
  msgid "Product stock average"
9018
  msgstr ""
9019
 
9020
- #: includes/reports/wcj-class-reports-stock.php:366
9021
  msgid "Total current stock purchase price"
9022
  msgstr ""
9023
 
9024
- #: includes/reports/wcj-class-reports-stock.php:370
9025
  msgid "Report was generated in: "
9026
  msgstr ""
9027
 
 
 
 
 
9028
  #: includes/settings/meta-box/wcj-settings-meta-box-add-to-cart-button-visibility.php:21
9029
  #: includes/settings/meta-box/wcj-settings-meta-box-add-to-cart-button-visibility.php:40
9030
  #: includes/settings/wcj-settings-admin-orders-list.php:139
@@ -9156,7 +9166,7 @@ msgid ""
9156
  msgstr ""
9157
 
9158
  #: includes/settings/meta-box/wcj-settings-meta-box-multicurrency.php:69
9159
- #: includes/settings/meta-box/wcj-settings-meta-box-price-by-user-role.php:153
9160
  #: includes/settings/wcj-settings-price-by-user-role.php:186
9161
  #: includes/settings/wcj-settings-price-by-user-role.php:269
9162
  msgid "Make Empty Price"
@@ -9258,7 +9268,7 @@ msgstr ""
9258
  msgid "Per Product Settings (press Update after changing)"
9259
  msgstr ""
9260
 
9261
- #: includes/settings/meta-box/wcj-settings-meta-box-price-by-user-role.php:128
9262
  #: includes/settings/wcj-settings-price-by-user-role.php:36
9263
  msgid "Multiplier"
9264
  msgstr ""
@@ -9444,7 +9454,7 @@ msgstr ""
9444
 
9445
  #: includes/settings/meta-box/wcj-settings-meta-box-product-images.php:21
9446
  #: includes/settings/meta-box/wcj-settings-meta-box-product-images.php:29
9447
- #: includes/settings/wcj-settings-product-custom-info.php:130
9448
  #: includes/settings/wcj-settings-product-images.php:52
9449
  #: includes/settings/wcj-settings-product-images.php:61
9450
  #: includes/settings/wcj-settings-product-images.php:70
@@ -9869,7 +9879,7 @@ msgstr ""
9869
  #: includes/settings/wcj-settings-add-to-cart.php:235
9870
  #: includes/settings/wcj-settings-add-to-cart.php:244
9871
  #: includes/settings/wcj-settings-payment-gateways-fees.php:59
9872
- #: includes/settings/wcj-settings-product-custom-info.php:246
9873
  msgid "Leave blank to disable."
9874
  msgstr ""
9875
 
@@ -10016,7 +10026,7 @@ msgstr ""
10016
  #: includes/settings/wcj-settings-offer-price.php:221
10017
  #: includes/settings/wcj-settings-offer-price.php:229
10018
  #: includes/tools/class-wcj-order-statuses-tool.php:187
10019
- #: includes/tools/class-wcj-order-statuses-tool.php:267
10020
  msgid "Label"
10021
  msgstr ""
10022
 
@@ -10146,7 +10156,8 @@ msgstr ""
10146
  #: includes/settings/wcj-settings-admin-tools.php:25
10147
  #, php-format
10148
  msgid ""
10149
- "Will require %s capability to see Booster menus (instead of %s capability)."
 
10150
  msgstr ""
10151
 
10152
  #: includes/settings/wcj-settings-admin-tools.php:35
@@ -10378,7 +10389,7 @@ msgstr ""
10378
  #: includes/settings/wcj-settings-checkout-custom-info.php:23
10379
  #: includes/settings/wcj-settings-mini-cart.php:22
10380
  #: includes/settings/wcj-settings-my-account.php:271
10381
- #: includes/settings/wcj-settings-product-custom-info.php:58
10382
  msgid "Total Blocks"
10383
  msgstr ""
10384
 
@@ -10393,7 +10404,7 @@ msgstr ""
10393
  #: includes/settings/wcj-settings-checkout-custom-info.php:72
10394
  #: includes/settings/wcj-settings-mini-cart.php:63
10395
  #: includes/settings/wcj-settings-my-account.php:348
10396
- #: includes/settings/wcj-settings-product-custom-info.php:164
10397
  msgid "Position Order (i.e. Priority)"
10398
  msgstr ""
10399
 
@@ -10493,7 +10504,7 @@ msgid "Fields Options"
10493
  msgstr ""
10494
 
10495
  #: includes/settings/wcj-settings-checkout-core-fields.php:94
10496
- #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:354
10497
  msgid "required"
10498
  msgstr ""
10499
 
@@ -10681,7 +10692,7 @@ msgstr ""
10681
  #: includes/settings/wcj-settings-checkout-custom-fields.php:219
10682
  #: includes/settings/wcj-settings-eu-vat-number.php:51
10683
  #: includes/templates/wcj-radio-for-variations.php:25
10684
- #: includes/tools/class-wcj-order-statuses-tool.php:263
10685
  msgid "Clear"
10686
  msgstr ""
10687
 
@@ -11540,7 +11551,7 @@ msgstr ""
11540
 
11541
  #: includes/settings/wcj-settings-checkout-files-upload.php:412
11542
  #, php-format
11543
- msgid "Ignored, if %s is not included in %s option above."
11544
  msgstr ""
11545
 
11546
  #: includes/settings/wcj-settings-checkout-files-upload.php:430
@@ -11554,7 +11565,7 @@ msgstr ""
11554
  #: includes/settings/wcj-settings-payment-gateways.php:62
11555
  #: includes/settings/wcj-settings-pdf-invoicing-advanced.php:50
11556
  #: includes/settings/wcj-settings-product-by-date.php:129
11557
- #: includes/settings/wcj-settings-product-custom-info.php:240
11558
  #: includes/settings/wcj-settings-product-input-fields.php:394
11559
  #: includes/settings/wcj-settings-shipping-by-condition.php:177
11560
  msgid "Advanced Options"
@@ -11819,8 +11830,8 @@ msgstr ""
11819
  #: includes/settings/wcj-settings-cross-sells.php:137
11820
  #, php-format
11821
  msgid ""
11822
- "Please note that this option will work only if \"%s\" option is disabled in "
11823
- "%s."
11824
  msgstr ""
11825
 
11826
  #: includes/settings/wcj-settings-cross-sells.php:138
@@ -12251,7 +12262,7 @@ msgid "Add Product Info to Item Name"
12251
  msgstr ""
12252
 
12253
  #: includes/settings/wcj-settings-email-options.php:29
12254
- #: includes/settings/wcj-settings-template-editor.php:71
12255
  #: includes/settings/wcj-settings-track-users.php:29
12256
  msgid "Info"
12257
  msgstr ""
@@ -13029,7 +13040,7 @@ msgstr ""
13029
  #: includes/settings/wcj-settings-global-discount.php:36
13030
  #: includes/settings/wcj-settings-product-by-user.php:146
13031
  #: includes/settings/wcj-settings-products-xml.php:32
13032
- #: includes/shipping/class-wc-shipping-wcj-custom.php:172
13033
  msgid "Press Save changes after you change this number."
13034
  msgstr ""
13035
 
@@ -13221,13 +13232,13 @@ msgstr ""
13221
  #: includes/settings/wcj-settings-left-to-free-shipping.php:22
13222
  #, php-format
13223
  msgid ""
13224
- "You can also use <em>Booster - Left to Free Shipping</em> widget, %s "
13225
- "shortcode or %s function."
13226
  msgstr ""
13227
 
13228
  #: includes/settings/wcj-settings-left-to-free-shipping.php:28
13229
  #, php-format
13230
- msgid "In content replaced values are: %s, %s and %s."
13231
  msgstr ""
13232
 
13233
  #: includes/settings/wcj-settings-left-to-free-shipping.php:36
@@ -13870,7 +13881,7 @@ msgstr ""
13870
 
13871
  #: includes/settings/wcj-settings-my-account.php:130
13872
  #, php-format
13873
- msgid "Add in %s format. One per line. E.g.: %s."
13874
  msgstr ""
13875
 
13876
  #: includes/settings/wcj-settings-my-account.php:149
@@ -14147,23 +14158,23 @@ msgid "Position On Single Product Page"
14147
  msgstr ""
14148
 
14149
  #: includes/settings/wcj-settings-offer-price.php:98
14150
- #: includes/settings/wcj-settings-product-custom-info.php:141
14151
  #: includes/settings/wcj-settings-upsells.php:61
14152
  msgid "Before single product"
14153
  msgstr ""
14154
 
14155
  #: includes/settings/wcj-settings-offer-price.php:101
14156
- #: includes/settings/wcj-settings-product-custom-info.php:146
14157
  msgid "Before add to cart form"
14158
  msgstr ""
14159
 
14160
  #: includes/settings/wcj-settings-offer-price.php:102
14161
- #: includes/settings/wcj-settings-product-custom-info.php:149
14162
  msgid "After add to cart form"
14163
  msgstr ""
14164
 
14165
  #: includes/settings/wcj-settings-offer-price.php:104
14166
- #: includes/settings/wcj-settings-product-custom-info.php:145
14167
  #: includes/settings/wcj-settings-upsells.php:65
14168
  msgid "After single product"
14169
  msgstr ""
@@ -14273,12 +14284,7 @@ msgstr ""
14273
 
14274
  #: includes/settings/wcj-settings-offer-price.php:326
14275
  #, php-format
14276
- msgid "Use %s to send to administrator email: %s."
14277
- msgstr ""
14278
-
14279
- #: includes/settings/wcj-settings-offer-price.php:356
14280
- #, php-format
14281
- msgid "From: %s %s"
14282
  msgstr ""
14283
 
14284
  #: includes/settings/wcj-settings-offer-price.php:366
@@ -14451,8 +14457,8 @@ msgstr ""
14451
  #, php-format
14452
  msgid ""
14453
  "Message to customer if order is below minimum amount. Default: You must have "
14454
- "an order with a minimum of %s to place your order, your current order total "
14455
- "is %s."
14456
  msgstr ""
14457
 
14458
  #: includes/settings/wcj-settings-order-min-amount.php:68
@@ -16627,7 +16633,7 @@ msgid "URL - All Products"
16627
  msgstr ""
16628
 
16629
  #: includes/settings/wcj-settings-product-add-to-cart.php:44
16630
- #: includes/settings/wcj-settings-product-tabs.php:254
16631
  msgid "This will add meta boxes to each product's edit page."
16632
  msgstr ""
16633
 
@@ -16854,14 +16860,14 @@ msgid "Position on Frontend"
16854
  msgstr ""
16855
 
16856
  #: includes/settings/wcj-settings-product-addons.php:235
16857
- #: includes/settings/wcj-settings-product-custom-info.php:147
16858
  #: includes/settings/wcj-settings-product-input-fields.php:228
16859
  #: includes/settings/wcj-settings-product-open-pricing.php:20
16860
  msgid "Before add to cart button"
16861
  msgstr ""
16862
 
16863
  #: includes/settings/wcj-settings-product-addons.php:236
16864
- #: includes/settings/wcj-settings-product-custom-info.php:148
16865
  #: includes/settings/wcj-settings-product-input-fields.php:229
16866
  #: includes/settings/wcj-settings-product-open-pricing.php:21
16867
  msgid "After add to cart button"
@@ -17163,7 +17169,7 @@ msgstr ""
17163
 
17164
  #: includes/settings/wcj-settings-product-by-condition.php:91
17165
  #: includes/settings/wcj-settings-related-products.php:182
17166
- #: includes/shortcodes/class-wcj-order-items-shortcodes.php:211
17167
  msgid "Standard"
17168
  msgstr ""
17169
 
@@ -17328,7 +17334,7 @@ msgstr ""
17328
 
17329
  #: includes/settings/wcj-settings-product-by-user.php:18
17330
  #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:192
17331
- #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:397
17332
  msgid "Image"
17333
  msgstr ""
17334
 
@@ -17377,7 +17383,7 @@ msgid "Message: Product Successfully Added"
17377
  msgstr ""
17378
 
17379
  #: includes/settings/wcj-settings-product-by-user.php:130
17380
- #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:314
17381
  msgid "\"%product_title%\" successfully added!"
17382
  msgstr ""
17383
 
@@ -17386,7 +17392,7 @@ msgid "Message: Product Successfully Edited"
17386
  msgstr ""
17387
 
17388
  #: includes/settings/wcj-settings-product-by-user.php:137
17389
- #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:322
17390
  msgid "\"%product_title%\" successfully edited!"
17391
  msgstr ""
17392
 
@@ -17407,80 +17413,80 @@ msgid ""
17407
  "Check to send email to product user when customer place order successfully"
17408
  msgstr ""
17409
 
17410
- #: includes/settings/wcj-settings-product-custom-info.php:48
17411
  msgid "Single Product Pages"
17412
  msgstr ""
17413
 
17414
- #: includes/settings/wcj-settings-product-custom-info.php:48
17415
  #: includes/settings/wcj-settings-product-msrp.php:17
17416
  msgid "Archives"
17417
  msgstr ""
17418
 
17419
- #: includes/settings/wcj-settings-product-custom-info.php:121
17420
  #, php-format
17421
  msgid "Block #%s"
17422
  msgstr ""
17423
 
17424
- #: includes/settings/wcj-settings-product-custom-info.php:150
17425
  msgid "Product meta start"
17426
  msgstr ""
17427
 
17428
- #: includes/settings/wcj-settings-product-custom-info.php:151
17429
  msgid "Product meta end"
17430
  msgstr ""
17431
 
17432
- #: includes/settings/wcj-settings-product-custom-info.php:156
17433
  msgid "Inside product title"
17434
  msgstr ""
17435
 
17436
- #: includes/settings/wcj-settings-product-custom-info.php:171
17437
  #: includes/settings/wcj-settings-wholesale-price.php:127
17438
  msgid "Product Categories to Include"
17439
  msgstr ""
17440
 
17441
- #: includes/settings/wcj-settings-product-custom-info.php:172
17442
- #: includes/settings/wcj-settings-product-custom-info.php:182
17443
- #: includes/settings/wcj-settings-product-custom-info.php:192
17444
- #: includes/settings/wcj-settings-product-custom-info.php:202
17445
- #: includes/settings/wcj-settings-product-custom-info.php:212
17446
- #: includes/settings/wcj-settings-product-custom-info.php:222
17447
  msgid "Leave blank to disable the option."
17448
  msgstr ""
17449
 
17450
- #: includes/settings/wcj-settings-product-custom-info.php:181
17451
  #: includes/settings/wcj-settings-wholesale-price.php:136
17452
  msgid "Product Categories to Exclude"
17453
  msgstr ""
17454
 
17455
- #: includes/settings/wcj-settings-product-custom-info.php:191
17456
  msgid "Product Tags to Include"
17457
  msgstr ""
17458
 
17459
- #: includes/settings/wcj-settings-product-custom-info.php:201
17460
  msgid "Product Tags to Exclude"
17461
  msgstr ""
17462
 
17463
- #: includes/settings/wcj-settings-product-custom-info.php:211
17464
  #: includes/settings/wcj-settings-products-xml.php:171
17465
  #: includes/settings/wcj-settings-wholesale-price.php:111
17466
  msgid "Products to Include"
17467
  msgstr ""
17468
 
17469
- #: includes/settings/wcj-settings-product-custom-info.php:221
17470
  #: includes/settings/wcj-settings-products-xml.php:181
17471
  #: includes/settings/wcj-settings-wholesale-price.php:120
17472
  msgid "Products to Exclude"
17473
  msgstr ""
17474
 
17475
- #: includes/settings/wcj-settings-product-custom-info.php:245
17476
  msgid "Extra Filters"
17477
  msgstr ""
17478
 
17479
- #: includes/settings/wcj-settings-product-custom-info.php:247
17480
  msgid "You can add custom filters here (one per line, in filter|title format)."
17481
  msgstr ""
17482
 
17483
- #: includes/settings/wcj-settings-product-custom-info.php:249
17484
  #, php-format
17485
  msgid "E.g.: %s."
17486
  msgstr ""
@@ -17848,7 +17854,7 @@ msgstr ""
17848
 
17849
  #: includes/settings/wcj-settings-product-input-fields.php:410
17850
  #, php-format
17851
- msgid "Enable this if you have single quotes %s converted to %s."
17852
  msgstr ""
17853
 
17854
  #: includes/settings/wcj-settings-product-listings.php:34
@@ -18211,7 +18217,7 @@ msgstr ""
18211
 
18212
  #: includes/settings/wcj-settings-product-price-by-formula.php:26
18213
  #, php-format
18214
- msgid "Use %s variable for product's base price. For example: %s."
18215
  msgstr ""
18216
 
18217
  #: includes/settings/wcj-settings-product-price-by-formula.php:36
@@ -18315,67 +18321,67 @@ msgid ""
18315
  msgstr ""
18316
 
18317
  #: includes/settings/wcj-settings-product-tabs.php:100
18318
- #: includes/settings/wcj-settings-product-tabs.php:317
18319
  msgid "You can use shortcodes here..."
18320
  msgstr ""
18321
 
18322
  #: includes/settings/wcj-settings-product-tabs.php:121
18323
- #: includes/settings/wcj-settings-product-tabs.php:338
18324
  msgid "PRODUCTS to HIDE this tab"
18325
  msgstr ""
18326
 
18327
  #: includes/settings/wcj-settings-product-tabs.php:122
18328
- #: includes/settings/wcj-settings-product-tabs.php:339
18329
  msgid "To hide this tab from some products, enter products here."
18330
  msgstr ""
18331
 
18332
  #: includes/settings/wcj-settings-product-tabs.php:130
18333
- #: includes/settings/wcj-settings-product-tabs.php:347
18334
  msgid "PRODUCTS to SHOW this tab"
18335
  msgstr ""
18336
 
18337
  #: includes/settings/wcj-settings-product-tabs.php:131
18338
- #: includes/settings/wcj-settings-product-tabs.php:348
18339
  msgid "To show this tab only for some products, enter products here."
18340
  msgstr ""
18341
 
18342
  #: includes/settings/wcj-settings-product-tabs.php:139
18343
- #: includes/settings/wcj-settings-product-tabs.php:356
18344
  msgid "CATEGORIES to HIDE this tab"
18345
  msgstr ""
18346
 
18347
  #: includes/settings/wcj-settings-product-tabs.php:140
18348
- #: includes/settings/wcj-settings-product-tabs.php:357
18349
  msgid "To hide this tab from some categories, enter categories here."
18350
  msgstr ""
18351
 
18352
  #: includes/settings/wcj-settings-product-tabs.php:148
18353
- #: includes/settings/wcj-settings-product-tabs.php:365
18354
  msgid "CATEGORIES to SHOW this tab"
18355
  msgstr ""
18356
 
18357
  #: includes/settings/wcj-settings-product-tabs.php:149
18358
- #: includes/settings/wcj-settings-product-tabs.php:366
18359
  msgid "To show this tab only for some categories, enter categories here."
18360
  msgstr ""
18361
 
18362
  #: includes/settings/wcj-settings-product-tabs.php:157
18363
- #: includes/settings/wcj-settings-product-tabs.php:374
18364
  msgid "TAGS to HIDE this tab"
18365
  msgstr ""
18366
 
18367
  #: includes/settings/wcj-settings-product-tabs.php:158
18368
- #: includes/settings/wcj-settings-product-tabs.php:375
18369
  msgid "To hide this tab from some tags, enter tags here."
18370
  msgstr ""
18371
 
18372
  #: includes/settings/wcj-settings-product-tabs.php:166
18373
- #: includes/settings/wcj-settings-product-tabs.php:383
18374
  msgid "TAGS to SHOW this tab"
18375
  msgstr ""
18376
 
18377
  #: includes/settings/wcj-settings-product-tabs.php:167
18378
- #: includes/settings/wcj-settings-product-tabs.php:384
18379
  msgid "To show this tab only for some tags, enter tags here."
18380
  msgstr ""
18381
 
@@ -18403,99 +18409,99 @@ msgstr ""
18403
  msgid "To hide this tab from some categories, enter category IDs here."
18404
  msgstr ""
18405
 
18406
- #: includes/settings/wcj-settings-product-tabs.php:226
18407
  msgid "Comma separated CATEGORY IDs to SHOW this tab"
18408
  msgstr ""
18409
 
18410
- #: includes/settings/wcj-settings-product-tabs.php:227
18411
  msgid "To show this tab only for some categories, enter category IDs here."
18412
  msgstr ""
18413
 
18414
- #: includes/settings/wcj-settings-product-tabs.php:246
18415
  msgid "Custom Product Tabs - Per Product"
18416
  msgstr ""
18417
 
18418
- #: includes/settings/wcj-settings-product-tabs.php:248
18419
  msgid "This section lets you set defaults for per product custom tabs."
18420
  msgstr ""
18421
 
18422
- #: includes/settings/wcj-settings-product-tabs.php:252
18423
  msgid "Enable Per Product Custom Product Tabs"
18424
  msgstr ""
18425
 
18426
- #: includes/settings/wcj-settings-product-tabs.php:260
18427
  msgid "Use Visual Editor"
18428
  msgstr ""
18429
 
18430
- #: includes/settings/wcj-settings-product-tabs.php:267
18431
  msgid "Add Per Product Tabs Content to \"Yoast SEO\" plugin analysis"
18432
  msgstr ""
18433
 
18434
- #: includes/settings/wcj-settings-product-tabs.php:274
18435
  msgid "Default Per Product Custom Product Tabs Number"
18436
  msgstr ""
18437
 
18438
- #: includes/settings/wcj-settings-product-tabs.php:296
18439
  msgid "Default Title"
18440
  msgstr ""
18441
 
18442
- #: includes/settings/wcj-settings-product-tabs.php:303
18443
  msgid "Default Key"
18444
  msgstr ""
18445
 
18446
- #: includes/settings/wcj-settings-product-tabs.php:304
18447
  msgid "The Default unique key for each product tab."
18448
  msgstr ""
18449
 
18450
- #: includes/settings/wcj-settings-product-tabs.php:310
18451
  msgid "Default Priority (i.e. Order)"
18452
  msgstr ""
18453
 
18454
- #: includes/settings/wcj-settings-product-tabs.php:316
18455
  msgid "Default Content"
18456
  msgstr ""
18457
 
18458
- #: includes/settings/wcj-settings-product-tabs.php:324
18459
  msgid "Default Link"
18460
  msgstr ""
18461
 
18462
- #: includes/settings/wcj-settings-product-tabs.php:325
18463
  msgid "Leave blank for default behaviour."
18464
  msgstr ""
18465
 
18466
- #: includes/settings/wcj-settings-product-tabs.php:332
18467
  msgid "Default \"Link - Open in New Window\""
18468
  msgstr ""
18469
 
18470
- #: includes/settings/wcj-settings-product-tabs.php:403
18471
  msgid "WooCommerce Standard Product Tabs Options"
18472
  msgstr ""
18473
 
18474
- #: includes/settings/wcj-settings-product-tabs.php:405
18475
  msgid "This section lets you customize single product tabs."
18476
  msgstr ""
18477
 
18478
- #: includes/settings/wcj-settings-product-tabs.php:409
18479
  msgid "Description Tab"
18480
  msgstr ""
18481
 
18482
- #: includes/settings/wcj-settings-product-tabs.php:410
18483
- #: includes/settings/wcj-settings-product-tabs.php:431
18484
- #: includes/settings/wcj-settings-product-tabs.php:452
18485
  msgid "Remove tab from product page"
18486
  msgstr ""
18487
 
18488
- #: includes/settings/wcj-settings-product-tabs.php:417
18489
- #: includes/settings/wcj-settings-product-tabs.php:438
18490
- #: includes/settings/wcj-settings-product-tabs.php:459
18491
  msgid "Leave blank for WooCommerce defaults"
18492
  msgstr ""
18493
 
18494
- #: includes/settings/wcj-settings-product-tabs.php:430
18495
  msgid "Additional Information Tab"
18496
  msgstr ""
18497
 
18498
- #: includes/settings/wcj-settings-product-tabs.php:451
18499
  msgid "Reviews Tab"
18500
  msgstr ""
18501
 
@@ -19483,7 +19489,7 @@ msgstr ""
19483
 
19484
  #: includes/settings/wcj-settings-sku.php:89
19485
  #, php-format
19486
- msgid "Used in %s, %s, %s and %s."
19487
  msgstr ""
19488
 
19489
  #: includes/settings/wcj-settings-sku.php:103
@@ -19849,7 +19855,7 @@ msgstr ""
19849
 
19850
  #: includes/settings/wcj-settings-stock.php:52
19851
  #, php-format
19852
- msgid "Used only if %s is selected for %s in %s."
19853
  msgstr ""
19854
 
19855
  #: includes/settings/wcj-settings-stock.php:53
@@ -20061,23 +20067,24 @@ msgstr ""
20061
  msgid "Paths"
20062
  msgstr ""
20063
 
20064
- #: includes/settings/wcj-settings-template-editor.php:39
20065
- msgid "One path per line relative to: "
 
20066
  msgstr ""
20067
 
20068
- #: includes/settings/wcj-settings-template-editor.php:51
20069
  msgid "Templates to Edit"
20070
  msgstr ""
20071
 
20072
- #: includes/settings/wcj-settings-template-editor.php:52
20073
  msgid "Save changes after you set this option to see new options fields."
20074
  msgstr ""
20075
 
20076
- #: includes/settings/wcj-settings-template-editor.php:74
20077
  msgid "Default template path"
20078
  msgstr ""
20079
 
20080
- #: includes/settings/wcj-settings-template-editor.php:75
20081
  msgid "Replaced template path"
20082
  msgstr ""
20083
 
@@ -20469,120 +20476,120 @@ msgstr ""
20469
  msgid "Regenerate wpml-config.xml file"
20470
  msgstr ""
20471
 
 
20472
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:60
20473
- #: includes/shipping/class-wc-shipping-wcj-custom.php:46
20474
  msgid "Booster: Custom Shipping Method"
20475
  msgstr ""
20476
 
20477
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:152
20478
- #: includes/shipping/class-wc-shipping-wcj-custom.php:184
20479
- msgid "Max Weight or Quantity"
20480
  msgstr ""
20481
 
20482
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:206
20483
- msgid "Flat rate"
20484
  msgstr ""
20485
 
20486
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:207
20487
- msgid "By total cart weight"
20488
  msgstr ""
20489
 
20490
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:208
20491
- msgid "By total cart weight table"
20492
  msgstr ""
20493
 
20494
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:209
20495
- msgid "By total cart quantity"
 
 
20496
  msgstr ""
20497
 
20498
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:217
20499
- msgid "By total cart quantity table"
20500
  msgstr ""
20501
 
 
20502
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:233
20503
- #: includes/shipping/class-wc-shipping-wcj-custom.php:131
20504
  msgid "Cost calculation type."
20505
  msgstr ""
20506
 
20507
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:234
20508
- #: includes/shipping/class-wc-shipping-wcj-custom.php:110
20509
- #: includes/shipping/class-wc-shipping-wcj-custom.php:131
20510
- msgid "By Total Cart Quantity Table"
20511
- msgstr ""
20512
-
20513
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:243
20514
- #: includes/shipping/class-wc-shipping-wcj-custom.php:139
20515
  msgid ""
20516
  "Cost. If calculating by weight - then cost per one weight unit. If "
20517
  "calculating by quantity - then cost per one piece."
20518
  msgstr ""
20519
 
20520
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:249
20521
- msgid "Cost Rounding"
20522
- msgstr ""
20523
-
20524
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:250
20525
- msgid "How the final cost will be rounded."
20526
- msgstr ""
20527
-
20528
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:262
20529
- #: includes/shipping/class-wc-shipping-wcj-custom.php:148
20530
  msgid "Min Weight"
20531
  msgstr ""
20532
 
 
20533
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:264
20534
- #: includes/shipping/class-wc-shipping-wcj-custom.php:150
20535
  msgid "Minimum total cart weight. Set zero to disable."
20536
  msgstr ""
20537
 
 
20538
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:274
20539
- #: includes/shipping/class-wc-shipping-wcj-custom.php:159
20540
  msgid "Max Weight"
20541
  msgstr ""
20542
 
 
20543
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:276
20544
- #: includes/shipping/class-wc-shipping-wcj-custom.php:161
20545
  msgid "Maximum total cart weight. Set zero to disable."
20546
  msgstr ""
20547
 
20548
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:286
20549
- msgid "Apply Formula and Shortcodes to Costs"
 
20550
  msgstr ""
20551
 
20552
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:289
20553
- #, php-format
20554
- msgid ""
20555
- "You can use %s and %s params in formula, e.g.: %s. Also you can use "
20556
- "shortcodes, e.g.: %s."
20557
  msgstr ""
20558
 
20559
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:302
20560
- #: includes/shipping/class-wc-shipping-wcj-custom.php:170
20561
- msgid "Table Total Rows"
20562
  msgstr ""
20563
 
20564
- #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:304
20565
- msgid "Press \"Save changes\" and reload the page after you change this number."
20566
  msgstr ""
20567
 
20568
- #: includes/shipping/class-wc-shipping-wcj-custom.php:99
20569
- msgid "Flat Rate"
20570
  msgstr ""
20571
 
20572
- #: includes/shipping/class-wc-shipping-wcj-custom.php:100
20573
- msgid "By Total Cart Weight"
20574
  msgstr ""
20575
 
20576
- #: includes/shipping/class-wc-shipping-wcj-custom.php:101
20577
- msgid "By Total Cart Weight Table"
20578
  msgstr ""
20579
 
20580
- #: includes/shipping/class-wc-shipping-wcj-custom.php:102
20581
- msgid "By Total Cart Quantity"
20582
  msgstr ""
20583
 
20584
- #: includes/shipping/class-wc-shipping-wcj-custom.php:118
20585
- msgid "Enable Custom Shipping"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20586
  msgstr ""
20587
 
20588
  #: includes/shortcodes/class-wcj-general-shortcodes.php:104
@@ -20597,7 +20604,7 @@ msgstr ""
20597
  msgid "Attribute \"name\" is required!"
20598
  msgstr ""
20599
 
20600
- #: includes/shortcodes/class-wcj-orders-shortcodes.php:393
20601
  #, php-format
20602
  msgid "Refund #%1$s - %2$s"
20603
  msgstr ""
@@ -20615,7 +20622,7 @@ msgid "Product exists!"
20615
  msgstr ""
20616
 
20617
  #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:195
20618
- #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:423
20619
  msgid "Product URL"
20620
  msgstr ""
20621
 
@@ -20628,32 +20635,32 @@ msgstr ""
20628
  msgid "Sale price must be less than the regular price!"
20629
  msgstr ""
20630
 
20631
- #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:306
20632
  msgid "Error!"
20633
  msgstr ""
20634
 
20635
- #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:349
20636
  msgid "Add New Product"
20637
  msgstr ""
20638
 
20639
- #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:349
20640
  msgid "Edit Product"
20641
  msgstr ""
20642
 
20643
- #: includes/shortcodes/class-wcj-products-shortcodes.php:348
20644
  #, php-format
20645
  msgid "%s ago"
20646
  msgstr ""
20647
 
20648
- #: includes/shortcodes/class-wcj-products-shortcodes.php:355
20649
  msgid "No sales yet."
20650
  msgstr ""
20651
 
20652
- #: includes/shortcodes/class-wcj-products-shortcodes.php:642
20653
  msgid "In stock"
20654
  msgstr ""
20655
 
20656
- #: includes/shortcodes/class-wcj-products-shortcodes.php:1136
20657
  msgid "from %level_min_qty% pcs."
20658
  msgstr ""
20659
 
@@ -20661,29 +20668,29 @@ msgstr ""
20661
  msgid "This product is currently out of stock and unavailable."
20662
  msgstr ""
20663
 
20664
- #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:54
20665
- #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:82
20666
  msgid "VAT"
20667
  msgstr ""
20668
 
20669
- #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:89
20670
  msgid "Add EU Countries VAT Rates"
20671
  msgstr ""
20672
 
20673
- #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:89
20674
  msgid "Note: will add duplicates."
20675
  msgstr ""
20676
 
20677
- #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:97
20678
  msgid "List of EU VAT rates to be added"
20679
  msgstr ""
20680
 
20681
- #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:103
20682
- #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:123
20683
  msgid "Rate"
20684
  msgstr ""
20685
 
20686
- #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:117
20687
  msgid "Current standard tax rates"
20688
  msgstr ""
20689
 
@@ -20740,17 +20747,17 @@ msgid "%s status delete failed!"
20740
  msgstr ""
20741
 
20742
  #: includes/tools/class-wcj-order-statuses-tool.php:188
20743
- #: includes/tools/class-wcj-order-statuses-tool.php:268
20744
  msgid "Icon Code"
20745
  msgstr ""
20746
 
20747
  #: includes/tools/class-wcj-order-statuses-tool.php:189
20748
- #: includes/tools/class-wcj-order-statuses-tool.php:269
20749
  msgid "Color"
20750
  msgstr ""
20751
 
20752
  #: includes/tools/class-wcj-order-statuses-tool.php:190
20753
- #: includes/tools/class-wcj-order-statuses-tool.php:270
20754
  msgid "Text Color"
20755
  msgstr ""
20756
 
@@ -20758,19 +20765,19 @@ msgstr ""
20758
  msgid "Get Booster Plus to enable."
20759
  msgstr ""
20760
 
20761
- #: includes/tools/class-wcj-order-statuses-tool.php:261
20762
  msgid "Edit custom status"
20763
  msgstr ""
20764
 
20765
- #: includes/tools/class-wcj-order-statuses-tool.php:261
20766
  msgid "Add new custom status"
20767
  msgstr ""
20768
 
20769
- #: includes/tools/class-wcj-order-statuses-tool.php:266
20770
  msgid "Slug (without <code>wc-</code> prefix)"
20771
  msgstr ""
20772
 
20773
- #: includes/tools/class-wcj-order-statuses-tool.php:327
20774
  msgid "Delete All Custom Statuses"
20775
  msgstr ""
20776
 
21
  "X-Poedit-SearchPathExcluded-1: .idea\n"
22
  "X-Poedit-SearchPathExcluded-2: .git\n"
23
 
24
+ #: includes/add-to-cart/class-wcj-add-to-cart-per-product.php:99
25
  msgid "Booster: Custom Add to Cart"
26
  msgstr ""
27
 
28
+ #: includes/add-to-cart/class-wcj-add-to-cart-per-product.php:117
29
  msgid "Single product view"
30
  msgstr ""
31
 
32
+ #: includes/add-to-cart/class-wcj-add-to-cart-per-product.php:118
33
  msgid "Product category (archive) view"
34
  msgstr ""
35
 
36
  #: includes/admin/class-wc-settings-jetpack.php:33
37
+ #: includes/admin/class-wc-settings-jetpack.php:400
38
  #: includes/class-wcj-admin-bar.php:299
39
  #: includes/class-wcj-checkout-files-upload.php:270
40
+ #: includes/class-wcj-eu-vat-number.php:179
41
+ #: includes/class-wcj-max-products-per-user.php:217
42
+ #: includes/class-wcj-orders.php:133 includes/class-wcj-orders.php:170
43
+ #: includes/class-wcj-payment-gateways.php:102
44
+ #: includes/class-wcj-track-users.php:174 includes/class-wcj-track-users.php:265
45
+ #: includes/classes/class-wcj-module.php:672
46
+ #: includes/classes/class-wcj-module.php:881
47
  #: includes/settings/wcj-settings-price-by-country.php:259
48
  msgid "Booster"
49
  msgstr ""
50
 
51
+ #: includes/admin/class-wc-settings-jetpack.php:88
52
  #, php-format
53
  msgid ""
54
  "You're using Booster free version. To unlock more features please consider <a "
55
  "target=\"_blank\" href=\"%s\">Upgrade Booster to unlock this feature</a>."
56
  msgstr ""
57
 
58
+ #: includes/admin/class-wc-settings-jetpack.php:113
59
  #, php-format
60
  msgid ""
61
+ "Please rate <strong>Booster for WooCommerce</strong> %1$s on <a href=\"%2$s\" "
62
  "target=\"_blank\">WordPress.org</a> to help us spread the word. Thank you "
63
  "from Booster team!"
64
  msgstr ""
65
 
66
+ #: includes/admin/class-wc-settings-jetpack.php:172
67
  #, php-format
68
  msgid ""
69
+ "Please rate <strong>Booster for WooCommerce</strong> %1$s on <a href=\"%2$s"
70
+ "\" target=\"_blank\">WordPress.org</a> to help us spread the word. Thank you "
71
  "from Booster team!"
72
  msgstr ""
73
 
74
+ #: includes/admin/class-wc-settings-jetpack.php:253
75
+ #: includes/admin/class-wc-settings-jetpack.php:319
76
+ #: includes/admin/class-wc-settings-jetpack.php:937
77
  #: includes/admin/wcj-modules-cats.php:17 includes/class-wcj-admin-bar.php:234
78
  #: includes/class-wcj-my-account.php:39
79
  msgid "Dashboard"
80
  msgstr ""
81
 
82
+ #: includes/admin/class-wc-settings-jetpack.php:254
83
  msgid "All Module"
84
  msgstr ""
85
 
86
+ #: includes/admin/class-wc-settings-jetpack.php:255
87
  msgid "Active Modules"
88
  msgstr ""
89
 
90
+ #: includes/admin/class-wc-settings-jetpack.php:256
91
  #: includes/class-wcj-admin-bar.php:167
92
  msgid "Manage Settings"
93
  msgstr ""
94
 
95
+ #: includes/admin/class-wc-settings-jetpack.php:367
96
  #, php-format
97
  msgid ""
98
+ "Please note that current <em>%1$s</em> module is deprecated and will be "
99
+ "removed in future updates. Please use <em>%2$s</em> module instead."
100
  msgstr ""
101
 
102
+ #: includes/admin/class-wc-settings-jetpack.php:373
103
  msgid "Module will be removed from the module's list as soon as you disable it."
104
  msgstr ""
105
 
106
+ #: includes/admin/class-wc-settings-jetpack.php:385
107
  #, php-format
108
  msgid ""
109
  "Please note that <em>%s</em> module is currently under development. Until "
111
  "be moved to paid plugin version."
112
  msgstr ""
113
 
114
+ #: includes/admin/class-wc-settings-jetpack.php:396
115
  #: includes/class-wcj-admin-bar.php:411
116
  #: includes/settings/wcj-settings-emails-verification.php:152
117
  #: includes/settings/wcj-settings-price-by-country.php:258
118
  msgid "WooCommerce"
119
  msgstr ""
120
 
121
+ #: includes/admin/class-wc-settings-jetpack.php:398
122
+ #: includes/admin/class-wc-settings-jetpack.php:629
123
  #: includes/class-wcj-admin-bar.php:184 includes/class-wcj-admin-bar.php:535
124
+ #: includes/class-wcj-admin-bar.php:635 includes/core/class-wcj-admin.php:143
125
  msgid "Settings"
126
  msgstr ""
127
 
128
+ #: includes/admin/class-wc-settings-jetpack.php:455
129
  msgid ""
130
  "This section lets you export, import or reset all Booster's modules settings."
131
  msgstr ""
132
 
133
+ #: includes/admin/class-wc-settings-jetpack.php:483
134
+ #: includes/admin/class-wc-settings-jetpack.php:1055
135
  #: includes/class-wcj-export-import.php:31
136
  msgid "Export"
137
  msgstr ""
138
 
139
+ #: includes/admin/class-wc-settings-jetpack.php:484
140
  msgid "Export all Booster's options to a file."
141
  msgstr ""
142
 
143
+ #: includes/admin/class-wc-settings-jetpack.php:487
144
+ #: includes/admin/class-wc-settings-jetpack.php:1046
145
+ #: includes/class-wcj-purchase-data.php:124
146
  msgid "Import"
147
  msgstr ""
148
 
149
+ #: includes/admin/class-wc-settings-jetpack.php:489
150
  msgid "Import all Booster's options from a file."
151
  msgstr ""
152
 
153
+ #: includes/admin/class-wc-settings-jetpack.php:493
154
  msgid ""
155
  "This will reset settings to defaults for all Booster modules. Are you sure?"
156
  msgstr ""
157
 
158
+ #: includes/admin/class-wc-settings-jetpack.php:494
159
+ #: includes/admin/class-wc-settings-jetpack.php:1066
160
  msgid "Reset"
161
  msgstr ""
162
 
163
+ #: includes/admin/class-wc-settings-jetpack.php:495
164
  msgid "Reset all Booster's options."
165
  msgstr ""
166
 
167
+ #: includes/admin/class-wc-settings-jetpack.php:499
168
  msgid "This will delete all Booster meta. Are you sure?"
169
  msgstr ""
170
 
171
+ #: includes/admin/class-wc-settings-jetpack.php:500
172
+ #: includes/admin/class-wc-settings-jetpack.php:1075
173
  msgid "Reset meta"
174
  msgstr ""
175
 
176
+ #: includes/admin/class-wc-settings-jetpack.php:501
177
  msgid "Reset all Booster's meta."
178
  msgstr ""
179
 
180
+ #: includes/admin/class-wc-settings-jetpack.php:554
181
  msgid "Version"
182
  msgstr ""
183
 
184
+ #: includes/admin/class-wc-settings-jetpack.php:581
185
+ #: includes/admin/class-wc-settings-jetpack.php:590
186
  msgid "Select All"
187
  msgstr ""
188
 
189
+ #: includes/admin/class-wc-settings-jetpack.php:583
190
+ #: includes/admin/class-wc-settings-jetpack.php:591
191
  msgid "Module"
192
  msgstr ""
193
 
194
+ #: includes/admin/class-wc-settings-jetpack.php:585
195
+ #: includes/admin/class-wc-settings-jetpack.php:594
196
  #: includes/export/class-wcj-export-fields-helper.php:297
197
  #: includes/gateways/class-wc-gateway-wcj-custom.php:67
198
  #: includes/settings/wcj-settings-checkout-custom-fields.php:181
199
  #: includes/settings/wcj-settings-eu-vat-number.php:37
200
  #: includes/settings/wcj-settings-product-by-user.php:16
201
  #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:190
202
+ #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:372
203
  msgid "Description"
204
  msgstr ""
205
 
206
+ #: includes/admin/class-wc-settings-jetpack.php:631
207
+ #: includes/admin/class-wc-settings-jetpack.php:1084
208
  #: includes/class-wcj-admin-bar.php:188
209
+ #: includes/classes/class-wcj-module.php:1029
210
  msgid "Documentation"
211
  msgstr ""
212
 
213
+ #: includes/admin/class-wc-settings-jetpack.php:642
214
  msgid "No active modules found."
215
  msgstr ""
216
 
217
+ #: includes/admin/class-wc-settings-jetpack.php:648
218
  msgid "Total Modules:"
219
  msgstr ""
220
 
221
+ #: includes/admin/class-wc-settings-jetpack.php:712
222
  msgid "Autoload Booster's Options"
223
  msgstr ""
224
 
225
+ #: includes/admin/class-wc-settings-jetpack.php:714
226
  msgid ""
227
  "Choose if you want Booster's options to be autoloaded when calling "
228
  "add_option. After saving this option, you need to Reset all Booster's "
229
  "settings. Leave default value (i.e. Enabled) if not sure."
230
  msgstr ""
231
 
232
+ #: includes/admin/class-wc-settings-jetpack.php:719
233
  msgid "Load Modules on Init Hook"
234
  msgstr ""
235
 
236
+ #: includes/admin/class-wc-settings-jetpack.php:721
237
  msgid "Choose if you want to load Booster Modules on Init hook."
238
  msgstr ""
239
 
240
+ #: includes/admin/class-wc-settings-jetpack.php:721
241
  msgid ""
242
  "It will load the locale appropriately if users change it from the profile "
243
  "page."
244
  msgstr ""
245
 
246
+ #: includes/admin/class-wc-settings-jetpack.php:726
247
  msgid "Use List Instead of Comma Separated Text for Products in Settings"
248
  msgstr ""
249
 
250
+ #: includes/admin/class-wc-settings-jetpack.php:730
251
+ #: includes/admin/class-wc-settings-jetpack.php:751
252
+ #: includes/admin/class-wc-settings-jetpack.php:767
253
  #, php-format
254
  msgid "Supported modules: %s."
255
  msgstr ""
256
 
257
+ #: includes/admin/class-wc-settings-jetpack.php:734
258
  #: includes/class-wcj-payment-gateways-per-category.php:31
259
  msgid "Gateways per Product or Category"
260
  msgstr ""
261
 
262
+ #: includes/admin/class-wc-settings-jetpack.php:735
263
  #: includes/class-wcj-global-discount.php:38
264
  #: includes/settings/wcj-settings-product-addons.php:275
265
  msgid "Global Discount"
266
  msgstr ""
267
 
268
+ #: includes/admin/class-wc-settings-jetpack.php:736
269
+ #: includes/admin/class-wc-settings-jetpack.php:755
270
+ #: includes/admin/class-wc-settings-jetpack.php:771
271
  #: includes/class-wcj-product-custom-info.php:29
272
+ #: includes/functions/wcj-functions-general.php:488
273
  msgid "Product Info"
274
  msgstr ""
275
 
276
+ #: includes/admin/class-wc-settings-jetpack.php:737
277
  #: includes/admin/wcj-welcome-screen-content.php:82
278
  #: includes/class-wcj-product-input-fields.php:29
279
+ #: includes/input-fields/class-wcj-product-input-fields-core.php:214
280
  msgid "Product Input Fields"
281
  msgstr ""
282
 
283
+ #: includes/admin/class-wc-settings-jetpack.php:738
284
  msgid "Products XML"
285
  msgstr ""
286
 
287
+ #: includes/admin/class-wc-settings-jetpack.php:739
288
  #: includes/class-wcj-related-products.php:52
289
  #: includes/settings/meta-box/wcj-settings-meta-box-related-products.php:33
290
  #: includes/settings/wcj-settings-free-price.php:23
291
  msgid "Related Products"
292
  msgstr ""
293
 
294
+ #: includes/admin/class-wc-settings-jetpack.php:747
295
  msgid ""
296
  "Use List Instead of Comma Separated Text for Products Categories in Settings"
297
  msgstr ""
298
 
299
+ #: includes/admin/class-wc-settings-jetpack.php:763
300
  msgid "Use List Instead of Comma Separated Text for Products Tags in Settings"
301
  msgstr ""
302
 
303
+ #: includes/admin/class-wc-settings-jetpack.php:802
304
+ #: includes/core/class-wcj-admin.php:127
305
  msgid "Booster for WooCommerce"
306
  msgstr ""
307
 
308
+ #: includes/admin/class-wc-settings-jetpack.php:896
309
  msgid "Need Help?"
310
  msgstr ""
311
 
312
+ #: includes/admin/class-wc-settings-jetpack.php:923
313
  #: includes/class-wcj-my-account.php:32
314
  msgid "My Account"
315
  msgstr ""
316
 
317
+ #: includes/admin/class-wc-settings-jetpack.php:927
318
  msgid "Get Booster Plus"
319
  msgstr ""
320
 
321
+ #: includes/admin/class-wc-settings-jetpack.php:934
322
  msgid "Getting Started"
323
  msgstr ""
324
 
325
+ #: includes/admin/class-wc-settings-jetpack.php:938
326
  msgid "Navigating Categories"
327
  msgstr ""
328
 
329
+ #: includes/admin/class-wc-settings-jetpack.php:939
330
  msgid "How to get started with booster"
331
  msgstr ""
332
 
333
+ #: includes/admin/class-wc-settings-jetpack.php:944
334
  msgid "Frequently Asked Questions"
335
  msgstr ""
336
 
337
+ #: includes/admin/class-wc-settings-jetpack.php:949
338
  msgid "Do I need to have coding skills to use Booster Plus?"
339
  msgstr ""
340
 
341
+ #: includes/admin/class-wc-settings-jetpack.php:953
342
  msgid ""
343
  "Absolutely not. You can configure pretty much everything Booster Plus has to "
344
  "offer without any coding knowledge."
345
  msgstr ""
346
 
347
+ #: includes/admin/class-wc-settings-jetpack.php:958
348
  msgid "Will Booster Plus slow down my website?"
349
  msgstr ""
350
 
351
+ #: includes/admin/class-wc-settings-jetpack.php:962
352
  msgid ""
353
  "Absolutely not. Booster Plus is carefully built with performance in mind."
354
  msgstr ""
355
 
356
+ #: includes/admin/class-wc-settings-jetpack.php:967
357
  msgid "Do you offer refunds?"
358
  msgstr ""
359
 
360
+ #: includes/admin/class-wc-settings-jetpack.php:971
361
  #, php-format
362
  msgid ""
363
  "If you are not completely satisfied with Booster Plus within the fist 30 "
365
  "no questions asked."
366
  msgstr ""
367
 
368
+ #: includes/admin/class-wc-settings-jetpack.php:976
369
  msgid "Can I use Booster Plus on client sites?"
370
  msgstr ""
371
 
372
+ #: includes/admin/class-wc-settings-jetpack.php:980
373
  msgid ""
374
  "Yes, you can use Booster Plus on client sites. You can purchase the multiple "
375
  "sites license of Booster Plus."
376
  msgstr ""
377
 
378
+ #: includes/admin/class-wc-settings-jetpack.php:985
379
  msgid "Do you have an affiliate program?"
380
  msgstr ""
381
 
382
+ #: includes/admin/class-wc-settings-jetpack.php:989
383
  msgid "Yes, We do have an affiliate program. "
384
  msgstr ""
385
 
386
+ #: includes/admin/class-wc-settings-jetpack.php:989
387
  msgid "Click here"
388
  msgstr ""
389
 
390
+ #: includes/admin/class-wc-settings-jetpack.php:989
391
  msgid " for the details."
392
  msgstr ""
393
 
394
+ #: includes/admin/class-wc-settings-jetpack.php:994
395
  msgid ""
396
  "Why should I choose the Booster Plus suite over other individual plugins?"
397
  msgstr ""
398
 
399
+ #: includes/admin/class-wc-settings-jetpack.php:998
400
  msgid ""
401
  "Oh, that's an easy one! Implementing just a few modules from the Booster Plus "
402
  "suite is more cost-effective than using dozens of individual plugins often "
408
  "your WooCommerce site easily."
409
  msgstr ""
410
 
411
+ #: includes/admin/class-wc-settings-jetpack.php:1003
412
  msgid "What features does Booster Plus have?"
413
  msgstr ""
414
 
415
+ #: includes/admin/class-wc-settings-jetpack.php:1007
416
  msgid "You can see all the features at "
417
  msgstr ""
418
 
419
+ #: includes/admin/class-wc-settings-jetpack.php:1007
420
  msgid "About Booster"
421
  msgstr ""
422
 
423
+ #: includes/admin/class-wc-settings-jetpack.php:1007
424
  msgid " page."
425
  msgstr ""
426
 
427
+ #: includes/admin/class-wc-settings-jetpack.php:1011
428
  msgid "Still have a question?"
429
  msgstr ""
430
 
431
+ #: includes/admin/class-wc-settings-jetpack.php:1012
432
  msgid "CONTACT BOOSTER SUPPORT"
433
  msgstr ""
434
 
435
+ #: includes/admin/class-wc-settings-jetpack.php:1018
436
  msgid "Connect with Booster"
437
  msgstr ""
438
 
439
+ #: includes/admin/class-wc-settings-jetpack.php:1022
440
  msgid "BOOSTER WEBSITE"
441
  msgstr ""
442
 
443
+ #: includes/admin/class-wc-settings-jetpack.php:1036
444
+ #: includes/class-wcj-general.php:244 includes/class-wcj-product-by-user.php:278
445
  #: includes/settings/wcj-settings-pdf-invoicing-advanced.php:166
446
  #: includes/tools/class-wcj-order-statuses-tool.php:191
447
+ #: includes/tools/class-wcj-order-statuses-tool.php:275
448
  msgid "Actions"
449
  msgstr ""
450
 
451
+ #: includes/admin/class-wc-settings-jetpack.php:1047
452
  msgid "Import Booster options"
453
  msgstr ""
454
 
455
+ #: includes/admin/class-wc-settings-jetpack.php:1056
456
  msgid "Export Booster options"
457
  msgstr ""
458
 
459
+ #: includes/admin/class-wc-settings-jetpack.php:1067
460
  msgid "Reset all Booster's options"
461
  msgstr ""
462
 
463
+ #: includes/admin/class-wc-settings-jetpack.php:1076
464
  msgid "Reset all Booster's meta"
465
  msgstr ""
466
 
467
+ #: includes/admin/class-wc-settings-jetpack.php:1091
468
  msgid "Here you can find all documentation of Booster"
469
  msgstr ""
470
 
471
+ #: includes/admin/class-wc-settings-jetpack.php:1093
472
  msgid "See Documentation"
473
  msgstr ""
474
 
475
+ #: includes/admin/class-wc-settings-jetpack.php:1100
476
  msgid "Latest updates"
477
  msgstr ""
478
 
479
+ #: includes/admin/class-wc-settings-jetpack.php:1103
480
  msgid "Version "
481
  msgstr ""
482
 
483
+ #: includes/admin/class-wc-settings-jetpack.php:1108
484
  msgid "SEE MORE"
485
  msgstr ""
486
 
487
+ #: includes/admin/class-wc-settings-jetpack.php:1119
488
+ #: includes/core/class-wcj-admin.php:101
489
  msgid "Please rate "
490
  msgstr ""
491
 
492
+ #: includes/admin/class-wc-settings-jetpack.php:1119
493
+ #: includes/core/class-wcj-admin.php:101
494
  msgid "Booster for Woocommerce"
495
  msgstr ""
496
 
497
+ #: includes/admin/class-wc-settings-jetpack.php:1127
498
+ #: includes/core/class-wcj-admin.php:109
499
  msgid "WordPress.org"
500
  msgstr ""
501
 
502
+ #: includes/admin/class-wc-settings-jetpack.php:1127
503
+ #: includes/core/class-wcj-admin.php:109
504
  msgid " to help us spread the word. Thank you from Booster team!"
505
  msgstr ""
506
 
507
+ #: includes/admin/class-wc-settings-jetpack.php:1131
508
  msgid "Upgrade today to unlock these popular premium features:"
509
  msgstr ""
510
 
511
+ #: includes/admin/class-wc-settings-jetpack.php:1133
512
  msgid "+ PDF Invoices and Packing slips –"
513
  msgstr ""
514
 
515
+ #: includes/admin/class-wc-settings-jetpack.php:1133
516
  msgid ""
517
  "Add ability to create Proforma Invoices, Credit Notes and Packaging slips"
518
  msgstr ""
519
 
520
+ #: includes/admin/class-wc-settings-jetpack.php:1134
521
  msgid "+ Empty Cart –"
522
  msgstr ""
523
 
524
+ #: includes/admin/class-wc-settings-jetpack.php:1134
525
  msgid ""
526
  "customize empty cart button text, different button positions on cart page"
527
  msgstr ""
528
 
529
+ #: includes/admin/class-wc-settings-jetpack.php:1135
530
  msgid "+ Cart and checkout –"
531
  msgstr ""
532
 
533
+ #: includes/admin/class-wc-settings-jetpack.php:1135
534
  msgid "add multiple – custom fields, custom info blocks, check out file uploads"
535
  msgstr ""
536
 
537
+ #: includes/admin/class-wc-settings-jetpack.php:1136
538
  msgid "+ Mini cart –"
539
  msgstr ""
540
 
541
+ #: includes/admin/class-wc-settings-jetpack.php:1136
542
  msgid "More custom information options"
543
  msgstr ""
544
 
545
+ #: includes/admin/class-wc-settings-jetpack.php:1137
546
  msgid "+ Prices and currencies –"
547
  msgstr ""
548
 
549
+ #: includes/admin/class-wc-settings-jetpack.php:1137
550
  msgid "add more unlimited number of currencies to WooCommerce"
551
  msgstr ""
552
 
553
+ #: includes/admin/class-wc-settings-jetpack.php:1138
554
  msgid "+ Export options –"
555
  msgstr ""
556
 
557
+ #: includes/admin/class-wc-settings-jetpack.php:1138
558
  msgid "more fields enabled"
559
  msgstr ""
560
 
561
+ #: includes/admin/class-wc-settings-jetpack.php:1139
562
  msgid "+ Add to cart –"
563
  msgstr ""
564
 
565
+ #: includes/admin/class-wc-settings-jetpack.php:1139
566
  msgid ""
567
  "customize add to cart messages, Button labels - multiple category groups "
568
  "allowed+ +"
569
  msgstr ""
570
 
571
+ #: includes/admin/class-wc-settings-jetpack.php:1140
572
  msgid "+ More configuration options for payments and shipping"
573
  msgstr ""
574
 
575
+ #: includes/admin/class-wc-settings-jetpack.php:1143
576
  msgid "Upgrade to Booster Plus"
577
  msgstr ""
578
 
579
  #: includes/admin/class-wcj-settings-custom-fields.php:79
580
  #, php-format
581
+ msgid "Grab raw %1$s rate from %2$s."
582
  msgstr ""
583
 
584
  #: includes/admin/class-wcj-settings-custom-fields.php:80
585
  msgid "Doesn't apply rounding, offset etc."
586
  msgstr ""
587
 
588
+ #: includes/admin/class-wcj-settings-custom-fields.php:351
589
  msgid "Save changes"
590
  msgstr ""
591
 
592
+ #: includes/admin/class-wcj-settings-manager.php:68
593
  msgid "Please upload a file to import!"
594
  msgstr ""
595
 
596
+ #: includes/admin/class-wcj-settings-manager.php:81
597
+ #: includes/admin/class-wcj-settings-manager.php:86
598
  msgid "Wrong file format!"
599
  msgstr ""
600
 
601
+ #: includes/admin/class-wcj-settings-manager.php:96
602
  #, php-format
603
  msgid "%d options successfully imported."
604
  msgstr ""
605
 
606
+ #: includes/admin/class-wcj-settings-manager.php:152
607
  #, php-format
608
  msgid "%d meta successfully deleted."
609
  msgstr ""
610
 
611
+ #: includes/admin/class-wcj-settings-manager.php:171
612
  #, php-format
613
  msgid "%d options successfully deleted."
614
  msgstr ""
615
 
616
+ #: includes/admin/class-wcj-tools.php:59
617
  msgid "Booster for WooCommerce Tools"
618
  msgstr ""
619
 
620
+ #: includes/admin/class-wcj-tools.php:60
621
  msgid "Booster Tools"
622
  msgstr ""
623
 
624
+ #: includes/admin/class-wcj-tools.php:81
625
  msgid "Tools Dashboard"
626
  msgstr ""
627
 
628
+ #: includes/admin/class-wcj-tools.php:108
629
  msgid "Booster for WooCommerce Tools - Dashboard"
630
  msgstr ""
631
 
632
+ #: includes/admin/class-wcj-tools.php:109
633
  msgid ""
634
  "This dashboard lets you check statuses and short descriptions of all "
635
  "available Booster for WooCommerce tools. Tools can be enabled through "
637
  "above."
638
  msgstr ""
639
 
640
+ #: includes/admin/class-wcj-welcome.php:56
641
+ #: includes/admin/class-wcj-welcome.php:57
642
  msgid "Welcome to Booster"
643
  msgstr ""
644
 
670
 
671
  #: includes/admin/wcj-modules-cats.php:61 includes/class-wcj-admin-bar.php:493
672
  #: includes/class-wcj-admin-bar.php:497 includes/class-wcj-admin-bar.php:543
673
+ #: includes/class-wcj-product-bulk-meta-editor.php:294
674
+ #: includes/class-wcj-product-by-user.php:176
675
+ #: includes/class-wcj-product-by-user.php:213
676
  #: includes/class-wcj-shipping-by-products.php:40
677
  #: includes/settings/wcj-settings-reports.php:181
678
  #: includes/settings/wcj-settings-shipping-options.php:77
882
  msgid "Don't miss updates from us!"
883
  msgstr ""
884
 
885
+ #: includes/admin/wcj-welcome-screen-content.php:150
886
+ msgid "Thank you for subscribing your email"
887
+ msgstr ""
888
+
889
+ #: includes/admin/wcj-welcome-screen-content.php:152
890
+ msgid "You have already subscribed your email"
891
+ msgstr ""
892
+
893
+ #: includes/admin/wcj-welcome-screen-content.php:154
894
+ msgid "Something went wrong with your subscription. Please after some time !"
895
  msgstr ""
896
 
897
+ #: includes/admin/wcj-welcome-screen-content.php:162
898
  msgid "Contact Us"
899
  msgstr ""
900
 
901
+ #: includes/admin/wcj-welcome-screen-content.php:164
902
  msgid ""
903
  "Booster Plus customers get access to Premium Support and we respond within 24 "
904
  "business hours."
905
  msgstr ""
906
 
907
+ #: includes/admin/wcj-welcome-screen-content.php:165
908
  msgid "Booster Plus Premium Support"
909
  msgstr ""
910
 
911
+ #: includes/admin/wcj-welcome-screen-content.php:168
912
  msgid ""
913
  "Free users post on WordPress Plugin Support forum here. We check these "
914
  "threads twice every week Mon and Frid to respond."
915
  msgstr ""
916
 
917
+ #: includes/admin/wcj-welcome-screen-content.php:169
918
  msgid "Booster Free Plugin Support"
919
  msgstr ""
920
 
993
 
994
  #: includes/class-wcj-admin-bar.php:267 includes/class-wcj-admin-bar.php:311
995
  #: includes/class-wcj-admin-bar.php:659
996
+ #: includes/classes/class-wcj-module.php:852
997
  #: includes/settings/wcj-settings-wpml.php:97
998
  msgid "Tools"
999
  msgstr ""
1047
 
1048
  #: includes/class-wcj-admin-bar.php:353
1049
  #: includes/functions/wcj-functions-reports.php:50
1050
+ #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:146
1051
  msgid "Year"
1052
  msgstr ""
1053
 
1058
  #: includes/class-wcj-admin-bar.php:418 includes/class-wcj-admin-bar.php:422
1059
  #: includes/class-wcj-admin-bar.php:440 includes/class-wcj-my-account.php:40
1060
  #: includes/class-wcj-my-account.php:48 includes/class-wcj-orders.php:31
1061
+ #: includes/reports/wcj-class-reports-sales-gateways.php:183
1062
  #: includes/settings/wcj-settings-reports.php:24
1063
  #: includes/settings/wcj-settings-reports.php:62
1064
  #: includes/settings/wcj-settings-reports.php:103
1089
  msgstr ""
1090
 
1091
  #: includes/class-wcj-admin-bar.php:459 includes/class-wcj-stock.php:35
1092
+ #: includes/reports/class-wcj-reports-stock.php:292
1093
  #: includes/settings/wcj-settings-reports.php:159
1094
  #: includes/settings/wcj-settings-reports.php:165
1095
  #: includes/settings/wcj-settings-reports.php:171
1103
  #: includes/class-wcj-admin-bar.php:467
1104
  #: includes/settings/wcj-settings-offer-price.php:53
1105
  #: includes/settings/wcj-settings-stock.php:111
1106
+ #: includes/shortcodes/class-wcj-products-shortcodes.php:646
1107
  msgid "Out of stock"
1108
  msgstr ""
1109
 
1111
  msgid "Most Stocked"
1112
  msgstr ""
1113
 
1114
+ #: includes/class-wcj-admin-bar.php:477 includes/class-wcj-eu-vat-number.php:243
1115
  msgid "Taxes"
1116
  msgstr ""
1117
 
1127
  msgid "Add product"
1128
  msgstr ""
1129
 
1130
+ #: includes/class-wcj-admin-bar.php:505 includes/class-wcj-sku.php:711
1131
  #: includes/export/class-wcj-export-fields-helper.php:322
1132
  #: includes/settings/wcj-settings-product-by-user.php:22
1133
  #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:196
1134
+ #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:436
1135
  msgid "Categories"
1136
  msgstr ""
1137
 
1139
  #: includes/export/class-wcj-export-fields-helper.php:323
1140
  #: includes/settings/wcj-settings-product-by-user.php:23
1141
  #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:197
1142
+ #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:446
1143
  msgid "Tags"
1144
  msgstr ""
1145
 
1284
  msgid "Not Completed"
1285
  msgstr ""
1286
 
1287
+ #: includes/class-wcj-admin-orders-list.php:264
1288
  msgid "Trash"
1289
  msgstr ""
1290
 
1291
+ #: includes/class-wcj-admin-orders-list.php:362
1292
  #: includes/class-wcj-product-by-country.php:192
1293
  #: includes/class-wcj-product-by-country.php:228
1294
  msgid "All countries"
1295
  msgstr ""
1296
 
1297
+ #: includes/class-wcj-admin-orders-list.php:371
1298
  msgid "All currencies"
1299
  msgstr ""
1300
 
1301
+ #: includes/class-wcj-admin-orders-list.php:413
1302
  #: includes/export/class-wcj-export-fields-helper.php:52
1303
  #: includes/export/class-wcj-export-fields-helper.php:136
1304
  #: includes/export/class-wcj-export-fields-helper.php:219
1306
  msgid "Billing Country"
1307
  msgstr ""
1308
 
1309
+ #: includes/class-wcj-admin-orders-list.php:416
1310
  #: includes/settings/wcj-settings-admin-orders-list.php:37
1311
  msgid "Currency Code"
1312
  msgstr ""
1373
  msgid "Item Meta Value"
1374
  msgstr ""
1375
 
1376
+ #: includes/class-wcj-admin-tools.php:290 includes/class-wcj-admin-tools.php:339
1377
+ #: includes/class-wcj-admin-tools.php:349
1378
+ #: includes/class-wcj-product-bulk-meta-editor.php:383
1379
+ #: includes/class-wcj-sku.php:710
1380
+ #: includes/reports/class-wcj-reports-sales.php:212
1381
+ #: includes/reports/class-wcj-reports-stock.php:289
1382
  msgid "Product"
1383
  msgstr ""
1384
 
1385
+ #: includes/class-wcj-admin-tools.php:291 includes/class-wcj-admin-tools.php:340
1386
+ #: includes/class-wcj-admin-tools.php:350
1387
+ #: includes/reports/class-wcj-reports-stock.php:290
1388
  msgid "Category"
1389
  msgstr ""
1390
 
1391
+ #: includes/class-wcj-admin-tools.php:368
1392
  msgid "Total Products:"
1393
  msgstr ""
1394
 
1492
  #: includes/class-wcj-checkout-custom-fields.php:48
1493
  #: includes/class-wcj-product-input-fields.php:45
1494
  #, php-format
1495
+ msgid "<strong>PHP code:</strong> by using %1$s function,<br> e.g.: %2$s"
1496
  msgstr ""
1497
 
1498
  #: includes/class-wcj-checkout-custom-info.php:30
1554
  msgid "Add fees to WooCommerce cart & checkout."
1555
  msgstr ""
1556
 
1557
+ #: includes/class-wcj-checkout-fees.php:257
1558
  #: includes/settings/wcj-settings-checkout-fees.php:46
1559
  #: includes/settings/wcj-settings-checkout-fees.php:67
1560
  msgid "Fee"
1589
 
1590
  #: includes/class-wcj-checkout-files-upload.php:232
1591
  #: includes/class-wcj-checkout-files-upload.php:247
1592
+ #: includes/class-wcj-checkout-files-upload.php:508
1593
+ #: includes/class-wcj-checkout-files-upload.php:524
1594
  #: includes/settings/wcj-settings-checkout-files-upload.php:120
1595
  #, php-format
1596
  msgid "Wrong file type: \"%s\"!"
1632
  msgid "File Removed"
1633
  msgstr ""
1634
 
1635
+ #: includes/class-wcj-checkout-files-upload.php:544
1636
  #: includes/settings/wcj-settings-checkout-files-upload.php:135
1637
  #, php-format
1638
  msgid "File \"%s\" was successfully uploaded."
1639
  msgstr ""
1640
 
1641
+ #: includes/class-wcj-checkout-files-upload.php:559
1642
  msgid "File Uploaded"
1643
  msgstr ""
1644
 
1645
+ #: includes/class-wcj-checkout-files-upload.php:587
1646
  #: includes/settings/wcj-settings-checkout-files-upload.php:141
1647
  msgid "Please select file to upload!"
1648
  msgstr ""
1649
 
1650
+ #: includes/class-wcj-checkout-files-upload.php:898
1651
+ #: includes/class-wcj-checkout-files-upload.php:899
1652
  #: includes/settings/wcj-settings-checkout-files-upload.php:105
1653
  msgid "Upload"
1654
  msgstr ""
1655
 
1656
+ #: includes/class-wcj-checkout-files-upload.php:914
1657
+ #: includes/class-wcj-checkout-files-upload.php:915
1658
  #: includes/settings/wcj-settings-checkout-files-upload.php:111
1659
  #: includes/settings/wcj-settings-price-by-user-role.php:81
1660
  #: includes/settings/wcj-settings-price-by-user-role.php:89
1770
  "\">Product Open Pricing (Name Your Price) module</a>."
1771
  msgstr ""
1772
 
1773
+ #: includes/class-wcj-currencies.php:32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1774
  msgid "Currencies"
1775
  msgstr ""
1776
 
1777
+ #: includes/class-wcj-currencies.php:33
1778
  msgid ""
1779
  "Add all world currencies and cryptocurrencies to your store; change currency "
1780
  "symbol (Plus); add custom currencies (1 allowed in free version)."
1781
  msgstr ""
1782
 
1783
+ #: includes/class-wcj-currencies.php:34
1784
  msgid ""
1785
  "Add all world currencies and cryptocurrencies to your store; change currency "
1786
  "symbol; add custom currencies."
1787
  msgstr ""
1788
 
1789
+ #: includes/class-wcj-currencies.php:74
1790
  msgid "Auroracoin"
1791
  msgstr ""
1792
 
1793
+ #: includes/class-wcj-currencies.php:75
1794
  msgid "BitConnect"
1795
  msgstr ""
1796
 
1797
+ #: includes/class-wcj-currencies.php:76
1798
  msgid "Bitcoin Cash"
1799
  msgstr ""
1800
 
1801
+ #: includes/class-wcj-currencies.php:77
1802
  msgid "Coinye"
1803
  msgstr ""
1804
 
1805
+ #: includes/class-wcj-currencies.php:78
1806
  msgid "DigitalNote"
1807
  msgstr ""
1808
 
1809
+ #: includes/class-wcj-currencies.php:79
1810
  msgid "Emercoin"
1811
  msgstr ""
1812
 
1813
+ #: includes/class-wcj-currencies.php:80
1814
  msgid "Ethereum Classic"
1815
  msgstr ""
1816
 
1817
+ #: includes/class-wcj-currencies.php:81
1818
  msgid "Ethereum"
1819
  msgstr ""
1820
 
1821
+ #: includes/class-wcj-currencies.php:82
1822
  msgid "Freemasoncoin"
1823
  msgstr ""
1824
 
1825
+ #: includes/class-wcj-currencies.php:83
1826
  msgid "Gridcoin"
1827
  msgstr ""
1828
 
1829
+ #: includes/class-wcj-currencies.php:84
1830
  msgid "IOTA"
1831
  msgstr ""
1832
 
1833
+ #: includes/class-wcj-currencies.php:85
1834
  msgid "Litecoin"
1835
  msgstr ""
1836
 
1837
+ #: includes/class-wcj-currencies.php:86
1838
  msgid "MazaCoin"
1839
  msgstr ""
1840
 
1841
+ #: includes/class-wcj-currencies.php:87
1842
  msgid "Monero"
1843
  msgstr ""
1844
 
1845
+ #: includes/class-wcj-currencies.php:88
1846
  msgid "Namecoin"
1847
  msgstr ""
1848
 
1849
+ #: includes/class-wcj-currencies.php:89
1850
  msgid "NEM"
1851
  msgstr ""
1852
 
1853
+ #: includes/class-wcj-currencies.php:90
1854
  msgid "Nxt"
1855
  msgstr ""
1856
 
1857
+ #: includes/class-wcj-currencies.php:91
1858
  msgid "Omni"
1859
  msgstr ""
1860
 
1861
+ #: includes/class-wcj-currencies.php:92
1862
  msgid "Peercoin"
1863
  msgstr ""
1864
 
1865
+ #: includes/class-wcj-currencies.php:93
1866
  msgid "PotCoin"
1867
  msgstr ""
1868
 
1869
+ #: includes/class-wcj-currencies.php:94
1870
  msgid "Primecoin"
1871
  msgstr ""
1872
 
1873
+ #: includes/class-wcj-currencies.php:95
1874
  msgid "Ripple"
1875
  msgstr ""
1876
 
1877
+ #: includes/class-wcj-currencies.php:96
1878
  msgid "SixEleven"
1879
  msgstr ""
1880
 
1881
+ #: includes/class-wcj-currencies.php:97
1882
  msgid "Synereo AMP"
1883
  msgstr ""
1884
 
1885
+ #: includes/class-wcj-currencies.php:98
1886
  msgid "Titcoin"
1887
  msgstr ""
1888
 
1889
+ #: includes/class-wcj-currencies.php:99
1890
  msgid "Ubiq"
1891
  msgstr ""
1892
 
1893
+ #: includes/class-wcj-currencies.php:100
1894
  msgid "Vertcoin"
1895
  msgstr ""
1896
 
1897
+ #: includes/class-wcj-currencies.php:101
1898
  msgid "Zcash"
1899
  msgstr ""
1900
 
1901
+ #: includes/class-wcj-currencies.php:103
1902
  msgid "Special Drawing Rights"
1903
  msgstr ""
1904
 
1905
+ #: includes/class-wcj-currencies.php:105
1906
  msgid "myCred"
1907
  msgstr ""
1908
 
1909
+ #: includes/class-wcj-currencies.php:190
1910
  msgid "Booster: Currency Symbol"
1911
  msgstr ""
1912
 
1913
+ #: includes/class-wcj-currencies.php:191
1914
  msgid "This sets the currency symbol."
1915
  msgstr ""
1916
 
1917
+ #: includes/class-wcj-currency-exchange-rates.php:29
1918
+ msgid "Currency Exchange Rates"
1919
+ msgstr ""
1920
+
1921
+ #: includes/class-wcj-currency-exchange-rates.php:30
1922
+ msgid ""
1923
+ "Automatic currency exchange rates for WooCommerce (1 allowed in free "
1924
+ "version). If you want to change the currency rate with real conversion then "
1925
+ "enable it"
1926
+ msgstr ""
1927
+
1928
+ #: includes/class-wcj-currency-exchange-rates.php:31
1929
+ msgid ""
1930
+ "Automatic currency exchange rates for WooCommerce. If you want to change the "
1931
+ "currency rate with real conversion then enable it"
1932
+ msgstr ""
1933
+
1934
+ #: includes/class-wcj-currency-exchange-rates.php:220
1935
+ #: includes/settings/wcj-settings-currency-exchange-rates.php:52
1936
+ msgid "Exchange Rates Server"
1937
+ msgstr ""
1938
+
1939
+ #: includes/class-wcj-currency-exchange-rates.php:226
1940
+ #, php-format
1941
+ msgid "Use default: %s"
1942
+ msgstr ""
1943
+
1944
+ #: includes/class-wcj-currency-exchange-rates.php:253
1945
+ msgid "Exchange Rates Offset (Percent)"
1946
+ msgstr ""
1947
+
1948
+ #: includes/class-wcj-currency-exchange-rates.php:259
1949
+ #, php-format
1950
+ msgid "Use default: %s%%"
1951
+ msgstr ""
1952
+
1953
+ #: includes/class-wcj-currency-exchange-rates.php:260
1954
+ msgid "Custom offset"
1955
+ msgstr ""
1956
+
1957
+ #: includes/class-wcj-currency-exchange-rates.php:264
1958
+ msgid "Custom offset (Percent)"
1959
+ msgstr ""
1960
+
1961
+ #: includes/class-wcj-currency-exchange-rates.php:265
1962
+ msgid "Used when \"Custom offset\" option is selected above."
1963
+ msgstr ""
1964
+
1965
+ #: includes/class-wcj-currency-external-products.php:28
1966
+ msgid "Currency for External Products"
1967
+ msgstr ""
1968
+
1969
+ #: includes/class-wcj-currency-external-products.php:29
1970
+ msgid "Set different currency for external products."
1971
+ msgstr ""
1972
+
1973
+ #: includes/class-wcj-currency-per-product.php:31
1974
+ #: includes/settings/wcj-settings-currency-per-product.php:61
1975
+ msgid "Currency per Product"
1976
+ msgstr ""
1977
+
1978
+ #: includes/class-wcj-currency-per-product.php:32
1979
+ msgid ""
1980
+ "Display prices for products in different currencies (1 currency allowed in "
1981
+ "free version)."
1982
+ msgstr ""
1983
+
1984
+ #: includes/class-wcj-currency-per-product.php:33
1985
+ msgid "Display prices for products in different currencies."
1986
+ msgstr ""
1987
+
1988
+ #: includes/class-wcj-currency-per-product.php:187
1989
+ #: includes/settings/wcj-settings-currency-per-product.php:40
1990
+ msgid ""
1991
+ "Only one product can be added to the cart. Clear the cart or finish the "
1992
+ "order, before adding another product to the cart."
1993
+ msgstr ""
1994
+
1995
+ #: includes/class-wcj-currency-per-product.php:207
1996
+ #: includes/settings/wcj-settings-currency-per-product.php:47
1997
+ msgid ""
1998
+ "Only products with same currency can be added to the cart. Clear the cart or "
1999
+ "finish the order, before adding products with another currency to the cart."
2000
+ msgstr ""
2001
+
2002
+ #: includes/class-wcj-currency-per-product.php:252
2003
+ #, php-format
2004
+ msgctxt "Price range: from-to"
2005
+ msgid "%1$s&ndash;%2$s"
2006
+ msgstr ""
2007
+
2008
  #: includes/class-wcj-custom-css.php:33
2009
  msgid "Custom CSS"
2010
  msgstr ""
2034
  #, php-format
2035
  msgid ""
2036
  "Please note that if you enable the module and enter non-valid PHP code here, "
2037
+ "your site will become unavailable. To fix this you will have to add %1$s "
2038
  "attribute to the URL (you must be logged as shop manager or admin (for this "
2039
+ "reason custom PHP code is not executed on %2$s page))."
2040
  msgstr ""
2041
 
2042
  #: includes/class-wcj-custom-php.php:42
2046
  msgid "E.g.: %s"
2047
  msgstr ""
2048
 
2049
+ #: includes/class-wcj-debug-tools.php:29
2050
  msgid "Debug Tools"
2051
  msgstr ""
2052
 
2053
+ #: includes/class-wcj-debug-tools.php:30
2054
  msgid "Booster for WooCommerce debug and log tools."
2055
  msgstr ""
2056
 
2057
+ #: includes/class-wcj-debug-tools.php:37
2058
  #: includes/settings/wcj-settings-debug-tools.php:22
2059
  msgid "Log"
2060
  msgstr ""
2061
 
2062
+ #: includes/class-wcj-debug-tools.php:38
2063
  msgid "Log."
2064
  msgstr ""
2065
 
2066
+ #: includes/class-wcj-debug-tools.php:66
2067
  msgid "Delete Log"
2068
  msgstr ""
2069
 
2070
+ #: includes/class-wcj-debug-tools.php:70
2071
  #, php-format
2072
  msgid "Now: %s"
2073
  msgstr ""
2074
 
2075
+ #: includes/class-wcj-debug-tools.php:75
2076
  msgid "Log is empty."
2077
  msgstr ""
2078
 
2079
+ #: includes/class-wcj-debug-tools.php:107
2080
  msgid "NOT DEFINED"
2081
  msgstr ""
2082
 
2242
  #: includes/settings/wcj-settings-emails.php:44
2243
  #: includes/settings/wcj-settings-pdf-invoicing-page.php:41
2244
  #: includes/settings/wcj-settings-shipping.php:77
2245
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:45
2246
  msgid "Custom"
2247
  msgstr ""
2248
 
2252
  msgstr ""
2253
 
2254
  #: includes/class-wcj-empty-cart-button.php:30
2255
+ #: includes/shortcodes/class-wcj-general-shortcodes.php:599
2256
  msgid "Empty Cart Button"
2257
  msgstr ""
2258
 
2269
  msgstr ""
2270
 
2271
  #: includes/class-wcj-eu-vat-number.php:30
2272
+ #: includes/class-wcj-eu-vat-number.php:334
2273
  #: includes/settings/wcj-settings-eu-vat-number.php:25
2274
  #: includes/settings/wcj-settings-eu-vat-number.php:32
2275
  msgid "EU VAT Number"
2297
  msgid "Add all EU countries VAT standard rates to WooCommerce."
2298
  msgstr ""
2299
 
2300
+ #: includes/class-wcj-eu-vat-number.php:231
2301
  msgid "Customer IP"
2302
  msgstr ""
2303
 
2304
+ #: includes/class-wcj-eu-vat-number.php:235 includes/class-wcj-orders.php:170
2305
  #: includes/settings/wcj-settings-orders.php:129
2306
  #: includes/settings/wcj-settings-payment-gateways-by-country.php:30
2307
  msgid "Country by IP"
2308
  msgstr ""
2309
 
2310
+ #: includes/class-wcj-eu-vat-number.php:239
2311
  msgid "Customer EU VAT Number"
2312
  msgstr ""
2313
 
2314
+ #: includes/class-wcj-eu-vat-number.php:451
2315
  #: includes/settings/wcj-settings-eu-vat-number.php:169
2316
  msgid "Validating VAT. Please wait..."
2317
  msgstr ""
2318
 
2319
+ #: includes/class-wcj-eu-vat-number.php:452
2320
  #: includes/settings/wcj-settings-eu-vat-number.php:176
2321
  msgid "VAT is valid."
2322
  msgstr ""
2323
 
2324
+ #: includes/class-wcj-eu-vat-number.php:453
2325
  #: includes/settings/wcj-settings-eu-vat-number.php:183
2326
  msgid "VAT is not valid."
2327
  msgstr ""
2328
 
2329
+ #: includes/class-wcj-eu-vat-number.php:454
2330
  #: includes/settings/wcj-settings-eu-vat-number.php:191
2331
  msgid "Validation failed. Please try again."
2332
  msgstr ""
2333
 
2334
+ #: includes/class-wcj-eu-vat-number.php:592
2335
  msgid "<strong>Billing EU VAT Number</strong>is a required field."
2336
  msgstr ""
2337
 
2338
+ #: includes/class-wcj-eu-vat-number.php:611
2339
  #: includes/settings/wcj-settings-eu-vat-number.php:78
2340
  msgid "<strong>EU VAT Number</strong> is not valid."
2341
  msgstr ""
2397
  msgid "Export Products."
2398
  msgstr ""
2399
 
2400
+ #: includes/class-wcj-export-import.php:252
2401
+ #: includes/class-wcj-export-import.php:258
2402
  msgid "Filter by Billing Country"
2403
  msgstr ""
2404
 
2405
+ #: includes/class-wcj-export-import.php:253
2406
  msgid "Filter by Product Title"
2407
  msgstr ""
2408
 
2409
+ #: includes/class-wcj-export-import.php:272
2410
+ #: includes/reports/class-wcj-reports-product-sales-daily.php:219
2411
+ #: includes/reports/wcj-class-reports-sales-gateways.php:166
2412
  #: includes/settings/wcj-settings-orders.php:48
2413
  msgid "Filter"
2414
  msgstr ""
2415
 
2416
+ #: includes/class-wcj-export-import.php:304
2417
  #: includes/class-wcj-track-users.php:45
2418
  msgid "All time"
2419
  msgstr ""
2420
 
2421
+ #: includes/class-wcj-export-import.php:323
2422
  msgid "Custom:"
2423
  msgstr ""
2424
 
2425
+ #: includes/class-wcj-export-import.php:328
2426
  msgid "Go"
2427
  msgstr ""
2428
 
2470
  msgid "Current PHP time limit: %s seconds."
2471
  msgstr ""
2472
 
2473
+ #: includes/class-wcj-general.php:138
2474
  msgid "Booster User Role"
2475
  msgstr ""
2476
 
2477
+ #: includes/class-wcj-general.php:244 includes/class-wcj-general.php:259
2478
+ #: includes/class-wcj-sku.php:709
2479
+ #: includes/reports/class-wcj-reports-sales.php:211
2480
  #: includes/settings/wcj-settings-cross-sells.php:46
2481
  #: includes/settings/wcj-settings-order-numbers.php:172
2482
  #: includes/settings/wcj-settings-product-by-user.php:175
2486
  msgid "ID"
2487
  msgstr ""
2488
 
2489
+ #: includes/class-wcj-general.php:244 includes/class-wcj-general.php:260
2490
+ #: includes/class-wcj-offer-price.php:179
2491
  #: includes/export/class-wcj-export-fields-helper.php:287
2492
+ #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:92
2493
+ #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:132
2494
  msgid "Name"
2495
  msgstr ""
2496
 
2497
+ #: includes/class-wcj-general.php:244 includes/class-wcj-general.php:261
2498
  msgid "Capabilities"
2499
  msgstr ""
2500
 
2501
+ #: includes/class-wcj-general.php:251
2502
+ #: includes/class-wcj-payment-gateways.php:134
2503
+ #: includes/class-wcj-product-bulk-meta-editor.php:411
2504
+ #: includes/class-wcj-product-by-user.php:287
2505
  #: includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-display.php:162
2506
  #: includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-display.php:384
2507
+ #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:394
2508
  #: includes/tools/class-wcj-order-statuses-tool.php:207
2509
  msgid "Delete"
2510
  msgstr ""
2560
  "status listed in module's \"Order Status\" option."
2561
  msgstr ""
2562
 
2563
+ #: includes/class-wcj-max-products-per-user.php:139
2564
+ #: includes/class-wcj-max-products-per-user.php:385
2565
  #: includes/settings/wcj-settings-max-products-per-user.php:77
2566
  msgid ""
2567
  "You can only buy maximum %max_qty% pcs. of %product_title% (you already "
2568
  "bought %qty_already_bought% pcs.)."
2569
  msgstr ""
2570
 
2571
+ #: includes/class-wcj-max-products-per-user.php:158
2572
  msgid "Data re-calculated."
2573
  msgstr ""
2574
 
2575
+ #: includes/class-wcj-max-products-per-user.php:160
2576
  #, php-format
2577
  msgid "%s order(s) processed."
2578
  msgstr ""
2579
 
2580
+ #: includes/class-wcj-max-products-per-user.php:217
2581
  msgid "Maximum Products per User: Sales Data"
2582
  msgstr ""
2583
 
2584
+ #: includes/class-wcj-max-products-per-user.php:235
2585
  msgid "User ID"
2586
  msgstr ""
2587
 
2588
+ #: includes/class-wcj-max-products-per-user.php:235
2589
  msgid "User Name"
2590
  msgstr ""
2591
 
2592
+ #: includes/class-wcj-max-products-per-user.php:235
2593
  msgid "Qty Bought"
2594
  msgstr ""
2595
 
2596
+ #: includes/class-wcj-max-products-per-user.php:238
2597
  #: includes/functions/wcj-functions-users.php:179
2598
  #: includes/functions/wcj-functions-users.php:215
2599
  msgid "Guest"
2674
  #: includes/class-wcj-multicurrency.php:59
2675
  #: includes/class-wcj-purchase-data.php:49
2676
  #, php-format
2677
+ msgid "<strong>PHP code:</strong> by using %1$s function, e.g.: %2$s"
2678
  msgstr ""
2679
 
2680
  #: includes/class-wcj-my-account.php:33
2722
  msgid "Lost password"
2723
  msgstr ""
2724
 
2725
+ #: includes/class-wcj-my-account.php:335
2726
  #, php-format
2727
  msgid "Hello %1$s (not %1$s? <a href=\"%2$s\">Log out</a>)"
2728
  msgstr ""
2729
 
2730
+ #: includes/class-wcj-my-account.php:346
2731
  #, php-format
2732
  msgid ""
2733
  "From your account dashboard you can view your <a href=\"%1$s\">recent orders</"
2735
  "href=\"%3$s\">edit your password and account details</a>."
2736
  msgstr ""
2737
 
2738
+ #: includes/class-wcj-my-account.php:456
2739
  msgid "User role"
2740
  msgstr ""
2741
 
2753
  msgid "Let your customers suggest their price for products."
2754
  msgstr ""
2755
 
2756
+ #: includes/class-wcj-offer-price.php:160
2757
  msgid "Booster: Offer Price History"
2758
  msgstr ""
2759
 
2760
+ #: includes/class-wcj-offer-price.php:176
2761
  #: includes/settings/wcj-settings-cross-sells.php:47
2762
  #: includes/settings/wcj-settings-order-numbers.php:173
2763
  #: includes/settings/wcj-settings-products-xml.php:244
2766
  msgid "Date"
2767
  msgstr ""
2768
 
2769
+ #: includes/class-wcj-offer-price.php:177
2770
  #: includes/export/class-wcj-export-fields-helper.php:293
2771
+ #: includes/reports/class-wcj-reports-stock.php:291
2772
  #: includes/settings/meta-box/wcj-settings-meta-box-wholesale-price.php:71
2773
  #: includes/settings/wcj-settings-cross-sells.php:50
2774
  #: includes/settings/wcj-settings-product-add-to-cart.php:310
2777
  msgid "Price"
2778
  msgstr ""
2779
 
2780
+ #: includes/class-wcj-offer-price.php:178
2781
  #: includes/settings/wcj-settings-coupon-by-user-role.php:63
2782
  #: includes/settings/wcj-settings-currency-per-product.php:38
2783
  #: includes/settings/wcj-settings-currency-per-product.php:45
2787
  msgid "Message"
2788
  msgstr ""
2789
 
2790
+ #: includes/class-wcj-offer-price.php:180
2791
  #: includes/export/class-wcj-export-fields-helper.php:83
2792
  #: includes/input-fields/wcj-product-input-fields-options.php:47
2793
+ #: includes/reports/class-wcj-reports-customers.php:102
2794
  #: includes/settings/wcj-settings-checkout-custom-fields.php:156
2795
  msgid "Email"
2796
  msgstr ""
2797
 
2798
+ #: includes/class-wcj-offer-price.php:181
2799
  #: includes/export/class-wcj-export-fields-helper.php:82
2800
  msgid "Customer ID"
2801
  msgstr ""
2802
 
2803
+ #: includes/class-wcj-offer-price.php:182
2804
  msgid "User IP"
2805
  msgstr ""
2806
 
2807
+ #: includes/class-wcj-offer-price.php:183
2808
  msgid "User Agent"
2809
  msgstr ""
2810
 
2811
+ #: includes/class-wcj-offer-price.php:184
2812
  msgid "Sent to"
2813
  msgstr ""
2814
 
2815
+ #: includes/class-wcj-offer-price.php:197
2816
  msgid "No price offers yet."
2817
  msgstr ""
2818
 
2819
+ #: includes/class-wcj-offer-price.php:260
2820
  #, php-format
2821
+ msgid "Average offer: %1$s (from %2$s offer(s))"
2822
  msgstr ""
2823
 
2824
+ #: includes/class-wcj-offer-price.php:268
2825
  msgid "Update product after checking the box."
2826
  msgstr ""
2827
 
2828
+ #: includes/class-wcj-offer-price.php:349
2829
  #: includes/settings/wcj-settings-offer-price.php:169
2830
  #, php-format
2831
  msgid "Your price (%s)"
2832
  msgstr ""
2833
 
2834
+ #: includes/class-wcj-offer-price.php:356
2835
  #: includes/settings/wcj-settings-offer-price.php:241
2836
  #, php-format
2837
  msgid "Suggest your price for %s"
2838
  msgstr ""
2839
 
2840
+ #: includes/class-wcj-offer-price.php:414
2841
  #: includes/settings/wcj-settings-offer-price.php:208
2842
  msgid "Your email"
2843
  msgstr ""
2844
 
2845
+ #: includes/class-wcj-offer-price.php:418
2846
  #: includes/settings/wcj-settings-offer-price.php:216
2847
  msgid "Your name"
2848
  msgstr ""
2849
 
2850
+ #: includes/class-wcj-offer-price.php:422
2851
  #: includes/settings/wcj-settings-offer-price.php:224
2852
  msgid "Your message"
2853
  msgstr ""
2854
 
2855
+ #: includes/class-wcj-offer-price.php:426
2856
  #: includes/settings/wcj-settings-offer-price.php:248
2857
  msgid "Send"
2858
  msgstr ""
2859
 
2860
+ #: includes/class-wcj-offer-price.php:428
2861
  #: includes/settings/wcj-settings-offer-price.php:232
2862
  msgid "Send a copy to your email"
2863
  msgstr ""
2864
 
2865
+ #: includes/class-wcj-offer-price.php:497
2866
  #: includes/settings/wcj-settings-offer-price.php:72
2867
  msgid "Make an offer"
2868
  msgstr ""
2869
 
2870
+ #: includes/class-wcj-offer-price.php:561
2871
  #: includes/settings/wcj-settings-offer-price.php:352
2872
  #, php-format
2873
  msgid "Product: %s"
2874
  msgstr ""
2875
 
2876
+ #: includes/class-wcj-offer-price.php:563
2877
  #: includes/settings/wcj-settings-offer-price.php:354
2878
  #, php-format
2879
  msgid "Offered price: %s"
2880
  msgstr ""
2881
 
2882
+ #: includes/class-wcj-offer-price.php:565
2883
+ #: includes/settings/wcj-settings-offer-price.php:356
2884
  #, php-format
2885
  msgid "From: %1$s %2$s"
2886
  msgstr ""
2887
 
2888
+ #: includes/class-wcj-offer-price.php:567
2889
  #: includes/settings/wcj-settings-offer-price.php:358
2890
  #, php-format
2891
  msgid "Message: %s"
2892
  msgstr ""
2893
 
2894
+ #: includes/class-wcj-offer-price.php:581
2895
  #: includes/settings/wcj-settings-offer-price.php:342
2896
  msgid "Price Offer"
2897
  msgstr ""
2898
 
2899
+ #: includes/class-wcj-offer-price.php:591
2900
  #: includes/settings/wcj-settings-offer-price.php:269
2901
  msgid "Your price offer has been sent."
2902
  msgstr ""
2917
  msgid "Tool removes old slugs/permalinks from database."
2918
  msgstr ""
2919
 
2920
+ #: includes/class-wcj-old-slugs.php:56
2921
  msgid "Old slug"
2922
  msgstr ""
2923
 
2924
+ #: includes/class-wcj-old-slugs.php:57
2925
  msgid "Post title"
2926
  msgstr ""
2927
 
2928
+ #: includes/class-wcj-old-slugs.php:58
2929
  msgid "Post id"
2930
  msgstr ""
2931
 
2932
+ #: includes/class-wcj-old-slugs.php:59
2933
  msgid "Post type"
2934
  msgstr ""
2935
 
2936
+ #: includes/class-wcj-old-slugs.php:60
2937
  msgid "Current slug"
2938
  msgstr ""
2939
 
2940
+ #: includes/class-wcj-old-slugs.php:100
2941
  #, php-format
2942
  msgid ""
2943
  "Removing old slugs from database finished! <strong>%d</strong> old slug(s) "
2944
  "deleted."
2945
  msgstr ""
2946
 
2947
+ #: includes/class-wcj-old-slugs.php:102
2948
  msgid "Please <a href=\"\">refresh</a> the page."
2949
  msgstr ""
2950
 
2951
+ #: includes/class-wcj-old-slugs.php:127
2952
  msgid "Old products slugs found:"
2953
  msgstr ""
2954
 
2955
+ #: includes/class-wcj-old-slugs.php:130
2956
  msgid "Remove all old product slugs"
2957
  msgstr ""
2958
 
2959
+ #: includes/class-wcj-old-slugs.php:133
2960
  msgid "Old non-products slugs found:"
2961
  msgstr ""
2962
 
2963
+ #: includes/class-wcj-old-slugs.php:136
2964
  msgid "Remove all old non-product slugs"
2965
  msgstr ""
2966
 
2967
+ #: includes/class-wcj-old-slugs.php:150
2968
  msgid "No old slugs found."
2969
  msgstr ""
2970
 
3057
  msgid "Tool renumerates all orders."
3058
  msgstr ""
3059
 
3060
+ #: includes/class-wcj-order-numbers.php:357
3061
  msgid "Orders successfully renumerated!"
3062
  msgstr ""
3063
 
3064
+ #: includes/class-wcj-order-numbers.php:362
3065
  #, php-format
3066
  msgid "Sequential number generation is enabled. Next order number will be %s."
3067
  msgstr ""
3068
 
3069
+ #: includes/class-wcj-order-numbers.php:375
3070
  #, php-format
3071
  msgid ""
3072
  "Press the button below to renumerate all existing orders starting from order "
3073
  "counter settings in <a href=\"%s\">Order Numbers</a> module."
3074
  msgstr ""
3075
 
3076
+ #: includes/class-wcj-order-numbers.php:383
3077
  msgid "Renumerate orders"
3078
  msgstr ""
3079
 
3087
  "decimal quantities etc."
3088
  msgstr ""
3089
 
3090
+ #: includes/class-wcj-order-quantities.php:291
3091
  #: includes/settings/wcj-settings-order-quantities.php:297
3092
  msgid ""
3093
  "Only one item can be added to the cart. Clear the cart or finish the order, "
3094
  "before adding another item to the cart."
3095
  msgstr ""
3096
 
3097
+ #: includes/class-wcj-order-quantities.php:485
3098
  #: includes/settings/wcj-settings-order-quantities.php:182
3099
  msgid ""
3100
  "Maximum allowed order quantity is %max_cart_total_quantity%. Your current "
3101
  "order quantity is %cart_total_quantity%."
3102
  msgstr ""
3103
 
3104
+ #: includes/class-wcj-order-quantities.php:496
3105
  #: includes/settings/wcj-settings-order-quantities.php:109
3106
  msgid ""
3107
  "Minimum allowed order quantity is %min_cart_total_quantity%. Your current "
3108
  "order quantity is %cart_total_quantity%."
3109
  msgstr ""
3110
 
3111
+ #: includes/class-wcj-order-quantities.php:508
3112
  #: includes/settings/wcj-settings-order-quantities.php:220
3113
  msgid ""
3114
  "Maximum allowed quantity for %product_title% is %max_per_item_quantity%. Your "
3115
  "current item quantity is %item_quantity%."
3116
  msgstr ""
3117
 
3118
+ #: includes/class-wcj-order-quantities.php:523
3119
  #: includes/settings/wcj-settings-order-quantities.php:146
3120
  msgid ""
3121
  "Minimum allowed quantity for %product_title% is %min_per_item_quantity%. Your "
3122
  "current item quantity is %item_quantity%."
3123
  msgstr ""
3124
 
3125
+ #: includes/class-wcj-order-quantities.php:535
3126
  #: includes/settings/wcj-settings-order-quantities.php:271
3127
  msgid ""
3128
  "Required step for %product_title% is %required_step%. Your current item "
3141
  "regenerate download permissions for orders."
3142
  msgstr ""
3143
 
3144
+ #: includes/class-wcj-orders.php:133
3145
  msgid "Order Navigation"
3146
  msgstr ""
3147
 
3148
+ #: includes/class-wcj-orders.php:157
3149
  msgid "Previous order"
3150
  msgstr ""
3151
 
3152
+ #: includes/class-wcj-orders.php:158
3153
  msgid "Next order"
3154
  msgstr ""
3155
 
3156
+ #: includes/class-wcj-orders.php:249
3157
  msgid "Regenerate download permissions"
3158
  msgstr ""
3159
 
3160
+ #: includes/class-wcj-orders.php:268
3161
  #, php-format
3162
  msgid "Download permissions regenerated for %s order."
3163
  msgid_plural "Download permissions regenerated for %s orders."
3280
  msgid "Add multiple custom payment gateways to WooCommerce."
3281
  msgstr ""
3282
 
3283
+ #: includes/class-wcj-payment-gateways.php:77
3284
  #, php-format
3285
  msgid "<strong>%s</strong> is a required field."
3286
  msgstr ""
3287
 
3288
+ #: includes/class-wcj-payment-gateways.php:102
3289
  #, php-format
3290
  msgid "%s Fields"
3291
  msgstr ""
3335
  msgid "Merge (Print)"
3336
  msgstr ""
3337
 
3338
+ #: includes/class-wcj-pdf-invoicing.php:159
3339
+ #, php-format
3340
+ msgid "Booster: %s."
3341
+ msgstr ""
3342
+
3343
  #: includes/class-wcj-price-by-country.php:44
3344
  msgid "Prices and Currencies by Country"
3345
  msgstr ""
3354
  msgid "Change product price and currency automatically by customer's country."
3355
  msgstr ""
3356
 
3357
+ #: includes/class-wcj-price-by-country.php:167
3358
  msgid "Price filter widget product prices recalculated."
3359
  msgstr ""
3360
 
3391
  msgid "Copy price to all %s"
3392
  msgstr ""
3393
 
3394
+ #: includes/class-wcj-price-by-user-role.php:257
3395
  msgid ""
3396
  "Booster: Free plugin's version is limited to only one price by user role per "
3397
  "products settings product enabled at a time. You will need to get <a href="
3448
 
3449
  #: includes/class-wcj-price-labels.php:46
3450
  #: includes/class-wcj-product-by-country.php:201
3451
+ #: includes/class-wcj-product-by-user-role.php:62
3452
  #: includes/class-wcj-product-info.php:255
3453
+ #: includes/class-wcj-product-price-by-formula.php:169
3454
  #: includes/class-wcj-shipping-by-products.php:214
3455
  #: includes/class-wcj-shipping-options.php:191
3456
  #: includes/classes/class-wcj-module.php:221
3666
  #: includes/settings/wcj-settings-product-price-by-formula.php:102
3667
  #: includes/settings/wcj-settings-product-price-by-formula.php:145
3668
  #: includes/settings/wcj-settings-product-tabs.php:47
3669
+ #: includes/settings/wcj-settings-product-tabs.php:254
3670
+ #: includes/settings/wcj-settings-product-tabs.php:262
3671
  #: includes/settings/wcj-settings-products-xml.php:99
3672
  #: includes/settings/wcj-settings-purchase-data.php:25
3673
  #: includes/settings/wcj-settings-purchase-data.php:32
3748
  msgid "Hide for all variations"
3749
  msgstr ""
3750
 
3751
+ #: includes/class-wcj-price-labels.php:145
3752
  msgid "Booster: Custom Price Labels"
3753
  msgstr ""
3754
 
3866
  "product's edit page."
3867
  msgstr ""
3868
 
3869
+ #: includes/class-wcj-product-bookings.php:159
3870
+ #: includes/class-wcj-product-bookings.php:289
3871
  #: includes/settings/wcj-settings-product-bookings.php:80
3872
  msgid "\"Date to\" must be after \"Date from\""
3873
  msgstr ""
3874
 
3875
+ #: includes/class-wcj-product-bookings.php:173
3876
+ #: includes/class-wcj-product-open-pricing.php:293
3877
  #: includes/settings/wcj-settings-add-to-cart.php:153
3878
  #: includes/settings/wcj-settings-add-to-cart.php:185
3879
  #: includes/settings/wcj-settings-add-to-cart.php:220
3880
  msgid "Read more"
3881
  msgstr ""
3882
 
3883
+ #: includes/class-wcj-product-bookings.php:239
3884
  #: includes/settings/wcj-settings-product-bookings.php:52
3885
  msgid "Period"
3886
  msgstr ""
3887
 
3888
+ #: includes/class-wcj-product-bookings.php:279
3889
  #: includes/settings/wcj-settings-product-bookings.php:66
3890
  msgid "\"Date from\" must be set"
3891
  msgstr ""
3892
 
3893
+ #: includes/class-wcj-product-bookings.php:283
3894
  #: includes/settings/wcj-settings-product-bookings.php:73
3895
  msgid "\"Date to\" must be set"
3896
  msgstr ""
3897
 
3898
+ #: includes/class-wcj-product-bookings.php:426
3899
  #: includes/settings/wcj-settings-product-bookings.php:38
3900
  msgid "Date from"
3901
  msgstr ""
3902
 
3903
+ #: includes/class-wcj-product-bookings.php:430
3904
  #: includes/settings/wcj-settings-product-bookings.php:45
3905
  msgid "Date to"
3906
  msgstr ""
3907
 
3908
+ #: includes/class-wcj-product-bookings.php:455
3909
  #: includes/settings/wcj-settings-product-bookings.php:59
3910
  msgid "/ day"
3911
  msgstr ""
3912
 
3913
+ #: includes/class-wcj-product-bookings.php:537
3914
  msgid ""
3915
  "Booster: Free plugin's version is limited to only one bookings product "
3916
  "enabled at a time. You will need to get <a href=\"https://booster.io/plus/\" "
3935
  msgid "Product Bulk Meta Editor Tool."
3936
  msgstr ""
3937
 
3938
+ #: includes/class-wcj-product-bulk-meta-editor.php:181
3939
  msgid "Please enter meta key."
3940
  msgstr ""
3941
 
3942
+ #: includes/class-wcj-product-bulk-meta-editor.php:203
3943
  #, php-format
3944
  msgid "Meta for <strong>%d</strong> product(s) was updated."
3945
  msgstr ""
3946
 
3947
+ #: includes/class-wcj-product-bulk-meta-editor.php:207
3948
  #, php-format
3949
  msgid "Meta for <strong>%d</strong> product(s) was not updated."
3950
  msgstr ""
3951
 
3952
+ #: includes/class-wcj-product-bulk-meta-editor.php:252
3953
  msgid "Meta key"
3954
  msgstr ""
3955
 
3956
+ #: includes/class-wcj-product-bulk-meta-editor.php:255
3957
  #, php-format
3958
  msgid "for example %s"
3959
  msgstr ""
3960
 
3961
+ #: includes/class-wcj-product-bulk-meta-editor.php:261
3962
  #: includes/settings/meta-box/wcj-settings-meta-box-add-to-cart-button-visibility.php:22
3963
  #: includes/settings/meta-box/wcj-settings-meta-box-add-to-cart-button-visibility.php:41
3964
  #: includes/settings/wcj-settings-price-by-user-role.php:73
3967
  msgid "Show"
3968
  msgstr ""
3969
 
3970
+ #: includes/class-wcj-product-bulk-meta-editor.php:265
3971
+ #: includes/class-wcj-product-bulk-meta-editor.php:384
3972
  #: includes/settings/wcj-settings-product-add-to-cart.php:312
3973
  msgid "Meta"
3974
  msgstr ""
3975
 
3976
+ #: includes/class-wcj-product-bulk-meta-editor.php:290
3977
  msgid ""
3978
  "Hold <strong>Control</strong> key to select multiple products. Press "
3979
  "<strong>Control</strong> + <strong>A</strong> to select all products."
3980
  msgstr ""
3981
 
3982
+ #: includes/class-wcj-product-bulk-meta-editor.php:315
3983
+ #: includes/class-wcj-product-by-user.php:287
3984
+ #: includes/class-wcj-purchase-data.php:125
3985
+ #: includes/classes/class-wcj-module.php:994
3986
  #: includes/functions/wcj-functions-general.php:208
3987
  #: includes/functions/wcj-functions-html.php:131
3988
+ #: includes/reports/class-wcj-reports-monthly-sales.php:393
3989
  #: includes/settings/wcj-settings-empty-cart.php:88
3990
+ #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:394
3991
  #: includes/tools/class-wcj-order-statuses-tool.php:207
3992
+ #: includes/tools/class-wcj-order-statuses-tool.php:340
3993
  msgid "Are you sure?"
3994
  msgstr ""
3995
 
3996
+ #: includes/class-wcj-product-bulk-meta-editor.php:332
3997
  #: includes/settings/wcj-settings-admin-orders-list.php:79
3998
  #: includes/settings/wcj-settings-admin-products-list.php:64
3999
  #: includes/settings/wcj-settings-checkout-fees.php:81
4004
  msgid "Value"
4005
  msgstr ""
4006
 
4007
+ #: includes/class-wcj-product-bulk-meta-editor.php:337
4008
  msgid "Set"
4009
  msgstr ""
4010
 
4011
+ #: includes/class-wcj-product-bulk-meta-editor.php:341
4012
  msgid "Set Meta for All Products"
4013
  msgstr ""
4014
 
4015
+ #: includes/class-wcj-product-bulk-meta-editor.php:360
4016
  msgid "Save all"
4017
  msgstr ""
4018
 
4019
+ #: includes/class-wcj-product-bulk-meta-editor.php:363
4020
  msgid "Delete all"
4021
  msgstr ""
4022
 
4023
+ #: includes/class-wcj-product-bulk-meta-editor.php:408
4024
  msgid "Save"
4025
  msgstr ""
4026
 
4027
+ #: includes/class-wcj-product-bulk-meta-editor.php:435
4028
+ #: includes/class-wcj-purchase-data.php:108
4029
  #: includes/export/class-wcj-export-fields-helper.php:285
4030
  #: includes/functions/wcj-functions-reports.php:27
4031
  #: includes/settings/wcj-settings-product-bulk-meta-editor.php:45
4032
  msgid "Product ID"
4033
  msgstr ""
4034
 
4035
+ #: includes/class-wcj-product-bulk-meta-editor.php:438
4036
  #: includes/settings/wcj-settings-product-bulk-meta-editor.php:46
4037
  msgid "Product status"
4038
  msgstr ""
4039
 
4040
+ #: includes/class-wcj-product-bulk-meta-editor.php:441
4041
  #: includes/settings/wcj-settings-product-bulk-meta-editor.php:47
4042
  msgid "Meta keys"
4043
  msgstr ""
4044
 
4045
+ #: includes/class-wcj-product-bulk-meta-editor.php:466
4046
  msgid "Show all"
4047
  msgstr ""
4048
 
4059
  msgid "Bulk Price Converter Tool."
4060
  msgstr ""
4061
 
4062
+ #: includes/class-wcj-product-bulk-price-converter.php:273
4063
  msgid "Multiply value must be above zero."
4064
  msgstr ""
4065
 
4066
+ #: includes/class-wcj-product-bulk-price-converter.php:279
4067
  msgid "Prices changed successfully!"
4068
  msgstr ""
4069
 
4070
+ #: includes/class-wcj-product-bulk-price-converter.php:304
4071
  msgid "Multiply all product prices by"
4072
  msgstr ""
4073
 
4074
+ #: includes/class-wcj-product-bulk-price-converter.php:312
4075
  msgid "Price type to modify"
4076
  msgstr ""
4077
 
4078
+ #: includes/class-wcj-product-bulk-price-converter.php:314
4079
  msgid "Both"
4080
  msgstr ""
4081
 
4082
+ #: includes/class-wcj-product-bulk-price-converter.php:316
4083
  msgid "Sale prices only"
4084
  msgstr ""
4085
 
4086
+ #: includes/class-wcj-product-bulk-price-converter.php:318
4087
  msgid "Regular prices only"
4088
  msgstr ""
4089
 
4090
+ #: includes/class-wcj-product-bulk-price-converter.php:325
4091
  msgid "Products category"
4092
  msgstr ""
4093
 
4094
+ #: includes/class-wcj-product-bulk-price-converter.php:327
4095
+ #: includes/shortcodes/class-wcj-products-shortcodes.php:376
4096
  msgid "Any"
4097
  msgstr ""
4098
 
4099
+ #: includes/class-wcj-product-bulk-price-converter.php:329
4100
  #: includes/settings/wcj-settings-global-discount.php:113
4101
  msgid "None"
4102
  msgstr ""
4103
 
4104
+ #: includes/class-wcj-product-bulk-price-converter.php:336
4105
  msgid "\"Pretty prices\" threshold"
4106
  msgstr ""
4107
 
4108
+ #: includes/class-wcj-product-bulk-price-converter.php:337
4109
  #: includes/settings/wcj-settings-payment-gateways-min-max.php:90
4110
  msgid "Leave zero to disable."
4111
  msgstr ""
4112
 
4113
+ #: includes/class-wcj-product-bulk-price-converter.php:338
4114
  msgid ""
4115
  "Otherwise - all prices below \"threshold\" will end with 0,99 and all prices "
4116
  "above or equal to \"threshold\" will end with 9,00."
4117
  msgstr ""
4118
 
4119
+ #: includes/class-wcj-product-bulk-price-converter.php:339
4120
  msgid ""
4121
  "E.g.: if you set \"threshold\" to 100, then all prices below 100 will be like "
4122
  "45,99 and all other prices will be like 109,00."
4123
  msgstr ""
4124
 
4125
+ #: includes/class-wcj-product-bulk-price-converter.php:347
4126
  msgid "Preview Prices"
4127
  msgstr ""
4128
 
4129
+ #: includes/class-wcj-product-bulk-price-converter.php:354
4130
  msgid "Change Prices"
4131
  msgstr ""
4132
 
4172
  #, php-format
4173
  msgid ""
4174
  "If \"Manually\" option is selected, you can add country selection drop box to "
4175
+ "frontend with \"%1$s\" widget or %2$s shortcode."
4176
  msgstr ""
4177
 
4178
  #: includes/class-wcj-product-by-country.php:165
4247
  msgid "Set product availability by date."
4248
  msgstr ""
4249
 
4250
+ #: includes/class-wcj-product-by-date.php:124
4251
  #: includes/settings/wcj-settings-product-by-date.php:119
4252
  msgid "%product_title% is not available until %direct_date%."
4253
  msgstr ""
4254
 
4255
+ #: includes/class-wcj-product-by-date.php:135
4256
+ #: includes/class-wcj-product-by-date.php:138
4257
  #: includes/settings/wcj-settings-product-by-date.php:106
4258
  msgid "%product_title% is not available this month."
4259
  msgstr ""
4260
 
4261
+ #: includes/class-wcj-product-by-date.php:144
4262
+ #: includes/class-wcj-product-by-date.php:148
4263
  #: includes/settings/wcj-settings-product-by-date.php:94
4264
  msgid "%product_title% is available only on %date_this_month% this month."
4265
  msgstr ""
4277
  msgid "Set product availability by time."
4278
  msgstr ""
4279
 
4280
+ #: includes/class-wcj-product-by-time.php:99
4281
  #: includes/settings/wcj-settings-product-by-time.php:95
4282
  msgid "%product_title% is not available today."
4283
  msgstr ""
4284
 
4285
+ #: includes/class-wcj-product-by-time.php:102
4286
  msgid "<p >%product_title% is not available today."
4287
  msgstr ""
4288
 
4289
+ #: includes/class-wcj-product-by-time.php:107
4290
+ #: includes/class-wcj-product-by-time.php:110
4291
  #: includes/settings/wcj-settings-product-by-time.php:84
4292
  msgid "%product_title% is available only at %time_today% today."
4293
  msgstr ""
4317
  msgid "User Roles"
4318
  msgstr ""
4319
 
4320
+ #: includes/class-wcj-product-by-user-role.php:54
4321
  msgid "User Options"
4322
  msgstr ""
4323
 
4324
+ #: includes/class-wcj-product-by-user-role.php:59
4325
  msgid "Skip Editable Roles Filter"
4326
  msgstr ""
4327
 
4328
+ #: includes/class-wcj-product-by-user-role.php:61
4329
  msgid "Ignores <code>editable_roles</code> filter on admin."
4330
  msgstr ""
4331
 
4332
+ #: includes/class-wcj-product-by-user-role.php:61
4333
  #, php-format
4334
  msgid ""
4335
  "Enable this option for example if the shop manager can't see some role but "
4357
  "form to frontend."
4358
  msgstr ""
4359
 
4360
+ #: includes/class-wcj-product-by-user.php:236
4361
+ #: includes/class-wcj-product-by-user.php:245
4362
  msgid "Wrong user ID!"
4363
  msgstr ""
4364
 
4365
+ #: includes/class-wcj-product-by-user.php:278
4366
  #: includes/export/class-wcj-export-fields-helper.php:298
4367
  msgid "Status"
4368
  msgstr ""
4369
 
4370
+ #: includes/class-wcj-product-by-user.php:278
4371
+ #: includes/class-wcj-product-tabs.php:663
4372
  #: includes/gateways/class-wc-gateway-wcj-custom.php:59
4373
  #: includes/input-fields/wcj-product-input-fields-options.php:53
4374
  #: includes/settings/meta-box/wcj-settings-meta-box-product-addons.php:104
4383
  #: includes/settings/wcj-settings-product-addons.php:107
4384
  #: includes/settings/wcj-settings-product-by-user.php:181
4385
  #: includes/settings/wcj-settings-product-tabs.php:78
4386
+ #: includes/settings/wcj-settings-product-tabs.php:417
4387
+ #: includes/settings/wcj-settings-product-tabs.php:438
4388
+ #: includes/settings/wcj-settings-product-tabs.php:459
4389
  #: includes/settings/wcj-settings-products-xml.php:247
4390
  #: includes/settings/wcj-settings-purchase-data.php:82
4391
  #: includes/settings/wcj-settings-related-products.php:36
4392
  #: includes/settings/wcj-settings-upsells.php:45
4393
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:122
4394
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:223
4395
+ #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:364
 
4396
  #: includes/widgets/class-wcj-widget-country-switcher.php:77
4397
  #: includes/widgets/class-wcj-widget-left-to-free-shipping.php:63
4398
  #: includes/widgets/class-wcj-widget-multicurrency.php:85
4400
  msgid "Title"
4401
  msgstr ""
4402
 
4403
+ #: includes/class-wcj-product-by-user.php:286
4404
+ #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:473
4405
  #: includes/tools/class-wcj-order-statuses-tool.php:210
4406
+ #: includes/tools/class-wcj-order-statuses-tool.php:290
4407
  msgid "Edit"
4408
  msgstr ""
4409
 
4439
  #: includes/class-wcj-product-custom-visibility.php:37
4440
  #, php-format
4441
  msgid ""
4442
+ "You can add selection drop box to frontend with \"%1$s\" widget (set "
4443
+ "\"Product custom visibility\" as \"Selector Type\") or %2$s shortcode."
4444
  msgstr ""
4445
 
4446
  #: includes/class-wcj-product-custom-visibility.php:42
4447
  msgid "Custom Visibility"
4448
  msgstr ""
4449
 
4450
+ #: includes/class-wcj-product-custom-visibility.php:105
4451
  msgid "Options List"
4452
  msgstr ""
4453
 
4454
+ #: includes/class-wcj-product-custom-visibility.php:110
4455
  #: includes/settings/wcj-settings-admin-bar.php:17
4456
  #: includes/settings/wcj-settings-breadcrumbs.php:17
4457
  #: includes/settings/wcj-settings-cart-customization.php:17
4484
  msgid "Options"
4485
  msgstr ""
4486
 
4487
+ #: includes/class-wcj-product-custom-visibility.php:111
4488
  msgid "One per line."
4489
  msgstr ""
4490
 
4491
+ #: includes/class-wcj-product-custom-visibility.php:112
4492
  msgid ""
4493
  "Can not be empty. Options will be added to each product's admin edit page and "
4494
  "to the selection drop box on frontend."
4509
  #: includes/class-wcj-product-info.php:129
4510
  #: includes/settings/wcj-settings-offer-price.php:121
4511
  #: includes/settings/wcj-settings-product-add-to-cart.php:335
4512
+ #: includes/settings/wcj-settings-product-custom-info.php:155
4513
  msgid "Before product"
4514
  msgstr ""
4515
 
4516
  #: includes/class-wcj-product-info.php:130
4517
  #: includes/settings/wcj-settings-product-add-to-cart.php:336
4518
+ #: includes/settings/wcj-settings-product-custom-info.php:156
4519
  msgid "Before product title"
4520
  msgstr ""
4521
 
4522
  #: includes/class-wcj-product-info.php:131
4523
  #: includes/settings/wcj-settings-offer-price.php:122
4524
  #: includes/settings/wcj-settings-product-add-to-cart.php:337
4525
+ #: includes/settings/wcj-settings-product-custom-info.php:159
4526
  msgid "After product"
4527
  msgstr ""
4528
 
4529
  #: includes/class-wcj-product-info.php:132
4530
  #: includes/settings/wcj-settings-product-add-to-cart.php:338
4531
+ #: includes/settings/wcj-settings-product-custom-info.php:158
4532
  msgid "After product title"
4533
  msgstr ""
4534
 
4535
  #: includes/class-wcj-product-info.php:144
4536
  #: includes/settings/wcj-settings-offer-price.php:100
4537
  #: includes/settings/wcj-settings-product-add-to-cart.php:296
4538
+ #: includes/settings/wcj-settings-product-custom-info.php:144
4539
  #: includes/settings/wcj-settings-upsells.php:63
4540
  msgid "Inside single product summary"
4541
  msgstr ""
4543
  #: includes/class-wcj-product-info.php:145
4544
  #: includes/settings/wcj-settings-offer-price.php:99
4545
  #: includes/settings/wcj-settings-product-add-to-cart.php:295
4546
+ #: includes/settings/wcj-settings-product-custom-info.php:143
4547
  #: includes/settings/wcj-settings-upsells.php:62
4548
  msgid "Before single product summary"
4549
  msgstr ""
4551
  #: includes/class-wcj-product-info.php:146
4552
  #: includes/settings/wcj-settings-offer-price.php:103
4553
  #: includes/settings/wcj-settings-product-add-to-cart.php:297
4554
+ #: includes/settings/wcj-settings-product-custom-info.php:145
4555
  #: includes/settings/wcj-settings-upsells.php:64
4556
  msgid "After single product summary"
4557
  msgstr ""
4567
  #: includes/settings/wcj-settings-my-account.php:303
4568
  #: includes/settings/wcj-settings-product-add-to-cart.php:290
4569
  #: includes/settings/wcj-settings-product-add-to-cart.php:330
4570
+ #: includes/settings/wcj-settings-product-custom-info.php:135
4571
  #: includes/settings/wcj-settings-product-info.php:59
4572
  #: includes/settings/wcj-settings-product-info.php:92
4573
  #: includes/settings/wcj-settings-product-msrp.php:43
4580
  #: includes/settings/wcj-settings-product-info.php:70
4581
  #: includes/settings/wcj-settings-product-info.php:103
4582
  #: includes/settings/wcj-settings-product-tabs.php:92
4583
+ #: includes/settings/wcj-settings-product-tabs.php:427
4584
+ #: includes/settings/wcj-settings-product-tabs.php:448
4585
+ #: includes/settings/wcj-settings-product-tabs.php:469
4586
  msgid "Priority (i.e. Order)"
4587
  msgstr ""
4588
 
4592
  "number."
4593
  msgstr ""
4594
 
4595
+ #: includes/class-wcj-product-info.php:310
4596
  msgid ""
4597
  "[wcj_product_you_save before=\"You save: <strong>\" hide_if_zero=\"yes\" "
4598
  "after=\"</strong>\"][wcj_product_you_save_percent hide_if_zero=\"yes\" before="
4599
  "\" (\" after=\"%)\"]"
4600
  msgstr ""
4601
 
4602
+ #: includes/class-wcj-product-info.php:313
4603
  msgid "[wcj_product_total_sales before=\"Total sales: \"]"
4604
  msgstr ""
4605
 
4683
  msgid "Open Pricing"
4684
  msgstr ""
4685
 
4686
+ #: includes/class-wcj-product-open-pricing.php:380
4687
  #: includes/settings/wcj-settings-product-open-pricing.php:79
4688
  msgid "Price is required!"
4689
  msgstr ""
4690
 
4691
+ #: includes/class-wcj-product-open-pricing.php:392
4692
  #: includes/settings/wcj-settings-product-open-pricing.php:87
4693
  msgid "Entered price is too small!"
4694
  msgstr ""
4695
 
4696
+ #: includes/class-wcj-product-open-pricing.php:407
4697
  #: includes/settings/wcj-settings-product-open-pricing.php:95
4698
  msgid "Entered price is too big!"
4699
  msgstr ""
4700
 
4701
+ #: includes/class-wcj-product-open-pricing.php:523
4702
  #: includes/settings/wcj-settings-product-open-pricing.php:32
4703
  msgid "Name Your Price"
4704
  msgstr ""
4717
  msgid "Set formula for automatic product price calculation."
4718
  msgstr ""
4719
 
4720
+ #: includes/class-wcj-product-price-by-formula.php:126
4721
  msgid "Booking cost"
4722
  msgstr ""
4723
 
4724
+ #: includes/class-wcj-product-price-by-formula.php:141
4725
  #, php-format
4726
  msgid "From: %s"
4727
  msgstr ""
4728
 
4729
+ #: includes/class-wcj-product-price-by-formula.php:168
4730
  msgid "Reset products"
4731
  msgstr ""
4732
 
4733
+ #: includes/class-wcj-product-price-by-formula.php:174
4734
  msgid ""
4735
  "If enabled will also reset formula related settings on products when "
4736
  "<code>Reset Settings</code> button is pressed."
4737
  msgstr ""
4738
 
4739
+ #: includes/class-wcj-product-price-by-formula.php:174
4740
  msgid ""
4741
  "It's necessary to <code>Save changes</code> first with the option enabled so "
4742
  "the <code>Reset settings</code> can be pressed."
4759
  "remove WooCommerce default product tabs."
4760
  msgstr ""
4761
 
4762
+ #: includes/class-wcj-product-tabs.php:619
4763
  msgid "Booster: Custom Tabs"
4764
  msgstr ""
4765
 
4766
+ #: includes/class-wcj-product-tabs.php:647
4767
  msgid "Total number of custom tabs"
4768
  msgstr ""
4769
 
4770
+ #: includes/class-wcj-product-tabs.php:653
4771
+ #: includes/input-fields/class-wcj-product-input-fields-core.php:243
4772
  msgid "Click \"Update\" product after you change this number."
4773
  msgstr ""
4774
 
4775
+ #: includes/class-wcj-product-tabs.php:668
4776
  #: includes/settings/wcj-settings-checkout-custom-fields.php:132
4777
  #: includes/settings/wcj-settings-product-tabs.php:85
4778
  msgid "Key"
4779
  msgstr ""
4780
 
4781
+ #: includes/class-wcj-product-tabs.php:673
4782
  #: includes/input-fields/wcj-product-input-fields-options.php:24
4783
  #: includes/settings/wcj-settings-related-products.php:71
4784
  #: includes/settings/wcj-settings-related-products.php:101
4785
  msgid "Order"
4786
  msgstr ""
4787
 
4788
+ #: includes/class-wcj-product-tabs.php:678
4789
  #: includes/settings/wcj-settings-add-to-cart-button-visibility.php:50
4790
  #: includes/settings/wcj-settings-add-to-cart-button-visibility.php:76
4791
  #: includes/settings/wcj-settings-add-to-cart-button-visibility.php:125
4798
  #: includes/settings/wcj-settings-mini-cart.php:45
4799
  #: includes/settings/wcj-settings-my-account.php:198
4800
  #: includes/settings/wcj-settings-my-account.php:295
4801
+ #: includes/settings/wcj-settings-product-custom-info.php:127
4802
  #: includes/settings/wcj-settings-product-tabs.php:99
4803
  #: includes/widgets/class-wcj-widget-left-to-free-shipping.php:70
4804
  msgid "Content"
4805
  msgstr ""
4806
 
4807
+ #: includes/class-wcj-product-tabs.php:683
4808
  #: includes/settings/wcj-settings-cart-customization.php:66
4809
  #: includes/settings/wcj-settings-product-tabs.php:107
4810
  msgid "Link"
4811
  msgstr ""
4812
 
4813
+ #: includes/class-wcj-product-tabs.php:685
4814
  #: includes/settings/wcj-settings-product-tabs.php:108
4815
  msgid ""
4816
  "If you wish to forward tab to new link, enter it here. In this case content "
4817
  "is ignored. Leave blank to show content."
4818
  msgstr ""
4819
 
4820
+ #: includes/class-wcj-product-tabs.php:689
4821
  #: includes/settings/wcj-settings-product-tabs.php:115
4822
  msgid "Link - Open in New Window"
4823
  msgstr ""
4824
 
4825
+ #: includes/class-wcj-product-tabs.php:692
4826
  #: includes/input-fields/wcj-product-input-fields-options.php:93
4827
  #: includes/settings/meta-box/wcj-settings-meta-box-custom-css.php:23
4828
  #: includes/settings/meta-box/wcj-settings-meta-box-multicurrency.php:66
4829
  #: includes/settings/meta-box/wcj-settings-meta-box-offer-price.php:23
4830
  #: includes/settings/meta-box/wcj-settings-meta-box-price-by-country.php:74
4831
  #: includes/settings/meta-box/wcj-settings-meta-box-price-by-user-role.php:40
4832
+ #: includes/settings/meta-box/wcj-settings-meta-box-price-by-user-role.php:152
4833
  #: includes/settings/meta-box/wcj-settings-meta-box-product-add-to-cart.php:26
4834
  #: includes/settings/meta-box/wcj-settings-meta-box-product-add-to-cart.php:51
4835
  #: includes/settings/meta-box/wcj-settings-meta-box-product-addons.php:22
4852
  msgid "No"
4853
  msgstr ""
4854
 
4855
+ #: includes/class-wcj-product-tabs.php:693
4856
  #: includes/input-fields/wcj-product-input-fields-options.php:86
4857
  #: includes/settings/meta-box/wcj-settings-meta-box-custom-css.php:22
4858
  #: includes/settings/meta-box/wcj-settings-meta-box-multicurrency.php:67
4859
  #: includes/settings/meta-box/wcj-settings-meta-box-offer-price.php:22
4860
  #: includes/settings/meta-box/wcj-settings-meta-box-price-by-country.php:75
4861
  #: includes/settings/meta-box/wcj-settings-meta-box-price-by-user-role.php:39
4862
+ #: includes/settings/meta-box/wcj-settings-meta-box-price-by-user-role.php:151
4863
  #: includes/settings/meta-box/wcj-settings-meta-box-product-add-to-cart.php:25
4864
  #: includes/settings/meta-box/wcj-settings-meta-box-product-add-to-cart.php:50
4865
  #: includes/settings/meta-box/wcj-settings-meta-box-product-addons.php:21
4890
  msgid "Yes"
4891
  msgstr ""
4892
 
4893
+ #: includes/class-wcj-product-tabs.php:701
4894
  #: includes/settings/meta-box/wcj-settings-meta-box-product-by-date.php:25
4895
  #: includes/settings/meta-box/wcj-settings-meta-box-product-by-time.php:22
4896
  #: includes/settings/wcj-settings-checkout-core-fields.php:89
4901
  msgid "Disabled"
4902
  msgstr ""
4903
 
4904
+ #: includes/class-wcj-product-tabs.php:704
4905
  #: includes/settings/wcj-settings-product-tabs.php:77
4906
+ #: includes/settings/wcj-settings-product-tabs.php:296
4907
  msgid "Custom Product Tab"
4908
  msgstr ""
4909
 
4921
  msgid "Add \"products per page\" selector to WooCommerce."
4922
  msgstr ""
4923
 
4924
+ #: includes/class-wcj-products-per-page.php:98
4925
  #: includes/settings/wcj-settings-products-per-page.php:67
4926
  msgid ""
4927
+ "Products <strong>%1$from% - %to%</strong> from <strong>%total%</strong>. "
4928
+ "Products on page %2$select_form%"
4929
  msgstr ""
4930
 
4931
  #: includes/class-wcj-products-xml.php:31
4989
  msgid "Import products costs from \"WooCommerce Cost of Goods\"."
4990
  msgstr ""
4991
 
4992
+ #: includes/class-wcj-purchase-data.php:109
4993
  msgid "Product Title"
4994
  msgstr ""
4995
 
4996
+ #: includes/class-wcj-purchase-data.php:110
4997
  msgid "WooCommerce Cost of Goods (source)"
4998
  msgstr ""
4999
 
5000
+ #: includes/class-wcj-purchase-data.php:111
5001
  msgid "Booster: Product cost (destination)"
5002
  msgstr ""
5003
 
5004
+ #: includes/class-wcj-purchase-data.php:155
5005
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:137
5006
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:194
5007
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:163
5008
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:241
 
 
5009
  msgid "Cost"
5010
  msgstr ""
5011
 
5012
+ #: includes/class-wcj-purchase-data.php:158
5013
+ #: includes/class-wcj-purchase-data.php:223
5014
+ #: includes/class-wcj-purchase-data.php:312
5015
  #: includes/functions/wcj-functions-reports.php:31
5016
  #: includes/settings/wcj-settings-purchase-data.php:152
5017
  #: includes/settings/wcj-settings-purchase-data.php:180
5018
  msgid "Profit"
5019
  msgstr ""
5020
 
5021
+ #: includes/class-wcj-purchase-data.php:226
5022
  #: includes/settings/wcj-settings-purchase-data.php:161
5023
  #: includes/settings/wcj-settings-purchase-data.php:187
5024
  msgid "Purchase Cost"
5025
  msgstr ""
5026
 
5027
+ #: includes/class-wcj-purchase-data.php:309
5028
  msgid "Selling"
5029
  msgstr ""
5030
 
5031
+ #: includes/class-wcj-purchase-data.php:310
5032
  msgid "Buying"
5033
  msgstr ""
5034
 
5035
+ #: includes/class-wcj-purchase-data.php:326
5036
  msgid "Report"
5037
  msgstr ""
5038
 
5063
  msgid "Stock, sales, customers etc. reports."
5064
  msgstr ""
5065
 
5066
+ #: includes/class-wcj-reports.php:93
5067
  msgid "Booster: More Ranges - Months"
5068
  msgstr ""
5069
 
5070
+ #: includes/class-wcj-reports.php:95 includes/class-wcj-reports.php:146
5071
  msgid "Select Range"
5072
  msgstr ""
5073
 
5074
+ #: includes/class-wcj-reports.php:144
5075
  msgid "Booster: More Ranges"
5076
  msgstr ""
5077
 
5078
+ #: includes/class-wcj-reports.php:255
5079
  msgid "Booster: Product Sales (Daily)"
5080
  msgstr ""
5081
 
5082
+ #: includes/class-wcj-reports.php:262
5083
  msgid "Booster: Product Sales (Monthly)"
5084
  msgstr ""
5085
 
5086
+ #: includes/class-wcj-reports.php:269
5087
  msgid "Booster: Monthly Sales (with Currency Conversion)"
5088
  msgstr ""
5089
 
5090
+ #: includes/class-wcj-reports.php:276
5091
  msgid "Booster: Payment Gateways"
5092
  msgstr ""
5093
 
5094
+ #: includes/class-wcj-reports.php:293
5095
  msgid "Booster: All in stock"
5096
  msgstr ""
5097
 
5098
+ #: includes/class-wcj-reports.php:300
5099
  msgid "Booster: Understocked"
5100
  msgstr ""
5101
 
5102
+ #: includes/class-wcj-reports.php:307
5103
  msgid "Booster: Overstocked"
5104
  msgstr ""
5105
 
5106
+ #: includes/class-wcj-reports.php:324
5107
  msgid "Booster: Customers by Country"
5108
  msgstr ""
5109
 
5110
+ #: includes/class-wcj-reports.php:331
5111
  msgid "Booster: Customers by Country Sets"
5112
  msgstr ""
5113
 
5320
  #: includes/settings/wcj-settings-product-by-condition.php:115
5321
  #: includes/settings/wcj-settings-product-by-user.php:122
5322
  #: includes/settings/wcj-settings-product-open-pricing.php:131
5323
+ #: includes/settings/wcj-settings-product-tabs.php:269
5324
  #: includes/settings/wcj-settings-purchase-data.php:153
5325
  #: includes/settings/wcj-settings-purchase-data.php:162
5326
  #: includes/settings/wcj-settings-purchase-data.php:181
5327
  #: includes/settings/wcj-settings-purchase-data.php:188
5328
  #: includes/settings/wcj-settings-sku.php:314
5329
  #: includes/settings/wcj-settings-sku.php:341
5330
+ #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:473
5331
+ #: includes/tools/class-wcj-order-statuses-tool.php:290
5332
  msgid "Add"
5333
  msgstr ""
5334
 
5375
  #: includes/class-wcj-shipping-by-time.php:149
5376
  #, php-format
5377
  msgid ""
5378
+ "According to current time, your time input will be parsed as: from %1$s to "
5379
+ "%2$s."
5380
  msgstr ""
5381
 
5382
  #: includes/class-wcj-shipping-by-time.php:155
5443
  msgid "Customize WooCommerce shipping calculator on cart page."
5444
  msgstr ""
5445
 
5446
+ #: includes/class-wcj-shipping-descriptions.php:33
5447
  msgid "Shipping Descriptions"
5448
  msgstr ""
5449
 
5450
+ #: includes/class-wcj-shipping-descriptions.php:34
5451
  msgid ""
5452
  "Add descriptions to shipping methods on frontend. Description visibility "
5453
  "(Plus). Description position (Plus)."
5454
  msgstr ""
5455
 
5456
+ #: includes/class-wcj-shipping-descriptions.php:35
5457
  msgid "Add descriptions to shipping methods on frontend."
5458
  msgstr ""
5459
 
5542
  #: includes/class-wcj-shipping.php:31
5543
  #: includes/settings/wcj-settings-shipping.php:19
5544
  #: includes/settings/wcj-settings-shipping.php:27
5545
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:125
5546
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:226
 
5547
  msgid "Custom Shipping"
5548
  msgstr ""
5549
 
5551
  msgid "Add multiple custom shipping methods to WooCommerce."
5552
  msgstr ""
5553
 
5554
+ #: includes/class-wcj-sku.php:30 includes/class-wcj-sku.php:712
5555
  #: includes/export/class-wcj-export-fields-helper.php:288
5556
  msgid "SKU"
5557
  msgstr ""
5575
  msgid "The tool generates and sets product SKUs for existing products."
5576
  msgstr ""
5577
 
5578
+ #: includes/class-wcj-sku.php:713
5579
  msgid "Old SKU"
5580
  msgstr ""
5581
 
5582
+ #: includes/class-wcj-sku.php:719
5583
  msgid "SKUs generated and set successfully!"
5584
  msgstr ""
5585
 
5586
+ #: includes/class-wcj-sku.php:730
5587
  msgid "Preview SKUs"
5588
  msgstr ""
5589
 
5590
+ #: includes/class-wcj-sku.php:732
5591
  msgid "Set SKUs"
5592
  msgstr ""
5593
 
5594
+ #: includes/class-wcj-sku.php:735
5595
  msgid ""
5596
  "You can optionally limit affected products by main product's ID (set option "
5597
  "to zero to ignore):"
5598
  msgstr ""
5599
 
5600
+ #: includes/class-wcj-sku.php:737
5601
  msgid "Min ID"
5602
  msgstr ""
5603
 
5604
+ #: includes/class-wcj-sku.php:740
5605
  msgid "Max ID"
5606
  msgstr ""
5607
 
5712
  msgid "Type:"
5713
  msgstr ""
5714
 
5715
+ #: includes/class-wcj-track-users.php:267
5716
  #, php-format
5717
  msgid "Top %d countries by visits"
5718
  msgstr ""
5719
 
5720
+ #: includes/class-wcj-track-users.php:341
5721
  #: includes/input-fields/wcj-product-input-fields-options.php:46
5722
  #: includes/settings/wcj-settings-checkout-custom-fields.php:154
5723
+ #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:110
5724
+ #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:130
5725
  msgid "Country"
5726
  msgstr ""
5727
 
5728
+ #: includes/class-wcj-track-users.php:341
5729
  msgid "Visits"
5730
  msgstr ""
5731
 
5732
  #: includes/class-wcj-track-users.php:373
5733
  #, php-format
5734
+ msgid "Stats generated at %1$s. Next update is scheduled at %2$s."
5735
  msgstr ""
5736
 
5737
  #: includes/class-wcj-track-users.php:374
5793
  msgid "File wpml-config.xml successfully regenerated!"
5794
  msgstr ""
5795
 
5796
+ #: includes/classes/class-wcj-module-product-by-condition.php:278
5797
  msgid "— No change —"
5798
  msgstr ""
5799
 
5800
+ #: includes/classes/class-wcj-module-product-by-condition.php:285
5801
  #: includes/settings/meta-box/wcj-settings-meta-box-product-by-condition.php:35
5802
  msgid "Visible"
5803
  msgstr ""
5804
 
5805
+ #: includes/classes/class-wcj-module-product-by-condition.php:296
5806
  #: includes/settings/meta-box/wcj-settings-meta-box-product-by-condition.php:53
5807
  msgid "Invisible"
5808
  msgstr ""
5832
  "\" products."
5833
  msgstr ""
5834
 
5835
+ #: includes/classes/class-wcj-module.php:766
5836
  #, php-format
5837
  msgid "Selected: %s."
5838
  msgstr ""
5839
 
5840
+ #: includes/classes/class-wcj-module.php:837
5841
  msgid "Back to Module Settings"
5842
  msgstr ""
5843
 
5844
+ #: includes/classes/class-wcj-module.php:858
5845
  #: includes/settings/wcj-settings-wpml.php:102
5846
  msgid "Module Tools"
5847
  msgstr ""
5848
 
5849
+ #: includes/classes/class-wcj-module.php:936
5850
  #: includes/settings/wcj-settings-checkout-core-fields.php:82
5851
  msgid "enabled"
5852
  msgstr ""
5853
 
5854
+ #: includes/classes/class-wcj-module.php:937
5855
  msgid "disabled"
5856
  msgstr ""
5857
 
5858
+ #: includes/classes/class-wcj-module.php:945
5859
  #: includes/settings/wcj-settings-product-tabs.php:181
5860
  #: includes/settings/wcj-settings-product-tabs.php:196
5861
  #: includes/settings/wcj-settings-product-tabs.php:211
5862
+ #: includes/settings/wcj-settings-product-tabs.php:227
5863
  msgid "Deprecated"
5864
  msgstr ""
5865
 
5866
+ #: includes/classes/class-wcj-module.php:984
5867
  msgid "Reset Settings"
5868
  msgstr ""
5869
 
5870
+ #: includes/classes/class-wcj-module.php:990
5871
  msgid "Reset Module to Default Settings"
5872
  msgstr ""
5873
 
5874
+ #: includes/classes/class-wcj-module.php:991
5875
  msgid "Reset Submodule to Default Settings"
5876
  msgstr ""
5877
 
5878
+ #: includes/classes/class-wcj-module.php:995
5879
  msgid "Reset settings"
5880
  msgstr ""
5881
 
5882
+ #: includes/classes/class-wcj-module.php:1033
5883
  msgid "Module Options"
5884
  msgstr ""
5885
 
5886
+ #: includes/classes/class-wcj-module.php:1040
5887
  msgid "Enable Module"
5888
  msgstr ""
5889
 
5892
  msgid "Company Name"
5893
  msgstr ""
5894
 
5895
+ #: includes/classes/class-wcj-pdf-invoice.php:302
5896
+ #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:280
5897
  msgid "Unexpected error"
5898
  msgstr ""
5899
 
5900
  #: includes/classes/class-wcj-shortcodes.php:156
5901
+ #: includes/shortcodes/class-wcj-general-shortcodes.php:599
5902
  #, php-format
5903
  msgid "\"%s\" module is not enabled!"
5904
  msgstr ""
5924
  msgid "Click <a target=\"_blank\" href=\"%s\">here</a> for more info."
5925
  msgstr ""
5926
 
5927
+ #: includes/core/class-wcj-admin.php:128
5928
  msgid "Booster Settings"
5929
  msgstr ""
5930
 
5931
+ #: includes/core/class-wcj-admin.php:144
5932
  msgid "Docs"
5933
  msgstr ""
5934
 
5935
+ #: includes/core/class-wcj-admin.php:147
5936
  msgid "Unlock all"
5937
  msgstr ""
5938
 
5939
+ #: includes/core/class-wcj-admin.php:149
5940
  msgid "Support"
5941
  msgstr ""
5942
 
5966
 
5967
  #: includes/emails/class-wc-email-wcj-custom.php:240
5968
  #, php-format
5969
+ msgid "Order status %1$s to %2$s"
5970
  msgstr ""
5971
 
5972
  #: includes/emails/class-wc-email-wcj-custom.php:247
5975
  #: includes/settings/wcj-settings-admin-products-list.php:86
5976
  #: includes/settings/wcj-settings-checkout-custom-fields.php:130
5977
  #: includes/settings/wcj-settings-checkout-fees.php:51
5978
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:116
5979
  msgid "Enable/Disable"
5980
  msgstr ""
5981
 
6234
  msgstr ""
6235
 
6236
  #: includes/export/class-wcj-export-fields-helper.php:89
6237
+ #: includes/reports/class-wcj-reports-customers.php:104
6238
  msgid "Registered"
6239
  msgstr ""
6240
 
6429
  msgstr ""
6430
 
6431
  #: includes/export/class-wcj-export-fields-helper.php:291
6432
+ #: includes/price-by-country/class-wcj-price-by-country-local.php:110
6433
  #: includes/settings/meta-box/wcj-settings-meta-box-multicurrency.php:44
6434
+ #: includes/settings/meta-box/wcj-settings-meta-box-price-by-user-role.php:108
6435
  #: includes/settings/wcj-settings-product-by-user.php:19
6436
  #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:193
6437
+ #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:408
6438
  msgid "Regular Price"
6439
  msgstr ""
6440
 
6441
  #: includes/export/class-wcj-export-fields-helper.php:292
6442
+ #: includes/price-by-country/class-wcj-price-by-country-local.php:117
6443
  #: includes/settings/meta-box/wcj-settings-meta-box-multicurrency.php:53
6444
+ #: includes/settings/meta-box/wcj-settings-meta-box-price-by-user-role.php:117
6445
  #: includes/settings/wcj-settings-product-by-user.php:20
6446
  #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:194
6447
+ #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:417
6448
  msgid "Sale Price"
6449
  msgstr ""
6450
 
6460
  #: includes/settings/wcj-settings-product-addons.php:95
6461
  #: includes/settings/wcj-settings-purchase-data.php:89
6462
  #: includes/settings/wcj-settings-shipping-options.php:85
6463
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:129
6464
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:231
 
6465
  #: includes/widgets/class-wcj-widget-multicurrency.php:92
6466
  msgid "Type"
6467
  msgstr ""
6474
  #: includes/export/class-wcj-export-fields-helper.php:296
6475
  #: includes/settings/wcj-settings-product-by-user.php:17
6476
  #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:191
6477
+ #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:381
6478
  msgid "Short Description"
6479
  msgstr ""
6480
 
6583
  msgid "Availability Class"
6584
  msgstr ""
6585
 
6586
+ #: includes/functions/wcj-functions-admin.php:148
6587
  #, php-format
6588
  msgid ""
6589
  "<strong>Booster for WooCommerce</strong> plugin was successfully updated to "
6590
  "version <strong>%s</strong>."
6591
  msgstr ""
6592
 
6593
+ #: includes/functions/wcj-functions-admin.php:195
6594
  msgid "Search&hellip;"
6595
  msgstr ""
6596
 
6597
+ #: includes/functions/wcj-functions-admin.php:246
6598
  msgid "Enter comma separated list of IDs."
6599
  msgstr ""
6600
 
6601
+ #: includes/functions/wcj-functions-admin.php:327
6602
  #: includes/settings/wcj-settings-emails-verification.php:79
6603
  #: includes/settings/wcj-settings-emails-verification.php:88
6604
  #: includes/settings/wcj-settings-emails-verification.php:136
6606
  msgid "Replaced value: %s"
6607
  msgstr ""
6608
 
6609
+ #: includes/functions/wcj-functions-admin.php:327
6610
  #, php-format
6611
  msgid "Replaced values: %s"
6612
  msgstr ""
6613
 
6614
+ #: includes/functions/wcj-functions-admin.php:359
6615
  msgid "Upgrade Booster to unlock this feature"
6616
  msgstr ""
6617
 
6618
+ #: includes/functions/wcj-functions-admin.php:362
6619
  #, php-format
6620
  msgid ""
6621
  "Some settings fields are locked and you will need %s to modify all locked "
6622
  "fields."
6623
  msgstr ""
6624
 
6625
+ #: includes/functions/wcj-functions-admin.php:366
6626
  msgid "Buy now"
6627
  msgstr ""
6628
 
6629
+ #: includes/functions/wcj-functions-admin.php:366
6630
  msgid "Visit Booster Site"
6631
  msgstr ""
6632
 
6633
+ #: includes/functions/wcj-functions-admin.php:372
6634
  #, php-format
6635
  msgid "Upgrade <a href=\"%s\" target=\"_blank\">Booster</a> to change value."
6636
  msgstr ""
6637
 
6638
+ #: includes/functions/wcj-functions-admin.php:376
6639
  #, php-format
6640
  msgid ""
6641
  "Upgrade <a href=\"%1$s\" target=\"_blank\">Booster to unlock this feature</a> "
6642
  "to enable \"%2$s\" option."
6643
  msgstr ""
6644
 
6645
+ #: includes/functions/wcj-functions-admin.php:380
6646
  #, php-format
6647
  msgid "Upgrade Booster to to enable \"%s\" option."
6648
  msgstr ""
6649
 
6650
+ #: includes/functions/wcj-functions-admin.php:384
6651
  #, php-format
6652
  msgid ""
6653
  "Upgrade <a href=\"%s\" target=\"_blank\">Booster</a> to change values below."
6654
  msgstr ""
6655
 
6656
+ #: includes/functions/wcj-functions-admin.php:388
6657
  #, php-format
6658
  msgid ""
6659
  "Upgrade <a href=\"%s\" target=\"_blank\">Booster </a> to change values above."
6660
  msgstr ""
6661
 
6662
+ #: includes/functions/wcj-functions-admin.php:391
6663
  msgid "Upgrade Booster to change value."
6664
  msgstr ""
6665
 
7745
  msgid "CoinMarketCap"
7746
  msgstr ""
7747
 
7748
+ #: includes/functions/wcj-functions-general.php:706
7749
  #: includes/settings/wcj-settings-cross-sells.php:78
7750
  #: includes/settings/wcj-settings-empty-cart.php:50
7751
  msgid "Before cart"
7752
  msgstr ""
7753
 
7754
+ #: includes/functions/wcj-functions-general.php:707
7755
  msgid "Before cart table"
7756
  msgstr ""
7757
 
7758
+ #: includes/functions/wcj-functions-general.php:708
7759
  msgid "Before cart contents"
7760
  msgstr ""
7761
 
7762
+ #: includes/functions/wcj-functions-general.php:709
7763
  msgid "Cart contents"
7764
  msgstr ""
7765
 
7766
+ #: includes/functions/wcj-functions-general.php:710
7767
  msgid "Cart coupon"
7768
  msgstr ""
7769
 
7770
+ #: includes/functions/wcj-functions-general.php:711
7771
  msgid "Cart actions"
7772
  msgstr ""
7773
 
7774
+ #: includes/functions/wcj-functions-general.php:712
7775
  msgid "After cart contents"
7776
  msgstr ""
7777
 
7778
+ #: includes/functions/wcj-functions-general.php:713
7779
  msgid "After cart table"
7780
  msgstr ""
7781
 
7782
+ #: includes/functions/wcj-functions-general.php:714
7783
  #: includes/settings/wcj-settings-cross-sells.php:79
7784
  msgid "Cart collaterals"
7785
  msgstr ""
7786
 
7787
+ #: includes/functions/wcj-functions-general.php:715
7788
  #: includes/settings/wcj-settings-cross-sells.php:80
7789
  #: includes/settings/wcj-settings-empty-cart.php:59
7790
  msgid "After cart"
7791
  msgstr ""
7792
 
7793
+ #: includes/functions/wcj-functions-general.php:717
7794
  msgid "Before cart totals"
7795
  msgstr ""
7796
 
7797
+ #: includes/functions/wcj-functions-general.php:718
7798
  #: includes/settings/wcj-settings-empty-cart.php:52
7799
  msgid "Cart totals: Before shipping"
7800
  msgstr ""
7801
 
7802
+ #: includes/functions/wcj-functions-general.php:719
7803
  #: includes/settings/wcj-settings-empty-cart.php:53
7804
  msgid "Cart totals: After shipping"
7805
  msgstr ""
7806
 
7807
+ #: includes/functions/wcj-functions-general.php:720
7808
  #: includes/settings/wcj-settings-empty-cart.php:54
7809
  msgid "Cart totals: Before order total"
7810
  msgstr ""
7811
 
7812
+ #: includes/functions/wcj-functions-general.php:721
7813
  #: includes/settings/wcj-settings-empty-cart.php:55
7814
  msgid "Cart totals: After order total"
7815
  msgstr ""
7816
 
7817
+ #: includes/functions/wcj-functions-general.php:722
7818
  msgid "Proceed to checkout"
7819
  msgstr ""
7820
 
7821
+ #: includes/functions/wcj-functions-general.php:723
7822
  msgid "After cart totals"
7823
  msgstr ""
7824
 
7825
+ #: includes/functions/wcj-functions-general.php:725
7826
  msgid "Before shipping calculator"
7827
  msgstr ""
7828
 
7829
+ #: includes/functions/wcj-functions-general.php:726
7830
  msgid "After shipping calculator"
7831
  msgstr ""
7832
 
7833
+ #: includes/functions/wcj-functions-general.php:728
7834
  msgid "If cart is empty"
7835
  msgstr ""
7836
 
7860
  msgstr ""
7861
 
7862
  #: includes/functions/wcj-functions-reports.php:24
7863
+ msgid "date"
7864
  msgstr ""
7865
 
7866
  #: includes/functions/wcj-functions-reports.php:25
7886
  msgstr ""
7887
 
7888
  #: includes/functions/wcj-functions-reports.php:32
7889
+ msgid "Last Sale date"
7890
  msgstr ""
7891
 
7892
  #: includes/functions/wcj-functions-reports.php:33
7961
  msgstr ""
7962
 
7963
  #: includes/gateways/class-wc-gateway-wcj-custom.php:61
7964
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:124
7965
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:225
 
7966
  msgid "This controls the title which the user sees during checkout."
7967
  msgstr ""
7968
 
8092
  msgid "Booster for WooCommerce: Custom Payment Gateway"
8093
  msgstr ""
8094
 
8095
+ #: includes/input-fields/class-wcj-product-input-fields-core.php:197
8096
  msgid "Booster: Product Input Fields"
8097
  msgstr ""
8098
 
8099
+ #: includes/input-fields/class-wcj-product-input-fields-core.php:237
8100
  msgid "Total number of "
8101
  msgstr ""
8102
 
8103
+ #: includes/input-fields/class-wcj-product-input-fields-core.php:253
8104
+ #: includes/input-fields/class-wcj-product-input-fields-core.php:451
8105
  #: includes/settings/wcj-settings-product-input-fields.php:96
8106
  msgid "Product Input Field"
8107
  msgstr ""
8108
 
8109
+ #: includes/input-fields/class-wcj-product-input-fields-core.php:536
8110
  msgid "Wrong file type!"
8111
  msgstr ""
8112
 
8113
+ #: includes/input-fields/class-wcj-product-input-fields-core.php:545
8114
  msgid "File is too big!"
8115
  msgstr ""
8116
 
8117
+ #: includes/input-fields/class-wcj-product-input-fields-core.php:782
8118
  msgid "Select a country&hellip;"
8119
  msgstr ""
8120
 
8502
  msgstr ""
8503
 
8504
  #: includes/pdf-invoices/class-wcj-pdf-invoicing-renumerate-tool.php:121
8505
+ #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:156
8506
  msgid "Document Type"
8507
  msgstr ""
8508
 
8524
  msgid "Total documents deleted: %d"
8525
  msgstr ""
8526
 
8527
+ #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:87
8528
  #, php-format
8529
  msgid ""
8530
  "This option is disabled with \"Disable Saving PDFs in PHP directory for "
8532
  "Settings > Booster > PDF Invoicing & Packing Slips > Advanced</a>."
8533
  msgstr ""
8534
 
8535
+ #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:99
8536
  msgid "Sorry, but something went wrong..."
8537
  msgstr ""
8538
 
8539
+ #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:105
8540
+ #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:127
8541
  msgid "Please fill year and month values."
8542
  msgstr ""
8543
 
8544
+ #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:151
8545
  msgid "Month"
8546
  msgstr ""
8547
 
8548
+ #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:163
8549
  msgid "Display monthly documents table"
8550
  msgstr ""
8551
 
8552
+ #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:169
8553
  msgid "Download all monthly documents PDFs in single ZIP file"
8554
  msgstr ""
8555
 
8556
+ #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:175
8557
  msgid "Download monthly documents CSV"
8558
  msgstr ""
8559
 
8560
+ #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:205
8561
  #, php-format
8562
  msgid ""
8563
  "Booster: %s class is not accessible on your server. Please contact your "
8564
  "hosting provider."
8565
  msgstr ""
8566
 
8567
+ #: includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php:296
8568
  #, php-format
8569
+ msgid "No documents (%1$s) found for %2$d-%3$02d."
8570
  msgstr ""
8571
 
8572
  #: includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-advanced.php:33
8674
  msgid "Booster: PDF Invoices"
8675
  msgstr ""
8676
 
 
 
 
 
8677
  #: includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-display.php:413
8678
  msgid ""
8679
  "In case of partial refund, you need to reload the page to see created "
8705
  msgstr ""
8706
 
8707
  #: includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-templates.php:30
8708
+ #: includes/settings/wcj-settings-template-editor.php:47
8709
  msgid "Templates"
8710
  msgstr ""
8711
 
8712
+ #: includes/price-by-country/class-wcj-price-by-country-group-generator.php:44
8713
  msgid "Country groups successfully generated."
8714
  msgstr ""
8715
 
8716
+ #: includes/price-by-country/class-wcj-price-by-country-group-generator.php:47
8717
  msgid "Country groups generation failed."
8718
  msgstr ""
8719
 
8720
+ #: includes/price-by-country/class-wcj-price-by-country-local.php:124
8721
  #: includes/settings/meta-box/wcj-settings-meta-box-price-by-country.php:77
8722
  #: includes/settings/wcj-settings-price-by-country.php:449
8723
  msgid "Make empty price"
8724
  msgstr ""
8725
 
8726
+ #: includes/price-by-country/class-wcj-price-by-country-local.php:249
8727
  #: includes/settings/meta-box/wcj-settings-meta-box-price-by-country.php:21
8728
  #: includes/settings/wcj-settings-add-to-cart.php:59
8729
  #: includes/settings/wcj-settings-price-by-country.php:334
8734
  msgid "Group"
8735
  msgstr ""
8736
 
8737
+ #: includes/reports/class-wcj-currency-reports.php:44
8738
  msgid "Reports currency:"
8739
  msgstr ""
8740
 
8741
+ #: includes/reports/class-wcj-currency-reports.php:46
8742
+ #: includes/reports/class-wcj-currency-reports.php:86
8743
  msgid "Show reports only in"
8744
  msgstr ""
8745
 
8746
+ #: includes/reports/class-wcj-reports-customers.php:52
8747
  msgid "No customers found."
8748
  msgstr ""
8749
 
8750
+ #: includes/reports/class-wcj-reports-customers.php:88
8751
  msgid "Non Available"
8752
  msgstr ""
8753
 
8754
+ #: includes/reports/class-wcj-reports-customers.php:101
8755
  #: includes/settings/wcj-settings-offer-price.php:212
8756
  msgid "Customer Name"
8757
  msgstr ""
8758
 
8759
+ #: includes/reports/class-wcj-reports-customers.php:103
8760
  msgid "Total Spent"
8761
  msgstr ""
8762
 
8763
+ #: includes/reports/class-wcj-reports-customers.php:147
8764
  msgid "Total customers"
8765
  msgstr ""
8766
 
8767
+ #: includes/reports/class-wcj-reports-customers.php:151
8768
  msgid "Country Code"
8769
  msgstr ""
8770
 
8771
+ #: includes/reports/class-wcj-reports-customers.php:152
8772
  msgid "Customers Count"
8773
  msgstr ""
8774
 
8775
+ #: includes/reports/class-wcj-reports-customers.php:153
8776
  msgid "Percent of total"
8777
  msgstr ""
8778
 
8779
+ #: includes/reports/class-wcj-reports-customers.php:175
8780
  msgid "Report for:"
8781
  msgstr ""
8782
 
8783
+ #: includes/reports/class-wcj-reports-monthly-sales.php:50
8784
  msgid "Currency rates saved."
8785
  msgstr ""
8786
 
8787
+ #: includes/reports/class-wcj-reports-monthly-sales.php:54
8788
  msgid "Currency rates deleted."
8789
  msgstr ""
8790
 
8791
+ #: includes/reports/class-wcj-reports-monthly-sales.php:101
8792
  msgid "Days"
8793
  msgstr ""
8794
 
8795
+ #: includes/reports/class-wcj-reports-monthly-sales.php:102
8796
  msgid "Total Orders"
8797
  msgstr ""
8798
 
8799
+ #: includes/reports/class-wcj-reports-monthly-sales.php:103
8800
  msgid "Orders Average / Day"
8801
  msgstr ""
8802
 
8803
+ #: includes/reports/class-wcj-reports-monthly-sales.php:104
8804
+ #: includes/reports/class-wcj-reports-sales.php:347
8805
  msgid "Total Sum"
8806
  msgstr ""
8807
 
8808
+ #: includes/reports/class-wcj-reports-monthly-sales.php:105
8809
  msgid "Total Sum (excl. TAX)"
8810
  msgstr ""
8811
 
8812
+ #: includes/reports/class-wcj-reports-monthly-sales.php:106
8813
  msgid "Average / Order (excl. TAX)"
8814
  msgstr ""
8815
 
8816
+ #: includes/reports/class-wcj-reports-monthly-sales.php:107
8817
  msgid "Average / Day (excl. TAX)"
8818
  msgstr ""
8819
 
8820
+ #: includes/reports/class-wcj-reports-monthly-sales.php:108
8821
  msgid "Currency Rates"
8822
  msgstr ""
8823
 
8824
+ #: includes/reports/class-wcj-reports-monthly-sales.php:109
8825
  msgid "Orders by Currency"
8826
  msgstr ""
8827
 
8828
+ #: includes/reports/class-wcj-reports-monthly-sales.php:222
8829
+ #: includes/reports/class-wcj-reports-monthly-sales.php:238
8830
+ #: includes/reports/class-wcj-reports-monthly-sales.php:310
8831
+ #: includes/reports/class-wcj-reports-monthly-sales.php:315
8832
  #, php-format
8833
  msgid "Forecast: %s"
8834
  msgstr ""
8835
 
8836
+ #: includes/reports/class-wcj-reports-monthly-sales.php:262
8837
  msgid "Grab average rate"
8838
  msgstr ""
8839
 
8840
+ #: includes/reports/class-wcj-reports-monthly-sales.php:321
8841
  msgid "Totals"
8842
  msgstr ""
8843
 
8844
+ #: includes/reports/class-wcj-reports-monthly-sales.php:365
8845
  msgid "Report currency"
8846
  msgstr ""
8847
 
8848
+ #: includes/reports/class-wcj-reports-monthly-sales.php:385
8849
  #, php-format
8850
  msgid "Report generated in: %s s"
8851
  msgstr ""
8852
 
8853
+ #: includes/reports/class-wcj-reports-monthly-sales.php:389
8854
  msgid "Save Currency Rates"
8855
  msgstr ""
8856
 
8857
+ #: includes/reports/class-wcj-reports-monthly-sales.php:393
8858
  msgid "Reset Currency Rates"
8859
  msgstr ""
8860
 
8861
+ #: includes/reports/class-wcj-reports-product-sales-daily.php:183
8862
+ #: includes/reports/class-wcj-reports-sales.php:367
8863
+ #: includes/reports/wcj-class-reports-sales-gateways.php:128
8864
  msgid "Reports Settings"
8865
  msgstr ""
8866
 
8867
+ #: includes/reports/class-wcj-reports-product-sales-daily.php:211
8868
+ #: includes/reports/wcj-class-reports-sales-gateways.php:160
8869
  msgid "From:"
8870
  msgstr ""
8871
 
8872
+ #: includes/reports/class-wcj-reports-product-sales-daily.php:214
8873
+ #: includes/reports/wcj-class-reports-sales-gateways.php:163
8874
  msgid "To:"
8875
  msgstr ""
8876
 
8877
+ #: includes/reports/class-wcj-reports-product-sales-daily.php:217
8878
  msgid "Product:"
8879
  msgstr ""
8880
 
8881
+ #: includes/reports/class-wcj-reports-product-sales-daily.php:307
8882
  #, php-format
8883
  msgid "Total: %d"
8884
  msgstr ""
8885
 
8886
+ #: includes/reports/class-wcj-reports-product-sales-daily.php:312
8887
+ #: includes/reports/class-wcj-reports-product-sales-daily.php:317
8888
  #, php-format
8889
  msgid "Total: %s"
8890
  msgstr ""
8891
 
8892
+ #: includes/reports/class-wcj-reports-product-sales-daily.php:336
8893
+ #: includes/reports/wcj-class-reports-sales-gateways.php:196
8894
  #, php-format
8895
  msgid "Total orders: %d"
8896
  msgstr ""
8897
 
8898
+ #: includes/reports/class-wcj-reports-product-sales-daily.php:337
8899
+ #: includes/reports/class-wcj-reports-sales.php:400
8900
+ #: includes/reports/wcj-class-reports-sales-gateways.php:198
8901
  msgid "No sales data for current period."
8902
  msgstr ""
8903
 
8904
+ #: includes/reports/class-wcj-reports-sales.php:143
 
 
 
 
 
 
 
 
 
 
8905
  msgid "Variation"
8906
  msgstr ""
8907
 
8908
+ #: includes/reports/class-wcj-reports-sales.php:213
8909
  msgid "Last Sale"
8910
  msgstr ""
8911
 
8912
+ #: includes/reports/class-wcj-reports-sales.php:214
8913
  msgid "Total"
8914
  msgstr ""
8915
 
8916
+ #: includes/reports/class-wcj-reports-sales.php:336
8917
  msgid "Total Items"
8918
  msgstr ""
8919
 
8920
+ #: includes/reports/class-wcj-reports-sales.php:358
8921
  msgid "Total Profit"
8922
  msgstr ""
8923
 
8924
+ #: includes/reports/class-wcj-reports-sales.php:395
8925
  msgid "Filter products"
8926
  msgstr ""
8927
 
8928
+ #: includes/reports/class-wcj-reports-stock.php:45
8929
  msgid "All Products on Stock"
8930
  msgstr ""
8931
 
8932
+ #: includes/reports/class-wcj-reports-stock.php:46
8933
  msgid "Report shows all products that are on stock and some sales info."
8934
  msgstr ""
8935
 
8936
+ #: includes/reports/class-wcj-reports-stock.php:50
8937
  msgid "Understocked"
8938
  msgstr ""
8939
 
8940
+ #: includes/reports/class-wcj-reports-stock.php:51
8941
  msgid ""
8942
  "Report shows all products that are low in stock calculated on product's sales "
8943
  "data."
8944
  msgstr ""
8945
 
8946
+ #: includes/reports/class-wcj-reports-stock.php:52
8947
  msgid ""
8948
  "Threshold for minimum stock is equal to half of the sales in selected days "
8949
  "range."
8950
  msgstr ""
8951
 
8952
+ #: includes/reports/class-wcj-reports-stock.php:56
8953
  msgid "Overstocked"
8954
  msgstr ""
8955
 
8956
+ #: includes/reports/class-wcj-reports-stock.php:57
8957
  msgid ""
8958
  "Report shows all products that are on stock, but have no sales in selected "
8959
  "period. Only products added before the start date of selected period are "
8960
  "accounted."
8961
  msgstr ""
8962
 
8963
+ #: includes/reports/class-wcj-reports-stock.php:121
8964
+ #: includes/reports/class-wcj-reports-stock.php:197
8965
+ #: includes/reports/wcj-class-reports-sales-gateways.php:98
8966
+ msgid "N/A"
8967
+ msgstr ""
8968
+
8969
+ #: includes/reports/class-wcj-reports-stock.php:293
8970
  msgid "Stock price"
8971
  msgstr ""
8972
 
8973
+ #: includes/reports/class-wcj-reports-stock.php:294
8974
  msgid "Total stock price"
8975
  msgstr ""
8976
 
8977
+ #: includes/reports/class-wcj-reports-stock.php:295
8978
  msgid "Last sale"
8979
  msgstr ""
8980
 
8981
+ #: includes/reports/class-wcj-reports-stock.php:297
8982
  #, php-format
8983
  msgid "Sales in last %s days"
8984
  msgstr ""
8985
 
8986
+ #: includes/reports/class-wcj-reports-stock.php:298
8987
  msgid "Total sales"
8988
  msgstr ""
8989
 
8990
+ #: includes/reports/class-wcj-reports-stock.php:300
8991
  msgid "Stock to minimum"
8992
  msgstr ""
8993
 
8994
+ #: includes/reports/class-wcj-reports-stock.php:330
8995
  msgid "purchase price:"
8996
  msgstr ""
8997
 
8998
+ #: includes/reports/class-wcj-reports-stock.php:334
8999
  msgid "stock purchase price:"
9000
  msgstr ""
9001
 
9002
+ #: includes/reports/class-wcj-reports-stock.php:339
9003
  msgid "No sales yet"
9004
  msgstr ""
9005
 
9006
+ #: includes/reports/class-wcj-reports-stock.php:342
9007
  msgid "profit:"
9008
  msgstr ""
9009
 
9010
+ #: includes/reports/class-wcj-reports-stock.php:362
9011
  msgid "Total current stock value"
9012
  msgstr ""
9013
 
9014
+ #: includes/reports/class-wcj-reports-stock.php:363
9015
  msgid "Total stock value"
9016
  msgstr ""
9017
 
9018
+ #: includes/reports/class-wcj-reports-stock.php:364
9019
  msgid "Product stock value average"
9020
  msgstr ""
9021
 
9022
+ #: includes/reports/class-wcj-reports-stock.php:365
9023
  msgid "Product stock average"
9024
  msgstr ""
9025
 
9026
+ #: includes/reports/class-wcj-reports-stock.php:367
9027
  msgid "Total current stock purchase price"
9028
  msgstr ""
9029
 
9030
+ #: includes/reports/class-wcj-reports-stock.php:371
9031
  msgid "Report was generated in: "
9032
  msgstr ""
9033
 
9034
+ #: includes/reports/wcj-class-reports-sales-gateways.php:182
9035
+ msgid "Gateway"
9036
+ msgstr ""
9037
+
9038
  #: includes/settings/meta-box/wcj-settings-meta-box-add-to-cart-button-visibility.php:21
9039
  #: includes/settings/meta-box/wcj-settings-meta-box-add-to-cart-button-visibility.php:40
9040
  #: includes/settings/wcj-settings-admin-orders-list.php:139
9166
  msgstr ""
9167
 
9168
  #: includes/settings/meta-box/wcj-settings-meta-box-multicurrency.php:69
9169
+ #: includes/settings/meta-box/wcj-settings-meta-box-price-by-user-role.php:154
9170
  #: includes/settings/wcj-settings-price-by-user-role.php:186
9171
  #: includes/settings/wcj-settings-price-by-user-role.php:269
9172
  msgid "Make Empty Price"
9268
  msgid "Per Product Settings (press Update after changing)"
9269
  msgstr ""
9270
 
9271
+ #: includes/settings/meta-box/wcj-settings-meta-box-price-by-user-role.php:129
9272
  #: includes/settings/wcj-settings-price-by-user-role.php:36
9273
  msgid "Multiplier"
9274
  msgstr ""
9454
 
9455
  #: includes/settings/meta-box/wcj-settings-meta-box-product-images.php:21
9456
  #: includes/settings/meta-box/wcj-settings-meta-box-product-images.php:29
9457
+ #: includes/settings/wcj-settings-product-custom-info.php:131
9458
  #: includes/settings/wcj-settings-product-images.php:52
9459
  #: includes/settings/wcj-settings-product-images.php:61
9460
  #: includes/settings/wcj-settings-product-images.php:70
9879
  #: includes/settings/wcj-settings-add-to-cart.php:235
9880
  #: includes/settings/wcj-settings-add-to-cart.php:244
9881
  #: includes/settings/wcj-settings-payment-gateways-fees.php:59
9882
+ #: includes/settings/wcj-settings-product-custom-info.php:247
9883
  msgid "Leave blank to disable."
9884
  msgstr ""
9885
 
10026
  #: includes/settings/wcj-settings-offer-price.php:221
10027
  #: includes/settings/wcj-settings-offer-price.php:229
10028
  #: includes/tools/class-wcj-order-statuses-tool.php:187
10029
+ #: includes/tools/class-wcj-order-statuses-tool.php:271
10030
  msgid "Label"
10031
  msgstr ""
10032
 
10156
  #: includes/settings/wcj-settings-admin-tools.php:25
10157
  #, php-format
10158
  msgid ""
10159
+ "Will require %1$s capability to see Booster menus (instead of %2$s "
10160
+ "capability)."
10161
  msgstr ""
10162
 
10163
  #: includes/settings/wcj-settings-admin-tools.php:35
10389
  #: includes/settings/wcj-settings-checkout-custom-info.php:23
10390
  #: includes/settings/wcj-settings-mini-cart.php:22
10391
  #: includes/settings/wcj-settings-my-account.php:271
10392
+ #: includes/settings/wcj-settings-product-custom-info.php:59
10393
  msgid "Total Blocks"
10394
  msgstr ""
10395
 
10404
  #: includes/settings/wcj-settings-checkout-custom-info.php:72
10405
  #: includes/settings/wcj-settings-mini-cart.php:63
10406
  #: includes/settings/wcj-settings-my-account.php:348
10407
+ #: includes/settings/wcj-settings-product-custom-info.php:165
10408
  msgid "Position Order (i.e. Priority)"
10409
  msgstr ""
10410
 
10504
  msgstr ""
10505
 
10506
  #: includes/settings/wcj-settings-checkout-core-fields.php:94
10507
+ #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:357
10508
  msgid "required"
10509
  msgstr ""
10510
 
10692
  #: includes/settings/wcj-settings-checkout-custom-fields.php:219
10693
  #: includes/settings/wcj-settings-eu-vat-number.php:51
10694
  #: includes/templates/wcj-radio-for-variations.php:25
10695
+ #: includes/tools/class-wcj-order-statuses-tool.php:267
10696
  msgid "Clear"
10697
  msgstr ""
10698
 
11551
 
11552
  #: includes/settings/wcj-settings-checkout-files-upload.php:412
11553
  #, php-format
11554
+ msgid "Ignored, if %1$s is not included in %2$s option above."
11555
  msgstr ""
11556
 
11557
  #: includes/settings/wcj-settings-checkout-files-upload.php:430
11565
  #: includes/settings/wcj-settings-payment-gateways.php:62
11566
  #: includes/settings/wcj-settings-pdf-invoicing-advanced.php:50
11567
  #: includes/settings/wcj-settings-product-by-date.php:129
11568
+ #: includes/settings/wcj-settings-product-custom-info.php:241
11569
  #: includes/settings/wcj-settings-product-input-fields.php:394
11570
  #: includes/settings/wcj-settings-shipping-by-condition.php:177
11571
  msgid "Advanced Options"
11830
  #: includes/settings/wcj-settings-cross-sells.php:137
11831
  #, php-format
11832
  msgid ""
11833
+ "Please note that this option will work only if \"%1$s\" option is disabled in "
11834
+ "%2$s."
11835
  msgstr ""
11836
 
11837
  #: includes/settings/wcj-settings-cross-sells.php:138
12262
  msgstr ""
12263
 
12264
  #: includes/settings/wcj-settings-email-options.php:29
12265
+ #: includes/settings/wcj-settings-template-editor.php:72
12266
  #: includes/settings/wcj-settings-track-users.php:29
12267
  msgid "Info"
12268
  msgstr ""
13040
  #: includes/settings/wcj-settings-global-discount.php:36
13041
  #: includes/settings/wcj-settings-product-by-user.php:146
13042
  #: includes/settings/wcj-settings-products-xml.php:32
13043
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:172
13044
  msgid "Press Save changes after you change this number."
13045
  msgstr ""
13046
 
13232
  #: includes/settings/wcj-settings-left-to-free-shipping.php:22
13233
  #, php-format
13234
  msgid ""
13235
+ "You can also use <em>Booster - Left to Free Shipping</em> widget, %1$s "
13236
+ "shortcode or %2$s function."
13237
  msgstr ""
13238
 
13239
  #: includes/settings/wcj-settings-left-to-free-shipping.php:28
13240
  #, php-format
13241
+ msgid "In content replaced values are: %1$s, %2$s and %3$s."
13242
  msgstr ""
13243
 
13244
  #: includes/settings/wcj-settings-left-to-free-shipping.php:36
13881
 
13882
  #: includes/settings/wcj-settings-my-account.php:130
13883
  #, php-format
13884
+ msgid "Add in %1$s format. One per line. E.g.: %2$s."
13885
  msgstr ""
13886
 
13887
  #: includes/settings/wcj-settings-my-account.php:149
14158
  msgstr ""
14159
 
14160
  #: includes/settings/wcj-settings-offer-price.php:98
14161
+ #: includes/settings/wcj-settings-product-custom-info.php:142
14162
  #: includes/settings/wcj-settings-upsells.php:61
14163
  msgid "Before single product"
14164
  msgstr ""
14165
 
14166
  #: includes/settings/wcj-settings-offer-price.php:101
14167
+ #: includes/settings/wcj-settings-product-custom-info.php:147
14168
  msgid "Before add to cart form"
14169
  msgstr ""
14170
 
14171
  #: includes/settings/wcj-settings-offer-price.php:102
14172
+ #: includes/settings/wcj-settings-product-custom-info.php:150
14173
  msgid "After add to cart form"
14174
  msgstr ""
14175
 
14176
  #: includes/settings/wcj-settings-offer-price.php:104
14177
+ #: includes/settings/wcj-settings-product-custom-info.php:146
14178
  #: includes/settings/wcj-settings-upsells.php:65
14179
  msgid "After single product"
14180
  msgstr ""
14284
 
14285
  #: includes/settings/wcj-settings-offer-price.php:326
14286
  #, php-format
14287
+ msgid "Use %1$s to send to administrator email: %2$s."
 
 
 
 
 
14288
  msgstr ""
14289
 
14290
  #: includes/settings/wcj-settings-offer-price.php:366
14457
  #, php-format
14458
  msgid ""
14459
  "Message to customer if order is below minimum amount. Default: You must have "
14460
+ "an order with a minimum of %1$s to place your order, your current order total "
14461
+ "is %2$s."
14462
  msgstr ""
14463
 
14464
  #: includes/settings/wcj-settings-order-min-amount.php:68
16633
  msgstr ""
16634
 
16635
  #: includes/settings/wcj-settings-product-add-to-cart.php:44
16636
+ #: includes/settings/wcj-settings-product-tabs.php:255
16637
  msgid "This will add meta boxes to each product's edit page."
16638
  msgstr ""
16639
 
16860
  msgstr ""
16861
 
16862
  #: includes/settings/wcj-settings-product-addons.php:235
16863
+ #: includes/settings/wcj-settings-product-custom-info.php:148
16864
  #: includes/settings/wcj-settings-product-input-fields.php:228
16865
  #: includes/settings/wcj-settings-product-open-pricing.php:20
16866
  msgid "Before add to cart button"
16867
  msgstr ""
16868
 
16869
  #: includes/settings/wcj-settings-product-addons.php:236
16870
+ #: includes/settings/wcj-settings-product-custom-info.php:149
16871
  #: includes/settings/wcj-settings-product-input-fields.php:229
16872
  #: includes/settings/wcj-settings-product-open-pricing.php:21
16873
  msgid "After add to cart button"
17169
 
17170
  #: includes/settings/wcj-settings-product-by-condition.php:91
17171
  #: includes/settings/wcj-settings-related-products.php:182
17172
+ #: includes/shortcodes/class-wcj-order-items-shortcodes.php:216
17173
  msgid "Standard"
17174
  msgstr ""
17175
 
17334
 
17335
  #: includes/settings/wcj-settings-product-by-user.php:18
17336
  #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:192
17337
+ #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:400
17338
  msgid "Image"
17339
  msgstr ""
17340
 
17383
  msgstr ""
17384
 
17385
  #: includes/settings/wcj-settings-product-by-user.php:130
17386
+ #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:317
17387
  msgid "\"%product_title%\" successfully added!"
17388
  msgstr ""
17389
 
17392
  msgstr ""
17393
 
17394
  #: includes/settings/wcj-settings-product-by-user.php:137
17395
+ #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:325
17396
  msgid "\"%product_title%\" successfully edited!"
17397
  msgstr ""
17398
 
17413
  "Check to send email to product user when customer place order successfully"
17414
  msgstr ""
17415
 
17416
+ #: includes/settings/wcj-settings-product-custom-info.php:49
17417
  msgid "Single Product Pages"
17418
  msgstr ""
17419
 
17420
+ #: includes/settings/wcj-settings-product-custom-info.php:49
17421
  #: includes/settings/wcj-settings-product-msrp.php:17
17422
  msgid "Archives"
17423
  msgstr ""
17424
 
17425
+ #: includes/settings/wcj-settings-product-custom-info.php:122
17426
  #, php-format
17427
  msgid "Block #%s"
17428
  msgstr ""
17429
 
17430
+ #: includes/settings/wcj-settings-product-custom-info.php:151
17431
  msgid "Product meta start"
17432
  msgstr ""
17433
 
17434
+ #: includes/settings/wcj-settings-product-custom-info.php:152
17435
  msgid "Product meta end"
17436
  msgstr ""
17437
 
17438
+ #: includes/settings/wcj-settings-product-custom-info.php:157
17439
  msgid "Inside product title"
17440
  msgstr ""
17441
 
17442
+ #: includes/settings/wcj-settings-product-custom-info.php:172
17443
  #: includes/settings/wcj-settings-wholesale-price.php:127
17444
  msgid "Product Categories to Include"
17445
  msgstr ""
17446
 
17447
+ #: includes/settings/wcj-settings-product-custom-info.php:173
17448
+ #: includes/settings/wcj-settings-product-custom-info.php:183
17449
+ #: includes/settings/wcj-settings-product-custom-info.php:193
17450
+ #: includes/settings/wcj-settings-product-custom-info.php:203
17451
+ #: includes/settings/wcj-settings-product-custom-info.php:213
17452
+ #: includes/settings/wcj-settings-product-custom-info.php:223
17453
  msgid "Leave blank to disable the option."
17454
  msgstr ""
17455
 
17456
+ #: includes/settings/wcj-settings-product-custom-info.php:182
17457
  #: includes/settings/wcj-settings-wholesale-price.php:136
17458
  msgid "Product Categories to Exclude"
17459
  msgstr ""
17460
 
17461
+ #: includes/settings/wcj-settings-product-custom-info.php:192
17462
  msgid "Product Tags to Include"
17463
  msgstr ""
17464
 
17465
+ #: includes/settings/wcj-settings-product-custom-info.php:202
17466
  msgid "Product Tags to Exclude"
17467
  msgstr ""
17468
 
17469
+ #: includes/settings/wcj-settings-product-custom-info.php:212
17470
  #: includes/settings/wcj-settings-products-xml.php:171
17471
  #: includes/settings/wcj-settings-wholesale-price.php:111
17472
  msgid "Products to Include"
17473
  msgstr ""
17474
 
17475
+ #: includes/settings/wcj-settings-product-custom-info.php:222
17476
  #: includes/settings/wcj-settings-products-xml.php:181
17477
  #: includes/settings/wcj-settings-wholesale-price.php:120
17478
  msgid "Products to Exclude"
17479
  msgstr ""
17480
 
17481
+ #: includes/settings/wcj-settings-product-custom-info.php:246
17482
  msgid "Extra Filters"
17483
  msgstr ""
17484
 
17485
+ #: includes/settings/wcj-settings-product-custom-info.php:248
17486
  msgid "You can add custom filters here (one per line, in filter|title format)."
17487
  msgstr ""
17488
 
17489
+ #: includes/settings/wcj-settings-product-custom-info.php:250
17490
  #, php-format
17491
  msgid "E.g.: %s."
17492
  msgstr ""
17854
 
17855
  #: includes/settings/wcj-settings-product-input-fields.php:410
17856
  #, php-format
17857
+ msgid "Enable this if you have single quotes %1$s converted to %2$s."
17858
  msgstr ""
17859
 
17860
  #: includes/settings/wcj-settings-product-listings.php:34
18217
 
18218
  #: includes/settings/wcj-settings-product-price-by-formula.php:26
18219
  #, php-format
18220
+ msgid "Use %1$s variable for product's base price. For example: %2$s."
18221
  msgstr ""
18222
 
18223
  #: includes/settings/wcj-settings-product-price-by-formula.php:36
18321
  msgstr ""
18322
 
18323
  #: includes/settings/wcj-settings-product-tabs.php:100
18324
+ #: includes/settings/wcj-settings-product-tabs.php:318
18325
  msgid "You can use shortcodes here..."
18326
  msgstr ""
18327
 
18328
  #: includes/settings/wcj-settings-product-tabs.php:121
18329
+ #: includes/settings/wcj-settings-product-tabs.php:339
18330
  msgid "PRODUCTS to HIDE this tab"
18331
  msgstr ""
18332
 
18333
  #: includes/settings/wcj-settings-product-tabs.php:122
18334
+ #: includes/settings/wcj-settings-product-tabs.php:340
18335
  msgid "To hide this tab from some products, enter products here."
18336
  msgstr ""
18337
 
18338
  #: includes/settings/wcj-settings-product-tabs.php:130
18339
+ #: includes/settings/wcj-settings-product-tabs.php:348
18340
  msgid "PRODUCTS to SHOW this tab"
18341
  msgstr ""
18342
 
18343
  #: includes/settings/wcj-settings-product-tabs.php:131
18344
+ #: includes/settings/wcj-settings-product-tabs.php:349
18345
  msgid "To show this tab only for some products, enter products here."
18346
  msgstr ""
18347
 
18348
  #: includes/settings/wcj-settings-product-tabs.php:139
18349
+ #: includes/settings/wcj-settings-product-tabs.php:357
18350
  msgid "CATEGORIES to HIDE this tab"
18351
  msgstr ""
18352
 
18353
  #: includes/settings/wcj-settings-product-tabs.php:140
18354
+ #: includes/settings/wcj-settings-product-tabs.php:358
18355
  msgid "To hide this tab from some categories, enter categories here."
18356
  msgstr ""
18357
 
18358
  #: includes/settings/wcj-settings-product-tabs.php:148
18359
+ #: includes/settings/wcj-settings-product-tabs.php:366
18360
  msgid "CATEGORIES to SHOW this tab"
18361
  msgstr ""
18362
 
18363
  #: includes/settings/wcj-settings-product-tabs.php:149
18364
+ #: includes/settings/wcj-settings-product-tabs.php:367
18365
  msgid "To show this tab only for some categories, enter categories here."
18366
  msgstr ""
18367
 
18368
  #: includes/settings/wcj-settings-product-tabs.php:157
18369
+ #: includes/settings/wcj-settings-product-tabs.php:375
18370
  msgid "TAGS to HIDE this tab"
18371
  msgstr ""
18372
 
18373
  #: includes/settings/wcj-settings-product-tabs.php:158
18374
+ #: includes/settings/wcj-settings-product-tabs.php:376
18375
  msgid "To hide this tab from some tags, enter tags here."
18376
  msgstr ""
18377
 
18378
  #: includes/settings/wcj-settings-product-tabs.php:166
18379
+ #: includes/settings/wcj-settings-product-tabs.php:384
18380
  msgid "TAGS to SHOW this tab"
18381
  msgstr ""
18382
 
18383
  #: includes/settings/wcj-settings-product-tabs.php:167
18384
+ #: includes/settings/wcj-settings-product-tabs.php:385
18385
  msgid "To show this tab only for some tags, enter tags here."
18386
  msgstr ""
18387
 
18409
  msgid "To hide this tab from some categories, enter category IDs here."
18410
  msgstr ""
18411
 
18412
+ #: includes/settings/wcj-settings-product-tabs.php:227
18413
  msgid "Comma separated CATEGORY IDs to SHOW this tab"
18414
  msgstr ""
18415
 
18416
+ #: includes/settings/wcj-settings-product-tabs.php:228
18417
  msgid "To show this tab only for some categories, enter category IDs here."
18418
  msgstr ""
18419
 
18420
+ #: includes/settings/wcj-settings-product-tabs.php:247
18421
  msgid "Custom Product Tabs - Per Product"
18422
  msgstr ""
18423
 
18424
+ #: includes/settings/wcj-settings-product-tabs.php:249
18425
  msgid "This section lets you set defaults for per product custom tabs."
18426
  msgstr ""
18427
 
18428
+ #: includes/settings/wcj-settings-product-tabs.php:253
18429
  msgid "Enable Per Product Custom Product Tabs"
18430
  msgstr ""
18431
 
18432
+ #: includes/settings/wcj-settings-product-tabs.php:261
18433
  msgid "Use Visual Editor"
18434
  msgstr ""
18435
 
18436
+ #: includes/settings/wcj-settings-product-tabs.php:268
18437
  msgid "Add Per Product Tabs Content to \"Yoast SEO\" plugin analysis"
18438
  msgstr ""
18439
 
18440
+ #: includes/settings/wcj-settings-product-tabs.php:275
18441
  msgid "Default Per Product Custom Product Tabs Number"
18442
  msgstr ""
18443
 
18444
+ #: includes/settings/wcj-settings-product-tabs.php:297
18445
  msgid "Default Title"
18446
  msgstr ""
18447
 
18448
+ #: includes/settings/wcj-settings-product-tabs.php:304
18449
  msgid "Default Key"
18450
  msgstr ""
18451
 
18452
+ #: includes/settings/wcj-settings-product-tabs.php:305
18453
  msgid "The Default unique key for each product tab."
18454
  msgstr ""
18455
 
18456
+ #: includes/settings/wcj-settings-product-tabs.php:311
18457
  msgid "Default Priority (i.e. Order)"
18458
  msgstr ""
18459
 
18460
+ #: includes/settings/wcj-settings-product-tabs.php:317
18461
  msgid "Default Content"
18462
  msgstr ""
18463
 
18464
+ #: includes/settings/wcj-settings-product-tabs.php:325
18465
  msgid "Default Link"
18466
  msgstr ""
18467
 
18468
+ #: includes/settings/wcj-settings-product-tabs.php:326
18469
  msgid "Leave blank for default behaviour."
18470
  msgstr ""
18471
 
18472
+ #: includes/settings/wcj-settings-product-tabs.php:333
18473
  msgid "Default \"Link - Open in New Window\""
18474
  msgstr ""
18475
 
18476
+ #: includes/settings/wcj-settings-product-tabs.php:404
18477
  msgid "WooCommerce Standard Product Tabs Options"
18478
  msgstr ""
18479
 
18480
+ #: includes/settings/wcj-settings-product-tabs.php:406
18481
  msgid "This section lets you customize single product tabs."
18482
  msgstr ""
18483
 
18484
+ #: includes/settings/wcj-settings-product-tabs.php:410
18485
  msgid "Description Tab"
18486
  msgstr ""
18487
 
18488
+ #: includes/settings/wcj-settings-product-tabs.php:411
18489
+ #: includes/settings/wcj-settings-product-tabs.php:432
18490
+ #: includes/settings/wcj-settings-product-tabs.php:453
18491
  msgid "Remove tab from product page"
18492
  msgstr ""
18493
 
18494
+ #: includes/settings/wcj-settings-product-tabs.php:418
18495
+ #: includes/settings/wcj-settings-product-tabs.php:439
18496
+ #: includes/settings/wcj-settings-product-tabs.php:460
18497
  msgid "Leave blank for WooCommerce defaults"
18498
  msgstr ""
18499
 
18500
+ #: includes/settings/wcj-settings-product-tabs.php:431
18501
  msgid "Additional Information Tab"
18502
  msgstr ""
18503
 
18504
+ #: includes/settings/wcj-settings-product-tabs.php:452
18505
  msgid "Reviews Tab"
18506
  msgstr ""
18507
 
19489
 
19490
  #: includes/settings/wcj-settings-sku.php:89
19491
  #, php-format
19492
+ msgid "Used in %1$s, %2$s, %3$s and %4$s."
19493
  msgstr ""
19494
 
19495
  #: includes/settings/wcj-settings-sku.php:103
19855
 
19856
  #: includes/settings/wcj-settings-stock.php:52
19857
  #, php-format
19858
+ msgid "Used only if %1$s is selected for %2$s in %3$s."
19859
  msgstr ""
19860
 
19861
  #: includes/settings/wcj-settings-stock.php:53
20067
  msgid "Paths"
20068
  msgstr ""
20069
 
20070
+ #: includes/settings/wcj-settings-template-editor.php:40
20071
+ #, php-format
20072
+ msgid "One path per line relative to: %s"
20073
  msgstr ""
20074
 
20075
+ #: includes/settings/wcj-settings-template-editor.php:52
20076
  msgid "Templates to Edit"
20077
  msgstr ""
20078
 
20079
+ #: includes/settings/wcj-settings-template-editor.php:53
20080
  msgid "Save changes after you set this option to see new options fields."
20081
  msgstr ""
20082
 
20083
+ #: includes/settings/wcj-settings-template-editor.php:75
20084
  msgid "Default template path"
20085
  msgstr ""
20086
 
20087
+ #: includes/settings/wcj-settings-template-editor.php:76
20088
  msgid "Replaced template path"
20089
  msgstr ""
20090
 
20476
  msgid "Regenerate wpml-config.xml file"
20477
  msgstr ""
20478
 
20479
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:46
20480
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:60
 
20481
  msgid "Booster: Custom Shipping Method"
20482
  msgstr ""
20483
 
20484
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:99
20485
+ msgid "Flat Rate"
 
20486
  msgstr ""
20487
 
20488
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:100
20489
+ msgid "By Total Cart Weight"
20490
  msgstr ""
20491
 
20492
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:101
20493
+ msgid "By Total Cart Weight Table"
20494
  msgstr ""
20495
 
20496
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:102
20497
+ msgid "By Total Cart Quantity"
20498
  msgstr ""
20499
 
20500
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:110
20501
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:131
20502
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:234
20503
+ msgid "By Total Cart Quantity Table"
20504
  msgstr ""
20505
 
20506
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:118
20507
+ msgid "Enable Custom Shipping"
20508
  msgstr ""
20509
 
20510
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:131
20511
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:233
 
20512
  msgid "Cost calculation type."
20513
  msgstr ""
20514
 
20515
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:139
 
 
 
 
 
20516
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:243
 
20517
  msgid ""
20518
  "Cost. If calculating by weight - then cost per one weight unit. If "
20519
  "calculating by quantity - then cost per one piece."
20520
  msgstr ""
20521
 
20522
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:148
 
 
 
 
 
 
 
20523
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:262
 
20524
  msgid "Min Weight"
20525
  msgstr ""
20526
 
20527
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:150
20528
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:264
 
20529
  msgid "Minimum total cart weight. Set zero to disable."
20530
  msgstr ""
20531
 
20532
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:159
20533
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:274
 
20534
  msgid "Max Weight"
20535
  msgstr ""
20536
 
20537
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:161
20538
  #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:276
 
20539
  msgid "Maximum total cart weight. Set zero to disable."
20540
  msgstr ""
20541
 
20542
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:170
20543
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:302
20544
+ msgid "Table Total Rows"
20545
  msgstr ""
20546
 
20547
+ #: includes/shipping/class-wc-shipping-wcj-custom-template.php:184
20548
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:152
20549
+ msgid "Max Weight or Quantity"
 
 
20550
  msgstr ""
20551
 
20552
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:206
20553
+ msgid "Flat rate"
 
20554
  msgstr ""
20555
 
20556
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:207
20557
+ msgid "By total cart weight"
20558
  msgstr ""
20559
 
20560
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:208
20561
+ msgid "By total cart weight table"
20562
  msgstr ""
20563
 
20564
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:209
20565
+ msgid "By total cart quantity"
20566
  msgstr ""
20567
 
20568
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:217
20569
+ msgid "By total cart quantity table"
20570
  msgstr ""
20571
 
20572
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:249
20573
+ msgid "Cost Rounding"
20574
  msgstr ""
20575
 
20576
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:250
20577
+ msgid "How the final cost will be rounded."
20578
+ msgstr ""
20579
+
20580
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:286
20581
+ msgid "Apply Formula and Shortcodes to Costs"
20582
+ msgstr ""
20583
+
20584
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:289
20585
+ #, php-format
20586
+ msgid ""
20587
+ "You can use %1$s and %2$s params in formula, e.g.: %3$s. Also you can use "
20588
+ "shortcodes, e.g.: %4$s."
20589
+ msgstr ""
20590
+
20591
+ #: includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php:304
20592
+ msgid "Press \"Save changes\" and reload the page after you change this number."
20593
  msgstr ""
20594
 
20595
  #: includes/shortcodes/class-wcj-general-shortcodes.php:104
20604
  msgid "Attribute \"name\" is required!"
20605
  msgstr ""
20606
 
20607
+ #: includes/shortcodes/class-wcj-orders-shortcodes.php:394
20608
  #, php-format
20609
  msgid "Refund #%1$s - %2$s"
20610
  msgstr ""
20622
  msgstr ""
20623
 
20624
  #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:195
20625
+ #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:426
20626
  msgid "Product URL"
20627
  msgstr ""
20628
 
20635
  msgid "Sale price must be less than the regular price!"
20636
  msgstr ""
20637
 
20638
+ #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:309
20639
  msgid "Error!"
20640
  msgstr ""
20641
 
20642
+ #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:352
20643
  msgid "Add New Product"
20644
  msgstr ""
20645
 
20646
+ #: includes/shortcodes/class-wcj-products-add-form-shortcodes.php:352
20647
  msgid "Edit Product"
20648
  msgstr ""
20649
 
20650
+ #: includes/shortcodes/class-wcj-products-shortcodes.php:349
20651
  #, php-format
20652
  msgid "%s ago"
20653
  msgstr ""
20654
 
20655
+ #: includes/shortcodes/class-wcj-products-shortcodes.php:356
20656
  msgid "No sales yet."
20657
  msgstr ""
20658
 
20659
+ #: includes/shortcodes/class-wcj-products-shortcodes.php:643
20660
  msgid "In stock"
20661
  msgstr ""
20662
 
20663
+ #: includes/shortcodes/class-wcj-products-shortcodes.php:1135
20664
  msgid "from %level_min_qty% pcs."
20665
  msgstr ""
20666
 
20668
  msgid "This product is currently out of stock and unavailable."
20669
  msgstr ""
20670
 
20671
+ #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:58
20672
+ #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:90
20673
  msgid "VAT"
20674
  msgstr ""
20675
 
20676
+ #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:97
20677
  msgid "Add EU Countries VAT Rates"
20678
  msgstr ""
20679
 
20680
+ #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:97
20681
  msgid "Note: will add duplicates."
20682
  msgstr ""
20683
 
20684
+ #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:105
20685
  msgid "List of EU VAT rates to be added"
20686
  msgstr ""
20687
 
20688
+ #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:111
20689
+ #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:131
20690
  msgid "Rate"
20691
  msgstr ""
20692
 
20693
+ #: includes/tools/class-wcj-eu-countries-vat-rates-tool.php:125
20694
  msgid "Current standard tax rates"
20695
  msgstr ""
20696
 
20747
  msgstr ""
20748
 
20749
  #: includes/tools/class-wcj-order-statuses-tool.php:188
20750
+ #: includes/tools/class-wcj-order-statuses-tool.php:272
20751
  msgid "Icon Code"
20752
  msgstr ""
20753
 
20754
  #: includes/tools/class-wcj-order-statuses-tool.php:189
20755
+ #: includes/tools/class-wcj-order-statuses-tool.php:273
20756
  msgid "Color"
20757
  msgstr ""
20758
 
20759
  #: includes/tools/class-wcj-order-statuses-tool.php:190
20760
+ #: includes/tools/class-wcj-order-statuses-tool.php:274
20761
  msgid "Text Color"
20762
  msgstr ""
20763
 
20765
  msgid "Get Booster Plus to enable."
20766
  msgstr ""
20767
 
20768
+ #: includes/tools/class-wcj-order-statuses-tool.php:265
20769
  msgid "Edit custom status"
20770
  msgstr ""
20771
 
20772
+ #: includes/tools/class-wcj-order-statuses-tool.php:265
20773
  msgid "Add new custom status"
20774
  msgstr ""
20775
 
20776
+ #: includes/tools/class-wcj-order-statuses-tool.php:270
20777
  msgid "Slug (without <code>wc-</code> prefix)"
20778
  msgstr ""
20779
 
20780
+ #: includes/tools/class-wcj-order-statuses-tool.php:340
20781
  msgid "Delete All Custom Statuses"
20782
  msgstr ""
20783
 
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: anbinder, karzin, pluggabl
3
  Tags: woocommerce customization, woocommerce bundle, woocommerce product addon, woocommerce integration, ecommerce plugin
4
  Requires at least: 4.4
5
- Tested up to: 6.0
6
  Requires PHP: 5.6
7
- Stable tag: 5.6.1
8
  License: GNU General Public License v3.0
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -275,6 +275,17 @@ To unlock all Booster for WooCommerce features, please install additional paid B
275
 
276
  == Changelog ==
277
 
 
 
 
 
 
 
 
 
 
 
 
278
  = 5.6.1 01/07/2022 =
279
 
280
  * FIXED - PRODUCTS - User Products - Fixed Fatal Error: Uncaught Error: Cannot access protected property XXX::$id.
2
  Contributors: anbinder, karzin, pluggabl
3
  Tags: woocommerce customization, woocommerce bundle, woocommerce product addon, woocommerce integration, ecommerce plugin
4
  Requires at least: 4.4
5
+ Tested up to: 6.0.1
6
  Requires PHP: 5.6
7
+ Stable tag: 5.6.2
8
  License: GNU General Public License v3.0
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
275
 
276
  == Changelog ==
277
 
278
+ = 5.6.2 27/07/2022 =
279
+
280
+ * NEW FEATURE - PDF INVOICING & PACKING SLIPS - PDF Invoicing - Added a new shortcode Attribute to exclude tax in order to refund the Total. [wcj_order_shipping_price excl_tax="yes" ]
281
+ * FIXED - SHIPPING & ORDERS - Maximum Products per User - Remove Max product per user meta from product while duplicating Product.
282
+ * FIXED - EMAILS & MISC. - Export - Escape the html content from the "Additional Export Orders Fields" value.
283
+ * FIXED - EMAILS & MISC. - Export - Array to string conversion for the "Additional Export Products Fields" value.
284
+ * FIXED - PHP Warning: Undefined array key "path" in /includes/functions/wcj-functions-booster-core.php ...
285
+ * FIXED - Added Security vulnerability fixes.
286
+ * WooCommerce 6.7.0 tested
287
+ * WordPress 6.0.1 tested
288
+
289
  = 5.6.1 01/07/2022 =
290
 
291
  * FIXED - PRODUCTS - User Products - Fixed Fatal Error: Uncaught Error: Cannot access protected property XXX::$id.
version-details.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ {
2
+ "0" : "= 5.6.2 27/07/2022 =",
3
+ "1" : "* NEW FEATURE - PDF INVOICING & PACKING SLIPS - PDF Invoicing - Added a new shortcode Attribute to exclude tax in order to refund the Total. [wcj_order_shipping_price excl_tax=\"yes\" ]",
4
+ "2" : "* FIXED - SHIPPING & ORDERS - Maximum Products per User - Remove Max product per user meta from product while duplicating Product",
5
+ "3" : "* FIXED - EMAILS & MISC. - Export - Escape the html content from the \"Additional Export Orders Fields\" value. "
6
+ }
version-details.txt DELETED
@@ -1,5 +0,0 @@
1
- = 5.6.1 01/07/2022 =
2
-
3
- * FIXED - PRODUCTS - User Products - Fixed Fatal Error: Uncaught Error: Cannot access protected property XXX::$id.
4
- * FIXED - PRODUCTS - Tax Display - Fixed Price displayed without taxes as default
5
- * FIXED - PRODUCTS - Price based on User Role - Parse error: syntax error, unexpected ‘)’ in .../includes/class-wcj-price-by-user-role.php on line 417.
 
 
 
 
 
woocommerce-jetpack.php CHANGED
@@ -1,15 +1,15 @@
1
- <?php
2
  /**
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: 5.6.1
7
  * Author: Pluggabl LLC
8
  * Author URI: https://booster.io
9
  * Text Domain: woocommerce-jetpack
10
  * Domain Path: /langs
11
  * Copyright: © 2020 Pluggabl LLC.
12
- * WC tested up to: 6.5.1
13
  * License: GNU General Public License v3.0
14
  * php version 5.6
15
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -65,7 +65,7 @@ if ( ! class_exists( 'WC_Jetpack' ) ) :
65
  * @var string
66
  * @since 2.4.7
67
  */
68
- public $version = '5.6.1';
69
 
70
  /**
71
  * The single instance of the class
1
+ <?php //phpcs:ignore
2
  /**
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: 5.6.2
7
  * Author: Pluggabl LLC
8
  * Author URI: https://booster.io
9
  * Text Domain: woocommerce-jetpack
10
  * Domain Path: /langs
11
  * Copyright: © 2020 Pluggabl LLC.
12
+ * WC tested up to: 6.7.0
13
  * License: GNU General Public License v3.0
14
  * php version 5.6
15
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
65
  * @var string
66
  * @since 2.4.7
67
  */
68
+ public $version = '5.6.2';
69
 
70
  /**
71
  * The single instance of the class