Booster for WooCommerce - Version 2.0.7

Version Description

  • 28/12/2014 =
  • Dev - PRODUCTS - Bulk Price Coverter - Initial module release.
  • Dev - CHECKOUT - Custom Checkout Fields - Option to add custom checkout fields to emails, added.
  • Dev - CHECKOUT - Payment Gateways - Additional emails on new order options added.
  • Dev - CURRENCIES - Prices and Currencies by Country - booking_form_calculated_booking_cost hook added. Partial compatibility with Bookings plugin.
  • Fix - CURRENCIES - Prices and Currencies by Country - On `round
Download this release

Release Info

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

Code changes from version 2.0.6 to 2.0.7

includes/abstracts/class-wcj-product-input-fields.php CHANGED
@@ -99,7 +99,11 @@ class WCJ_Product_Input_Fields {
99
  /**
100
  * validate_product_input_fields_on_add_to_cart.
101
  */
102
- public function validate_product_input_fields_on_add_to_cart( $passed, $product_id ) {
 
 
 
 
103
  $total_number = apply_filters( 'wcj_get_option_filter', 1, $this->get_value( 'wcj_' . 'product_input_fields' . '_' . $this->scope . '_total_number', $product_id, 1 ) );
104
  for ( $i = 1; $i <= $total_number; $i++ ) {
105
  $is_required = $this->get_value( 'wcj_product_input_fields_required_' . $this->scope . '_' . $i, $product_id, 'no' );
99
  /**
100
  * validate_product_input_fields_on_add_to_cart.
101
  */
102
+ public function validate_product_input_fields_on_add_to_cart( $passed, $product_id ) {
103
+
104
+ //$message = date( 'l jS \of F Y h:i:s A' ) . ' ' . print_r( $_POST, true );
105
+ //update_option( 'wcj_log', $message );
106
+
107
  $total_number = apply_filters( 'wcj_get_option_filter', 1, $this->get_value( 'wcj_' . 'product_input_fields' . '_' . $this->scope . '_total_number', $product_id, 1 ) );
108
  for ( $i = 1; $i <= $total_number; $i++ ) {
109
  $is_required = $this->get_value( 'wcj_product_input_fields_required_' . $this->scope . '_' . $i, $product_id, 'no' );
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', 'sku', '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', 'bulk_price_converter', ),
42
  ),
43
  'cart' => array(
44
  'label' => __( 'Cart', 'woocommerce-jetpack' ),
includes/class-wcj-checkout-custom-fields.php CHANGED
@@ -29,7 +29,10 @@ class WCJ_Checkout_Custom_Fields {
29
  add_action( 'woocommerce_admin_order_data_after_shipping_address', array( $this, 'add_custom_shipping_fields_to_admin_order_display' ), PHP_INT_MAX );
30
  //add_action( 'woocommerce_admin_order_data_after_order_details', array( $this, 'add_custom_order_and_account_fields_to_admin_order_display' ), PHP_INT_MAX );
31
  add_action( 'woocommerce_admin_order_data_after_shipping_address', array( $this, 'add_custom_order_and_account_fields_to_admin_order_display' ), PHP_INT_MAX );
32
-
 
 
 
33
  add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'update_custom_checkout_fields_order_meta' ) );
34
 
35
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
@@ -45,7 +48,27 @@ class WCJ_Checkout_Custom_Fields {
45
  }
46
 
47
  /**
48
- * Convert the php date format string to a js date format
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  */
50
  public function enqueue_scripts() {
51
  wp_enqueue_script('jquery-ui-datepicker');
@@ -214,16 +237,45 @@ class WCJ_Checkout_Custom_Fields {
214
 
215
  $settings = array(
216
 
217
- array( 'title' => __( 'Checkout Custom Fields Options', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => __( 'This section lets you add custom checkout fields.', 'woocommerce-jetpack' ), 'id' => 'wcj_checkout_custom_fields_options' ),
 
 
 
 
 
218
 
219
  array(
220
  'title' => __( 'Custom Checkout Fields', 'woocommerce-jetpack' ),
221
- 'desc' => __( 'Enable the Checkout Custom Fields feature', 'woocommerce-jetpack' ),
222
  'desc_tip' => __( 'Add custom fields to the Checkout page.', 'woocommerce-jetpack' ),
223
  'id' => 'wcj_checkout_custom_fields_enabled',
224
  'default' => 'yes',
225
  'type' => 'checkbox',
226
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
 
228
  array(
229
  'title' => __( 'Custom Fields Number', 'woocommerce-jetpack' ),
@@ -262,6 +314,7 @@ class WCJ_Checkout_Custom_Fields {
262
  //'select' => __( 'Select', 'woocommerce-jetpack' ),
263
  'password' => __( 'Password', 'woocommerce-jetpack' ),
264
  ),
 
265
  ),
266
  array(
267
  'title' => '',
@@ -276,6 +329,7 @@ class WCJ_Checkout_Custom_Fields {
276
  'id' => 'wcj_checkout_custom_field_label_' . $i,
277
  'default' => '',
278
  'type' => 'text',
 
279
  ),
280
  /*array(
281
  'title' => '',
@@ -297,6 +351,7 @@ class WCJ_Checkout_Custom_Fields {
297
  'id' => 'wcj_checkout_custom_field_placeholder_' . $i,
298
  'default' => '',
299
  'type' => 'text',
 
300
  ),
301
 
302
  array(
@@ -311,6 +366,7 @@ class WCJ_Checkout_Custom_Fields {
311
  'order' => __( 'Order Notes', 'woocommerce-jetpack' ),
312
  'account' => __( 'Account', 'woocommerce-jetpack' ),
313
  ),
 
314
  ),
315
 
316
  array(
@@ -324,6 +380,7 @@ class WCJ_Checkout_Custom_Fields {
324
  'form-row-first' => __( 'First', 'woocommerce-jetpack' ),
325
  'form-row-last' => __( 'Last', 'woocommerce-jetpack' ),
326
  ),
 
327
  ),
328
 
329
  /**
@@ -339,7 +396,7 @@ class WCJ_Checkout_Custom_Fields {
339
  );
340
  }
341
 
342
- $settings[] = array( 'type' => 'sectionend', 'id' => 'wcj_checkout_custom_fields_options' );
343
 
344
  return $settings;
345
  }
29
  add_action( 'woocommerce_admin_order_data_after_shipping_address', array( $this, 'add_custom_shipping_fields_to_admin_order_display' ), PHP_INT_MAX );
30
  //add_action( 'woocommerce_admin_order_data_after_order_details', array( $this, 'add_custom_order_and_account_fields_to_admin_order_display' ), PHP_INT_MAX );
31
  add_action( 'woocommerce_admin_order_data_after_shipping_address', array( $this, 'add_custom_order_and_account_fields_to_admin_order_display' ), PHP_INT_MAX );
32
+
33
+ add_action( 'woocommerce_email_after_order_table', array( $this, 'add_custom_fields_to_emails' ), PHP_INT_MAX, 2 );
34
+
35
+
36
  add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'update_custom_checkout_fields_order_meta' ) );
37
 
38
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
48
  }
49
 
50
  /**
51
+ * add_custom_fields_to_admin_emails.
52
+ */
53
+ public function add_custom_fields_to_emails( $order, $sent_to_admin ) {
54
+ if ( ( $sent_to_admin && 'yes' === get_option( 'wcj_checkout_custom_fields_email_all_to_admin' ) ) ||
55
+ ( ! $sent_to_admin && 'yes' === get_option( 'wcj_checkout_custom_fields_email_all_to_customer' ) ) ) {
56
+ $this->add_custom_billing_fields_to_admin_order_display( $order );
57
+ $this->add_custom_shipping_fields_to_admin_order_display( $order );
58
+ $this->add_custom_order_and_account_fields_to_admin_order_display( $order );
59
+ }
60
+ }
61
+
62
+ /**
63
+ * add_custom_fields_to_customer_emails.
64
+ */
65
+ public function add_custom_fields_to_customer_emails() {
66
+
67
+
68
+ }
69
+
70
+ /**
71
+ * enqueue_scripts.
72
  */
73
  public function enqueue_scripts() {
74
  wp_enqueue_script('jquery-ui-datepicker');
237
 
238
  $settings = array(
239
 
240
+ array(
241
+ 'title' => __( 'Checkout Custom Fields Options', 'woocommerce-jetpack' ),
242
+ 'type' => 'title',
243
+ 'desc' => __( 'This section lets you add custom checkout fields.', 'woocommerce-jetpack' ),
244
+ 'id' => 'wcj_checkout_custom_fields_options',
245
+ ),
246
 
247
  array(
248
  'title' => __( 'Custom Checkout Fields', 'woocommerce-jetpack' ),
249
+ 'desc' => '<strong>' . __( 'Enable Module', 'woocommerce-jetpack' ) . '</strong>',
250
  'desc_tip' => __( 'Add custom fields to the Checkout page.', 'woocommerce-jetpack' ),
251
  'id' => 'wcj_checkout_custom_fields_enabled',
252
  'default' => 'yes',
253
  'type' => 'checkbox',
254
  ),
255
+
256
+ array(
257
+ 'title' => __( 'Add All Fields to Admin Emails', 'woocommerce-jetpack' ),
258
+ 'desc' => __( 'Enable', 'woocommerce-jetpack' ),
259
+ 'id' => 'wcj_checkout_custom_fields_email_all_to_admin',
260
+ 'default' => 'yes',
261
+ 'type' => 'checkbox',
262
+ ),
263
+
264
+ array(
265
+ 'title' => __( 'Add All Fields to Customers Emails', 'woocommerce-jetpack' ),
266
+ 'desc' => __( 'Enable', 'woocommerce-jetpack' ),
267
+ 'id' => 'wcj_checkout_custom_fields_email_all_to_customer',
268
+ 'default' => 'yes',
269
+ 'type' => 'checkbox',
270
+ ),
271
+
272
+ array( 'type' => 'sectionend', 'id' => 'wcj_checkout_custom_fields_options' ),
273
+
274
+ array(
275
+ 'title' => __( 'The Fields', 'woocommerce-jetpack' ),
276
+ 'type' => 'title',
277
+ 'id' => 'wcj_checkout_custom_fields_individual_options',
278
+ ),
279
 
280
  array(
281
  'title' => __( 'Custom Fields Number', 'woocommerce-jetpack' ),
314
  //'select' => __( 'Select', 'woocommerce-jetpack' ),
315
  'password' => __( 'Password', 'woocommerce-jetpack' ),
316
  ),
317
+ 'css' => 'width:200px;',
318
  ),
319
  array(
320
  'title' => '',
329
  'id' => 'wcj_checkout_custom_field_label_' . $i,
330
  'default' => '',
331
  'type' => 'text',
332
+ 'css' => 'width:200px;',
333
  ),
334
  /*array(
335
  'title' => '',
351
  'id' => 'wcj_checkout_custom_field_placeholder_' . $i,
352
  'default' => '',
353
  'type' => 'text',
354
+ 'css' => 'width:200px;',
355
  ),
356
 
357
  array(
366
  'order' => __( 'Order Notes', 'woocommerce-jetpack' ),
367
  'account' => __( 'Account', 'woocommerce-jetpack' ),
368
  ),
369
+ 'css' => 'width:200px;',
370
  ),
371
 
372
  array(
380
  'form-row-first' => __( 'First', 'woocommerce-jetpack' ),
381
  'form-row-last' => __( 'Last', 'woocommerce-jetpack' ),
382
  ),
383
+ 'css' => 'width:200px;',
384
  ),
385
 
386
  /**
396
  );
397
  }
398
 
399
+ $settings[] = array( 'type' => 'sectionend', 'id' => 'wcj_checkout_custom_fields_individual_options' );
400
 
401
  return $settings;
402
  }
includes/class-wcj-emails.php CHANGED
@@ -25,7 +25,10 @@ class WCJ_Emails {
25
  if ( '' != get_option( 'wcj_emails_bcc_email' ) )
26
  add_filter( 'woocommerce_email_headers', array( $this, 'add_bcc_email' ) );
27
  if ( '' != get_option( 'wcj_emails_cc_email' ) )
28
- add_filter( 'woocommerce_email_headers', array( $this, 'add_cc_email' ) );
 
 
 
29
  // Settings
30
  add_filter( 'woocommerce_email_settings', array( $this, 'add_email_forwarding_fields' ), 100 );
31
  }
@@ -35,6 +38,15 @@ class WCJ_Emails {
35
  add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
36
  }
37
 
 
 
 
 
 
 
 
 
 
38
  /**
39
  * add_enabled_option.
40
  */
@@ -121,7 +133,15 @@ class WCJ_Emails {
121
  'id' => 'wcj_emails_enabled',
122
  'default' => 'yes',
123
  'type' => 'checkbox',
124
- ),
 
 
 
 
 
 
 
 
125
 
126
  array( 'type' => 'sectionend', 'id' => 'wcj_emails_options' ),
127
 
25
  if ( '' != get_option( 'wcj_emails_bcc_email' ) )
26
  add_filter( 'woocommerce_email_headers', array( $this, 'add_bcc_email' ) );
27
  if ( '' != get_option( 'wcj_emails_cc_email' ) )
28
+ add_filter( 'woocommerce_email_headers', array( $this, 'add_cc_email' ) );
29
+
30
+ //add_action( 'woocommerce_email_after_order_table', array( $this, 'add_payment_method_to_new_order_email' ), 15, 2 );
31
+
32
  // Settings
33
  add_filter( 'woocommerce_email_settings', array( $this, 'add_email_forwarding_fields' ), 100 );
34
  }
38
  add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
39
  }
40
 
41
+ /**
42
+ * add_payment_method_to_new_order_email.
43
+ *
44
+ public function add_payment_method_to_new_order_email( $order, $is_admin_email ) {
45
+ if ( 'yes' === get_option( 'wcj_emails_add_payment_method_to_new_order_enabled' ) ) {
46
+ echo '<p><strong>' . __( 'Payment Method:', 'woocommerce-jetpack' ) . '</strong> ' . $order->payment_method_title . '</p>';
47
+ }
48
+ }
49
+
50
  /**
51
  * add_enabled_option.
52
  */
133
  'id' => 'wcj_emails_enabled',
134
  'default' => 'yes',
135
  'type' => 'checkbox',
136
+ ),
137
+
138
+ /*array(
139
+ 'title' => __( 'Add Payment Method to New Order Email', 'woocommerce-jetpack' ),
140
+ 'desc' => __( 'Enable', 'woocommerce-jetpack' ),
141
+ 'id' => 'wcj_emails_add_payment_method_to_new_order_enabled',
142
+ 'default' => 'no',
143
+ 'type' => 'checkbox',
144
+ ),*/
145
 
146
  array( 'type' => 'sectionend', 'id' => 'wcj_emails_options' ),
147
 
includes/class-wcj-orders.php CHANGED
@@ -316,7 +316,7 @@ class WCJ_Orders {
316
 
317
  array(
318
  'title' => __( 'Orders', 'woocommerce-jetpack' ),
319
- 'desc' => __( 'Enable the Orders feature', 'woocommerce-jetpack' ),
320
  'desc_tip' => __( 'Minimum order amount, orders auto-complete, orders custom statuses.', 'woocommerce-jetpack' ),
321
  'id' => 'wcj_orders_enabled',
322
  'default' => 'yes',
316
 
317
  array(
318
  'title' => __( 'Orders', 'woocommerce-jetpack' ),
319
+ 'desc' => '<strong>' . __( 'Enable Module', 'woocommerce-jetpack' ) . '</strong>',
320
  'desc_tip' => __( 'Minimum order amount, orders auto-complete, orders custom statuses.', 'woocommerce-jetpack' ),
321
  'id' => 'wcj_orders_enabled',
322
  'default' => 'yes',
includes/class-wcj-payment-gateways.php CHANGED
@@ -60,8 +60,8 @@ class WCJ_Payment_Gateways {
60
  add_action( 'wp_enqueue_scripts' , array( $this, 'enqueue_checkout_script' ) );
61
  // Settings Hooks
62
  add_filter( 'woocommerce_payment_gateways_settings', array( $this, 'add_fees_settings' ), 100 );
63
- // Scripts
64
- wp_register_script( 'wcj-payment-gateways-checkout', trailingslashit( plugin_dir_url( __FILE__ ) ) . 'js/checkout.js', array( 'jquery' ), false, true );
65
  }
66
  }
67
 
@@ -71,11 +71,18 @@ class WCJ_Payment_Gateways {
71
  add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
72
  }
73
 
 
 
 
 
 
 
 
74
  /**
75
  * enqueue_checkout_script.
76
  */
77
  public function enqueue_checkout_script() {
78
- if( !is_checkout() )
79
  return;
80
  wp_enqueue_script( 'wcj-payment-gateways-checkout' );
81
  }
@@ -311,7 +318,7 @@ class WCJ_Payment_Gateways {
311
 
312
  array(
313
  'title' => __( 'Payment Gateways', 'woocommerce-jetpack' ),
314
- 'desc' => __( 'Enable the Payment Gateways feature', 'woocommerce-jetpack' ),
315
  'desc_tip' => __( 'Add custom payment gateway, change icons (images) for all default WooCommerce payment gateways.', 'woocommerce-jetpack' ),
316
  'id' => 'wcj_payment_gateways_enabled',
317
  'default' => 'yes',
60
  add_action( 'wp_enqueue_scripts' , array( $this, 'enqueue_checkout_script' ) );
61
  // Settings Hooks
62
  add_filter( 'woocommerce_payment_gateways_settings', array( $this, 'add_fees_settings' ), 100 );
63
+ // Scripts
64
+ add_action( 'init', array( $this, 'register_script' ) );
65
  }
66
  }
67
 
71
  add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
72
  }
73
 
74
+ /**
75
+ * register_script.
76
+ */
77
+ public function register_script() {
78
+ wp_register_script( 'wcj-payment-gateways-checkout', trailingslashit( plugin_dir_url( __FILE__ ) ) . 'js/checkout.js', array( 'jquery' ), false, true );
79
+ }
80
+
81
  /**
82
  * enqueue_checkout_script.
83
  */
84
  public function enqueue_checkout_script() {
85
+ if( ! is_checkout() )
86
  return;
87
  wp_enqueue_script( 'wcj-payment-gateways-checkout' );
88
  }
318
 
319
  array(
320
  'title' => __( 'Payment Gateways', 'woocommerce-jetpack' ),
321
+ 'desc' => '<strong>' . __( 'Enable Module', 'woocommerce-jetpack' ) . '</strong>',
322
  'desc_tip' => __( 'Add custom payment gateway, change icons (images) for all default WooCommerce payment gateways.', 'woocommerce-jetpack' ),
323
  'id' => 'wcj_payment_gateways_enabled',
324
  'default' => 'yes',
includes/class-wcj-price-by-country.php CHANGED
@@ -46,6 +46,7 @@ class WCJ_Price_By_Country {
46
  add_filter( 'woocommerce_get_price', array( $this, 'change_price_by_country' ), PHP_INT_MAX );
47
  add_filter( 'woocommerce_get_sale_price', array( $this, 'change_price_by_country' ), PHP_INT_MAX );
48
  add_filter( 'woocommerce_get_regular_price', array( $this, 'change_price_by_country' ), PHP_INT_MAX );
 
49
  add_filter( 'woocommerce_get_price_html', array( $this, 'fix_variable_product_price_on_sale' ), 10 , 2 );
50
  // Currency
51
  add_filter( 'woocommerce_currency_symbol', array( $this, 'change_currency_symbol'), PHP_INT_MAX, 2 );
@@ -214,11 +215,11 @@ class WCJ_Price_By_Country {
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' ) );
@@ -520,10 +521,12 @@ class WCJ_Price_By_Country {
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 );
46
  add_filter( 'woocommerce_get_price', array( $this, 'change_price_by_country' ), PHP_INT_MAX );
47
  add_filter( 'woocommerce_get_sale_price', array( $this, 'change_price_by_country' ), PHP_INT_MAX );
48
  add_filter( 'woocommerce_get_regular_price', array( $this, 'change_price_by_country' ), PHP_INT_MAX );
49
+ add_filter( 'booking_form_calculated_booking_cost', array( $this, 'change_price_by_country' ), PHP_INT_MAX );
50
  add_filter( 'woocommerce_get_price_html', array( $this, 'fix_variable_product_price_on_sale' ), 10 , 2 );
51
  // Currency
52
  add_filter( 'woocommerce_currency_symbol', array( $this, 'change_currency_symbol'), PHP_INT_MAX, 2 );
215
  */
216
  public function update_database() {
217
 
 
 
218
  // Started
219
  update_option( 'wcj_geoipcountry_db_version', -1 );
220
 
221
+ ob_start();
222
+
223
  // Get IPs from file
224
  // This product includes GeoLite data created by MaxMind, available from <a href="http://www.maxmind.com">http://www.maxmind.com</a>.
225
  $csv = array_map( array( $this, 'parse_csv_line' ), file( plugin_dir_path( __FILE__ ) . 'lib/ipdb.csv' ) );
521
  if ( 1 != $country_exchange_rate ) {
522
  $modified_price = $price * $country_exchange_rate;
523
  $rounding = get_option( 'wcj_price_by_country_rounding', 'none' );
524
+ $precision = get_option( 'woocommerce_price_num_decimals', 2 );
525
  switch ( $rounding ) {
526
  case 'none':
527
+ //return ( $modified_price );
528
+ return round( $modified_price, $precision );
529
+ case 'round':
530
  return round( $modified_price );
531
  case 'floor':
532
  return floor( $modified_price );
includes/class-wcj-product-bulk-price-converter.php ADDED
@@ -0,0 +1,223 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WooCommerce Jetpack Bulk Price Converter
4
+ *
5
+ * The WooCommerce Jetpack Bulk Price Converter class.
6
+ *
7
+ * @class WCJ_Bulk_Price_Converter
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_Bulk_Price_Converter' ) ) :
16
+
17
+ class WCJ_Bulk_Price_Converter {
18
+
19
+ /**
20
+ * Constructor.
21
+ */
22
+ public function __construct() {
23
+
24
+ $the_priority = 100;
25
+ // Main hooks
26
+ if ( 'yes' === get_option( 'wcj_bulk_price_converter_enabled' ) ) {
27
+ add_filter( 'wcj_tools_tabs', array( $this, 'add_bulk_price_converter_tool_tab' ), $the_priority );
28
+ add_action( 'wcj_tools_bulk_price_converter', array( $this, 'create_bulk_price_converter_tool' ), $the_priority );
29
+ }
30
+ add_action( 'wcj_tools_dashboard', array( $this, 'add_bulk_price_converter_tool_info_to_tools_dashboard' ), $the_priority );
31
+
32
+ // Settings hooks
33
+ add_filter( 'wcj_settings_sections', array( $this, 'settings_section' ) );
34
+ add_filter( 'wcj_settings_bulk_price_converter', array( $this, 'get_settings' ), 100 );
35
+ add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
36
+ }
37
+
38
+ /**
39
+ * add_bulk_price_converter_tool_tab.
40
+ */
41
+ public function add_bulk_price_converter_tool_tab( $tabs ) {
42
+ $tabs[] = array(
43
+ 'id' => 'bulk_price_converter',
44
+ 'title' => __( 'Bulk Price Converter', 'woocommerce-jetpack' ),
45
+ );
46
+ return $tabs;
47
+ }
48
+
49
+ /**
50
+ * change_price_by_type.
51
+ */
52
+ public function change_price_by_type( $product_id, $multiply_price_by, $price_type, $is_preview ) {
53
+ $the_price = get_post_meta( $product_id, '_' . $price_type, true );
54
+ $precision = get_option( 'woocommerce_price_num_decimals', 2 );
55
+ $the_multiplied_price = round( $the_price * $multiply_price_by, $precision );
56
+ if ( ! $is_preview )
57
+ update_post_meta( $product_id, '_' . $price_type, $the_multiplied_price );
58
+
59
+ echo '<tr>' .
60
+ '<td>' . get_the_title( $product_id ) . '</td>' .
61
+ '<td>' . $price_type . '</td>' .
62
+ '<td>' . $the_price . '</td>' .
63
+ '<td>' . $the_multiplied_price . '</td>' .
64
+ '</tr>';
65
+ }
66
+
67
+ /**
68
+ * change_price_all_types.
69
+ */
70
+ public function change_price_all_types( $product_id, $multiply_price_by, $is_preview ) {
71
+ $this->change_price_by_type( $product_id, $multiply_price_by, 'price', $is_preview );
72
+ $this->change_price_by_type( $product_id, $multiply_price_by, 'sale_price', $is_preview );
73
+ $this->change_price_by_type( $product_id, $multiply_price_by, 'regular_price', $is_preview );
74
+ }
75
+
76
+ /**
77
+ * change_product_price.
78
+ */
79
+ public function change_product_price( $product_id, $multiply_price_by, $is_preview ) {
80
+ $this->change_price_all_types( $product_id, $multiply_price_by, $is_preview );
81
+ // Handling variable products
82
+ $product = wc_get_product( $product_id );
83
+ if ( $product->is_type( 'variable' ) ) {
84
+ $variations = $product->get_available_variations();
85
+ foreach( $variations as $variation ) {
86
+ $this->change_price_all_types( $variation['variation_id'], $multiply_price_by, $is_preview );
87
+ }
88
+ }
89
+ }
90
+
91
+ /**
92
+ * change_all_products_prices
93
+ */
94
+ public function change_all_products_prices( $multiply_prices_by, $is_preview ) {
95
+ $multiply_prices_by = floatval( $multiply_prices_by );
96
+ if ( $multiply_prices_by <= 0 )
97
+ return;
98
+
99
+ ob_start();
100
+
101
+ $args = array(
102
+ 'post_type' => 'product',
103
+ 'post_status' => 'any',
104
+ 'posts_per_page' => -1,
105
+ );
106
+ $loop = new WP_Query( $args );
107
+ echo '<table class="widefat" style="width:50%; min-width: 300px;">';
108
+ echo '<tr>' .
109
+ '<th>' . __( 'Product', 'woocommerce-jetpack' ) . '</th>' .
110
+ '<th>' . __( 'Price', 'woocommerce-jetpack' ) . '</th>' .
111
+ '<th>' . __( 'Price Type', 'woocommerce-jetpack' ) . '</th>' .
112
+ '<th>' . __( 'Modified Price', 'woocommerce-jetpack' ) . '</th>' .
113
+ '</tr>';
114
+ while ( $loop->have_posts() ) : $loop->the_post();
115
+ $this->change_product_price( $loop->post->ID, $multiply_prices_by, $is_preview );
116
+ endwhile;
117
+ echo '</table>';
118
+
119
+ return ob_get_clean();
120
+ }
121
+
122
+ /**
123
+ * create_bulk_price_converter_tool
124
+ */
125
+ public function create_bulk_price_converter_tool() {
126
+
127
+ $result_message = '';
128
+ $multiply_prices_by = isset( $_POST['multiply_prices_by'] ) ? $_POST['multiply_prices_by'] : 1;
129
+ $is_preview = isset( $_POST['bulk_change_prices_preview'] ) ? true : false;
130
+
131
+ if ( $multiply_prices_by <= 0 ) {
132
+ $result_message = '<p><div class="error"><p><strong>' . __( 'Multiply value must be above zero.', 'woocommerce-jetpack' ) . '</strong></p></div></p>';
133
+ $multiply_prices_by = 1;
134
+ }
135
+ else {
136
+ if ( isset( $_POST['bulk_change_prices'] ) || isset( $_POST['bulk_change_prices_preview'] ) ) {
137
+ $result_changing_prices = $this->change_all_products_prices( $multiply_prices_by, $is_preview );
138
+ if ( ! $is_preview ) {
139
+ $result_message = '<p><div class="updated"><p><strong>' . __( 'Prices changed successfully!', 'woocommerce-jetpack' ) . '</strong></p></div></p>';
140
+ $multiply_prices_by = 1;
141
+ }
142
+ }
143
+ }
144
+ ?>
145
+ <div>
146
+ <h2><?php echo __( 'WooCommerce Jetpack - Bulk Price Converter', 'woocommerce-jetpack' ); ?></h2>
147
+ <p><?php echo __( 'Bulk Price Converter Tool.', 'woocommerce-jetpack' ); ?></p>
148
+ <?php echo $result_message; ?>
149
+ <p><form method="post" action="">
150
+ <?php echo __( 'Multiply all product prices by', 'woocommerce-jetpack' ); ?> <input class="" type="text" name="multiply_prices_by" id="multiply_prices_by" value="<?php echo $multiply_prices_by; ?>">
151
+ <input class="button-primary" type="submit" name="bulk_change_prices_preview" id="bulk_change_prices_preview" value="Preview Prices">
152
+ <input class="button-primary" type="submit" name="bulk_change_prices" id="bulk_change_prices" value="Change Prices">
153
+ </form></p>
154
+ <?php if ( $is_preview ) echo $result_changing_prices; ?>
155
+ </div>
156
+ <?php
157
+ }
158
+
159
+ /**
160
+ * add_bulk_price_converter_tool_info_to_tools_dashboard.
161
+ */
162
+ public function add_bulk_price_converter_tool_info_to_tools_dashboard() {
163
+ echo '<tr>';
164
+ if ( 'yes' === get_option( 'wcj_bulk_price_converter_enabled') )
165
+ $is_enabled = '<span style="color:green;font-style:italic;">' . __( 'enabled', 'woocommerce-jetpack' ) . '</span>';
166
+ else
167
+ $is_enabled = '<span style="color:gray;font-style:italic;">' . __( 'disabled', 'woocommerce-jetpack' ) . '</span>';
168
+ echo '<td>' . __( 'Bulk Price Converter', 'woocommerce-jetpack' ) . '</td>';
169
+ echo '<td>' . $is_enabled . '</td>';
170
+ echo '<td>' . __( 'Bulk Price Converter Tool.', 'woocommerce-jetpack' ) . '</td>';
171
+ echo '</tr>';
172
+ }
173
+
174
+ /**
175
+ * add_enabled_option.
176
+ */
177
+ public function add_enabled_option( $settings ) {
178
+ $all_settings = $this->get_settings();
179
+ $settings[] = $all_settings[1];
180
+ return $settings;
181
+ }
182
+
183
+ /**
184
+ * get_settings.
185
+ */
186
+ function get_settings() {
187
+
188
+ $settings = array(
189
+
190
+ array(
191
+ 'title' => __( 'Bulk Price Converter Options', 'woocommerce-jetpack' ),
192
+ 'type' => 'title',
193
+ 'desc' => __( 'When enabled, the tool is accessible through WooCommerce > Jetpack Tools > Bulk Price Converter.', 'woocommerce-jetpack' ),
194
+ 'id' => 'wcj_bulk_price_converter_options'
195
+ ),
196
+
197
+ array(
198
+ 'title' => __( 'Bulk Price Converter', 'woocommerce-jetpack' ),
199
+ 'desc' => '<strong>' . __( 'Enable Module', 'woocommerce-jetpack' ) . '</strong>',
200
+ 'desc_tip' => __( 'Multiply all products prices by set value.', 'woocommerce-jetpack' ),
201
+ 'id' => 'wcj_bulk_price_converter_enabled',
202
+ 'default' => 'yes',
203
+ 'type' => 'checkbox',
204
+ ),
205
+
206
+ array( 'type' => 'sectionend', 'id' => 'wcj_bulk_price_converter_options' ),
207
+ );
208
+
209
+ return $settings;
210
+ }
211
+
212
+ /**
213
+ * settings_section.
214
+ */
215
+ function settings_section( $sections ) {
216
+ $sections['bulk_price_converter'] = __( 'Bulk Price Converter', 'woocommerce-jetpack' );
217
+ return $sections;
218
+ }
219
+ }
220
+
221
+ endif;
222
+
223
+ return new WCJ_Bulk_Price_Converter();
includes/class-wcj-product-input-fields-global.php CHANGED
@@ -44,7 +44,12 @@ class WCJ_Product_Input_Fields_Global extends WCJ_Product_Input_Fields {
44
 
45
  // Make nicer name for product input fields in order at backend (shop manager)
46
  add_action( 'woocommerce_before_order_itemmeta', array( $this, 'start_making_nicer_name_for_product_input_fields' ), 100, 3 );
47
- add_action( 'woocommerce_after_order_itemmeta', array( $this, 'finish_making_nicer_name_for_product_input_fields' ), 100, 3 );
 
 
 
 
 
48
  }
49
 
50
  // Settings hooks
@@ -53,6 +58,44 @@ class WCJ_Product_Input_Fields_Global extends WCJ_Product_Input_Fields {
53
  add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
54
  }
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  /**
57
  * get_value.
58
  */
44
 
45
  // Make nicer name for product input fields in order at backend (shop manager)
46
  add_action( 'woocommerce_before_order_itemmeta', array( $this, 'start_making_nicer_name_for_product_input_fields' ), 100, 3 );
47
+ add_action( 'woocommerce_after_order_itemmeta', array( $this, 'finish_making_nicer_name_for_product_input_fields' ), 100, 3 );
48
+
49
+ //add_action( 'init', array( $this, 'init' ), 100 );
50
+ //add_action( 'woocommerce_ajax_added_to_cart', array( $this, 'ajax_add_to_cart' ), 100 );
51
+ //add_action( 'woocommerce_loop_add_to_cart_link', array( $this, 'replace_loop_add_to_cart_button' ), 100, 2 );
52
+ //add_action( 'woocommerce_after_shop_loop_item', array( $this, 'add_product_input_fields_to_frontend' ), 100 );
53
  }
54
 
55
  // Settings hooks
58
  add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
59
  }
60
 
61
+ /**
62
+ * replace_loop_add_to_cart_button.
63
+ *
64
+ public function replace_loop_add_to_cart_button( $button, $product ) {
65
+ $html .= '<form class="cart" method="post" enctype=\'multipart/form-data\'>';
66
+ $html .= '<input type="hidden" name="add-to-cart" value="' . esc_attr( $product->id ) . '" />';
67
+ $html .= '<button type="submit" class="button add_to_cart_button product_type_simple">' . $product->single_add_to_cart_text() . '</button>';
68
+ $html .= $button;
69
+ $html .= '</form>';
70
+ return $html;
71
+ }
72
+
73
+ /**
74
+ * ajax_add_to_cart.
75
+ *
76
+ public function ajax_add_to_cart() {
77
+
78
+ $message = date( 'l jS \of F Y h:i:s A' ) . ' ' . print_r( $_POST, true );
79
+ update_option( 'wcj_log', $message );
80
+
81
+
82
+ // check if logo_text has been defined by the client
83
+ //if ( isset( $_POST['logo_text'] ) ) {
84
+ // do something
85
+ //}
86
+ }
87
+
88
+ /**
89
+ * init.
90
+ *
91
+ public function init() {
92
+
93
+ print_r( get_option( 'wcj_log', 'N/A' ) );
94
+
95
+ //remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); // remove that ajaxified Add To Cart button that automatically adds 1 item to the cart.
96
+ //add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_single_add_to_cart', 30 ); // replace it with the Add To Cart Button, complete with QTY field.. the same one that is used on the Single Product page.
97
+ }
98
+
99
  /**
100
  * get_value.
101
  */
includes/gateways/class-wc-gateway-wcj-custom.php CHANGED
@@ -123,6 +123,22 @@ function init_wc_gateway_wcj_custom_class() {
123
  'default' => apply_filters( 'woocommerce_default_order_status', 'pending' ),
124
  'type' => 'select',
125
  'options' => $this->get_order_statuses(),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  ),
127
  );
128
 
@@ -274,7 +290,13 @@ function init_wc_gateway_wcj_custom_class() {
274
  //$order->update_status( 'on-hold', __( 'Awaiting payment', 'woocommerce' ) );
275
  $statuses = $this->get_order_statuses();
276
  $note = isset( $statuses[ $this->default_order_status ] ) ? $statuses[ $this->default_order_status ] : '';
277
- $order->update_status( $this->default_order_status, $note );
 
 
 
 
 
 
278
 
279
  // Reduce stock levels
280
  $order->reduce_order_stock();
@@ -311,6 +333,8 @@ function init_wc_gateway_wcj_custom_class() {
311
  $this->enable_for_methods = $this->get_option( 'enable_for_methods', array() );
312
  $this->enable_for_virtual = $this->get_option( 'enable_for_virtual', 'yes' ) === 'yes' ? true : false;
313
  $this->default_order_status = $this->get_option( 'default_order_status', 'pending' );
 
 
314
  // Actions
315
  add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
316
  add_action( 'woocommerce_thankyou_' . $this->id, array( $this, 'thankyou_page' ) );
123
  'default' => apply_filters( 'woocommerce_default_order_status', 'pending' ),
124
  'type' => 'select',
125
  'options' => $this->get_order_statuses(),
126
+ ),
127
+
128
+ 'send_email_to_admin' => array(
129
+ 'title' => __( 'Send Additional Emails', 'woocommerce-jetpack' ),
130
+ 'label' => __( 'Send to Admin', 'woocommerce-jetpack' ),
131
+ //'description' => __( 'This may help if you are using pending or custom default status and not getting new order emails.', 'woocommerce-jetpack' ),
132
+ 'default' => 'no',
133
+ 'type' => 'checkbox',
134
+ ),
135
+
136
+ 'send_email_to_customer' => array(
137
+ 'title' => '',//__( 'Send Additional Email to Customer', 'woocommerce-jetpack' ),
138
+ 'label' => __( 'Send to Customer', 'woocommerce-jetpack' ),
139
+ 'description' => __( 'This may help if you are using pending or custom default status and not getting new order emails.', 'woocommerce-jetpack' ),
140
+ 'default' => 'no',
141
+ 'type' => 'checkbox',
142
  ),
143
  );
144
 
290
  //$order->update_status( 'on-hold', __( 'Awaiting payment', 'woocommerce' ) );
291
  $statuses = $this->get_order_statuses();
292
  $note = isset( $statuses[ $this->default_order_status ] ) ? $statuses[ $this->default_order_status ] : '';
293
+ $order->update_status( $this->default_order_status, $note );
294
+
295
+ if ( 'yes' === $this->send_email_to_admin || 'yes' === $this->send_email_to_customer ) {
296
+ $woocommerce_mailer = WC()->mailer();
297
+ if ( 'yes' === $this->send_email_to_admin ) $woocommerce_mailer->emails['WC_Email_New_Order']->trigger( $order_id );
298
+ if ( 'yes' === $this->send_email_to_customer ) $woocommerce_mailer->emails['WC_Email_Customer_Processing_Order']->trigger( $order_id );
299
+ }
300
 
301
  // Reduce stock levels
302
  $order->reduce_order_stock();
333
  $this->enable_for_methods = $this->get_option( 'enable_for_methods', array() );
334
  $this->enable_for_virtual = $this->get_option( 'enable_for_virtual', 'yes' ) === 'yes' ? true : false;
335
  $this->default_order_status = $this->get_option( 'default_order_status', 'pending' );
336
+ $this->send_email_to_admin = $this->get_option( 'send_email_to_admin', 'no' );
337
+ $this->send_email_to_customer = $this->get_option( 'send_email_to_customer', 'no' );
338
  // Actions
339
  add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
340
  add_action( 'woocommerce_thankyou_' . $this->id, array( $this, 'thankyou_page' ) );
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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
 
@@ -33,6 +33,8 @@ WooCommerce Jetpack is a WordPress plugin that supercharges your site with aweso
33
  * Cart - Add "Empty Cart" button to cart page, automatically add product to cart on visit.
34
  * Add to Cart - Change text for add to cart buttons for each product type. Display "Product already in cart" instead of "Add to cart" button. Redirect add to cart button to any url (e.g. checkout page).
35
  * Old Slugs - Remove old product slugs.
 
 
36
  * Another custom CSS tool, if you need one.
37
 
38
  = Feedback =
@@ -64,8 +66,16 @@ To unlock all WooCommerce Jetpack features, please install additional <a href="h
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.
@@ -115,8 +125,8 @@ To unlock all WooCommerce Jetpack features, please install additional <a href="h
115
  * Dev - CHECKOUT - **Payment Gateways** - Payment fees - Maximum and/or minimum cart amount for adding fee option, added.
116
  * Dev - CHECKOUT - **Payment Gateways** - Option to set *default order status* for custom gateway, added.
117
  * Dev - ORDERS - **Custom Statuses** - *Default Order Status* option added. Idea by Patryk.
118
- * Dev - ORDERS - **Order Numbers** - Custom order number date suffix. Idea by Patryk.
119
- * Dev - ORDERS - **Order Numbers** - Option to *enabled/disable sequential order numbers*, added. This will let use only *custom order number width, prefixes and suffixes*.
120
  * Dev - **PDF Invoices** - Shortcodes.
121
  * Dev - **PDF Invoices** - Custom billing and shipping checkout fields are now added to PDF. This covers the request to add shipping phone to PDF by Dennys.
122
  * Dev - PRICE LABELS - **Custom Price Labels** - *Global* price labels between regular and sale. Suggested by Roman.
@@ -126,7 +136,7 @@ To unlock all WooCommerce Jetpack features, please install additional <a href="h
126
  * i18n - `FR_fr` French translation updated. Translated by Jean-Marc.
127
  * i18n - POT file updated.
128
  * Tweak - PRICE LABELS - **Custom Price Labels** - Hide custom price labels if the Dashboard or the administration panel is displayed. Suggested by Jean-Marc.
129
- * Tweak - ORDERS - **Order Numbers** - Moved to separate module.
130
  * Tweak - CART - **Add to Cart** - "Only *local* URLs are accepted" info updated in *Add to cart redirect*.
131
 
132
  = 1.9.1 - 13/11/2014 =
@@ -144,7 +154,7 @@ To unlock all WooCommerce Jetpack features, please install additional <a href="h
144
  * Feature Upgraded - **Sorting** - Sorting products by stock quantity, added. Idea by Fred.
145
  * Feature Upgraded - **PDF Invoices** - Emailing PDF as attachment for selected payment methods only option added. Idea by Jen.
146
  * Feature Upgraded - **PDF Invoices** - Option to add shipping address to the invoice, added. Idea by Justine.
147
- * Feature Upgraded - **Orders** - Order Numbers - Custom order number suffix added. Idea by Patryk.
148
  * Feature Upgraded - **Add to Cart** - Changing *add to cart* button text for products with zero and/or empty price (suggested by Patryk) option added.
149
  Products with *zero price* are covered for archive (category) and single views.
150
  Products with *empty price* only for archives (single view does not contain add to cart button at all, so nothing to cover).
@@ -357,7 +367,7 @@ To unlock all WooCommerce Jetpack features, please install additional <a href="h
357
  * Feature - PDF Invoices - PDF invoices for store owners and for customers.
358
 
359
  = 1.0.5 - 18/06/2014 =
360
- * Feature - Order Numbers - Sequential order numbering, custom order number prefix and number width.
361
 
362
  = 1.0.4 - 15/06/2014 =
363
  * Fix - Add to cart text - on archives now calling the right function.
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.7
8
  License: GNU General Public License v3.0
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
33
  * Cart - Add "Empty Cart" button to cart page, automatically add product to cart on visit.
34
  * Add to Cart - Change text for add to cart buttons for each product type. Display "Product already in cart" instead of "Add to cart" button. Redirect add to cart button to any url (e.g. checkout page).
35
  * Old Slugs - Remove old product slugs.
36
+ * Bulk Price Converter tool.
37
+ * Prices and Currencies by Country.
38
  * Another custom CSS tool, if you need one.
39
 
40
  = Feedback =
66
 
67
  == Changelog ==
68
 
69
+ = 2.0.7 - 28/12/2014 =
70
+ * Dev - PRODUCTS - **Bulk Price Coverter** - Initial module release.
71
+ * Dev - CHECKOUT - **Custom Checkout Fields** - Option to add custom checkout fields to emails, added.
72
+ * Dev - CHECKOUT - **Payment Gateways** - *Additional emails on new order* options added.
73
+ * Dev - CURRENCIES - **Prices and Currencies by Country** - `booking_form_calculated_booking_cost` hook added. Partial compatibility with Bookings plugin.
74
+ * Fix - CURRENCIES - **Prices and Currencies by Country** - On `round = none` rounding by precision set in WooCommerce.
75
+ * Fix - Payment Gateways - `wp_register_script` moved to `init`. This caused warning generation on some servers.
76
+
77
  = 2.0.6 - 20/12/2014 =
78
+ * Fix - CART - **Add to Cart per Category** - `is_object` check added. This caused warning generation on some servers.
79
  * Fix - **PDF Invoices** - `get_line_subtotal` instead of `get_line_total`. This fixes the bug with item's discount in invoice.
80
  * Fix - **PDF Invoices** - "Shipping and Discount as item" fix.
81
  * Fix - **PDF Invoices** - Total weight shortcode quantity bug, fixed.
125
  * Dev - CHECKOUT - **Payment Gateways** - Payment fees - Maximum and/or minimum cart amount for adding fee option, added.
126
  * Dev - CHECKOUT - **Payment Gateways** - Option to set *default order status* for custom gateway, added.
127
  * Dev - ORDERS - **Custom Statuses** - *Default Order Status* option added. Idea by Patryk.
128
+ * Dev - ORDERS - **Bulk Price Changer** - Custom order number date suffix. Idea by Patryk.
129
+ * Dev - ORDERS - **Bulk Price Changer** - Option to *enabled/disable sequential order numbers*, added. This will let use only *custom order number width, prefixes and suffixes*.
130
  * Dev - **PDF Invoices** - Shortcodes.
131
  * Dev - **PDF Invoices** - Custom billing and shipping checkout fields are now added to PDF. This covers the request to add shipping phone to PDF by Dennys.
132
  * Dev - PRICE LABELS - **Custom Price Labels** - *Global* price labels between regular and sale. Suggested by Roman.
136
  * i18n - `FR_fr` French translation updated. Translated by Jean-Marc.
137
  * i18n - POT file updated.
138
  * Tweak - PRICE LABELS - **Custom Price Labels** - Hide custom price labels if the Dashboard or the administration panel is displayed. Suggested by Jean-Marc.
139
+ * Tweak - ORDERS - **Bulk Price Changer** - Moved to separate module.
140
  * Tweak - CART - **Add to Cart** - "Only *local* URLs are accepted" info updated in *Add to cart redirect*.
141
 
142
  = 1.9.1 - 13/11/2014 =
154
  * Feature Upgraded - **Sorting** - Sorting products by stock quantity, added. Idea by Fred.
155
  * Feature Upgraded - **PDF Invoices** - Emailing PDF as attachment for selected payment methods only option added. Idea by Jen.
156
  * Feature Upgraded - **PDF Invoices** - Option to add shipping address to the invoice, added. Idea by Justine.
157
+ * Feature Upgraded - **Orders** - Bulk Price Changer - Custom order number suffix added. Idea by Patryk.
158
  * Feature Upgraded - **Add to Cart** - Changing *add to cart* button text for products with zero and/or empty price (suggested by Patryk) option added.
159
  Products with *zero price* are covered for archive (category) and single views.
160
  Products with *empty price* only for archives (single view does not contain add to cart button at all, so nothing to cover).
367
  * Feature - PDF Invoices - PDF invoices for store owners and for customers.
368
 
369
  = 1.0.5 - 18/06/2014 =
370
+ * Feature - Bulk Price Changer - Sequential order numbering, custom order number prefix and number width.
371
 
372
  = 1.0.4 - 15/06/2014 =
373
  * Fix - Add to cart text - on archives now calling the right function.
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.6
7
  Author: Algoritmika Ltd
8
  Author URI: http://www.algoritmika.com
9
  Copyright: © 2014 Algoritmika Ltd.
@@ -172,6 +172,7 @@ final class WC_Jetpack {
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' );
 
175
 
176
  $settings[] = include_once( 'includes/class-wcj-cart.php' );
177
  $settings[] = include_once( 'includes/class-wcj-add-to-cart.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.7
7
  Author: Algoritmika Ltd
8
  Author URI: http://www.algoritmika.com
9
  Copyright: © 2014 Algoritmika Ltd.
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' );
175
+ $settings[] = include_once( 'includes/class-wcj-product-bulk-price-converter.php' );
176
 
177
  $settings[] = include_once( 'includes/class-wcj-cart.php' );
178
  $settings[] = include_once( 'includes/class-wcj-add-to-cart.php' );