Booster for WooCommerce - Version 2.4.6

Version Description

  • 07/04/2016 =
  • Dev - Documentation link added to WCJ_Module class.
  • Dev - Functions - wcj_current_filter_priority() function added (affected Checkout Files Upload module).
  • Dev - BUTTON & PRICE LABELS - Add to Cart Labels - Code refactoring.
  • Dev - BUTTON & PRICE LABELS - Call for Price - Code refactoring.
  • Dev - PRODUCTS - Product Listings - Code refactoring.
  • Fix - PRODUCTS - Product Info V2 - Priority bug fixed.
  • Fix - PRODUCTS - Product Input Fields - File type field - Admin order view - Check for not empty file name added.
  • Fix - CART & CHECKOUT - Checkout Custom Fields - Admin fields edit - Styling bug fixed (full row styling added) and proper select type display added.
  • Fix - CART & CHECKOUT - Cart - Priority bug fixed.
  • Dev - CART & CHECKOUT - Cart - Documentation link added. Reset button added.
  • Fix - CART & CHECKOUT - Mini Cart - Priority bug fixed.
  • Dev - CART & CHECKOUT - Mini Cart - Documentation link added.
  • Dev - SHIPPING & ORDERS - Shipping Calculator - Code refactoring.
  • Dev - EMAILS & MISC. - Reports - Code refactoring.
Download this release

Release Info

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

Code changes from version 2.4.5 to 2.4.6

includes/add-to-cart/class-wcj-add-to-cart-per-product-type.php CHANGED
@@ -4,82 +4,78 @@
4
  *
5
  * The WooCommerce Jetpack Add to Cart per Product Type class.
6
  *
7
- * @class WCJ_Add_To_Cart_Per_Product_Type
8
- * @version 2.2.0
9
- * @category Class
10
- * @author Algoritmika Ltd.
11
  */
12
 
13
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
14
-
15
  if ( ! class_exists( 'WCJ_Add_To_Cart_Per_Product_Type' ) ) :
16
-
17
  class WCJ_Add_To_Cart_Per_Product_Type {
18
-
19
- /**
20
- * Constructor.
21
- */
22
- public function __construct() {
23
-
24
- // Main hooks
25
- if ( 'yes' === get_option( 'wcj_add_to_cart_enabled' ) ) {
26
  if ( get_option( 'wcj_add_to_cart_text_enabled' ) == 'yes' ) {
27
- add_filter( 'woocommerce_product_single_add_to_cart_text', array( $this, 'custom_add_to_cart_button_text' ), 100 );
28
- add_filter( 'woocommerce_product_add_to_cart_text', array( $this, 'custom_add_to_cart_button_text' ), 100 );
29
- }
30
- }
31
- }
32
-
33
- /**
34
- * custom_add_to_cart_button_text.
35
- */
36
- public function custom_add_to_cart_button_text( $add_to_cart_text ) {
37
-
38
  global $woocommerce, $product;
39
-
40
  if ( ! $product )
41
  return $add_to_cart_text;
42
 
43
  $product_type = $product->product_type;
44
-
45
  if ( ! in_array( $product_type, array( 'external', 'grouped', 'simple', 'variable' ) ) )
46
  $product_type = 'other';
47
-
48
- $single_or_archive = '';
49
  if ( current_filter() == 'woocommerce_product_single_add_to_cart_text' ) $single_or_archive = 'single';
50
- else if ( current_filter() == 'woocommerce_product_add_to_cart_text' ) $single_or_archive = 'archives';
51
-
52
  if ( '' != $single_or_archive ) {
53
-
54
  //if ( 'yes' === get_option( 'wcj_add_to_cart_text_enabled_on_' . $single_or_archive . '_in_cart_' . $product_type, 'no' ) ) {
55
  if ( '' != get_option( 'wcj_add_to_cart_text_on_' . $single_or_archive . '_in_cart_' . $product_type, '' ) ) {
56
- foreach( $woocommerce->cart->get_cart() as $cart_item_key => $values ) {
57
- $_product = $values['data'];
58
- if( get_the_ID() == $_product->id )
59
  return get_option( 'wcj_add_to_cart_text_on_' . $single_or_archive . '_in_cart_' . $product_type );
60
  }
61
  }
62
-
63
  $text_on_no_price = get_option( 'wcj_add_to_cart_text_on_' . $single_or_archive . '_no_price_' . $product_type, '' );
64
  if ( '' != $text_on_no_price && '' === $product->get_price() )
65
  return $text_on_no_price;
66
-
67
  $text_on_zero_price = get_option( 'wcj_add_to_cart_text_on_' . $single_or_archive . '_zero_price_' . $product_type, '' );
68
  if ( '' != $text_on_zero_price && 0 == $product->get_price() )
69
- return $text_on_zero_price;
70
-
71
  //if ( get_option( 'wcj_add_to_cart_text_enabled_on_' . $single_or_archive . '_' . $product_type ) == 'yes' )
72
  if ( '' != get_option( 'wcj_add_to_cart_text_on_' . $single_or_archive . '_' . $product_type ) )
73
  return get_option( 'wcj_add_to_cart_text_on_' . $single_or_archive . '_' . $product_type );
74
  else
75
- return $add_to_cart_text;
76
  }
77
 
78
  // Default
79
  return $add_to_cart_text;
80
- }
81
  }
82
-
83
  endif;
84
-
85
  return new WCJ_Add_To_Cart_Per_Product_Type();
4
  *
5
  * The WooCommerce Jetpack Add to Cart per Product Type class.
6
  *
7
+ * @version 2.2.0
8
+ * @author Algoritmika Ltd.
 
 
9
  */
10
 
11
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
12
+
13
  if ( ! class_exists( 'WCJ_Add_To_Cart_Per_Product_Type' ) ) :
14
+
15
  class WCJ_Add_To_Cart_Per_Product_Type {
16
+
17
+ /**
18
+ * Constructor.
19
+ */
20
+ public function __construct() {
21
+ if ( 'yes' === get_option( 'wcj_add_to_cart_enabled' ) ) {
 
 
22
  if ( get_option( 'wcj_add_to_cart_text_enabled' ) == 'yes' ) {
23
+ add_filter( 'woocommerce_product_single_add_to_cart_text', array( $this, 'custom_add_to_cart_button_text' ), 100 );
24
+ add_filter( 'woocommerce_product_add_to_cart_text', array( $this, 'custom_add_to_cart_button_text' ), 100 );
25
+ }
26
+ }
27
+ }
28
+
29
+ /**
30
+ * custom_add_to_cart_button_text.
31
+ */
32
+ public function custom_add_to_cart_button_text( $add_to_cart_text ) {
33
+
34
  global $woocommerce, $product;
35
+
36
  if ( ! $product )
37
  return $add_to_cart_text;
38
 
39
  $product_type = $product->product_type;
40
+
41
  if ( ! in_array( $product_type, array( 'external', 'grouped', 'simple', 'variable' ) ) )
42
  $product_type = 'other';
43
+
44
+ $single_or_archive = '';
45
  if ( current_filter() == 'woocommerce_product_single_add_to_cart_text' ) $single_or_archive = 'single';
46
+ elseif ( current_filter() == 'woocommerce_product_add_to_cart_text' ) $single_or_archive = 'archives';
47
+
48
  if ( '' != $single_or_archive ) {
49
+
50
  //if ( 'yes' === get_option( 'wcj_add_to_cart_text_enabled_on_' . $single_or_archive . '_in_cart_' . $product_type, 'no' ) ) {
51
  if ( '' != get_option( 'wcj_add_to_cart_text_on_' . $single_or_archive . '_in_cart_' . $product_type, '' ) ) {
52
+ foreach( $woocommerce->cart->get_cart() as $cart_item_key => $values ) {
53
+ $_product = $values['data'];
54
+ if( get_the_ID() == $_product->id )
55
  return get_option( 'wcj_add_to_cart_text_on_' . $single_or_archive . '_in_cart_' . $product_type );
56
  }
57
  }
58
+
59
  $text_on_no_price = get_option( 'wcj_add_to_cart_text_on_' . $single_or_archive . '_no_price_' . $product_type, '' );
60
  if ( '' != $text_on_no_price && '' === $product->get_price() )
61
  return $text_on_no_price;
62
+
63
  $text_on_zero_price = get_option( 'wcj_add_to_cart_text_on_' . $single_or_archive . '_zero_price_' . $product_type, '' );
64
  if ( '' != $text_on_zero_price && 0 == $product->get_price() )
65
+ return $text_on_zero_price;
66
+
67
  //if ( get_option( 'wcj_add_to_cart_text_enabled_on_' . $single_or_archive . '_' . $product_type ) == 'yes' )
68
  if ( '' != get_option( 'wcj_add_to_cart_text_on_' . $single_or_archive . '_' . $product_type ) )
69
  return get_option( 'wcj_add_to_cart_text_on_' . $single_or_archive . '_' . $product_type );
70
  else
71
+ return $add_to_cart_text;
72
  }
73
 
74
  // Default
75
  return $add_to_cart_text;
76
+ }
77
  }
78
+
79
  endif;
80
+
81
  return new WCJ_Add_To_Cart_Per_Product_Type();
includes/add-to-cart/class-wcj-add-to-cart-per-product.php CHANGED
@@ -4,10 +4,8 @@
4
  *
5
  * The WooCommerce Jetpack Add to Cart per Product class.
6
  *
7
- * @class WCJ_Add_To_Cart_Per_Product
8
- * @version 2.2.0
9
- * @category Class
10
- * @author Algoritmika Ltd.
11
  */
12
 
13
  if ( ! defined( 'ABSPATH' ) ) exit;
@@ -16,47 +14,45 @@ if ( ! class_exists( 'WCJ_Add_To_Cart_Per_Product' ) ) :
16
 
17
  class WCJ_Add_To_Cart_Per_Product {
18
 
19
- /**
20
- * Constructor.
21
- */
22
- public function __construct() {
23
-
24
- // Main hooks
25
- if ( 'yes' === get_option( 'wcj_add_to_cart_per_product_enabled' ) ) {
26
-
27
- add_filter( 'woocommerce_product_single_add_to_cart_text', array( $this, 'change_add_to_cart_button_text_single' ), PHP_INT_MAX );
28
- add_filter( 'woocommerce_product_add_to_cart_text', array( $this, 'change_add_to_cart_button_text_archive' ), PHP_INT_MAX );
29
-
30
  add_action( 'add_meta_boxes', array( $this, 'add_custom_add_to_cart_meta_box' ) );
31
- add_action( 'save_post_product', array( $this, 'save_custom_add_to_cart_meta_box' ), 100, 2 );
32
- }
33
- }
34
-
35
- /**
36
- * change_add_to_cart_button_text_single.
37
- */
38
- public function change_add_to_cart_button_text_single( $add_to_cart_text ) {
39
  return $this->change_add_to_cart_button_text( $add_to_cart_text, 'single' );
40
  }
41
 
42
- /**
43
- * change_add_to_cart_button_text_archive.
44
- */
45
- public function change_add_to_cart_button_text_archive( $add_to_cart_text ) {
46
  return $this->change_add_to_cart_button_text( $add_to_cart_text, 'archive' );
47
  }
48
 
49
- /**
50
- * change_add_to_cart_button_text.
51
- */
52
- public function change_add_to_cart_button_text( $add_to_cart_text, $single_or_archive ) {
53
  global $product;
54
- if ( ! $product )
55
  return $add_to_cart_text;
 
56
  $local_custom_add_to_cart_option_id = 'wcj_custom_add_to_cart_local_' . $single_or_archive;
57
  $local_custom_add_to_cart_option_value = get_post_meta( $product->id, '_' . $local_custom_add_to_cart_option_id, true );
58
- if ( '' != $local_custom_add_to_cart_option_value )
59
  return $local_custom_add_to_cart_option_value;
 
60
  return $add_to_cart_text;
61
  }
62
 
@@ -65,8 +61,9 @@ class WCJ_Add_To_Cart_Per_Product {
65
  */
66
  public function save_custom_add_to_cart_meta_box( $post_id, $post ) {
67
  // Check that we are saving with custom add to cart metabox displayed.
68
- if ( ! isset( $_POST['woojetpack_custom_add_to_cart_save_post'] ) )
69
  return;
 
70
  $option_name = 'wcj_custom_add_to_cart_local_' . 'single';
71
  update_post_meta( $post_id, '_' . $option_name, $_POST[ $option_name ] );
72
  $option_name = 'wcj_custom_add_to_cart_local_' . 'archive';
@@ -88,8 +85,8 @@ class WCJ_Add_To_Cart_Per_Product {
88
  $current_post_id = get_the_ID();
89
 
90
  $options = array(
91
- 'single' => __( 'Single product view', 'woocommerce-jetpack' ),
92
- 'archive' => __( 'Product category (archive) view', 'woocommerce-jetpack' ),
93
  );
94
 
95
  $html = '<table style="width:50%;min-width:300px;">';
4
  *
5
  * The WooCommerce Jetpack Add to Cart per Product class.
6
  *
7
+ * @version 2.2.0
8
+ * @author Algoritmika Ltd.
 
 
9
  */
10
 
11
  if ( ! defined( 'ABSPATH' ) ) exit;
14
 
15
  class WCJ_Add_To_Cart_Per_Product {
16
 
17
+ /**
18
+ * Constructor.
19
+ */
20
+ public function __construct() {
21
+ if ( 'yes' === get_option( 'wcj_add_to_cart_per_product_enabled' ) ) {
22
+ add_filter( 'woocommerce_product_single_add_to_cart_text', array( $this, 'change_add_to_cart_button_text_single' ), PHP_INT_MAX );
23
+ add_filter( 'woocommerce_product_add_to_cart_text', array( $this, 'change_add_to_cart_button_text_archive' ), PHP_INT_MAX );
 
 
 
 
24
  add_action( 'add_meta_boxes', array( $this, 'add_custom_add_to_cart_meta_box' ) );
25
+ add_action( 'save_post_product', array( $this, 'save_custom_add_to_cart_meta_box' ), 100, 2 );
26
+ }
27
+ }
28
+
29
+ /**
30
+ * change_add_to_cart_button_text_single.
31
+ */
32
+ public function change_add_to_cart_button_text_single( $add_to_cart_text ) {
33
  return $this->change_add_to_cart_button_text( $add_to_cart_text, 'single' );
34
  }
35
 
36
+ /**
37
+ * change_add_to_cart_button_text_archive.
38
+ */
39
+ public function change_add_to_cart_button_text_archive( $add_to_cart_text ) {
40
  return $this->change_add_to_cart_button_text( $add_to_cart_text, 'archive' );
41
  }
42
 
43
+ /**
44
+ * change_add_to_cart_button_text.
45
+ */
46
+ public function change_add_to_cart_button_text( $add_to_cart_text, $single_or_archive ) {
47
  global $product;
48
+ if ( ! $product ) {
49
  return $add_to_cart_text;
50
+ }
51
  $local_custom_add_to_cart_option_id = 'wcj_custom_add_to_cart_local_' . $single_or_archive;
52
  $local_custom_add_to_cart_option_value = get_post_meta( $product->id, '_' . $local_custom_add_to_cart_option_id, true );
53
+ if ( '' != $local_custom_add_to_cart_option_value ) {
54
  return $local_custom_add_to_cart_option_value;
55
+ }
56
  return $add_to_cart_text;
57
  }
58
 
61
  */
62
  public function save_custom_add_to_cart_meta_box( $post_id, $post ) {
63
  // Check that we are saving with custom add to cart metabox displayed.
64
+ if ( ! isset( $_POST['woojetpack_custom_add_to_cart_save_post'] ) ) {
65
  return;
66
+ }
67
  $option_name = 'wcj_custom_add_to_cart_local_' . 'single';
68
  update_post_meta( $post_id, '_' . $option_name, $_POST[ $option_name ] );
69
  $option_name = 'wcj_custom_add_to_cart_local_' . 'archive';
85
  $current_post_id = get_the_ID();
86
 
87
  $options = array(
88
+ 'single' => __( 'Single product view', 'woocommerce-jetpack' ),
89
+ 'archive' => __( 'Product category (archive) view', 'woocommerce-jetpack' ),
90
  );
91
 
92
  $html = '<table style="width:50%;min-width:300px;">';
includes/admin/class-wc-settings-jetpack.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * The WooCommerce Jetpack Settings class.
6
  *
7
- * @version 2.4.0
8
  * @since 1.0.0
9
  * @author Algoritmika Ltd.
10
  */
@@ -360,7 +360,7 @@ class WC_Settings_Jetpack extends WC_Settings_Page {
360
  /**
361
  * output_dashboard_modules.
362
  *
363
- * @version 2.2.8
364
  */
365
  function output_dashboard_modules( $settings, $cat_id = '' ) {
366
  $readme_html = '';
@@ -413,23 +413,26 @@ class WC_Settings_Jetpack extends WC_Settings_Page {
413
  $html .= '<td class="plugin-title"><strong>' . $the_feature['title'] . '</strong>';
414
  $html .= '<div class="row-actions visible">';
415
 
416
- $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</a></span>';
 
 
 
417
  $html .= '</div>';
418
  $html .= '</td>';
419
 
420
  $html .= '<td class="column-description desc">';
421
- $html .= '<div class="plugin-description"><p>' . $the_feature['desc_tip'] . '</p></div>';
422
  $html .= '</td>';
423
 
424
  $html .= '</tr>';
425
 
426
- $readme_html .= '* *' . $the_feature['title'] . '* - ' . $the_feature['desc_tip'] . PHP_EOL;
427
  }
428
  echo $html;
429
  ?></tbody>
430
  </table><p style="color:gray;font-size:x-small;font-style:italic;"><?php echo __( 'Total Modules:' ) . ' ' . $total_modules; ?></p>
431
  <?php
432
- return '<pre>' . $readme_html . '</pre>';
433
  }
434
 
435
  /**
4
  *
5
  * The WooCommerce Jetpack Settings class.
6
  *
7
+ * @version 2.4.6
8
  * @since 1.0.0
9
  * @author Algoritmika Ltd.
10
  */
360
  /**
361
  * output_dashboard_modules.
362
  *
363
+ * @version 2.4.6
364
  */
365
  function output_dashboard_modules( $settings, $cat_id = '' ) {
366
  $readme_html = '';
413
  $html .= '<td class="plugin-title"><strong>' . $the_feature['title'] . '</strong>';
414
  $html .= '<div class="row-actions visible">';
415
 
416
+ $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>';
417
+ if ( isset( $the_feature['wcj_link'] ) && '' != $the_feature['wcj_link'] ) {
418
+ $html .= ' | <span class="0"><a href="' . $the_feature['wcj_link'] . '" target="_blank">' . __( 'Documentation', 'woocommerce' ) . '</a></span>';
419
+ }
420
  $html .= '</div>';
421
  $html .= '</td>';
422
 
423
  $html .= '<td class="column-description desc">';
424
+ $html .= '<div class="plugin-description"><p>' . ( ( isset( $the_feature['wcj_desc'] ) ) ? $the_feature['wcj_desc'] : $the_feature['desc_tip'] ) . '</p></div>';
425
  $html .= '</td>';
426
 
427
  $html .= '</tr>';
428
 
429
+ $readme_html .= '* *' . $the_feature['title'] . '* - ' . ( ( isset( $the_feature['wcj_desc'] ) ) ? $the_feature['wcj_desc'] : $the_feature['desc_tip'] ) . PHP_EOL;
430
  }
431
  echo $html;
432
  ?></tbody>
433
  </table><p style="color:gray;font-size:x-small;font-style:italic;"><?php echo __( 'Total Modules:' ) . ' ' . $total_modules; ?></p>
434
  <?php
435
+ return $readme_html;
436
  }
437
 
438
  /**
includes/class-wcj-add-to-cart.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * The WooCommerce Jetpack Add to Cart class.
6
  *
7
- * @version 2.2.0
8
  * @author Algoritmika Ltd.
9
  */
10
 
@@ -12,33 +12,26 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
12
 
13
  if ( ! class_exists( 'WCJ_Add_To_Cart' ) ) :
14
 
15
- class WCJ_Add_To_Cart {
16
 
17
  /**
18
  * Constructor.
 
 
19
  */
20
  public function __construct() {
21
 
22
- // Main hooks
23
- if ( 'yes' === get_option( 'wcj_add_to_cart_enabled' ) ) {
 
 
 
 
 
24
  include_once( 'add-to-cart/class-wcj-add-to-cart-per-category.php' );
25
  include_once( 'add-to-cart/class-wcj-add-to-cart-per-product.php' );
26
  include_once( 'add-to-cart/class-wcj-add-to-cart-per-product-type.php' );
27
- }
28
-
29
- // Settings hooks
30
- add_filter( 'wcj_settings_sections', array( $this, 'settings_section' ) );
31
- add_filter( 'wcj_settings_add_to_cart', array( $this, 'get_settings' ), 100 );
32
- add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
33
- }
34
-
35
- /**
36
- * add_enabled_option.
37
- */
38
- public function add_enabled_option( $settings ) {
39
- $all_settings = $this->get_settings();
40
- $settings[] = $all_settings[1];
41
- return $settings;
42
  }
43
 
44
  /**
@@ -61,29 +54,29 @@ class WCJ_Add_To_Cart {
61
  $groups_by_product_type = array(
62
 
63
  array(
64
- 'id' => 'simple',
65
- 'title' => __( 'Simple product', 'woocommerce-jetpack' ),
66
- 'default' => 'Add to cart',
67
  ),
68
  array(
69
- 'id' => 'variable',
70
- 'title' => __( 'Variable product', 'woocommerce-jetpack' ),
71
- 'default' => 'Select options',
72
  ),
73
  array(
74
- 'id' => 'external',
75
- 'title' => __( 'External product', 'woocommerce-jetpack' ),
76
- 'default' => 'Buy product',
77
  ),
78
  array(
79
- 'id' => 'grouped',
80
- 'title' => __( 'Grouped product', 'woocommerce-jetpack' ),
81
- 'default' => 'View products',
82
  ),
83
  array(
84
- 'id' => 'other',
85
- 'title' => __( 'Other product', 'woocommerce-jetpack' ),
86
- 'default' => 'Read more',
87
  ),
88
  );
89
 
@@ -152,8 +145,8 @@ class WCJ_Add_To_Cart {
152
  'id' => 'wcj_add_to_cart_text_on_single_in_cart_' . $group_by_product_type['id'],
153
  'desc' => __( 'Already in cart. Single product view.', 'woocommerce-jetpack' ),
154
  'desc_tip' => __( 'Leave blank to disable.', 'woocommerce-jetpack' ) . ' ' .
155
- __( 'Try: ', 'woocommerce-jetpack' ) . __( 'Already in cart - Add Again?', 'woocommerce-jetpack' ) . ' ' .
156
- __( 'Default: ', 'woocommerce-jetpack' ) . __( 'Add to cart', 'woocommerce-jetpack' ),
157
  'default' => __( 'Add to cart', 'woocommerce-jetpack' ),
158
  'type' => 'text',
159
  'css' => 'width:30%;min-width:300px;',
@@ -165,8 +158,8 @@ class WCJ_Add_To_Cart {
165
  'id' => 'wcj_add_to_cart_text_on_archives_in_cart_' . $group_by_product_type['id'],
166
  'desc' => __( 'Already in cart. Product category (archive) view.', 'woocommerce-jetpack' ),
167
  'desc_tip' => __( 'Leave blank to disable.', 'woocommerce-jetpack' ) . ' ' .
168
- __( 'Try: ', 'woocommerce-jetpack' ) . __( 'Already in cart - Add Again?', 'woocommerce-jetpack' ) . ' ' .
169
- __( 'Default: ', 'woocommerce-jetpack' ) . __( 'Add to cart', 'woocommerce-jetpack' ),
170
  'default' => __( 'Add to cart', 'woocommerce-jetpack' ),
171
  'type' => 'text',
172
  'css' => 'width:30%;min-width:300px;',
@@ -182,27 +175,26 @@ class WCJ_Add_To_Cart {
182
  * get_per_product_settings.
183
  */
184
  function get_per_product_settings() {
185
-
186
- $settings = array(
187
-
188
- array(
189
- 'title' => __( 'Per Product Options', 'woocommerce-jetpack' ),
190
- 'type' => 'title',
191
- 'desc' => __( 'This section lets you set Add to Cart button text on per product basis. When enabled, label for each product can be changed in "Edit Product".', 'woocommerce-jetpack' ),
192
- 'id' => 'wcj_add_to_cart_per_product_options' ),
193
-
194
- array(
195
- 'title' => __( 'Per Product Labels', 'woocommerce-jetpack' ),
196
- 'desc' => __( 'Enable Section', 'woocommerce-jetpack' ),
197
  'desc_tip' => '',
198
- 'id' => 'wcj_add_to_cart_per_product_enabled',
199
- 'default' => 'yes',
200
- 'type' => 'checkbox',
201
- ),
202
-
203
- array( 'type' => 'sectionend', 'id' => 'wcj_add_to_cart_per_product_options' ),
204
- );
205
-
 
206
  return $settings;
207
  }
208
 
@@ -213,16 +205,16 @@ class WCJ_Add_To_Cart {
213
 
214
  $settings = array(
215
 
216
- array( 'title' => __( 'Per Category Options', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => __( 'This sections lets you set Add to Cart button text on per category basis.', 'woocommerce-jetpack' ), 'id' => 'wcj_add_to_cart_per_category_options' ),
217
 
218
- array(
219
- 'title' => __( 'Per Category Labels', 'woocommerce-jetpack' ),
220
- 'desc' => __( 'Enable Section', 'woocommerce-jetpack' ),
221
  'desc_tip' => '',
222
- 'id' => 'wcj_add_to_cart_per_category_enabled',
223
- 'default' => 'yes',
224
- 'type' => 'checkbox',
225
- ),
226
 
227
  array(
228
  'title' => __( 'Category Groups Number', 'woocommerce-jetpack' ),
@@ -261,7 +253,7 @@ class WCJ_Add_To_Cart {
261
  //delete_option( 'wcj_add_to_cart_per_category_group_' . $i );
262
  } */
263
 
264
- $settings = array_merge( $settings, array(
265
  array(
266
  'title' => __( 'Group', 'woocommerce-jetpack' ) . ' #' . $i,
267
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
@@ -319,40 +311,15 @@ class WCJ_Add_To_Cart {
319
 
320
  /**
321
  * get_settings.
 
 
322
  */
323
  function get_settings() {
324
-
325
- $settings = array(
326
-
327
- array( 'title' => __( 'Add to Cart Options', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => '', 'id' => 'wcj_add_to_cart_options' ),
328
-
329
- array(
330
- 'title' => __( 'Add to Cart Labels', 'woocommerce-jetpack' ),
331
- 'desc' => '<strong>' . __( 'Enable Module', 'woocommerce-jetpack' ) . '</strong>',
332
- 'desc_tip' => __( 'Change text for Add to Cart button by WooCommerce product type, by product category or for individual products.', 'woocommerce-jetpack' ),
333
- 'id' => 'wcj_add_to_cart_enabled',
334
- 'default' => 'no',
335
- 'type' => 'checkbox',
336
- ),
337
-
338
- array( 'type' => 'sectionend', 'id' => 'wcj_add_to_cart_options' ),
339
- );
340
-
341
  $settings = array_merge( $settings, $this->get_per_category_settings() );
342
-
343
  $settings = array_merge( $settings, $this->get_per_product_settings() );
344
-
345
  $settings = array_merge( $settings, $this->get_per_product_type_settings() );
346
-
347
- return $settings;
348
- }
349
-
350
- /**
351
- * settings_section.
352
- */
353
- function settings_section( $sections ) {
354
- $sections['add_to_cart'] = __( 'Add to Cart Labels', 'woocommerce-jetpack' );
355
- return $sections;
356
  }
357
  }
358
 
4
  *
5
  * The WooCommerce Jetpack Add to Cart class.
6
  *
7
+ * @version 2.4.6
8
  * @author Algoritmika Ltd.
9
  */
10
 
12
 
13
  if ( ! class_exists( 'WCJ_Add_To_Cart' ) ) :
14
 
15
+ class WCJ_Add_To_Cart extends WCJ_Module {
16
 
17
  /**
18
  * Constructor.
19
+ *
20
+ * @version 2.4.6
21
  */
22
  public function __construct() {
23
 
24
+ $this->id = 'add_to_cart';
25
+ $this->short_desc = __( 'Add to Cart Labels', 'woocommerce-jetpack' );
26
+ $this->desc = __( 'Change text for Add to Cart button by WooCommerce product type, by product category or for individual products.', 'woocommerce-jetpack' );
27
+ $this->link = 'http://booster.io/features/woocommerce-add-to-cart-labels/';
28
+ parent::__construct();
29
+
30
+ if ( $this->is_enabled() ) {
31
  include_once( 'add-to-cart/class-wcj-add-to-cart-per-category.php' );
32
  include_once( 'add-to-cart/class-wcj-add-to-cart-per-product.php' );
33
  include_once( 'add-to-cart/class-wcj-add-to-cart-per-product-type.php' );
34
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  }
36
 
37
  /**
54
  $groups_by_product_type = array(
55
 
56
  array(
57
+ 'id' => 'simple',
58
+ 'title' => __( 'Simple product', 'woocommerce-jetpack' ),
59
+ 'default' => 'Add to cart',
60
  ),
61
  array(
62
+ 'id' => 'variable',
63
+ 'title' => __( 'Variable product', 'woocommerce-jetpack' ),
64
+ 'default' => 'Select options',
65
  ),
66
  array(
67
+ 'id' => 'external',
68
+ 'title' => __( 'External product', 'woocommerce-jetpack' ),
69
+ 'default' => 'Buy product',
70
  ),
71
  array(
72
+ 'id' => 'grouped',
73
+ 'title' => __( 'Grouped product', 'woocommerce-jetpack' ),
74
+ 'default' => 'View products',
75
  ),
76
  array(
77
+ 'id' => 'other',
78
+ 'title' => __( 'Other product', 'woocommerce-jetpack' ),
79
+ 'default' => 'Read more',
80
  ),
81
  );
82
 
145
  'id' => 'wcj_add_to_cart_text_on_single_in_cart_' . $group_by_product_type['id'],
146
  'desc' => __( 'Already in cart. Single product view.', 'woocommerce-jetpack' ),
147
  'desc_tip' => __( 'Leave blank to disable.', 'woocommerce-jetpack' ) . ' ' .
148
+ __( 'Try: ', 'woocommerce-jetpack' ) . __( 'Already in cart - Add Again?', 'woocommerce-jetpack' ) . ' ' .
149
+ __( 'Default: ', 'woocommerce-jetpack' ) . __( 'Add to cart', 'woocommerce-jetpack' ),
150
  'default' => __( 'Add to cart', 'woocommerce-jetpack' ),
151
  'type' => 'text',
152
  'css' => 'width:30%;min-width:300px;',
158
  'id' => 'wcj_add_to_cart_text_on_archives_in_cart_' . $group_by_product_type['id'],
159
  'desc' => __( 'Already in cart. Product category (archive) view.', 'woocommerce-jetpack' ),
160
  'desc_tip' => __( 'Leave blank to disable.', 'woocommerce-jetpack' ) . ' ' .
161
+ __( 'Try: ', 'woocommerce-jetpack' ) . __( 'Already in cart - Add Again?', 'woocommerce-jetpack' ) . ' ' .
162
+ __( 'Default: ', 'woocommerce-jetpack' ) . __( 'Add to cart', 'woocommerce-jetpack' ),
163
  'default' => __( 'Add to cart', 'woocommerce-jetpack' ),
164
  'type' => 'text',
165
  'css' => 'width:30%;min-width:300px;',
175
  * get_per_product_settings.
176
  */
177
  function get_per_product_settings() {
178
+ $settings = array(
179
+ array(
180
+ 'title' => __( 'Per Product Options', 'woocommerce-jetpack' ),
181
+ 'type' => 'title',
182
+ 'desc' => __( 'This section lets you set Add to Cart button text on per product basis. When enabled, label for each product can be changed in "Edit Product".', 'woocommerce-jetpack' ),
183
+ 'id' => 'wcj_add_to_cart_per_product_options',
184
+ ),
185
+ array(
186
+ 'title' => __( 'Per Product Labels', 'woocommerce-jetpack' ),
187
+ 'desc' => __( 'Enable Section', 'woocommerce-jetpack' ),
 
 
188
  'desc_tip' => '',
189
+ 'id' => 'wcj_add_to_cart_per_product_enabled',
190
+ 'default' => 'yes',
191
+ 'type' => 'checkbox',
192
+ ),
193
+ array(
194
+ 'type' => 'sectionend',
195
+ 'id' => 'wcj_add_to_cart_per_product_options',
196
+ ),
197
+ );
198
  return $settings;
199
  }
200
 
205
 
206
  $settings = array(
207
 
208
+ array( 'title' => __( 'Per Category Options', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => __( 'This sections lets you set Add to Cart button text on per category basis.', 'woocommerce-jetpack' ), 'id' => 'wcj_add_to_cart_per_category_options' ),
209
 
210
+ array(
211
+ 'title' => __( 'Per Category Labels', 'woocommerce-jetpack' ),
212
+ 'desc' => __( 'Enable Section', 'woocommerce-jetpack' ),
213
  'desc_tip' => '',
214
+ 'id' => 'wcj_add_to_cart_per_category_enabled',
215
+ 'default' => 'yes',
216
+ 'type' => 'checkbox',
217
+ ),
218
 
219
  array(
220
  'title' => __( 'Category Groups Number', 'woocommerce-jetpack' ),
253
  //delete_option( 'wcj_add_to_cart_per_category_group_' . $i );
254
  } */
255
 
256
+ $settings = array_merge( $settings, array(
257
  array(
258
  'title' => __( 'Group', 'woocommerce-jetpack' ) . ' #' . $i,
259
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
311
 
312
  /**
313
  * get_settings.
314
+ *
315
+ * @version 2.4.6
316
  */
317
  function get_settings() {
318
+ $settings = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
  $settings = array_merge( $settings, $this->get_per_category_settings() );
 
320
  $settings = array_merge( $settings, $this->get_per_product_settings() );
 
321
  $settings = array_merge( $settings, $this->get_per_product_type_settings() );
322
+ return $this->add_standard_settings( $settings );
 
 
 
 
 
 
 
 
 
323
  }
324
  }
325
 
includes/class-wcj-call-for-price.php CHANGED
@@ -4,49 +4,50 @@
4
  *
5
  * The WooCommerce Jetpack Call for Price class.
6
  *
7
- * @class WCJ_Call_For_Price
8
- * @category Class
9
- * @author Algoritmika Ltd.
10
  */
11
 
12
  if ( ! defined( 'ABSPATH' ) ) exit; // exit if accessed directly
13
 
14
  if ( ! class_exists( 'WCJ_Call_For_Price' ) ) :
15
 
16
- class WCJ_Call_For_Price {
17
 
18
  /**
19
  * Constructor.
 
 
20
  */
21
  public function __construct() {
22
 
 
 
 
 
 
 
23
  // Defaults
24
  $this->default_empty_price_text = '<strong>Call for price</strong>';
25
 
26
- // Empty Price hooks
27
- if ( get_option( 'wcj_call_for_price_enabled' ) == 'yes' ) {
28
  add_action( 'init', array( $this, 'add_hook' ), PHP_INT_MAX );
29
- //add_filter( 'woocommerce_empty_price_html', array( $this, 'on_empty_price' ), PHP_INT_MAX );
30
  add_filter( 'woocommerce_sale_flash', array( $this, 'hide_sales_flash' ), 100, 3 );
31
  }
32
-
33
- // Settings hooks
34
- add_filter( 'wcj_settings_sections', array( $this, 'settings_section' ) );
35
- add_filter( 'wcj_settings_call_for_price', array( $this, 'get_settings' ), 100 );
36
- add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
37
  }
38
 
39
  /**
40
- * some.
41
  */
42
- public function add_hook() {
43
  add_filter( 'woocommerce_empty_price_html', array( $this, 'on_empty_price' ), PHP_INT_MAX );
44
  }
45
 
46
  /**
47
  * Hide "sales" icon for empty price products.
48
  */
49
- public function hide_sales_flash( $onsale_html, $post, $product ) {
50
  if ( get_option('wcj_call_for_price_hide_sale_sign') === 'yes' )
51
  if ( $product->get_price() === '' )
52
  return '';
@@ -72,27 +73,17 @@ class WCJ_Call_For_Price {
72
 
73
  /**
74
  * Get settings array.
 
 
75
  */
76
  function get_settings() {
77
-
78
  $settings = array(
79
-
80
  array(
81
  'title' => __( 'Call for Price Options', 'woocommerce-jetpack' ),
82
  'type' => 'title',
83
  'desc' => __( 'Leave price empty when adding or editing products. Then set the options here.', 'woocommerce-jetpack' ),
84
  'id' => 'wcj_call_for_price_options',
85
  ),
86
-
87
- array(
88
- 'title' => __( 'Call for Price', 'woocommerce-jetpack' ),
89
- 'desc' => '<strong>' . __( 'Enable Module', 'woocommerce-jetpack' ) . '</strong>',
90
- 'desc_tip' => __( 'Create any custom price label for all WooCommerce products with empty price.', 'woocommerce-jetpack' ),
91
- 'id' => 'wcj_call_for_price_enabled',
92
- 'default' => 'no',
93
- 'type' => 'checkbox',
94
- ),
95
-
96
  array(
97
  'title' => __( 'Label to Show on Single', 'woocommerce-jetpack' ),
98
  'desc_tip' => __( 'This sets the html to output on empty price. Leave blank to disable.', 'woocommerce-jetpack' ),
@@ -104,7 +95,6 @@ class WCJ_Call_For_Price {
104
  'custom_attributes'
105
  => apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
106
  ),
107
-
108
  array(
109
  'title' => __( 'Label to Show on Archives', 'woocommerce-jetpack' ),
110
  'desc_tip' => __( 'This sets the html to output on empty price. Leave blank to disable.', 'woocommerce-jetpack' ),
@@ -116,7 +106,6 @@ class WCJ_Call_For_Price {
116
  'custom_attributes'
117
  => apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
118
  ),
119
-
120
  array(
121
  'title' => __( 'Label to Show on Homepage', 'woocommerce-jetpack' ),
122
  'desc_tip' => __( 'This sets the html to output on empty price. Leave blank to disable.', 'woocommerce-jetpack' ),
@@ -128,7 +117,6 @@ class WCJ_Call_For_Price {
128
  'custom_attributes'
129
  => apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
130
  ),
131
-
132
  array(
133
  'title' => __( 'Label to Show on Related', 'woocommerce-jetpack' ),
134
  'desc_tip' => __( 'This sets the html to output on empty price. Leave blank to disable.', 'woocommerce-jetpack' ),
@@ -140,7 +128,6 @@ class WCJ_Call_For_Price {
140
  'custom_attributes'
141
  => apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
142
  ),
143
-
144
  array(
145
  'title' => __( 'Hide Sale! Tag', 'woocommerce-jetpack' ),
146
  'desc' => __( 'Hide the tag', 'woocommerce-jetpack' ),
@@ -148,32 +135,12 @@ class WCJ_Call_For_Price {
148
  'default' => 'yes',
149
  'type' => 'checkbox',
150
  ),
151
-
152
  array(
153
  'type' => 'sectionend',
154
  'id' => 'wcj_call_for_price_options',
155
  ),
156
-
157
  );
158
-
159
- return $settings;
160
- }
161
-
162
- /**
163
- * Get "enabled" setting from settings array.
164
- */
165
- public function add_enabled_option( $settings ) {
166
- $all_settings = $this->get_settings();
167
- $settings[] = $all_settings[1];
168
- return $settings;
169
- }
170
-
171
- /**
172
- * Add section to WooCommerce > Settings > Jetpack.
173
- */
174
- function settings_section( $sections ) {
175
- $sections['call_for_price'] = __( 'Call for Price', 'woocommerce-jetpack' );
176
- return $sections;
177
  }
178
  }
179
 
4
  *
5
  * The WooCommerce Jetpack Call for Price class.
6
  *
7
+ * @version 2.4.6
8
+ * @author Algoritmika Ltd.
 
9
  */
10
 
11
  if ( ! defined( 'ABSPATH' ) ) exit; // exit if accessed directly
12
 
13
  if ( ! class_exists( 'WCJ_Call_For_Price' ) ) :
14
 
15
+ class WCJ_Call_For_Price extends WCJ_module {
16
 
17
  /**
18
  * Constructor.
19
+ *
20
+ * @version 2.4.6
21
  */
22
  public function __construct() {
23
 
24
+ $this->id = 'call_for_price';
25
+ $this->short_desc = __( 'Call for Price', 'woocommerce-jetpack' );
26
+ $this->desc = __( 'Create any custom price label for all WooCommerce products with empty price.', 'woocommerce-jetpack' );
27
+ $this->link = 'http://booster.io/features/woocommerce-call-for-price/';
28
+ parent::__construct();
29
+
30
  // Defaults
31
  $this->default_empty_price_text = '<strong>Call for price</strong>';
32
 
33
+ if ( $this->is_enabled() ) {
 
34
  add_action( 'init', array( $this, 'add_hook' ), PHP_INT_MAX );
35
+ // add_filter( 'woocommerce_empty_price_html', array( $this, 'on_empty_price' ), PHP_INT_MAX );
36
  add_filter( 'woocommerce_sale_flash', array( $this, 'hide_sales_flash' ), 100, 3 );
37
  }
 
 
 
 
 
38
  }
39
 
40
  /**
41
+ * add_hook.
42
  */
43
+ public function add_hook() {
44
  add_filter( 'woocommerce_empty_price_html', array( $this, 'on_empty_price' ), PHP_INT_MAX );
45
  }
46
 
47
  /**
48
  * Hide "sales" icon for empty price products.
49
  */
50
+ public function hide_sales_flash( $onsale_html, $post, $product ) {
51
  if ( get_option('wcj_call_for_price_hide_sale_sign') === 'yes' )
52
  if ( $product->get_price() === '' )
53
  return '';
73
 
74
  /**
75
  * Get settings array.
76
+ *
77
+ * @version 2.4.6
78
  */
79
  function get_settings() {
 
80
  $settings = array(
 
81
  array(
82
  'title' => __( 'Call for Price Options', 'woocommerce-jetpack' ),
83
  'type' => 'title',
84
  'desc' => __( 'Leave price empty when adding or editing products. Then set the options here.', 'woocommerce-jetpack' ),
85
  'id' => 'wcj_call_for_price_options',
86
  ),
 
 
 
 
 
 
 
 
 
 
87
  array(
88
  'title' => __( 'Label to Show on Single', 'woocommerce-jetpack' ),
89
  'desc_tip' => __( 'This sets the html to output on empty price. Leave blank to disable.', 'woocommerce-jetpack' ),
95
  'custom_attributes'
96
  => apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
97
  ),
 
98
  array(
99
  'title' => __( 'Label to Show on Archives', 'woocommerce-jetpack' ),
100
  'desc_tip' => __( 'This sets the html to output on empty price. Leave blank to disable.', 'woocommerce-jetpack' ),
106
  'custom_attributes'
107
  => apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
108
  ),
 
109
  array(
110
  'title' => __( 'Label to Show on Homepage', 'woocommerce-jetpack' ),
111
  'desc_tip' => __( 'This sets the html to output on empty price. Leave blank to disable.', 'woocommerce-jetpack' ),
117
  'custom_attributes'
118
  => apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
119
  ),
 
120
  array(
121
  'title' => __( 'Label to Show on Related', 'woocommerce-jetpack' ),
122
  'desc_tip' => __( 'This sets the html to output on empty price. Leave blank to disable.', 'woocommerce-jetpack' ),
128
  'custom_attributes'
129
  => apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
130
  ),
 
131
  array(
132
  'title' => __( 'Hide Sale! Tag', 'woocommerce-jetpack' ),
133
  'desc' => __( 'Hide the tag', 'woocommerce-jetpack' ),
135
  'default' => 'yes',
136
  'type' => 'checkbox',
137
  ),
 
138
  array(
139
  'type' => 'sectionend',
140
  'id' => 'wcj_call_for_price_options',
141
  ),
 
142
  );
143
+ return $this->add_standard_settings( $settings );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  }
145
  }
146
 
includes/class-wcj-cart.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * The WooCommerce Jetpack Cart class.
6
  *
7
- * @version 2.4.4
8
  * @author Algoritmika Ltd.
9
  */
10
 
@@ -17,18 +17,20 @@ class WCJ_Cart extends WCJ_Module {
17
  /**
18
  * Constructor.
19
  *
20
- * @version 2.3.9
21
  */
22
  function __construct() {
23
 
24
  $this->id = 'cart';
25
  $this->short_desc = __( 'Cart', 'woocommerce-jetpack' );
26
  $this->desc = __( 'Add custom info to WooCommerce cart page.', 'woocommerce-jetpack' );
 
 
 
27
  $this->full_desc =
28
  __( 'This feature allows you to add a final checkpoint for your customers before they proceed to payment.', 'woocommerce-jetpack' ) . '<br>' .
29
  __( 'Show custom information at on the cart page using Booster\'s various shortcodes and give your customers a seamless cart experience.', 'woocommerce-jetpack' ) . '<br>' .
30
  __( 'For example, show them the total weight of their items, any additional fees or taxes, or a confirmation of the address their products are being sent to.', 'woocommerce-jetpack' );
31
- parent::__construct();
32
 
33
  if ( $this->is_enabled() ) {
34
 
@@ -40,7 +42,11 @@ class WCJ_Cart extends WCJ_Module {
40
  // add_action( get_option( 'wcj_cart_custom_info_hook', 'woocommerce_after_cart_totals' ), array( $this, 'add_cart_custom_info' ) );
41
  $total_number = apply_filters( 'wcj_get_option_filter', 1, get_option( 'wcj_cart_custom_info_total_number', 1 ) );
42
  for ( $i = 1; $i <= $total_number; $i++) {
43
- add_action( get_option( 'wcj_cart_custom_info_hook_' . $i, 'woocommerce_after_cart_totals' ), array( $this, 'add_cart_custom_info' ) );
 
 
 
 
44
  }
45
  }
46
  }
@@ -65,12 +71,19 @@ class WCJ_Cart extends WCJ_Module {
65
 
66
  /**
67
  * add_cart_custom_info.
 
 
68
  */
69
  function add_cart_custom_info() {
70
  $current_filter = current_filter();
 
71
  $total_number = apply_filters( 'wcj_get_option_filter', 1, get_option( 'wcj_cart_custom_info_total_number', 1 ) );
72
  for ( $i = 1; $i <= $total_number; $i++) {
73
- if ( '' != get_option( 'wcj_cart_custom_info_content_' . $i ) && $current_filter === get_option( 'wcj_cart_custom_info_hook_' . $i ) ) {
 
 
 
 
74
  echo do_shortcode( get_option( 'wcj_cart_custom_info_content_' . $i ) );
75
  }
76
  }
@@ -93,7 +106,7 @@ class WCJ_Cart extends WCJ_Module {
93
  /**
94
  * get_settings.
95
  *
96
- * @version 2.4.4
97
  */
98
  function get_settings() {
99
 
@@ -160,7 +173,7 @@ class WCJ_Cart extends WCJ_Module {
160
  ),
161
 
162
  array(
163
- 'title' => __( 'Priority', 'woocommerce-jetpack' ),
164
  'id' => 'wcj_cart_custom_info_priority_' . $i,
165
  'default' => 10,
166
  'type' => 'number',
@@ -197,7 +210,7 @@ class WCJ_Cart extends WCJ_Module {
197
  'id' => 'wcj_cart_custom_info_item_options',
198
  );
199
 
200
- return $this->add_enable_module_setting( $settings/* , $this->full_desc */ );
201
  }
202
  }
203
 
4
  *
5
  * The WooCommerce Jetpack Cart class.
6
  *
7
+ * @version 2.4.6
8
  * @author Algoritmika Ltd.
9
  */
10
 
17
  /**
18
  * Constructor.
19
  *
20
+ * @version 2.4.6
21
  */
22
  function __construct() {
23
 
24
  $this->id = 'cart';
25
  $this->short_desc = __( 'Cart', 'woocommerce-jetpack' );
26
  $this->desc = __( 'Add custom info to WooCommerce cart page.', 'woocommerce-jetpack' );
27
+ $this->link = 'http://booster.io/features/woocommerce-cart/';
28
+ parent::__construct();
29
+
30
  $this->full_desc =
31
  __( 'This feature allows you to add a final checkpoint for your customers before they proceed to payment.', 'woocommerce-jetpack' ) . '<br>' .
32
  __( 'Show custom information at on the cart page using Booster\'s various shortcodes and give your customers a seamless cart experience.', 'woocommerce-jetpack' ) . '<br>' .
33
  __( 'For example, show them the total weight of their items, any additional fees or taxes, or a confirmation of the address their products are being sent to.', 'woocommerce-jetpack' );
 
34
 
35
  if ( $this->is_enabled() ) {
36
 
42
  // add_action( get_option( 'wcj_cart_custom_info_hook', 'woocommerce_after_cart_totals' ), array( $this, 'add_cart_custom_info' ) );
43
  $total_number = apply_filters( 'wcj_get_option_filter', 1, get_option( 'wcj_cart_custom_info_total_number', 1 ) );
44
  for ( $i = 1; $i <= $total_number; $i++) {
45
+ add_action(
46
+ get_option( 'wcj_cart_custom_info_hook_' . $i, 'woocommerce_after_cart_totals' ),
47
+ array( $this, 'add_cart_custom_info' ),
48
+ get_option( 'wcj_cart_custom_info_priority_' . $i, 10 )
49
+ );
50
  }
51
  }
52
  }
71
 
72
  /**
73
  * add_cart_custom_info.
74
+ *
75
+ * @version 2.4.6
76
  */
77
  function add_cart_custom_info() {
78
  $current_filter = current_filter();
79
+ $current_filter_priority = wcj_current_filter_priority();
80
  $total_number = apply_filters( 'wcj_get_option_filter', 1, get_option( 'wcj_cart_custom_info_total_number', 1 ) );
81
  for ( $i = 1; $i <= $total_number; $i++) {
82
+ if (
83
+ '' != get_option( 'wcj_cart_custom_info_content_' . $i ) &&
84
+ $current_filter === get_option( 'wcj_cart_custom_info_hook_' . $i, 'woocommerce_after_cart_totals' ) &&
85
+ $current_filter_priority == get_option( 'wcj_cart_custom_info_priority_' . $i, 10 )
86
+ ) {
87
  echo do_shortcode( get_option( 'wcj_cart_custom_info_content_' . $i ) );
88
  }
89
  }
106
  /**
107
  * get_settings.
108
  *
109
+ * @version 2.4.6
110
  */
111
  function get_settings() {
112
 
173
  ),
174
 
175
  array(
176
+ 'title' => __( 'Position Order (i.e. Priority)', 'woocommerce-jetpack' ),
177
  'id' => 'wcj_cart_custom_info_priority_' . $i,
178
  'default' => 10,
179
  'type' => 'number',
210
  'id' => 'wcj_cart_custom_info_item_options',
211
  );
212
 
213
+ return $this->add_standard_settings( $settings/* , $this->full_desc */ );
214
  }
215
  }
216
 
includes/class-wcj-checkout-custom-fields.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * The WooCommerce Jetpack Checkout Custom Fields class.
6
  *
7
- * @version 2.4.5
8
  * @author Algoritmika Ltd.
9
  */
10
 
@@ -333,17 +333,30 @@ class WCJ_Checkout_Custom_Fields extends WCJ_Module {
333
  /**
334
  * add_woocommerce_admin_fields.
335
  *
336
- * @version 2.4.0
337
  */
338
  public function add_woocommerce_admin_fields( $fields, $section ) {
339
  for ( $i = 1; $i <= apply_filters( 'wcj_get_option_filter', 1, get_option( 'wcj_checkout_custom_fields_total_number', 1 ) ); $i++ ) {
340
  if ( 'yes' === get_option( 'wcj_checkout_custom_field_enabled_' . $i ) ) {
341
  $the_type = get_option( 'wcj_checkout_custom_field_type_' . $i );
342
- if ( 'datepicker' === $the_type || 'weekpicker' === $the_type || 'timepicker' === $the_type || 'number' === $the_type ) {
343
  $the_type = 'text';
344
  }
345
  if ( 'checkbox' === $the_type || 'select' === $the_type || 'radio' === $the_type ) {
346
  $the_type = 'text';
 
 
 
 
 
 
 
 
 
 
 
 
 
347
  }
348
  $the_section = get_option( 'wcj_checkout_custom_field_section_' . $i );
349
  if ( $section != $the_section ) continue;
@@ -362,7 +375,12 @@ class WCJ_Checkout_Custom_Fields extends WCJ_Module {
362
  get_post_meta( get_the_ID(), '_' . $section . '_' . $the_key_label, true ) :
363
  get_option( 'wcj_checkout_custom_field_label_' . $i ),
364
  'show' => true,
 
 
365
  );
 
 
 
366
  }
367
  }
368
  return $fields;
4
  *
5
  * The WooCommerce Jetpack Checkout Custom Fields class.
6
  *
7
+ * @version 2.4.6
8
  * @author Algoritmika Ltd.
9
  */
10
 
333
  /**
334
  * add_woocommerce_admin_fields.
335
  *
336
+ * @version 2.4.6
337
  */
338
  public function add_woocommerce_admin_fields( $fields, $section ) {
339
  for ( $i = 1; $i <= apply_filters( 'wcj_get_option_filter', 1, get_option( 'wcj_checkout_custom_fields_total_number', 1 ) ); $i++ ) {
340
  if ( 'yes' === get_option( 'wcj_checkout_custom_field_enabled_' . $i ) ) {
341
  $the_type = get_option( 'wcj_checkout_custom_field_type_' . $i );
342
+ /* if ( 'datepicker' === $the_type || 'weekpicker' === $the_type || 'timepicker' === $the_type || 'number' === $the_type ) {
343
  $the_type = 'text';
344
  }
345
  if ( 'checkbox' === $the_type || 'select' === $the_type || 'radio' === $the_type ) {
346
  $the_type = 'text';
347
+ } */
348
+ if ( 'select' === $the_type ) {
349
+ $the_class = 'first';
350
+ $options = wcj_get_select_options( get_option( 'wcj_checkout_custom_field_select_options_' . $i, array() ) );
351
+ }
352
+ else if ( 'country' === $the_type ) {
353
+ $the_type = 'select';
354
+ $the_class = 'js_field-country select short';
355
+ $options = WC()->countries->get_allowed_countries();
356
+ }
357
+ else /* if ( 'select' != $the_type ) */ {
358
+ $the_type = 'text';
359
+ $the_class = 'short';
360
  }
361
  $the_section = get_option( 'wcj_checkout_custom_field_section_' . $i );
362
  if ( $section != $the_section ) continue;
375
  get_post_meta( get_the_ID(), '_' . $section . '_' . $the_key_label, true ) :
376
  get_option( 'wcj_checkout_custom_field_label_' . $i ),
377
  'show' => true,
378
+ 'class' => $the_class,
379
+ 'wrapper_class' => 'form-field-wide',
380
  );
381
+ if ( isset( $options ) ) {
382
+ $fields[ $the_key ]['options'] = $options;
383
+ }
384
  }
385
  }
386
  return $fields;
includes/class-wcj-checkout-files-upload.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * The WooCommerce Jetpack Checkout Files Upload class.
6
  *
7
- * @version 2.4.5
8
  * @since 2.4.5
9
  * @author Algoritmika Ltd.
10
  */
@@ -217,6 +217,8 @@ class WCJ_Checkout_Files_Upload extends WCJ_Module {
217
 
218
  /**
219
  * add_files_upload_form_to_checkout_frontend.
 
 
220
  */
221
  function add_files_upload_form_to_checkout_frontend() {
222
  $html = '';
@@ -224,9 +226,7 @@ class WCJ_Checkout_Files_Upload extends WCJ_Module {
224
  $total_number = apply_filters( 'wcj_get_option_filter', 1, get_option( 'wcj_checkout_files_upload_total_number', 1 ) );
225
  // $html .= '<table>';
226
  $current_filter = current_filter();
227
- // $current_filter_priority = current_filter_priority();
228
- global $wp_filter;
229
- $current_filter_priority = key( $wp_filter[ current_filter() ] );
230
  for ( $i = 1; $i <= $total_number; $i++ ) {
231
  if (
232
  'yes' === get_option( 'wcj_checkout_files_upload_enabled_' . $i, 'yes' ) &&
4
  *
5
  * The WooCommerce Jetpack Checkout Files Upload class.
6
  *
7
+ * @version 2.4.6
8
  * @since 2.4.5
9
  * @author Algoritmika Ltd.
10
  */
217
 
218
  /**
219
  * add_files_upload_form_to_checkout_frontend.
220
+ *
221
+ * @version 2.4.6
222
  */
223
  function add_files_upload_form_to_checkout_frontend() {
224
  $html = '';
226
  $total_number = apply_filters( 'wcj_get_option_filter', 1, get_option( 'wcj_checkout_files_upload_total_number', 1 ) );
227
  // $html .= '<table>';
228
  $current_filter = current_filter();
229
+ $current_filter_priority = wcj_current_filter_priority();
 
 
230
  for ( $i = 1; $i <= $total_number; $i++ ) {
231
  if (
232
  'yes' === get_option( 'wcj_checkout_files_upload_enabled_' . $i, 'yes' ) &&
includes/class-wcj-mini-cart.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * The WooCommerce Jetpack Mini Cart class.
6
  *
7
- * @version 2.4.2
8
  * @since 2.2.0
9
  * @author Algoritmika Ltd.
10
  */
@@ -17,18 +17,45 @@ class WCJ_Mini_Cart extends WCJ_Module {
17
 
18
  /**
19
  * Constructor.
 
 
20
  */
21
  public function __construct() {
22
 
23
  $this->id = 'mini_cart';
24
  $this->short_desc = __( 'Mini Cart', 'woocommerce-jetpack' );
25
  $this->desc = __( 'Customize WooCommerce mini cart widget.', 'woocommerce-jetpack' );
 
26
  parent::__construct();
27
 
28
  if ( $this->is_enabled() ) {
29
  $total_number = apply_filters( 'wcj_get_option_filter', 1, get_option( 'wcj_mini_cart_custom_info_total_number', 1 ) );
30
  for ( $i = 1; $i <= $total_number; $i++ ) {
31
- add_action( get_option( 'wcj_mini_cart_custom_info_hook_' . $i, 'woocommerce_after_mini_cart' ), array( $this, 'add_mini_cart_custom_info' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  }
33
  }
34
  }
@@ -36,11 +63,10 @@ class WCJ_Mini_Cart extends WCJ_Module {
36
  /**
37
  * get_settings.
38
  *
39
- * @version 2.4.2
40
  */
41
  function get_settings() {
42
 
43
- // The Module settings
44
  $settings = array();
45
 
46
  // Mini Cart Custom Info Options
@@ -98,7 +124,7 @@ class WCJ_Mini_Cart extends WCJ_Module {
98
  ),
99
 
100
  array(
101
- 'title' => __( 'Priority', 'woocommerce-jetpack' ),
102
  'id' => 'wcj_mini_cart_custom_info_priority_' . $i,
103
  'default' => 10,
104
  'type' => 'number',
@@ -114,19 +140,6 @@ class WCJ_Mini_Cart extends WCJ_Module {
114
 
115
  return $this->add_standard_settings( $settings );
116
  }
117
-
118
- /**
119
- * add_mini_cart_custom_info.
120
- */
121
- function add_mini_cart_custom_info() {
122
- $current_filter = current_filter();
123
- $total_number = apply_filters( 'wcj_get_option_filter', 1, get_option( 'wcj_mini_cart_custom_info_total_number', 1 ) );
124
- for ( $i = 1; $i <= $total_number; $i++ ) {
125
- if ( '' != get_option( 'wcj_mini_cart_custom_info_content_' . $i ) && $current_filter === get_option( 'wcj_mini_cart_custom_info_hook_' . $i ) ) {
126
- echo do_shortcode( get_option( 'wcj_mini_cart_custom_info_content_' . $i ) );
127
- }
128
- }
129
- }
130
  }
131
 
132
  endif;
4
  *
5
  * The WooCommerce Jetpack Mini Cart class.
6
  *
7
+ * @version 2.4.6
8
  * @since 2.2.0
9
  * @author Algoritmika Ltd.
10
  */
17
 
18
  /**
19
  * Constructor.
20
+ *
21
+ * @version 2.4.6
22
  */
23
  public function __construct() {
24
 
25
  $this->id = 'mini_cart';
26
  $this->short_desc = __( 'Mini Cart', 'woocommerce-jetpack' );
27
  $this->desc = __( 'Customize WooCommerce mini cart widget.', 'woocommerce-jetpack' );
28
+ $this->link = 'http://booster.io/features/woocommerce-mini-cart/';
29
  parent::__construct();
30
 
31
  if ( $this->is_enabled() ) {
32
  $total_number = apply_filters( 'wcj_get_option_filter', 1, get_option( 'wcj_mini_cart_custom_info_total_number', 1 ) );
33
  for ( $i = 1; $i <= $total_number; $i++ ) {
34
+ add_action(
35
+ get_option( 'wcj_mini_cart_custom_info_hook_' . $i, 'woocommerce_after_mini_cart' ),
36
+ array( $this, 'add_mini_cart_custom_info' ),
37
+ get_option( 'wcj_mini_cart_custom_info_priority_' . $i, 10 )
38
+ );
39
+ }
40
+ }
41
+ }
42
+
43
+ /**
44
+ * add_mini_cart_custom_info.
45
+ *
46
+ * @version 2.4.6
47
+ */
48
+ function add_mini_cart_custom_info() {
49
+ $current_filter = current_filter();
50
+ $current_filter_priority = wcj_current_filter_priority();
51
+ $total_number = apply_filters( 'wcj_get_option_filter', 1, get_option( 'wcj_mini_cart_custom_info_total_number', 1 ) );
52
+ for ( $i = 1; $i <= $total_number; $i++ ) {
53
+ if (
54
+ '' != get_option( 'wcj_mini_cart_custom_info_content_' . $i ) &&
55
+ $current_filter === get_option( 'wcj_mini_cart_custom_info_hook_' . $i, 'woocommerce_after_mini_cart' ) &&
56
+ $current_filter_priority == get_option( 'wcj_mini_cart_custom_info_priority_' . $i, 10 )
57
+ ) {
58
+ echo do_shortcode( get_option( 'wcj_mini_cart_custom_info_content_' . $i ) );
59
  }
60
  }
61
  }
63
  /**
64
  * get_settings.
65
  *
66
+ * @version 2.4.6
67
  */
68
  function get_settings() {
69
 
 
70
  $settings = array();
71
 
72
  // Mini Cart Custom Info Options
124
  ),
125
 
126
  array(
127
+ 'title' => __( 'Position Order (i.e. Priority)', 'woocommerce-jetpack' ),
128
  'id' => 'wcj_mini_cart_custom_info_priority_' . $i,
129
  'default' => 10,
130
  'type' => 'number',
140
 
141
  return $this->add_standard_settings( $settings );
142
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  }
144
 
145
  endif;
includes/class-wcj-order-numbers.php CHANGED
@@ -28,8 +28,8 @@ class WCJ_Order_Numbers extends WCJ_Module {
28
 
29
  $this->add_tools( array(
30
  'renumerate_orders' => array(
31
- 'title' => __( 'Orders Renumerate', 'woocommerce-jetpack' ),
32
- 'desc' => __( 'Tool renumerates all orders.', 'woocommerce-jetpack' ),
33
  // 'tab_title' => __( 'Renumerate orders', 'woocommerce-jetpack' ),
34
  ),
35
  ) );
@@ -256,4 +256,4 @@ class WCJ_Order_Numbers extends WCJ_Module {
256
 
257
  endif;
258
 
259
- return new WCJ_Order_Numbers();
28
 
29
  $this->add_tools( array(
30
  'renumerate_orders' => array(
31
+ 'title' => __( 'Orders Renumerate', 'woocommerce-jetpack' ),
32
+ 'desc' => __( 'Tool renumerates all orders.', 'woocommerce-jetpack' ),
33
  // 'tab_title' => __( 'Renumerate orders', 'woocommerce-jetpack' ),
34
  ),
35
  ) );
256
 
257
  endif;
258
 
259
+ return new WCJ_Order_Numbers();
includes/class-wcj-product-custom-info.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * The WooCommerce Jetpack Product Custom Info class.
6
  *
7
- * @version 2.4.0
8
  * @since 2.4.0
9
  * @author Algoritmika Ltd.
10
  */
@@ -17,6 +17,8 @@ class WCJ_Product_Custom_info extends WCJ_Module {
17
 
18
  /**
19
  * Constructor.
 
 
20
  */
21
  public function __construct() {
22
 
@@ -30,11 +32,12 @@ class WCJ_Product_Custom_info extends WCJ_Module {
30
  if ( $this->is_enabled() ) {
31
  $single_or_archive_array = array( 'single', 'archive' );
32
  foreach ( $single_or_archive_array as $single_or_archive ) {
 
33
  for ( $i = 1; $i <= apply_filters( 'wcj_get_option_filter', 1, get_option( 'wcj_product_custom_info_total_number_' . $single_or_archive, 1 ) ); $i++ ) {
34
- $default_hook = ( 'single' === $single_or_archive ) ? 'woocommerce_after_single_product_summary' : 'woocommerce_after_shop_loop_item_title';
35
  add_action(
36
  get_option( 'wcj_product_custom_info_hook_' . $single_or_archive . '_' . $i, $default_hook ),
37
- array( $this, 'add_product_custom_info' )
 
38
  );
39
  }
40
  }
@@ -43,13 +46,21 @@ class WCJ_Product_Custom_info extends WCJ_Module {
43
 
44
  /**
45
  * add_product_custom_info.
 
 
46
  */
47
  function add_product_custom_info() {
48
  $current_filter = current_filter();
 
49
  $single_or_archive_array = array( 'single', 'archive' );
50
  foreach ( $single_or_archive_array as $single_or_archive ) {
 
51
  for ( $i = 1; $i <= apply_filters( 'wcj_get_option_filter', 1, get_option( 'wcj_product_custom_info_total_number_' . $single_or_archive, 1 ) ); $i++ ) {
52
- if ( '' != get_option( 'wcj_product_custom_info_content_' . $single_or_archive . '_' . $i ) && $current_filter === get_option( 'wcj_product_custom_info_hook_' . $single_or_archive . '_' . $i ) ) {
 
 
 
 
53
  $products_to_exclude = get_option( 'wcj_product_custom_info_products_to_exclude_' . $single_or_archive . '_' . $i );
54
  $products_to_include = get_option( 'wcj_product_custom_info_products_to_include_' . $single_or_archive . '_' . $i );
55
  $product_id = get_the_ID();
@@ -82,6 +93,8 @@ class WCJ_Product_Custom_info extends WCJ_Module {
82
 
83
  /**
84
  * add_settings.
 
 
85
  */
86
  function add_settings() {
87
 
@@ -159,7 +172,7 @@ class WCJ_Product_Custom_info extends WCJ_Module {
159
  'css' => 'width:250px;',
160
  ),
161
  array(
162
- 'title' => __( 'Priority', 'woocommerce-jetpack' ),
163
  'id' => 'wcj_product_custom_info_priority_' . $single_or_archive . '_' . $i,
164
  'default' => 10,
165
  'type' => 'number',
4
  *
5
  * The WooCommerce Jetpack Product Custom Info class.
6
  *
7
+ * @version 2.4.6
8
  * @since 2.4.0
9
  * @author Algoritmika Ltd.
10
  */
17
 
18
  /**
19
  * Constructor.
20
+ *
21
+ * @version 2.4.6
22
  */
23
  public function __construct() {
24
 
32
  if ( $this->is_enabled() ) {
33
  $single_or_archive_array = array( 'single', 'archive' );
34
  foreach ( $single_or_archive_array as $single_or_archive ) {
35
+ $default_hook = ( 'single' === $single_or_archive ) ? 'woocommerce_after_single_product_summary' : 'woocommerce_after_shop_loop_item_title';
36
  for ( $i = 1; $i <= apply_filters( 'wcj_get_option_filter', 1, get_option( 'wcj_product_custom_info_total_number_' . $single_or_archive, 1 ) ); $i++ ) {
 
37
  add_action(
38
  get_option( 'wcj_product_custom_info_hook_' . $single_or_archive . '_' . $i, $default_hook ),
39
+ array( $this, 'add_product_custom_info' ),
40
+ get_option( 'wcj_product_custom_info_priority_' . $single_or_archive . '_' . $i, 10 )
41
  );
42
  }
43
  }
46
 
47
  /**
48
  * add_product_custom_info.
49
+ *
50
+ * @version 2.4.6
51
  */
52
  function add_product_custom_info() {
53
  $current_filter = current_filter();
54
+ $current_filter_priority = wcj_current_filter_priority();
55
  $single_or_archive_array = array( 'single', 'archive' );
56
  foreach ( $single_or_archive_array as $single_or_archive ) {
57
+ $default_hook = ( 'single' === $single_or_archive ) ? 'woocommerce_after_single_product_summary' : 'woocommerce_after_shop_loop_item_title';
58
  for ( $i = 1; $i <= apply_filters( 'wcj_get_option_filter', 1, get_option( 'wcj_product_custom_info_total_number_' . $single_or_archive, 1 ) ); $i++ ) {
59
+ if (
60
+ '' != get_option( 'wcj_product_custom_info_content_' . $single_or_archive . '_' . $i ) &&
61
+ $current_filter === get_option( 'wcj_product_custom_info_hook_' . $single_or_archive . '_' . $i, $default_hook ) &&
62
+ $current_filter_priority == get_option( 'wcj_product_custom_info_priority_' . $single_or_archive . '_' . $i, 10 )
63
+ ) {
64
  $products_to_exclude = get_option( 'wcj_product_custom_info_products_to_exclude_' . $single_or_archive . '_' . $i );
65
  $products_to_include = get_option( 'wcj_product_custom_info_products_to_include_' . $single_or_archive . '_' . $i );
66
  $product_id = get_the_ID();
93
 
94
  /**
95
  * add_settings.
96
+ *
97
+ * @version 2.4.6
98
  */
99
  function add_settings() {
100
 
172
  'css' => 'width:250px;',
173
  ),
174
  array(
175
+ 'title' => __( 'Position Order (i.e. Priority)', 'woocommerce-jetpack' ),
176
  'id' => 'wcj_product_custom_info_priority_' . $single_or_archive . '_' . $i,
177
  'default' => 10,
178
  'type' => 'number',
includes/class-wcj-product-listings.php CHANGED
@@ -4,26 +4,30 @@
4
  *
5
  * The WooCommerce Jetpack Product Listings class.
6
  *
7
- * @class WCJ_Product_Listings
8
- * @version 1.2.0
9
- * @category Class
10
- * @author Algoritmika Ltd.
11
  */
12
 
13
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
14
 
15
  if ( ! class_exists( 'WCJ_Product_Listings' ) ) :
16
 
17
- class WCJ_Product_Listings {
18
 
19
  /**
20
  * Constructor.
 
 
21
  */
22
  public function __construct() {
23
- // Main hooks
24
- if ( 'yes' === get_option( 'wcj_product_listings_enabled' ) ) {
 
 
 
 
25
  // Exclude and Hide Empty
26
- add_filter( 'woocommerce_product_subcategories_args', array( $this, 'filter_subcategories' ), 100 );
27
  add_filter( 'woocommerce_product_subcategories_hide_empty', array( $this, 'filter_subcategories_show_empty' ), 100 );
28
  // Hide Count
29
  if ( 'yes' === get_option( 'wcj_product_listings_hide_cats_count_on_shop' ) || 'yes' === get_option( 'wcj_product_listings_hide_cats_count_on_archive' ) )
@@ -31,67 +35,43 @@ class WCJ_Product_Listings {
31
  // Settings to "WooCommerce > Settings > Products > Product Listings"
32
  add_filter( 'woocommerce_product_settings', array( $this, 'add_fields_to_woocommerce_settings' ), 100 );
33
  }
34
- // Settings hooks
35
- add_filter( 'wcj_settings_sections', array( $this, 'settings_section' ) );
36
- add_filter( 'wcj_settings_product_listings', array( $this, 'get_settings' ), 100 );
37
- add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
38
- }
39
-
40
- /**
41
- * add_enabled_option.
42
- */
43
- public function add_enabled_option( $settings ) {
44
- $all_settings = $this->get_settings();
45
- $settings[] = $all_settings[1];
46
- return $settings;
47
  }
48
 
49
  /**
50
  * get_settings.
 
 
51
  */
52
  function get_settings() {
53
 
54
- $settings = array(
55
-
56
- array( 'title' => __( 'Product Listings Options', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => __( '', 'woocommerce-jetpack' ), 'id' => 'wcj_product_listings_options' ),
57
-
58
- array(
59
- 'title' => __( 'Product Listings', 'woocommerce-jetpack' ),
60
- 'desc' => '<strong>' . __( 'Enable Module', 'woocommerce-jetpack' ) . '</strong>',
61
- 'desc_tip' => __( 'Change WooCommerce display options for shop and category pages: show/hide categories count, exclude categories, show/hide empty categories.', 'woocommerce-jetpack' ),
62
- 'id' => 'wcj_product_listings_enabled',
63
- 'default' => 'no',
64
- 'type' => 'checkbox',
65
- ),
66
-
67
- array( 'type' => 'sectionend', 'id' => 'wcj_product_listings_options' ),
68
 
69
  array( 'title' => __( 'Shop Page Display Options', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => __( 'This will work only when "Shop Page Display" in "WooCommerce > Settings > Products > Product Listings" is set to "Show subcategories" or "Show both".', 'woocommerce-jetpack' ), 'id' => 'wcj_product_listings_shop_page_options' ),
70
 
71
  array(
72
- 'title' => __( 'Categories Count', 'woocommerce-jetpack' ),
73
  'desc' => __( 'Hide categories count on shop page', 'woocommerce-jetpack' ),
74
- 'id' => 'wcj_product_listings_hide_cats_count_on_shop',
75
- 'default' => 'no',
76
- 'type' => 'checkbox',
77
- ),
78
 
79
- array(
80
  'title' => __( 'Exclude Categories', 'woocommerce-jetpack' ),
81
  'desc_tip' => __(' Excludes one or more categories from the shop page. This parameter takes a comma-separated list of categories by unique ID, in ascending order. Leave blank to disable.', 'woocommerce-jetpack' ),
82
- 'id' => 'wcj_product_listings_exclude_cats_on_shop',
83
- 'default' => '',
84
- 'type' => 'text',
85
  'css' => 'width:50%;min-width:300px;',
86
- ),
87
 
88
- array(
89
- 'title' => __( 'Hide Empty', 'woocommerce-jetpack' ),
90
  'desc' => __( 'Hide empty categories on shop page', 'woocommerce-jetpack' ),
91
- 'id' => 'wcj_product_listings_hide_empty_cats_on_shop',
92
- 'default' => 'yes',
93
- 'type' => 'checkbox',
94
- ),
95
 
96
  array(
97
  'title' => __( 'Show Products', 'woocommerce-jetpack' ),
@@ -106,31 +86,31 @@ class WCJ_Product_Listings {
106
  array( 'title' => __( 'Category Display Options', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => __( 'This will work only when "Default Category Display" in "WooCommerce > Settings > Products > Product Listings" is set to "Show subcategories" or "Show both".', 'woocommerce-jetpack' ), 'id' => 'wcj_product_listings_archive_pages_options' ),
107
 
108
  array(
109
- 'title' => __( 'Subcategories Count', 'woocommerce-jetpack' ),
110
  'desc' => __( 'Hide subcategories count on category pages', 'woocommerce-jetpack' ),
111
- 'id' => 'wcj_product_listings_hide_cats_count_on_archive',
112
- 'default' => 'no',
113
- 'type' => 'checkbox',
114
  'custom_attributes' => apply_filters( 'get_wc_jetpack_plus_message', '', 'disabled' ),
115
  'desc_tip' => apply_filters( 'get_wc_jetpack_plus_message', '', 'desc' ),
116
- ),
117
 
118
- array(
119
- 'title' => __( 'Exclude Subcategories', 'woocommerce-jetpack' ),
120
  'desc_tip' => __(' Excludes one or more categories from the category (archive) pages. This parameter takes a comma-separated list of categories by unique ID, in ascending order. Leave blank to disable.', 'woocommerce-jetpack' ),
121
- 'id' => 'wcj_product_listings_exclude_cats_on_archives',
122
- 'default' => '',
123
- 'type' => 'text',
124
  'css' => 'width:50%;min-width:300px;',
125
- ),
126
 
127
- array(
128
- 'title' => __( 'Hide Empty', 'woocommerce-jetpack' ),
129
  'desc' => __( 'Hide empty subcategories on category pages', 'woocommerce-jetpack' ),
130
- 'id' => 'wcj_product_listings_hide_empty_cats_on_archives',
131
- 'default' => 'yes',
132
- 'type' => 'checkbox',
133
- ),
134
 
135
  array(
136
  'title' => __( 'Show Products', 'woocommerce-jetpack' ),
@@ -141,17 +121,9 @@ class WCJ_Product_Listings {
141
  ),
142
 
143
  array( 'type' => 'sectionend', 'id' => 'wcj_product_listings_archive_pages_options' ),
144
- );
145
-
146
- return $settings;
147
- }
148
 
149
- /**
150
- * settings_section.
151
- */
152
- function settings_section( $sections ) {
153
- $sections['product_listings'] = __( 'Product Listings', 'woocommerce-jetpack' );
154
- return $sections;
155
  }
156
 
157
  /**
4
  *
5
  * The WooCommerce Jetpack Product Listings class.
6
  *
7
+ * @version 2.4.6
8
+ * @author Algoritmika Ltd.
 
 
9
  */
10
 
11
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
12
 
13
  if ( ! class_exists( 'WCJ_Product_Listings' ) ) :
14
 
15
+ class WCJ_Product_Listings extends WCJ_Module {
16
 
17
  /**
18
  * Constructor.
19
+ *
20
+ * @version 2.4.6
21
  */
22
  public function __construct() {
23
+ $this->id = 'product_listings';
24
+ $this->short_desc = __( 'Product Listings', 'woocommerce-jetpack' );
25
+ $this->desc = __( 'Change WooCommerce display options for shop and category pages: show/hide categories count, exclude categories, show/hide empty categories.', 'woocommerce-jetpack' );
26
+ parent::__construct();
27
+
28
+ if ( $this->is_enabled() ) {
29
  // Exclude and Hide Empty
30
+ add_filter( 'woocommerce_product_subcategories_args', array( $this, 'filter_subcategories' ), 100 );
31
  add_filter( 'woocommerce_product_subcategories_hide_empty', array( $this, 'filter_subcategories_show_empty' ), 100 );
32
  // Hide Count
33
  if ( 'yes' === get_option( 'wcj_product_listings_hide_cats_count_on_shop' ) || 'yes' === get_option( 'wcj_product_listings_hide_cats_count_on_archive' ) )
35
  // Settings to "WooCommerce > Settings > Products > Product Listings"
36
  add_filter( 'woocommerce_product_settings', array( $this, 'add_fields_to_woocommerce_settings' ), 100 );
37
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  }
39
 
40
  /**
41
  * get_settings.
42
+ *
43
+ * @version 2.4.6
44
  */
45
  function get_settings() {
46
 
47
+ $settings = array(
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
  array( 'title' => __( 'Shop Page Display Options', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => __( 'This will work only when "Shop Page Display" in "WooCommerce > Settings > Products > Product Listings" is set to "Show subcategories" or "Show both".', 'woocommerce-jetpack' ), 'id' => 'wcj_product_listings_shop_page_options' ),
50
 
51
  array(
52
+ 'title' => __( 'Categories Count', 'woocommerce-jetpack' ),
53
  'desc' => __( 'Hide categories count on shop page', 'woocommerce-jetpack' ),
54
+ 'id' => 'wcj_product_listings_hide_cats_count_on_shop',
55
+ 'default' => 'no',
56
+ 'type' => 'checkbox',
57
+ ),
58
 
59
+ array(
60
  'title' => __( 'Exclude Categories', 'woocommerce-jetpack' ),
61
  'desc_tip' => __(' Excludes one or more categories from the shop page. This parameter takes a comma-separated list of categories by unique ID, in ascending order. Leave blank to disable.', 'woocommerce-jetpack' ),
62
+ 'id' => 'wcj_product_listings_exclude_cats_on_shop',
63
+ 'default' => '',
64
+ 'type' => 'text',
65
  'css' => 'width:50%;min-width:300px;',
66
+ ),
67
 
68
+ array(
69
+ 'title' => __( 'Hide Empty', 'woocommerce-jetpack' ),
70
  'desc' => __( 'Hide empty categories on shop page', 'woocommerce-jetpack' ),
71
+ 'id' => 'wcj_product_listings_hide_empty_cats_on_shop',
72
+ 'default' => 'yes',
73
+ 'type' => 'checkbox',
74
+ ),
75
 
76
  array(
77
  'title' => __( 'Show Products', 'woocommerce-jetpack' ),
86
  array( 'title' => __( 'Category Display Options', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => __( 'This will work only when "Default Category Display" in "WooCommerce > Settings > Products > Product Listings" is set to "Show subcategories" or "Show both".', 'woocommerce-jetpack' ), 'id' => 'wcj_product_listings_archive_pages_options' ),
87
 
88
  array(
89
+ 'title' => __( 'Subcategories Count', 'woocommerce-jetpack' ),
90
  'desc' => __( 'Hide subcategories count on category pages', 'woocommerce-jetpack' ),
91
+ 'id' => 'wcj_product_listings_hide_cats_count_on_archive',
92
+ 'default' => 'no',
93
+ 'type' => 'checkbox',
94
  'custom_attributes' => apply_filters( 'get_wc_jetpack_plus_message', '', 'disabled' ),
95
  'desc_tip' => apply_filters( 'get_wc_jetpack_plus_message', '', 'desc' ),
96
+ ),
97
 
98
+ array(
99
+ 'title' => __( 'Exclude Subcategories', 'woocommerce-jetpack' ),
100
  'desc_tip' => __(' Excludes one or more categories from the category (archive) pages. This parameter takes a comma-separated list of categories by unique ID, in ascending order. Leave blank to disable.', 'woocommerce-jetpack' ),
101
+ 'id' => 'wcj_product_listings_exclude_cats_on_archives',
102
+ 'default' => '',
103
+ 'type' => 'text',
104
  'css' => 'width:50%;min-width:300px;',
105
+ ),
106
 
107
+ array(
108
+ 'title' => __( 'Hide Empty', 'woocommerce-jetpack' ),
109
  'desc' => __( 'Hide empty subcategories on category pages', 'woocommerce-jetpack' ),
110
+ 'id' => 'wcj_product_listings_hide_empty_cats_on_archives',
111
+ 'default' => 'yes',
112
+ 'type' => 'checkbox',
113
+ ),
114
 
115
  array(
116
  'title' => __( 'Show Products', 'woocommerce-jetpack' ),
121
  ),
122
 
123
  array( 'type' => 'sectionend', 'id' => 'wcj_product_listings_archive_pages_options' ),
124
+ );
 
 
 
125
 
126
+ return $this->add_standard_settings( $settings );
 
 
 
 
 
127
  }
128
 
129
  /**
includes/class-wcj-reports.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * The WooCommerce Jetpack Reports class.
6
  *
7
- * @version 2.3.0
8
  * @author Algoritmika Ltd.
9
  */
10
 
@@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
12
 
13
  if ( ! class_exists( 'WCJ_Reports' ) ) :
14
 
15
- class WCJ_Reports {
16
 
17
  /** @var string Report ID. */
18
  public $report_id;
@@ -25,30 +25,32 @@ class WCJ_Reports {
25
 
26
  /**
27
  * Constructor.
 
 
28
  */
29
  public function __construct() {
30
 
31
- // Main hooks
32
- if ( 'yes' === get_option( 'wcj_reports_enabled' ) ) {
 
 
 
 
33
  if ( is_admin() ) {
34
- add_filter( 'woocommerce_admin_reports', array( $this, 'add_customers_by_country_report' ) );
35
- add_filter( 'woocommerce_admin_reports', array( $this, 'add_stock_reports' ) );
36
- add_filter( 'woocommerce_admin_reports', array( $this, 'add_sales_reports' ) );
37
- add_action( 'init', array( $this, 'catch_arguments' ) );
 
38
 
39
  include_once( 'reports/wcj-class-reports-customers.php' );
40
  include_once( 'reports/wcj-class-reports-stock.php' );
41
  include_once( 'reports/wcj-class-reports-sales.php' );
42
 
43
- add_action( 'admin_bar_menu', array( $this, 'add_custom_order_reports_ranges_to_admin_bar' ), PHP_INT_MAX );
44
- add_action( 'admin_bar_menu', array( $this, 'add_custom_order_reports_ranges_by_month_to_admin_bar' ), PHP_INT_MAX );
45
  }
46
  }
47
-
48
- // Settings hooks
49
- add_filter( 'wcj_settings_sections', array( $this, 'settings_section' ) ); // Add section to WooCommerce > Settings > Jetpack
50
- add_filter( 'wcj_settings_reports', array( $this, 'get_settings' ), 100 ); // Add the settings
51
- add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 ); // Add Enable option to Jetpack Settings Dashboard
52
  }
53
 
54
  /**
@@ -158,13 +160,13 @@ class WCJ_Reports {
158
  'href' => add_query_arg( array( 'range' => 'custom', 'start_date' => date( 'Y-m-01', strtotime( '-1 month' ) ), 'end_date' => date( 'Y-m-d', strtotime( '-1 month' ) ), ) ),
159
  'meta' => array( 'title' => __( 'Same Days Last Month', 'woocommerce-jetpack' ), ),
160
  ),
161
- /*array(
162
  'parent' => $parent,
163
  'id' => $parent . '_' . 'last_week',
164
  'title' => __( 'Last Week', 'woocommerce-jetpack' ),
165
  'href' => add_query_arg( array( 'range' => 'custom', 'start_date' => date( 'Y-m-d', strtotime( 'last monday' ) ), 'end_date' => date( 'Y-m-d', strtotime( 'last sunday' ) ), ) ),
166
  'meta' => array( 'title' => __( 'Last Week', 'woocommerce-jetpack' ), ),
167
- ),*/
168
  array(
169
  'parent' => $parent,
170
  'id' => $parent . '_' . 'last_year',
@@ -284,64 +286,35 @@ class WCJ_Reports {
284
  return $reports;
285
  }
286
 
287
- /**
288
- * Add Enable option to Jetpack Settings Dashboard.
289
- */
290
- public function add_enabled_option( $settings ) {
291
- $all_settings = $this->get_settings();
292
- $settings[] = $all_settings[1];
293
- return $settings;
294
- }
295
-
296
  /*
297
  * Add the settings.
 
 
298
  */
299
  function get_settings() {
300
-
301
  $settings = array(
302
-
303
- array( 'title' => __( 'Reports Options', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => '', 'id' => 'wcj_reports_options' ),
304
-
305
  array(
306
- 'title' => __( 'Reports', 'woocommerce-jetpack' ),
307
- 'desc' => '<strong>' . __( 'Enable Module', 'woocommerce-jetpack' ) . '</strong>',
308
- 'desc_tip' => __( 'WooCommerce stock, sales, customers etc. reports.', 'woocommerce-jetpack' ),
309
- 'id' => 'wcj_reports_enabled',
310
- 'default' => 'no',
311
- 'type' => 'checkbox'
 
 
 
 
 
 
 
 
312
  ),
313
-
314
- array( 'type' => 'sectionend', 'id' => 'wcj_reports_options' ),
315
-
316
  array(
317
- 'title' => __( 'Available Reports', 'woocommerce-jetpack' ),
318
- 'type' => 'title',
319
- 'desc' => '<p>'
320
- . __( 'Booster: Customers by Country. Available in WooCommerce > Reports > Customers.', 'woocommerce-jetpack' )
321
- . '</p><p>'
322
- . __( 'Booster: Customers by Country Sets. Available in WooCommerce > Reports > Customers.', 'woocommerce-jetpack' )
323
- . '</p><p>'
324
- . __( 'Booster: All in Stock with sales data. Available in WooCommerce > Reports > Stock.', 'woocommerce-jetpack' )
325
- . '</p><p>'
326
- . __( 'Booster: Understocked products (calculated by sales data). Available in WooCommerce > Reports > Stock.', 'woocommerce-jetpack' )
327
- . '</p><p>'
328
- . __( 'Booster: Overstocked products (calculated by sales data). Available in WooCommerce > Reports > Stock.', 'woocommerce-jetpack' )
329
- . '</p>',
330
- 'id' => 'wcj_reports_more_options'
331
  ),
332
-
333
- array( 'type' => 'sectionend', 'id' => 'wcj_reports_more_options' ),
334
  );
335
-
336
- return $settings;
337
- }
338
-
339
- /*
340
- * Add settings section to WooCommerce > Settings > Jetpack.
341
- */
342
- function settings_section( $sections ) {
343
- $sections['reports'] = __( 'Reports', 'woocommerce-jetpack' );
344
- return $sections;
345
  }
346
  }
347
 
4
  *
5
  * The WooCommerce Jetpack Reports class.
6
  *
7
+ * @version 2.4.6
8
  * @author Algoritmika Ltd.
9
  */
10
 
12
 
13
  if ( ! class_exists( 'WCJ_Reports' ) ) :
14
 
15
+ class WCJ_Reports extends WCJ_Module {
16
 
17
  /** @var string Report ID. */
18
  public $report_id;
25
 
26
  /**
27
  * Constructor.
28
+ *
29
+ * @version 2.4.6
30
  */
31
  public function __construct() {
32
 
33
+ $this->id = 'reports';
34
+ $this->short_desc = __( 'Reports', 'woocommerce-jetpack' );
35
+ $this->desc = __( 'WooCommerce stock, sales, customers etc. reports.', 'woocommerce-jetpack' );
36
+ parent::__construct();
37
+
38
+ if ( $this->is_enabled() ) {
39
  if ( is_admin() ) {
40
+
41
+ add_filter( 'woocommerce_admin_reports', array( $this, 'add_customers_by_country_report' ) );
42
+ add_filter( 'woocommerce_admin_reports', array( $this, 'add_stock_reports' ) );
43
+ add_filter( 'woocommerce_admin_reports', array( $this, 'add_sales_reports' ) );
44
+ add_action( 'init', array( $this, 'catch_arguments' ) );
45
 
46
  include_once( 'reports/wcj-class-reports-customers.php' );
47
  include_once( 'reports/wcj-class-reports-stock.php' );
48
  include_once( 'reports/wcj-class-reports-sales.php' );
49
 
50
+ add_action( 'admin_bar_menu', array( $this, 'add_custom_order_reports_ranges_to_admin_bar' ), PHP_INT_MAX );
51
+ add_action( 'admin_bar_menu', array( $this, 'add_custom_order_reports_ranges_by_month_to_admin_bar' ), PHP_INT_MAX );
52
  }
53
  }
 
 
 
 
 
54
  }
55
 
56
  /**
160
  'href' => add_query_arg( array( 'range' => 'custom', 'start_date' => date( 'Y-m-01', strtotime( '-1 month' ) ), 'end_date' => date( 'Y-m-d', strtotime( '-1 month' ) ), ) ),
161
  'meta' => array( 'title' => __( 'Same Days Last Month', 'woocommerce-jetpack' ), ),
162
  ),
163
+ /* array(
164
  'parent' => $parent,
165
  'id' => $parent . '_' . 'last_week',
166
  'title' => __( 'Last Week', 'woocommerce-jetpack' ),
167
  'href' => add_query_arg( array( 'range' => 'custom', 'start_date' => date( 'Y-m-d', strtotime( 'last monday' ) ), 'end_date' => date( 'Y-m-d', strtotime( 'last sunday' ) ), ) ),
168
  'meta' => array( 'title' => __( 'Last Week', 'woocommerce-jetpack' ), ),
169
+ ), */
170
  array(
171
  'parent' => $parent,
172
  'id' => $parent . '_' . 'last_year',
286
  return $reports;
287
  }
288
 
 
 
 
 
 
 
 
 
 
289
  /*
290
  * Add the settings.
291
+ *
292
+ * @version 2.4.6
293
  */
294
  function get_settings() {
 
295
  $settings = array(
 
 
 
296
  array(
297
+ 'title' => __( 'Available Reports', 'woocommerce-jetpack' ),
298
+ 'type' => 'title',
299
+ 'desc' => '<p>'
300
+ . __( 'Booster: Customers by Country. Available in WooCommerce > Reports > Customers.', 'woocommerce-jetpack' )
301
+ . '</p><p>'
302
+ . __( 'Booster: Customers by Country Sets. Available in WooCommerce > Reports > Customers.', 'woocommerce-jetpack' )
303
+ . '</p><p>'
304
+ . __( 'Booster: All in Stock with sales data. Available in WooCommerce > Reports > Stock.', 'woocommerce-jetpack' )
305
+ . '</p><p>'
306
+ . __( 'Booster: Understocked products (calculated by sales data). Available in WooCommerce > Reports > Stock.', 'woocommerce-jetpack' )
307
+ . '</p><p>'
308
+ . __( 'Booster: Overstocked products (calculated by sales data). Available in WooCommerce > Reports > Stock.', 'woocommerce-jetpack' )
309
+ . '</p>',
310
+ 'id' => 'wcj_reports_more_options'
311
  ),
 
 
 
312
  array(
313
+ 'type' => 'sectionend',
314
+ 'id' => 'wcj_reports_more_options',
 
 
 
 
 
 
 
 
 
 
 
 
315
  ),
 
 
316
  );
317
+ return $this->add_standard_settings( $settings );
 
 
 
 
 
 
 
 
 
318
  }
319
  }
320
 
includes/class-wcj-shipping-calculator.php CHANGED
@@ -4,45 +4,45 @@
4
  *
5
  * The WooCommerce Jetpack Shipping Calculator class.
6
  *
7
- * @class WCJ_Shipping_Calculator
8
- * @version 1.0.0
9
- * @category Class
10
- * @author Algoritmika Ltd.
11
  */
12
 
13
  if ( ! defined( 'ABSPATH' ) ) exit;
14
-
15
  if ( ! class_exists( 'WCJ_Shipping_Calculator' ) ) :
16
-
17
- class WCJ_Shipping_Calculator {
18
-
19
  /**
20
  * Constructor.
 
 
21
  */
22
  public function __construct() {
23
-
24
- // Main hooks
25
- if ( 'yes' === get_option( 'wcj_shipping_calculator_enabled' ) ) {
26
- add_filter( 'woocommerce_shipping_calculator_enable_city' , array( $this, 'enable_city' ) );
27
- add_filter( 'woocommerce_shipping_calculator_enable_postcode', array( $this, 'enable_postcode' ) );
28
- add_action( 'wp_head', array( $this, 'add_custom_styles' ) );
29
- //add_filter( 'gettext', array( $this, 'change_labels' ), 20, 3 );
30
- }
31
-
32
- // Settings hooks
33
- add_filter( 'wcj_settings_sections', array( $this, 'settings_section' ) );
34
- add_filter( 'wcj_settings_shipping_calculator', array( $this, 'get_settings' ), 100 );
35
- add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
36
  }
37
-
38
  /**
39
  * change_labels.
40
- *
41
- public function change_labels( $translated_text, $text, $domain ) {
42
-
43
  if ( ! function_exists( 'is_cart' ) || ! is_cart() )
44
  return $translated_text;
45
-
46
  if ( 'Update Totals' === $text ) {
47
  $the_label = get_option( 'wcj_shipping_calculator_label_update_totals' );
48
  if ( '' != $the_label )
@@ -53,151 +53,125 @@ class WCJ_Shipping_Calculator {
53
  if ( '' != $the_label )
54
  return $the_label;
55
  }
56
-
57
  return $translated_text;
58
- }
59
-
60
  /**
61
  * add_custom_styles.
62
  */
63
- public function add_custom_styles() {
64
-
65
  $html = '<style type="text/css">';
66
-
67
  if ( 'no' === get_option( 'wcj_shipping_calculator_enable_state' ) ) {
68
- $html .= '#calc_shipping_state { display: none !important; }';
69
- }
70
-
71
  if ( 'yes' === get_option( 'wcj_shipping_calculator_enable_force_block_open' ) ) {
72
-
73
  $html .= '.shipping-calculator-form { display: block !important; }';
74
-
75
  if ( 'hide' === get_option( 'wcj_shipping_calculator_enable_force_block_open_button' ) )
76
  $html .= 'a.shipping-calculator-button { display: none !important; }';
77
  else if ( 'noclick' === get_option( 'wcj_shipping_calculator_enable_force_block_open_button' ) )
78
  $html .= 'a.shipping-calculator-button { pointer-events: none; cursor: default; }';
79
- }
80
-
81
  $html .= '</style>';
82
-
83
  echo $html;
84
- }
85
-
86
  /**
87
  * enable_city.
88
  */
89
- public function enable_city() {
90
  return ( 'yes' === get_option( 'wcj_shipping_calculator_enable_city' ) ) ? true : false;
91
  }
92
-
93
  /**
94
  * enable_postcode.
95
  */
96
- public function enable_postcode() {
97
  return ( 'yes' === get_option( 'wcj_shipping_calculator_enable_postcode' ) ) ? true : false;
98
- }
99
-
100
- /**
101
- * add_enabled_option.
102
- */
103
- public function add_enabled_option( $settings ) {
104
- $all_settings = $this->get_settings();
105
- $settings[] = $all_settings[1];
106
- return $settings;
107
  }
108
-
109
  /**
110
  * get_settings.
111
- */
 
 
112
  function get_settings() {
113
-
114
- $settings = array(
115
-
116
- array( 'title' => __( 'Shipping Calculator Options', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => '', 'id' => 'wcj_shipping_calculator_options' ),
117
-
118
- array(
119
- 'title' => __( 'Shipping Calculator', 'woocommerce-jetpack' ),
120
- 'desc' => '<strong>' . __( 'Enable Module', 'woocommerce-jetpack' ) . '</strong>',
121
- 'desc_tip' => __( 'Customize WooCommerce shipping calculator on cart page.', 'woocommerce-jetpack' ),
122
- 'id' => 'wcj_shipping_calculator_enabled',
123
- 'default' => 'no',
124
- 'type' => 'checkbox',
125
- ),
126
-
127
- array(
128
- 'title' => __( 'Enable City', 'woocommerce-jetpack' ),
129
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
130
- 'id' => 'wcj_shipping_calculator_enable_city',
131
- 'default' => 'no',
132
- 'type' => 'checkbox',
133
- ),
134
-
135
- array(
136
- 'title' => __( 'Enable Postcode', 'woocommerce-jetpack' ),
137
- 'desc' => __( 'Enable', 'woocommerce-jetpack' ),
138
- 'id' => 'wcj_shipping_calculator_enable_postcode',
139
- 'default' => 'yes',
140
- 'type' => 'checkbox',
141
- ),
142
-
143
- array(
144
- 'title' => __( 'Enable State', 'woocommerce-jetpack' ),
145
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
146
- 'id' => 'wcj_shipping_calculator_enable_state',
147
- 'default' => 'yes',
148
- 'type' => 'checkbox',
149
- ),
150
-
151
  array(
152
- 'title' => __( 'Force Block Open', 'woocommerce-jetpack' ),
153
- 'desc' => __( 'Enable', 'woocommerce-jetpack' ),
154
- 'id' => 'wcj_shipping_calculator_enable_force_block_open',
155
- 'default' => 'no',
156
- 'type' => 'checkbox',
157
- ),
158
-
159
  array(
160
- 'title' => __( '', 'woocommerce-jetpack' ),
161
- 'desc' => __( 'Calculate Shipping button', 'woocommerce-jetpack' ),
162
- 'desc_tip' => __( 'When "Force Block Open" options is enabled, set Calculate Shipping button options.', 'woocommerce-jetpack' ),
163
- 'id' => 'wcj_shipping_calculator_enable_force_block_open_button',
164
- 'default' => 'hide',
165
- 'type' => 'select',
166
- 'options' => array(
167
- 'hide' => __( 'Hide', 'woocommerce-jetpack' ),
168
- 'noclick' => __( 'Make non clickable', 'woocommerce-jetpack' ),
169
- ),
170
- ),
171
-
 
 
 
 
 
 
172
  /*array(
173
- 'title' => __( 'Label for Calculate Shipping', 'woocommerce-jetpack' ),
174
- 'id' => 'wcj_shipping_calculator_label_calculate_shipping',
175
- 'default' => '',
176
- 'type' => 'text',
177
- ),
178
-
179
  array(
180
- 'title' => __( 'Label for Update Totals', 'woocommerce-jetpack' ),
181
- 'id' => 'wcj_shipping_calculator_label_update_totals',
182
- 'default' => '',
183
- 'type' => 'text',
184
- ),*/
185
-
186
- array( 'type' => 'sectionend', 'id' => 'wcj_shipping_calculator_options' ),
187
- );
188
-
189
- return $settings;
 
190
  }
191
-
192
- /**
193
- * settings_section.
194
- */
195
- function settings_section( $sections ) {
196
- $sections['shipping_calculator'] = __( 'Shipping Calculator', 'woocommerce-jetpack' );
197
- return $sections;
198
- }
199
  }
200
-
201
  endif;
202
-
203
  return new WCJ_Shipping_Calculator();
4
  *
5
  * The WooCommerce Jetpack Shipping Calculator class.
6
  *
7
+ * @version 2.4.6
8
+ * @author Algoritmika Ltd.
 
 
9
  */
10
 
11
  if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
  if ( ! class_exists( 'WCJ_Shipping_Calculator' ) ) :
14
+
15
+ class WCJ_Shipping_Calculator extends WCJ_Module {
16
+
17
  /**
18
  * Constructor.
19
+ *
20
+ * @version 2.4.6
21
  */
22
  public function __construct() {
23
+
24
+ $this->id = 'shipping_calculator';
25
+ $this->short_desc = __( 'Shipping Calculator', 'woocommerce-jetpack' );
26
+ $this->desc = __( 'Customize WooCommerce shipping calculator on cart page.', 'woocommerce-jetpack' );
27
+ $this->link = 'http://booster.io/features/woocommerce-shipping-calculator-customizer/';
28
+ parent::__construct();
29
+
30
+ if ( $this->is_enabled() ) {
31
+ add_filter( 'woocommerce_shipping_calculator_enable_city' , array( $this, 'enable_city' ) );
32
+ add_filter( 'woocommerce_shipping_calculator_enable_postcode', array( $this, 'enable_postcode' ) );
33
+ add_action( 'wp_head', array( $this, 'add_custom_styles' ) );
34
+ // add_filter( 'gettext', array( $this, 'change_labels' ), 20, 3 );
35
+ }
36
  }
37
+
38
  /**
39
  * change_labels.
40
+ */
41
+ /* public function change_labels( $translated_text, $text, $domain ) {
42
+
43
  if ( ! function_exists( 'is_cart' ) || ! is_cart() )
44
  return $translated_text;
45
+
46
  if ( 'Update Totals' === $text ) {
47
  $the_label = get_option( 'wcj_shipping_calculator_label_update_totals' );
48
  if ( '' != $the_label )
53
  if ( '' != $the_label )
54
  return $the_label;
55
  }
56
+
57
  return $translated_text;
58
+ } */
59
+
60
  /**
61
  * add_custom_styles.
62
  */
63
+ public function add_custom_styles() {
64
+
65
  $html = '<style type="text/css">';
66
+
67
  if ( 'no' === get_option( 'wcj_shipping_calculator_enable_state' ) ) {
68
+ $html .= '#calc_shipping_state { display: none !important; }';
69
+ }
70
+
71
  if ( 'yes' === get_option( 'wcj_shipping_calculator_enable_force_block_open' ) ) {
72
+
73
  $html .= '.shipping-calculator-form { display: block !important; }';
74
+
75
  if ( 'hide' === get_option( 'wcj_shipping_calculator_enable_force_block_open_button' ) )
76
  $html .= 'a.shipping-calculator-button { display: none !important; }';
77
  else if ( 'noclick' === get_option( 'wcj_shipping_calculator_enable_force_block_open_button' ) )
78
  $html .= 'a.shipping-calculator-button { pointer-events: none; cursor: default; }';
79
+ }
80
+
81
  $html .= '</style>';
82
+
83
  echo $html;
84
+ }
85
+
86
  /**
87
  * enable_city.
88
  */
89
+ public function enable_city() {
90
  return ( 'yes' === get_option( 'wcj_shipping_calculator_enable_city' ) ) ? true : false;
91
  }
92
+
93
  /**
94
  * enable_postcode.
95
  */
96
+ public function enable_postcode() {
97
  return ( 'yes' === get_option( 'wcj_shipping_calculator_enable_postcode' ) ) ? true : false;
 
 
 
 
 
 
 
 
 
98
  }
99
+
100
  /**
101
  * get_settings.
102
+ *
103
+ * @version 2.4.6
104
+ */
105
  function get_settings() {
106
+
107
+ $settings = array(
108
+
109
+ array(
110
+ 'title' => __( 'Shipping Calculator Options', 'woocommerce-jetpack' ),
111
+ 'type' => 'title',
112
+ 'id' => 'wcj_shipping_calculator_options',
113
+ ),
114
+ array(
115
+ 'title' => __( 'Enable City', 'woocommerce-jetpack' ),
 
 
 
 
 
 
116
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
117
+ 'id' => 'wcj_shipping_calculator_enable_city',
118
+ 'default' => 'no',
119
+ 'type' => 'checkbox',
120
+ ),
121
+ array(
122
+ 'title' => __( 'Enable Postcode', 'woocommerce-jetpack' ),
 
 
 
 
 
 
 
 
 
123
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
124
+ 'id' => 'wcj_shipping_calculator_enable_postcode',
125
+ 'default' => 'yes',
126
+ 'type' => 'checkbox',
127
+ ),
 
128
  array(
129
+ 'title' => __( 'Enable State', 'woocommerce-jetpack' ),
130
+ 'desc' => __( 'Enable', 'woocommerce-jetpack' ),
131
+ 'id' => 'wcj_shipping_calculator_enable_state',
132
+ 'default' => 'yes',
133
+ 'type' => 'checkbox',
134
+ ),
 
135
  array(
136
+ 'title' => __( 'Force Block Open', 'woocommerce-jetpack' ),
137
+ 'desc' => __( 'Enable', 'woocommerce-jetpack' ),
138
+ 'id' => 'wcj_shipping_calculator_enable_force_block_open',
139
+ 'default' => 'no',
140
+ 'type' => 'checkbox',
141
+ ),
142
+ array(
143
+ 'title' => __( '', 'woocommerce-jetpack' ),
144
+ 'desc' => __( 'Calculate Shipping button', 'woocommerce-jetpack' ),
145
+ 'desc_tip' => __( 'When "Force Block Open" options is enabled, set Calculate Shipping button options.', 'woocommerce-jetpack' ),
146
+ 'id' => 'wcj_shipping_calculator_enable_force_block_open_button',
147
+ 'default' => 'hide',
148
+ 'type' => 'select',
149
+ 'options' => array(
150
+ 'hide' => __( 'Hide', 'woocommerce-jetpack' ),
151
+ 'noclick' => __( 'Make non clickable', 'woocommerce-jetpack' ),
152
+ ),
153
+ ),
154
  /*array(
155
+ 'title' => __( 'Label for Calculate Shipping', 'woocommerce-jetpack' ),
156
+ 'id' => 'wcj_shipping_calculator_label_calculate_shipping',
157
+ 'default' => '',
158
+ 'type' => 'text',
159
+ ),
 
160
  array(
161
+ 'title' => __( 'Label for Update Totals', 'woocommerce-jetpack' ),
162
+ 'id' => 'wcj_shipping_calculator_label_update_totals',
163
+ 'default' => '',
164
+ 'type' => 'text',
165
+ ),*/
166
+ array(
167
+ 'type' => 'sectionend',
168
+ 'id' => 'wcj_shipping_calculator_options',
169
+ ),
170
+ );
171
+ return $this->add_standard_settings( $settings );
172
  }
 
 
 
 
 
 
 
 
173
  }
174
+
175
  endif;
176
+
177
  return new WCJ_Shipping_Calculator();
includes/classes/class-wcj-module.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * The WooCommerce Jetpack Module class.
6
  *
7
- * @version 2.4.5
8
  * @since 2.2.0
9
  * @author Algoritmika Ltd.
10
  */
@@ -20,6 +20,7 @@ if ( ! class_exists( 'WCJ_Module' ) ) :
20
  public $desc;
21
  public $parent_id; // for `submodule` only
22
  public $type; // `module` or `submodule`
 
23
 
24
  /**
25
  * Constructor.
@@ -391,9 +392,15 @@ if ( ! class_exists( 'WCJ_Module' ) ) :
391
  * settings_section.
392
  * only for `module`
393
  *
394
- * @version 2.2.7
395
  */
396
  function add_enable_module_setting( $settings, $module_desc = '' ) {
 
 
 
 
 
 
397
  $enable_module_setting = array(
398
  array(
399
  'title' => $this->short_desc . ' ' . __( 'Module Options', 'woocommerce-jetpack' ),
@@ -404,10 +411,12 @@ if ( ! class_exists( 'WCJ_Module' ) ) :
404
  array(
405
  'title' => $this->short_desc,
406
  'desc' => '<strong>' . __( 'Enable Module', 'woocommerce-jetpack' ) . '</strong>',
407
- 'desc_tip' => $this->desc,
408
  'id' => 'wcj_' . $this->id . '_enabled',
409
  'default' => 'no',
410
  'type' => 'checkbox',
 
 
411
  ),
412
  array(
413
  'type' => 'sectionend',
4
  *
5
  * The WooCommerce Jetpack Module class.
6
  *
7
+ * @version 2.4.6
8
  * @since 2.2.0
9
  * @author Algoritmika Ltd.
10
  */
20
  public $desc;
21
  public $parent_id; // for `submodule` only
22
  public $type; // `module` or `submodule`
23
+ public $link;
24
 
25
  /**
26
  * Constructor.
392
  * settings_section.
393
  * only for `module`
394
  *
395
+ * @version 2.4.6
396
  */
397
  function add_enable_module_setting( $settings, $module_desc = '' ) {
398
+ $the_link = '';
399
+ if ( isset( $this->link ) && '' != $this->link ) {
400
+ $the_link = ' <a class="button-primary"' .
401
+ ' style="background: green; border-color: green; box-shadow: 0 1px 0 green; text-shadow: 0 -1px 1px #0a0,1px 0 1px #0a0,0 1px 1px #0a0,-1px 0 1px #0a0;"' .
402
+ ' href="' . $this->link . '" target="_blank">' . __( 'Documentation', 'woocommerce-jetpack' ) . '</a>';
403
+ }
404
  $enable_module_setting = array(
405
  array(
406
  'title' => $this->short_desc . ' ' . __( 'Module Options', 'woocommerce-jetpack' ),
411
  array(
412
  'title' => $this->short_desc,
413
  'desc' => '<strong>' . __( 'Enable Module', 'woocommerce-jetpack' ) . '</strong>',
414
+ 'desc_tip' => $this->desc . $the_link,
415
  'id' => 'wcj_' . $this->id . '_enabled',
416
  'default' => 'no',
417
  'type' => 'checkbox',
418
+ 'wcj_desc' => $this->desc,
419
+ 'wcj_link' => ( isset( $this->link ) ? $this->link : '' ),
420
  ),
421
  array(
422
  'type' => 'sectionend',
includes/functions/wcj-functions.php CHANGED
@@ -4,10 +4,24 @@
4
  *
5
  * The WooCommerce Jetpack Functions.
6
  *
7
- * @version 2.4.4
8
  * @author Algoritmika Ltd.
9
  */
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  /*
12
  * wcj_get_product_input_fields.
13
  *
4
  *
5
  * The WooCommerce Jetpack Functions.
6
  *
7
+ * @version 2.4.6
8
  * @author Algoritmika Ltd.
9
  */
10
 
11
+ /*
12
+ * wcj_current_filter_priority.
13
+ *
14
+ * @version 2.4.6
15
+ * @since 2.4.6
16
+ */
17
+ if ( ! function_exists( 'wcj_current_filter_priority' ) ) {
18
+ function wcj_current_filter_priority() {
19
+ global $wp_filter;
20
+ $current_filter_priority = key( $wp_filter[ current_filter() ] );
21
+ return $current_filter_priority;
22
+ }
23
+ }
24
+
25
  /*
26
  * wcj_get_product_input_fields.
27
  *
includes/input-fields/class-wcj-product-input-fields-abstract.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * The WooCommerce Jetpack Product Input Fields abstract class.
6
  *
7
- * @version 2.4.5
8
  * @author Algoritmika Ltd.
9
  */
10
 
@@ -230,6 +230,8 @@ class WCJ_Product_Input_Fields_Abstract {
230
 
231
  /**
232
  * output_custom_input_fields_in_admin_order.
 
 
233
  */
234
  function output_custom_input_fields_in_admin_order( $item_id, $item, $_product ) {
235
  echo '<table cellspacing="0" class="display_meta">';
@@ -250,7 +252,9 @@ class WCJ_Product_Input_Fields_Abstract {
250
  //$the_value = $upload_url . '/' . $the_value;
251
  //$the_value = '<img style="width:50px;" src="' . $the_value . '">'; */
252
  $the_value = maybe_unserialize( $the_value );
253
- $the_value = '<a href="' . add_query_arg( 'wcj_download_file', $item_id . '.' . pathinfo( $the_value['name'], PATHINFO_EXTENSION ) ) . '">' . $the_value['name'] . '</a>';
 
 
254
  } else {
255
  if ( 'no' === get_option( 'wcj_product_input_fields_make_nicer_name_enabled' ) ) {
256
  continue;
4
  *
5
  * The WooCommerce Jetpack Product Input Fields abstract class.
6
  *
7
+ * @version 2.4.6
8
  * @author Algoritmika Ltd.
9
  */
10
 
230
 
231
  /**
232
  * output_custom_input_fields_in_admin_order.
233
+ *
234
+ * @version 2.4.6
235
  */
236
  function output_custom_input_fields_in_admin_order( $item_id, $item, $_product ) {
237
  echo '<table cellspacing="0" class="display_meta">';
252
  //$the_value = $upload_url . '/' . $the_value;
253
  //$the_value = '<img style="width:50px;" src="' . $the_value . '">'; */
254
  $the_value = maybe_unserialize( $the_value );
255
+ if ( isset( $the_value['name'] ) ) {
256
+ $the_value = '<a href="' . add_query_arg( 'wcj_download_file', $item_id . '.' . pathinfo( $the_value['name'], PATHINFO_EXTENSION ) ) . '">' . $the_value['name'] . '</a>';
257
+ }
258
  } else {
259
  if ( 'no' === get_option( 'wcj_product_input_fields_make_nicer_name_enabled' ) ) {
260
  continue;
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: algoritmika,anbinder,solovjov
3
  Tags: woocommerce,booster for woocommerce,woocommerce jetpack,custom price labels,call for price,currency symbol,remove sorting,remove old product slugs,add to cart text,order number,sequential order numbering,email pdf invoice,pdf invoice,pdf invoices,already in cart,empty cart,redirect to checkout,minimum order amount,customize checkout fields,checkout fields,email,customize product tabs,product tabs,related products number,empty cart,redirect add to cart,redirect to checkout,product already in cart,custom payment gateway,payment gateway icon,auto-complete all orders,custom order statuses,custom order status,remove text from price,custom css,hide categories count,hide subcategories count,hide category count,hide subcategory count,display total sales,custom product tabs,remove product tab,payment gateway fee,vat,gateway by country,price by country,currency switcher
4
  Requires at least: 3.8
5
  Tested up to: 4.4
6
- Stable tag: 2.4.5
7
  License: GNU General Public License v3.0
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -120,6 +120,22 @@ To unlock all Booster for WooCommerce features, please install additional [Boost
120
 
121
  == Changelog ==
122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  = 2.4.5 - 06/04/2016 =
124
  * Dev - `K_TCPDF_THROW_EXCEPTION_ERROR` "is defined" check added to `tcpdf_config.php` file.
125
  * Dev - Default type added to `WCJ_Module::create_meta_box()` (works for `text` type).
3
  Tags: woocommerce,booster for woocommerce,woocommerce jetpack,custom price labels,call for price,currency symbol,remove sorting,remove old product slugs,add to cart text,order number,sequential order numbering,email pdf invoice,pdf invoice,pdf invoices,already in cart,empty cart,redirect to checkout,minimum order amount,customize checkout fields,checkout fields,email,customize product tabs,product tabs,related products number,empty cart,redirect add to cart,redirect to checkout,product already in cart,custom payment gateway,payment gateway icon,auto-complete all orders,custom order statuses,custom order status,remove text from price,custom css,hide categories count,hide subcategories count,hide category count,hide subcategory count,display total sales,custom product tabs,remove product tab,payment gateway fee,vat,gateway by country,price by country,currency switcher
4
  Requires at least: 3.8
5
  Tested up to: 4.4
6
+ Stable tag: 2.4.6
7
  License: GNU General Public License v3.0
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
120
 
121
  == Changelog ==
122
 
123
+ = 2.4.6 - 07/04/2016 =
124
+ * Dev - Documentation link added to `WCJ_Module` class.
125
+ * Dev - Functions - `wcj_current_filter_priority()` function added (affected Checkout Files Upload module).
126
+ * Dev - BUTTON & PRICE LABELS - Add to Cart Labels - Code refactoring.
127
+ * Dev - BUTTON & PRICE LABELS - Call for Price - Code refactoring.
128
+ * Dev - PRODUCTS - Product Listings - Code refactoring.
129
+ * Fix - PRODUCTS - Product Info V2 - Priority bug fixed.
130
+ * Fix - PRODUCTS - Product Input Fields - File type field - Admin order view - Check for not empty file name added.
131
+ * Fix - CART & CHECKOUT - Checkout Custom Fields - Admin fields edit - Styling bug fixed (full row styling added) and proper select type display added.
132
+ * Fix - CART & CHECKOUT - Cart - Priority bug fixed.
133
+ * Dev - CART & CHECKOUT - Cart - Documentation link added. Reset button added.
134
+ * Fix - CART & CHECKOUT - Mini Cart - Priority bug fixed.
135
+ * Dev - CART & CHECKOUT - Mini Cart - Documentation link added.
136
+ * Dev - SHIPPING & ORDERS - Shipping Calculator - Code refactoring.
137
+ * Dev - EMAILS & MISC. - Reports - Code refactoring.
138
+
139
  = 2.4.5 - 06/04/2016 =
140
  * Dev - `K_TCPDF_THROW_EXCEPTION_ERROR` "is defined" check added to `tcpdf_config.php` file.
141
  * Dev - Default type added to `WCJ_Module::create_meta_box()` (works for `text` type).
woocommerce-jetpack.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Booster for WooCommerce
4
  Plugin URI: http://booster.io
5
  Description: Supercharge your WooCommerce site with these awesome powerful features.
6
- Version: 2.4.5
7
  Author: Algoritmika Ltd
8
  Author URI: http://www.algoritmika.com
9
  Copyright: © 2016 Algoritmika Ltd.
3
  Plugin Name: Booster for WooCommerce
4
  Plugin URI: http://booster.io
5
  Description: Supercharge your WooCommerce site with these awesome powerful features.
6
+ Version: 2.4.6
7
  Author: Algoritmika Ltd
8
  Author URI: http://www.algoritmika.com
9
  Copyright: © 2016 Algoritmika Ltd.