Booster for WooCommerce - Version 2.0.6

Version Description

  • 20/12/2014 =
  • Fix - CART - Add to Cart per Category - is_object check added.
  • Fix - PDF Invoices - get_line_subtotal instead of get_line_total. This fixes the bug with item's discount in invoice.
  • Fix - PDF Invoices - "Shipping and Discount as item" fix.
  • Fix - PDF Invoices - Total weight shortcode quantity bug, fixed.
  • Fix - CURRENCIES - Prices and Currencies by Country - Report currency menu had only GBP and USD, fixed.
  • Dev - CURRENCIES - Prices and Currencies by Country - Price Rounding option added.
  • Dev - CURRENCIES - Prices and Currencies by Country - Country by IP detection method option added. Alternative method added: api.host.info.
  • Dev - CURRENCIES - Prices and Currencies by Country - Debug info added.
  • Dev - PRODUCTS - SKUs.
  • Dev - PDF Invoices - shadowed font option added.
Download this release

Release Info

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

Code changes from version 2.0.5 to 2.0.6

includes/admin/settings/class-wc-settings-jetpack.php CHANGED
@@ -38,7 +38,7 @@ class WC_Settings_Jetpack extends WC_Settings_Page {
38
  'products' => array(
39
  'label' => __( 'Products', 'woocommerce-jetpack' ),
40
  'default_cat_id' => 'product_listings',
41
- 'all_cat_ids' => array( 'product_listings', 'product_tabs', 'product_info', 'sorting', 'product_input_fields_global', 'product_input_fields_local', ),
42
  ),
43
  'cart' => array(
44
  'label' => __( 'Cart', 'woocommerce-jetpack' ),
38
  'products' => array(
39
  'label' => __( 'Products', 'woocommerce-jetpack' ),
40
  'default_cat_id' => 'product_listings',
41
+ 'all_cat_ids' => array( 'product_listings', 'product_tabs', 'product_info', 'sorting', 'sku', 'product_input_fields_global', 'product_input_fields_local', ),
42
  ),
43
  'cart' => array(
44
  'label' => __( 'Cart', 'woocommerce-jetpack' ),
includes/class-wcj-add-to-cart-per-category.php CHANGED
@@ -176,6 +176,8 @@ class WCJ_Add_To_Cart_Per_Category {
176
  $categories_info .= '</th>';
177
  $categories_info .= '</tr>';
178
  foreach ( $categories as $key => $category ) {
 
 
179
  $categories_info .= '<tr>';
180
  $categories_info .= '<td>';
181
  $categories_info .= $category->cat_name;
176
  $categories_info .= '</th>';
177
  $categories_info .= '</tr>';
178
  foreach ( $categories as $key => $category ) {
179
+ if ( ! is_object( $category ) )
180
+ continue;
181
  $categories_info .= '<tr>';
182
  $categories_info .= '<td>';
183
  $categories_info .= $category->cat_name;
includes/class-wcj-currency-external-products.php CHANGED
@@ -69,7 +69,7 @@ class WCJ_Currency_External_Products {
69
 
70
  array(
71
  'title' => __( 'Currency for External Products', 'woocommerce-jetpack' ),
72
- 'desc' => '<strong>' . __( 'Enable Feature', 'woocommerce-jetpack' ) . '</strong>',
73
  'desc_tip' => __( 'Set different currency for external products.', 'woocommerce-jetpack' ),
74
  'id' => 'wcj_currency_external_products_enabled',
75
  'default' => 'no',
69
 
70
  array(
71
  'title' => __( 'Currency for External Products', 'woocommerce-jetpack' ),
72
+ 'desc' => '<strong>' . __( 'Enable Module', 'woocommerce-jetpack' ) . '</strong>',
73
  'desc_tip' => __( 'Set different currency for external products.', 'woocommerce-jetpack' ),
74
  'id' => 'wcj_currency_external_products_enabled',
75
  'default' => 'no',
includes/class-wcj-pdf-invoices.php CHANGED
@@ -110,7 +110,7 @@ class WCJ_PDF_Invoices {
110
  $the_items = $the_order->get_items();
111
  foreach( $the_items as $the_item ) {
112
  $the_product = new WC_Product( $the_item['product_id'] );
113
- $total_weight += $the_product->get_weight();
114
  }
115
  return ( 0 == $total_weight ) ? '' : $total_weight;
116
  }
@@ -279,8 +279,10 @@ class WCJ_PDF_Invoices {
279
  // This method has several options, check the source code documentation for more information.
280
  $pdf->AddPage();
281
 
282
- // set text shadow effect
283
- $pdf->setTextShadow(array('enabled'=>true, 'depth_w'=>0.2, 'depth_h'=>0.2, 'color'=>array(196,196,196), 'opacity'=>1, 'blend_mode'=>'Normal'));
 
 
284
 
285
  $html = $this->get_invoice_html( $order_id );
286
 
@@ -650,12 +652,14 @@ class WCJ_PDF_Invoices {
650
  $item_total_tax_formatted = wc_price( $item_tax, $order_currency_array );
651
  $item_total_incl_tax_formatted = wc_price( $item_total_incl_tax, $order_currency_array );
652
  // Line Prices
653
- $line_total_excl_tax = $the_order->get_line_total( $item, false );//$the_order->get_line_subtotal( $item, false, true );//$item['line_subtotal'];//$item['line_total'];
 
654
  $line_tax = $the_order->get_line_tax( $item );//$item['line_tax'];
655
  $line_total_tax_percent = 0;
656
  if ( 0 != $item['line_subtotal'] )
657
  $line_total_tax_percent = round( ( $item['line_tax'] / $item['line_subtotal'] * 100 ), 2 );
658
- $line_total_incl_tax = $the_order->get_line_total( $item, true );//$line_total_excl_tax + $line_tax;
 
659
  $line_total_excl_tax_formatted = wc_price( $line_total_excl_tax, $order_currency_array );
660
  $line_total_tax_formatted = wc_price( $line_tax, $order_currency_array );
661
  $line_total_incl_tax_formatted = wc_price( $line_total_incl_tax, $order_currency_array );
@@ -668,14 +672,15 @@ class WCJ_PDF_Invoices {
668
 
669
 
670
  $product = $the_order->get_product_from_item( $item );
671
-
672
- // Additional info (e.g. SKU)
673
- if ( '' != get_option( 'wcj_pdf_invoices_column_item_name_additional_text' ) && $product->get_sku() )
674
- $item_name .= ' ' . str_replace( '%sku%', $product->get_sku(), get_option( 'wcj_pdf_invoices_column_item_name_additional_text' ) );
675
-
676
- // Variation (if needed)
677
- if ( $product->is_type( 'variation' ) )
678
- $item_name .= '<div style="font-size:smaller;">' . wc_get_formatted_variation( $product->variation_data, true ) . '</div>';
 
679
 
680
  // Item Counter
681
  $item_counter++;
@@ -1207,7 +1212,7 @@ class WCJ_PDF_Invoices {
1207
  array( 'title' => __( 'General Options', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => __( '', 'woocommerce-jetpack' ), 'id' => 'wcj_pdf_invoices_general_options' ),
1208
 
1209
  array(
1210
- 'title' => __( 'Font family', 'woocommerce-jetpack' ),
1211
  //'desc' => __( 'Default: dejavusans', 'woocommerce-jetpack' ),
1212
  'desc' => apply_filters( 'get_wc_jetpack_plus_message', '', 'desc' ),
1213
  'id' => 'wcj_pdf_invoices_general_font_family',
@@ -1223,12 +1228,20 @@ class WCJ_PDF_Invoices {
1223
  ),
1224
 
1225
  array(
1226
- 'title' => __( 'Font size', 'woocommerce-jetpack' ),
1227
  'desc' => __( 'Default: 8', 'woocommerce-jetpack' ),
1228
  'id' => 'wcj_pdf_invoices_general_font_size',
1229
  'default' => 8,
1230
  'type' => 'number',
1231
  ),
 
 
 
 
 
 
 
 
1232
 
1233
  array(
1234
  'title' => __( 'CSS', 'woocommerce-jetpack' ),
110
  $the_items = $the_order->get_items();
111
  foreach( $the_items as $the_item ) {
112
  $the_product = new WC_Product( $the_item['product_id'] );
113
+ $total_weight += $the_item['qty'] * $the_product->get_weight();
114
  }
115
  return ( 0 == $total_weight ) ? '' : $total_weight;
116
  }
279
  // This method has several options, check the source code documentation for more information.
280
  $pdf->AddPage();
281
 
282
+ if ( 'yes' === get_option( 'wcj_pdf_invoices_general_font_shadowed', 'yes' ) ) {
283
+ // set text shadow effect
284
+ $pdf->setTextShadow(array('enabled'=>true, 'depth_w'=>0.2, 'depth_h'=>0.2, 'color'=>array(196,196,196), 'opacity'=>1, 'blend_mode'=>'Normal'));
285
+ }
286
 
287
  $html = $this->get_invoice_html( $order_id );
288
 
652
  $item_total_tax_formatted = wc_price( $item_tax, $order_currency_array );
653
  $item_total_incl_tax_formatted = wc_price( $item_total_incl_tax, $order_currency_array );
654
  // Line Prices
655
+ // $line_total_excl_tax = $the_order->get_line_total( $item, false );//$the_order->get_line_subtotal( $item, false, true );//$item['line_subtotal'];//$item['line_total'];
656
+ $line_total_excl_tax = $the_order->get_line_subtotal( $item, false );//$the_order->get_line_subtotal( $item, false, true );//$item['line_subtotal'];//$item['line_total'];
657
  $line_tax = $the_order->get_line_tax( $item );//$item['line_tax'];
658
  $line_total_tax_percent = 0;
659
  if ( 0 != $item['line_subtotal'] )
660
  $line_total_tax_percent = round( ( $item['line_tax'] / $item['line_subtotal'] * 100 ), 2 );
661
+ // $line_total_incl_tax = $the_order->get_line_total( $item, true );//$line_total_excl_tax + $line_tax;
662
+ $line_total_incl_tax = $the_order->get_line_subtotal( $item, true );//$line_total_excl_tax + $line_tax;
663
  $line_total_excl_tax_formatted = wc_price( $line_total_excl_tax, $order_currency_array );
664
  $line_total_tax_formatted = wc_price( $line_tax, $order_currency_array );
665
  $line_total_incl_tax_formatted = wc_price( $line_total_incl_tax, $order_currency_array );
672
 
673
 
674
  $product = $the_order->get_product_from_item( $item );
675
+ if ( $product ) {
676
+ // Additional info (e.g. SKU)
677
+ if ( '' != get_option( 'wcj_pdf_invoices_column_item_name_additional_text' ) && $product->get_sku() )
678
+ $item_name .= ' ' . str_replace( '%sku%', $product->get_sku(), get_option( 'wcj_pdf_invoices_column_item_name_additional_text' ) );
679
+
680
+ // Variation (if needed)
681
+ if ( $product->is_type( 'variation' ) )
682
+ $item_name .= '<div style="font-size:smaller;">' . wc_get_formatted_variation( $product->variation_data, true ) . '</div>';
683
+ }
684
 
685
  // Item Counter
686
  $item_counter++;
1212
  array( 'title' => __( 'General Options', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => __( '', 'woocommerce-jetpack' ), 'id' => 'wcj_pdf_invoices_general_options' ),
1213
 
1214
  array(
1215
+ 'title' => __( 'Font Family', 'woocommerce-jetpack' ),
1216
  //'desc' => __( 'Default: dejavusans', 'woocommerce-jetpack' ),
1217
  'desc' => apply_filters( 'get_wc_jetpack_plus_message', '', 'desc' ),
1218
  'id' => 'wcj_pdf_invoices_general_font_family',
1228
  ),
1229
 
1230
  array(
1231
+ 'title' => __( 'Font Size', 'woocommerce-jetpack' ),
1232
  'desc' => __( 'Default: 8', 'woocommerce-jetpack' ),
1233
  'id' => 'wcj_pdf_invoices_general_font_size',
1234
  'default' => 8,
1235
  'type' => 'number',
1236
  ),
1237
+
1238
+ array(
1239
+ 'title' => __( 'Make Font Shadowed', 'woocommerce-jetpack' ),
1240
+ 'desc' => __( 'Default: Yes', 'woocommerce-jetpack' ),
1241
+ 'id' => 'wcj_pdf_invoices_general_font_shadowed',
1242
+ 'default' => 'yes',
1243
+ 'type' => 'checkbox',
1244
+ ),
1245
 
1246
  array(
1247
  'title' => __( 'CSS', 'woocommerce-jetpack' ),
includes/class-wcj-price-by-country.php CHANGED
@@ -24,7 +24,7 @@ class WCJ_Price_By_Country {
24
  $this->customer_country = null;
25
  $this->customer_country_group_id = null;
26
 
27
- $this->current_db_file_version = 2;
28
 
29
  //$this->currency_symbols = include( 'currencies/wcj-currency-symbols.php' );
30
  /*$currencies = include( 'currencies/wcj-currencies.php' );
@@ -55,39 +55,65 @@ class WCJ_Price_By_Country {
55
  add_filter( 'woocommerce_reports_get_order_report_data_args', array( $this, 'filter_reports'), PHP_INT_MAX, 1 );
56
  add_filter( 'woocommerce_currency_symbol', array( $this, 'change_currency_symbol_reports'), PHP_INT_MAX, 2 );
57
  //add_filter( 'woocommerce_currency', array( $this, 'change_currency_code_reports'), PHP_INT_MAX, 2 );
58
- add_action( 'admin_bar_menu', array( $this, 'toolbar_link_to_mypage' ), 999 );
59
-
 
 
 
60
  }
61
 
62
  // Settings hooks
63
  add_filter( 'wcj_settings_sections', array( $this, 'settings_section' ) );
64
  add_filter( 'wcj_settings_price_by_country', array( $this, 'get_settings' ), 100 );
65
  add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
66
- }
67
-
68
 
69
- /**/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  public function toolbar_link_to_mypage( $wp_admin_bar ) {
 
71
  //http://codex.wordpress.org/Function_Reference/add_node
72
 
73
-
74
  if ( isset( $_GET['page'] ) && 'wc-reports' === $_GET['page'] ) {
75
  $the_current_code = isset( $_GET['currency'] ) ? $_GET['currency'] : get_woocommerce_currency();
76
  $parent = 'reports_currency_select';
77
  $args = array(
78
  'parent' => false,
79
  'id' => $parent,
80
- 'title' => 'Reports currency: ' . $the_current_code,
81
  'href' => false,
82
  'meta' => array( 'title' => __( 'Show reports only in', 'woocommerce-jetpack' ) . ' ' . $the_current_code, ),
83
  );
84
 
85
  $wp_admin_bar->add_node( $args );
86
- //$wp_admin_bar->add_menu
87
-
88
 
89
-
90
- $this->reports_currency_symbols = array( 'GBP' => '&pound;', 'USD' => '&#36;' );
 
 
 
 
 
 
 
91
  foreach ( $this->reports_currency_symbols as $code => $symbol ) {
92
  //if ( $code === $the_current_code )
93
  // continue;
@@ -181,43 +207,117 @@ class WCJ_Price_By_Country {
181
  */
182
  public function parse_csv_line( $line ) {
183
  return explode( ',', trim( $line ) );
184
- }
185
 
186
  /**
187
  * check_and_update_database.
188
  */
189
- public function check_and_update_database() {
190
-
 
 
 
 
 
 
191
  // This product includes GeoLite data created by MaxMind, available from <a href="http://www.maxmind.com">http://www.maxmind.com</a>.
192
- $current_version = get_option( 'wcj_geoipcountry_db_version', 0 );
193
- if ( -1 == $current_version )
194
- return;
195
- if ( $current_version < $this->current_db_file_version ) {
196
-
197
- // Updating DB - started
198
- update_option( 'wcj_geoipcountry_db_version', -1 );
199
 
200
- // Updating DB - get IPs from file
201
- //$csv = array_map( 'str_getcsv', file( plugin_dir_path( __FILE__ ) . 'lib/ipdb.csv' ) );
202
- $csv = array_map( array( $this, 'parse_csv_line' ), file( plugin_dir_path( __FILE__ ) . 'lib/ipdb.csv' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
 
204
- // Updating DB - IPs from
 
205
  foreach ( $csv as $key => $data )
206
  $column[ $key ] = $data[0];
207
  update_option( 'wcj_geoipcountry_db_from', $column );
208
 
209
- // Updating DB - IPs to
210
  foreach ( $csv as $key => $data )
211
  $column[ $key ] = $data[1];
212
  update_option( 'wcj_geoipcountry_db_to', $column );
213
 
214
- // Updating DB - Countries
215
  foreach ( $csv as $key => $data )
216
  $column[ $key ] = $data[2];
217
  update_option( 'wcj_geoipcountry_db_country', $column );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
218
 
219
- // Updating DB - version
220
- update_option( 'wcj_geoipcountry_db_version', $this->current_db_file_version );
 
 
 
 
 
 
 
221
  }
222
  }
223
 
@@ -340,6 +440,15 @@ class WCJ_Price_By_Country {
340
 
341
  return null;
342
  }
 
 
 
 
 
 
 
 
 
343
 
344
  /**
345
  * get_user_country_group_id.
@@ -351,7 +460,15 @@ class WCJ_Price_By_Country {
351
  return $this->customer_country_group_id;
352
 
353
  // Get the country by IP
354
- $country = $this->get_user_country_by_ip();
 
 
 
 
 
 
 
 
355
  if ( null === $country )
356
  return null;
357
 
@@ -400,10 +517,39 @@ class WCJ_Price_By_Country {
400
  public function change_price_by_country( $price ) {
401
  if ( null != ( $group_id = $this->get_user_country_group_id() ) ) {
402
  $country_exchange_rate = get_option( 'wcj_price_by_country_exchange_rate_group_' . $group_id, 1 );
403
- return ( $price * $country_exchange_rate );
 
 
 
 
 
 
 
 
 
 
 
 
 
404
  }
 
405
  return $price;
406
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
407
 
408
  /**
409
  * add_enabled_option.
@@ -427,22 +573,48 @@ class WCJ_Price_By_Country {
427
  'desc' => __( 'Change product\'s price and currency by customer\'s country. Customer\'s country is detected automatically by IP.', 'woocommerce-jetpack' )
428
  . '<br>'
429
  . '<span style="color:gray;font-size:smaller;">'
430
- . __( 'IP DB version: ', 'woocommerce-jetpack' ) . get_option( 'wcj_geoipcountry_db_version', 0 )
431
  . '</span>',
432
  'id' => 'wcj_price_by_country_options' ),
433
 
434
  array(
435
  'title' => __( 'Prices and Currencies by Country', 'woocommerce-jetpack' ),
436
- 'desc' => __( 'Enable the Price by Country feature', 'woocommerce-jetpack' ),
437
- 'desc_tip' => __( 'Change product\'s price and currency by customer\'s country.', 'woocommerce-jetpack' ),
438
  'id' => 'wcj_price_by_country_enabled',
439
  'default' => 'no',
440
  'type' => 'checkbox',
441
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
442
 
443
  array( 'type' => 'sectionend', 'id' => 'wcj_price_by_country_options' ),
444
 
445
- array( 'title' => __( 'Exchange rates', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => '', 'id' => 'wcj_price_by_country_exchange_rate_options' ),
446
 
447
  array(
448
  'title' => __( 'Groups Number', 'woocommerce-jetpack' ),
24
  $this->customer_country = null;
25
  $this->customer_country_group_id = null;
26
 
27
+ $this->current_db_file_version = 3;
28
 
29
  //$this->currency_symbols = include( 'currencies/wcj-currency-symbols.php' );
30
  /*$currencies = include( 'currencies/wcj-currencies.php' );
55
  add_filter( 'woocommerce_reports_get_order_report_data_args', array( $this, 'filter_reports'), PHP_INT_MAX, 1 );
56
  add_filter( 'woocommerce_currency_symbol', array( $this, 'change_currency_symbol_reports'), PHP_INT_MAX, 2 );
57
  //add_filter( 'woocommerce_currency', array( $this, 'change_currency_code_reports'), PHP_INT_MAX, 2 );
58
+ add_action( 'admin_bar_menu', array( $this, 'toolbar_link_to_mypage' ), 999 );
59
+
60
+ // Debug
61
+ add_action( 'woocommerce_after_add_to_cart_button', array( $this, 'add_debug_info'), PHP_INT_MAX, 0 );
62
+ add_action( 'admin_init', array( $this, 'reinstall_ip_db'), PHP_INT_MAX, 0 );
63
  }
64
 
65
  // Settings hooks
66
  add_filter( 'wcj_settings_sections', array( $this, 'settings_section' ) );
67
  add_filter( 'wcj_settings_price_by_country', array( $this, 'get_settings' ), 100 );
68
  add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
69
+ }
 
70
 
71
+ public function reinstall_ip_db() {
72
+ if ( isset( $_GET['wcj-install-ip-db'] ) && '1' == $_GET['wcj-install-ip-db'] ) {
73
+ $this->update_database();
74
+ }
75
+ }
76
+
77
+ public function add_debug_info() {
78
+ if ( isset( $_GET['wcj-debug'] ) ) {
79
+ echo '<input type="hidden" name="wcj-get-ip" value="' . $this->get_the_ip() . '" />';
80
+ echo '<input type="hidden" name="wcj-get-country" value="' . $this->get_user_country_by_ip() . '" />';
81
+ echo '<input type="hidden" name="wcj-get-country-external" value="' . $this->get_user_country_by_ip_external() . '" />';
82
+ echo '<input type="hidden" name="wcj-get-country-group" value="' . $this->get_user_country_group_id() . '" />';
83
+ echo '<input type="hidden" name="wcj-get-country-db-cur-ver" value="' . $this->current_db_file_version . '" />';
84
+ echo '<input type="hidden" name="wcj-get-country-db-ver" value="' . get_option( 'wcj_geoipcountry_db_version', 0 ) . '" />';
85
+ echo '<input type="hidden" name="wcj-get-country-db-from-size" value="' . count( get_option( 'wcj_geoipcountry_db_from', array() ) ) . '" />';
86
+ echo '<input type="hidden" name="wcj-get-country-db-to-size" value="' . count( get_option( 'wcj_geoipcountry_db_to', array() ) ) . '" />';
87
+ echo '<input type="hidden" name="wcj-get-country-db-country-size" value="' . count( get_option( 'wcj_geoipcountry_db_country', array() ) ) . '" />';
88
+ }
89
+ }
90
+
91
  public function toolbar_link_to_mypage( $wp_admin_bar ) {
92
+
93
  //http://codex.wordpress.org/Function_Reference/add_node
94
 
 
95
  if ( isset( $_GET['page'] ) && 'wc-reports' === $_GET['page'] ) {
96
  $the_current_code = isset( $_GET['currency'] ) ? $_GET['currency'] : get_woocommerce_currency();
97
  $parent = 'reports_currency_select';
98
  $args = array(
99
  'parent' => false,
100
  'id' => $parent,
101
+ 'title' => __( 'Reports currency:', 'woocommerce-jetpack' ) . ' ' . $the_current_code,
102
  'href' => false,
103
  'meta' => array( 'title' => __( 'Show reports only in', 'woocommerce-jetpack' ) . ' ' . $the_current_code, ),
104
  );
105
 
106
  $wp_admin_bar->add_node( $args );
 
 
107
 
108
+ $currency_symbols = array();
109
+ $currency_symbols[ $the_current_code ] = '';
110
+ $currency_symbols[ get_woocommerce_currency() ] = '';
111
+ for ( $i = 1; $i <= apply_filters( 'wcj_get_option_filter', 1, get_option( 'wcj_price_by_country_total_groups_number', 1 ) ); $i++ ) {
112
+ $currency_symbols[ get_option( 'wcj_price_by_country_exchange_rate_currency_group_' . $i ) ] = '';
113
+ }
114
+ $this->reports_currency_symbols = $currency_symbols;
115
+
116
+
117
  foreach ( $this->reports_currency_symbols as $code => $symbol ) {
118
  //if ( $code === $the_current_code )
119
  // continue;
207
  */
208
  public function parse_csv_line( $line ) {
209
  return explode( ',', trim( $line ) );
210
+ }
211
 
212
  /**
213
  * check_and_update_database.
214
  */
215
+ public function update_database() {
216
+
217
+ ob_start();
218
+
219
+ // Started
220
+ update_option( 'wcj_geoipcountry_db_version', -1 );
221
+
222
+ // Get IPs from file
223
  // This product includes GeoLite data created by MaxMind, available from <a href="http://www.maxmind.com">http://www.maxmind.com</a>.
224
+ $csv = array_map( array( $this, 'parse_csv_line' ), file( plugin_dir_path( __FILE__ ) . 'lib/ipdb.csv' ) );
225
+ if ( ! empty ($csv) ) {
 
 
 
 
 
226
 
227
+ /**
228
+ update_option( 'wcj_geoipcountry_db_from', array() );
229
+ update_option( 'wcj_geoipcountry_db_to', array() );
230
+ update_option( 'wcj_geoipcountry_db_country', array() );
231
+
232
+ foreach ( $csv as $key => $data ) {
233
+ $column_ip_from[ $key ] = $data[0];
234
+ $column_ip_to[ $key ] = $data[1];
235
+ $column_ip_country[ $key ] = $data[2];
236
+ }
237
+
238
+ update_option( 'wcj_geoipcountry_db_from', $column_ip_from );
239
+ update_option( 'wcj_geoipcountry_db_to', $column_ip_to );
240
+ update_option( 'wcj_geoipcountry_db_country', $column_ip_country );
241
+ /**/
242
+
243
+
244
+ /**
245
+ global $wpdb;
246
+
247
+ $sql = "CREATE TABLE {$wpdb->prefix}wcj_country_ip (
248
+ ip_from INT(10) UNSIGNED NOT NULL,
249
+ ip_to INT(10) UNSIGNED NOT NULL,
250
+ country_code VARCHAR(2) NOT NULL
251
+ )";
252
+ $results = $wpdb->get_results( $sql );
253
+
254
+ if ( ( $handle = fopen( plugin_dir_path( __FILE__ ) . 'lib/ipdb.csv', "r" ) ) !== FALSE ) {
255
+ while ( ($data = fgetcsv( $handle, 100, "," ) ) !== FALSE ) {
256
+
257
+ print_r( $wpdb->insert(
258
+ '$wpdb->prefix' . 'wcj_country_ip',
259
+ array(
260
+ 'ip_from' => $data[0],
261
+ 'ip_to' => $data[1] ,
262
+ 'country_code' => $data[2],
263
+ ),
264
+ array(
265
+ '%d',
266
+ '%d',
267
+ '%s',
268
+ )
269
+ ) );
270
+ }
271
+ fclose( $handle );
272
+ }
273
+ /**/
274
 
275
+ /**/
276
+ // IPs from
277
  foreach ( $csv as $key => $data )
278
  $column[ $key ] = $data[0];
279
  update_option( 'wcj_geoipcountry_db_from', $column );
280
 
281
+ // IPs to
282
  foreach ( $csv as $key => $data )
283
  $column[ $key ] = $data[1];
284
  update_option( 'wcj_geoipcountry_db_to', $column );
285
 
286
+ // Countries
287
  foreach ( $csv as $key => $data )
288
  $column[ $key ] = $data[2];
289
  update_option( 'wcj_geoipcountry_db_country', $column );
290
+ /**/
291
+ /**/
292
+ $count_db_from = count( get_option( 'wcj_geoipcountry_db_from', array() ) );
293
+ $count_db_to = count( get_option( 'wcj_geoipcountry_db_to', array() ) );
294
+ $count_db_country = count( get_option( 'wcj_geoipcountry_db_country', array() ) );
295
+
296
+ if ( 0 == $count_db_from || $count_db_from != $count_db_to || $count_db_from != $count_db_country ) {
297
+ // Something went wrong
298
+ update_option( 'wcj_geoipcountry_db_version', -2 );
299
+ }
300
+ else {
301
+ // Finished
302
+ update_option( 'wcj_geoipcountry_db_version', $this->current_db_file_version );
303
+ }
304
+ /**/
305
+ }
306
+
307
+ $output_buffer = ob_get_contents();
308
+ ob_end_clean();
309
+ update_option( 'wcj_geoipcountry_db_update_log', $output_buffer );
310
+ }
311
 
312
+ /**
313
+ * check_and_update_database.
314
+ */
315
+ public function check_and_update_database() {
316
+ $current_version = get_option( 'wcj_geoipcountry_db_version', 0 );
317
+ if ( $current_version < 0 )
318
+ return;
319
+ if ( $current_version != $this->current_db_file_version ) {
320
+ $this->update_database();
321
  }
322
  }
323
 
440
 
441
  return null;
442
  }
443
+
444
+ public function get_user_country_by_ip_external() {
445
+ ob_start();
446
+ $country = file_get_contents( 'http://api.hostip.info/country.php?ip=' . $this->get_the_ip() );
447
+ //$json = file_get_contents( 'http://api.hostip.info/country.php?ip=' . $this->get_the_ip() );//file_get_contents( 'http://ipinfo.io/' . $this->get_the_ip() . '/country' );
448
+ //$country = json_decode( $json );
449
+ ob_end_clean();
450
+ return $country;
451
+ }
452
 
453
  /**
454
  * get_user_country_group_id.
460
  return $this->customer_country_group_id;
461
 
462
  // Get the country by IP
463
+ switch( get_option( 'wcj_price_by_country_by_ip_detection_type', 'internal' ) ) {
464
+ case 'internal':
465
+ $country = $this->get_user_country_by_ip();
466
+ break;
467
+ case 'hostip_info':
468
+ $country = $this->get_user_country_by_ip_external();
469
+ break;
470
+ }
471
+
472
  if ( null === $country )
473
  return null;
474
 
517
  public function change_price_by_country( $price ) {
518
  if ( null != ( $group_id = $this->get_user_country_group_id() ) ) {
519
  $country_exchange_rate = get_option( 'wcj_price_by_country_exchange_rate_group_' . $group_id, 1 );
520
+ if ( 1 != $country_exchange_rate ) {
521
+ $modified_price = $price * $country_exchange_rate;
522
+ $rounding = get_option( 'wcj_price_by_country_rounding', 'none' );
523
+ switch ( $rounding ) {
524
+ case 'none':
525
+ return ( $modified_price );
526
+ case 'round':
527
+ return round( $modified_price );
528
+ case 'floor':
529
+ return floor( $modified_price );
530
+ case 'ceil':
531
+ return ceil( $modified_price );
532
+ }
533
+ }
534
  }
535
+ // No changes
536
  return $price;
537
  }
538
+
539
+ /**
540
+ * get_ip_db_status_html.
541
+ */
542
+ public function get_ip_db_status_html() {
543
+ $installed_db_version = get_option( 'wcj_geoipcountry_db_version', 0 );
544
+ if ( $this->current_db_file_version != $installed_db_version ) {
545
+ if ( $installed_db_version < 0 )
546
+ $installed_db_version = abs( $installed_db_version ) + 10000;
547
+ return __( 'IP DB not installed', 'woocommerce-jetpack' ) . ' (' . $installed_db_version . ').'
548
+ . ' ' . '<a href="' . add_query_arg( 'wcj-install-ip-db', '1' ) . '">' . __( 'Fix', 'woocommerce-jetpack' ) . '</a>';
549
+ }
550
+ else
551
+ return __( 'IP DB version: ', 'woocommerce-jetpack' ) . $this->current_db_file_version;
552
+ }
553
 
554
  /**
555
  * add_enabled_option.
573
  'desc' => __( 'Change product\'s price and currency by customer\'s country. Customer\'s country is detected automatically by IP.', 'woocommerce-jetpack' )
574
  . '<br>'
575
  . '<span style="color:gray;font-size:smaller;">'
576
+ . $this->get_ip_db_status_html()
577
  . '</span>',
578
  'id' => 'wcj_price_by_country_options' ),
579
 
580
  array(
581
  'title' => __( 'Prices and Currencies by Country', 'woocommerce-jetpack' ),
582
+ 'desc' => '<strong>' . __( 'Enable Module', 'woocommerce-jetpack' ) . '</strong>',
583
+ 'desc_tip' => __( 'Change product\'s price and currency automatically by customer\'s country.', 'woocommerce-jetpack' ),
584
  'id' => 'wcj_price_by_country_enabled',
585
  'default' => 'no',
586
  'type' => 'checkbox',
587
  ),
588
+
589
+ array(
590
+ 'title' => __( 'Country by IP Method', 'woocommerce-jetpack' ),
591
+ 'desc' => __( 'Select which method to use for detecting customers country by IP.', 'woocommerce-jetpack' ),
592
+ 'id' => 'wcj_price_by_country_by_ip_detection_type',
593
+ 'default' => 'internal',
594
+ 'type' => 'select',
595
+ 'options' => array(
596
+ 'internal' => __( 'Internal DB (recommended)', 'woocommerce-jetpack' ),
597
+ 'hostip_info' => __( 'External server:', 'woocommerce-jetpack' ) . ' ' . 'api.hostip.info',
598
+ ),
599
+ ),
600
+
601
+ array(
602
+ 'title' => __( 'Price Rounding', 'woocommerce-jetpack' ),
603
+ 'desc' => __( 'If you choose to multiply price, set rounding options here.', 'woocommerce-jetpack' ),
604
+ 'id' => 'wcj_price_by_country_rounding',
605
+ 'default' => 'none',
606
+ 'type' => 'select',
607
+ 'options' => array(
608
+ 'none' => __( 'No rounding', 'woocommerce-jetpack' ),
609
+ 'round' => __( 'Round', 'woocommerce-jetpack' ),
610
+ 'floor' => __( 'Round down', 'woocommerce-jetpack' ),
611
+ 'ceil' => __( 'Round up', 'woocommerce-jetpack' ),
612
+ ),
613
+ ),
614
 
615
  array( 'type' => 'sectionend', 'id' => 'wcj_price_by_country_options' ),
616
 
617
+ array( 'title' => __( 'Country Groups', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => '', 'id' => 'wcj_price_by_country_exchange_rate_options' ),
618
 
619
  array(
620
  'title' => __( 'Groups Number', 'woocommerce-jetpack' ),
includes/class-wcj-sku.php ADDED
@@ -0,0 +1,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WooCommerce Jetpack SKU
4
+ *
5
+ * The WooCommerce Jetpack SKU class.
6
+ *
7
+ * @class WCJ_SKU
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_SKU' ) ) :
16
+
17
+ class WCJ_SKU {
18
+
19
+ /**
20
+ * Constructor.
21
+ */
22
+ public function __construct() {
23
+
24
+ $the_priority = 100;
25
+ // Main hooks
26
+ if ( 'yes' === get_option( 'wcj_sku_enabled' ) ) {
27
+ add_filter( 'wcj_tools_tabs', array( $this, 'add_sku_tool_tab' ), $the_priority );
28
+ add_action( 'wcj_tools_sku', array( $this, 'create_sku_tool' ), $the_priority );
29
+ add_action( 'wp_insert_post', array( $this, 'set_product_sku' ), $the_priority, 3 );
30
+ }
31
+ add_action( 'wcj_tools_dashboard', array( $this, 'add_sku_tool_info_to_tools_dashboard' ), $the_priority );
32
+
33
+ // Settings hooks
34
+ add_filter( 'wcj_settings_sections', array( $this, 'settings_section' ) );
35
+ add_filter( 'wcj_settings_sku', array( $this, 'get_settings' ), $the_priority );
36
+ add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), $the_priority );
37
+ }
38
+
39
+ /**
40
+ * set_sku.
41
+ */
42
+ public function set_sku( $product_id ) {
43
+ $the_sku = sprintf( '%s%0' . get_option( 'wcj_sku_minimum_number_length', 0 ) . 'd%s', get_option( 'wcj_sku_prefix', '' ), $product_id, apply_filters( 'wcj_get_option_filter', '', get_option( 'wcj_sku_suffix', '' ) ) );
44
+ update_post_meta( $product_id, '_' . 'sku', $the_sku );
45
+ }
46
+
47
+ /**
48
+ * set_sku.
49
+ */
50
+ public function set_all_sku() {
51
+ $args = array(
52
+ 'post_type' => 'product',
53
+ 'post_status' => 'any',
54
+ 'posts_per_page' => -1,
55
+ );
56
+ $loop = new WP_Query( $args );
57
+ while ( $loop->have_posts() ) : $loop->the_post();
58
+ $this->set_sku( $loop->post->ID );
59
+ endwhile;
60
+ }
61
+
62
+ /**
63
+ * set_product_sku.
64
+ */
65
+ public function set_product_sku( $post_ID, $post, $update ) {
66
+ if ( 'product' !== $post->type )
67
+ return;
68
+ if ( false === $update ) {
69
+ $this->set_sku( $post_ID );
70
+ }
71
+ }
72
+
73
+ /**
74
+ * add_sku_tool_tab.
75
+ */
76
+ public function add_sku_tool_tab( $tabs ) {
77
+ $tabs[] = array(
78
+ 'id' => 'sku',
79
+ 'title' => __( 'Autogenerate SKUs', 'woocommerce-jetpack' ),
80
+ );
81
+ return $tabs;
82
+ }
83
+
84
+ /**
85
+ * create_sku_tool
86
+ */
87
+ public function create_sku_tool() {
88
+ $result_message = '';
89
+ if ( isset( $_POST['set_sku'] ) ) {
90
+ $this->set_all_sku();
91
+ $result_message = '<p><div class="updated"><p><strong>' . __( 'SKUs generated and set successfully!', 'woocommerce-jetpack' ) . '</strong></p></div></p>';
92
+ }
93
+ ?><div>
94
+ <h2><?php echo __( 'WooCommerce Jetpack - Autogenerate SKUs', 'woocommerce-jetpack' ); ?></h2>
95
+ <p><?php echo __( 'The tool generates and sets product SKUs.', 'woocommerce-jetpack' ); ?></p>
96
+ <?php echo $result_message; ?>
97
+ <form method="post" action="">
98
+ <input class="button-primary" type="submit" name="set_sku" value="Set SKUs">
99
+ </form>
100
+ </div><?php
101
+ }
102
+
103
+ /**
104
+ * add_sku_tool_info_to_tools_dashboard.
105
+ */
106
+ public function add_sku_tool_info_to_tools_dashboard() {
107
+ echo '<tr>';
108
+ if ( 'yes' === get_option( 'wcj_sku_enabled') )
109
+ $is_enabled = '<span style="color:green;font-style:italic;">' . __( 'enabled', 'woocommerce-jetpack' ) . '</span>';
110
+ else
111
+ $is_enabled = '<span style="color:gray;font-style:italic;">' . __( 'disabled', 'woocommerce-jetpack' ) . '</span>';
112
+ echo '<td>' . __( 'Autogenerate SKUs', 'woocommerce-jetpack' ) . '</td>';
113
+ echo '<td>' . $is_enabled . '</td>';
114
+ echo '<td>' . __( 'The tool generates and sets product SKUs.', 'woocommerce-jetpack' ) . '</td>';
115
+ echo '</tr>';
116
+ }
117
+
118
+ /**
119
+ * add_enabled_option.
120
+ */
121
+ public function add_enabled_option( $settings ) {
122
+ $all_settings = $this->get_settings();
123
+ $settings[] = $all_settings[1];
124
+ return $settings;
125
+ }
126
+
127
+ /**
128
+ * get_settings.
129
+ */
130
+ function get_settings() {
131
+
132
+ $settings = array(
133
+
134
+ array(
135
+ 'title' => __( 'SKU Options', 'woocommerce-jetpack' ),
136
+ 'type' => 'title',
137
+ 'desc' => __( 'When enabled - all new products will be given (autogenerated) SKU. If you wish to set SKUs for existing products, use Autogenerate SKUs Tool in WooCommerce > Jetpack Tools.', 'woocommerce-jetpack' ),
138
+ 'id' => 'wcj_sku_options'
139
+ ),
140
+
141
+ array(
142
+ 'title' => __( 'SKU', 'woocommerce-jetpack' ),
143
+ 'desc' => '<strong>' . __( 'Enable Module', 'woocommerce-jetpack' ) . '</strong>',
144
+ 'desc_tip' => __( 'Generate SKUs automatically.', 'woocommerce-jetpack' ),
145
+ 'id' => 'wcj_sku_enabled',
146
+ 'default' => 'no',
147
+ 'type' => 'checkbox',
148
+ ),
149
+
150
+ array(
151
+ 'title' => __( 'Prefix', 'woocommerce-jetpack' ),
152
+ 'id' => 'wcj_sku_prefix',
153
+ 'default' => '',
154
+ 'type' => 'text',
155
+ ),
156
+
157
+ array(
158
+ 'title' => __( 'Minimum Number Length', 'woocommerce-jetpack' ),
159
+ 'id' => 'wcj_sku_minimum_number_length',
160
+ 'default' => 0,
161
+ 'type' => 'number',
162
+ ),
163
+
164
+ array(
165
+ 'title' => __( 'Suffix', 'woocommerce-jetpack' ),
166
+ 'id' => 'wcj_sku_suffix',
167
+ 'default' => '',
168
+ 'type' => 'text',
169
+ 'desc' => apply_filters( 'get_wc_jetpack_plus_message', '', 'desc' ),
170
+ 'custom_attributes'
171
+ => apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
172
+ ),
173
+
174
+ array(
175
+ 'type' => 'sectionend',
176
+ 'id' => 'wcj_sku_options'
177
+ ),
178
+ );
179
+
180
+ return $settings;
181
+ }
182
+
183
+ /**
184
+ * settings_section.
185
+ */
186
+ function settings_section( $sections ) {
187
+ $sections['sku'] = __( 'SKU', 'woocommerce-jetpack' );
188
+ return $sections;
189
+ }
190
+ }
191
+
192
+ endif;
193
+
194
+ return new WCJ_SKU();
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: algoritmika
3
  Donate link: http://algoritmika.com/donate/
4
  Tags: 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,
5
  Requires at least: 3.9.1
6
- Tested up to: 4.0.1
7
- Stable tag: 2.0.5
8
  License: GNU General Public License v3.0
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -64,6 +64,19 @@ To unlock all WooCommerce Jetpack features, please install additional <a href="h
64
 
65
  == Changelog ==
66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  = 2.0.5 - 16/12/2014 =
68
  * Fix - CURRENCIES - **Prices and Currencies by Country** - Calls to `str_getcsv` removed (as this function needs PHP 5.3.0 minimum).
69
 
3
  Donate link: http://algoritmika.com/donate/
4
  Tags: 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,
5
  Requires at least: 3.9.1
6
+ Tested up to: 4.1
7
+ Stable tag: 2.0.6
8
  License: GNU General Public License v3.0
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
64
 
65
  == Changelog ==
66
 
67
+ = 2.0.6 - 20/12/2014 =
68
+ * Fix - CART - **Add to Cart per Category** - `is_object` check added.
69
+ * Fix - **PDF Invoices** - `get_line_subtotal` instead of `get_line_total`. This fixes the bug with item's discount in invoice.
70
+ * Fix - **PDF Invoices** - "Shipping and Discount as item" fix.
71
+ * Fix - **PDF Invoices** - Total weight shortcode quantity bug, fixed.
72
+ * Fix - CURRENCIES - **Prices and Currencies by Country** - Report currency menu had only GBP and USD, fixed.
73
+ * Dev - CURRENCIES - **Prices and Currencies by Country** - *Price Rounding* option added.
74
+ * Dev - CURRENCIES - **Prices and Currencies by Country** - *Country by IP detection method* option added.
75
+ Alternative method added: `api.host.info`.
76
+ * Dev - CURRENCIES - **Prices and Currencies by Country** - Debug info added.
77
+ * Dev - PRODUCTS - **SKUs**.
78
+ * Dev - **PDF Invoices** - shadowed font option added.
79
+
80
  = 2.0.5 - 16/12/2014 =
81
  * Fix - CURRENCIES - **Prices and Currencies by Country** - Calls to `str_getcsv` removed (as this function needs PHP 5.3.0 minimum).
82
 
woocommerce-jetpack.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WooCommerce Jetpack
4
  Plugin URI: http://woojetpack.com
5
  Description: Supercharge your WooCommerce site with these awesome powerful features.
6
- Version: 2.0.5
7
  Author: Algoritmika Ltd
8
  Author URI: http://www.algoritmika.com
9
  Copyright: © 2014 Algoritmika Ltd.
@@ -168,6 +168,7 @@ final class WC_Jetpack {
168
  $settings[] = include_once( 'includes/class-wcj-product-listings.php' );
169
  $settings[] = include_once( 'includes/class-wcj-sorting.php' );
170
  $settings[] = include_once( 'includes/class-wcj-product-info.php' );
 
171
  $settings[] = include_once( 'includes/class-wcj-product-tabs.php' );
172
  $settings[] = include_once( 'includes/class-wcj-product-input-fields-global.php' );
173
  $settings[] = include_once( 'includes/class-wcj-product-input-fields-per-product.php' );
3
  Plugin Name: WooCommerce Jetpack
4
  Plugin URI: http://woojetpack.com
5
  Description: Supercharge your WooCommerce site with these awesome powerful features.
6
+ Version: 2.0.6
7
  Author: Algoritmika Ltd
8
  Author URI: http://www.algoritmika.com
9
  Copyright: © 2014 Algoritmika Ltd.
168
  $settings[] = include_once( 'includes/class-wcj-product-listings.php' );
169
  $settings[] = include_once( 'includes/class-wcj-sorting.php' );
170
  $settings[] = include_once( 'includes/class-wcj-product-info.php' );
171
+ $settings[] = include_once( 'includes/class-wcj-sku.php' );
172
  $settings[] = include_once( 'includes/class-wcj-product-tabs.php' );
173
  $settings[] = include_once( 'includes/class-wcj-product-input-fields-global.php' );
174
  $settings[] = include_once( 'includes/class-wcj-product-input-fields-per-product.php' );