Booster for WooCommerce - Version 1.1.5

Version Description

  • 11/08/2014 =
  • Dev - PDF Invoices - "Save as..." disabled.
  • Feature Upgraded - PDF Invoices - New fields added: line total excluding tax, subtotal, shipping, discount, taxes.
Download this release

Release Info

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

Code changes from version 1.1.3 to 1.1.5

includes/class-wcj-pdf-invoices.php CHANGED
@@ -95,8 +95,8 @@ class WCJ_PDF_Invoices {
95
  //$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 001', PDF_HEADER_STRING, array(0,64,255), array(0,64,128));
96
  //$pdf->SetHeaderData( get_option( 'wcj_pdf_invoices_seller_logo_url' ), 30, get_option( 'wcj_pdf_invoices_header_title' ), get_option( 'wcj_pdf_invoices_header_string' ), array(0,64,255), array(0,64,128));
97
  $pdf->SetPrintHeader(false);
98
- //$pdf->setFooterData(array(0,64,0), array(0,64,128));
99
- $pdf->SetPrintFooter(false);
100
 
101
  // set header and footer fonts
102
  $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
@@ -133,7 +133,7 @@ class WCJ_PDF_Invoices {
133
  // dejavusans is a UTF-8 Unicode font, if you only need to
134
  // print standard ASCII chars, you can use core fonts like
135
  // helvetica or times to reduce file size.
136
- $pdf->SetFont('dejavusans', '', 14, '', true);
137
 
138
  // Add a page
139
  // This method has several options, check the source code documentation for more information.
@@ -150,6 +150,7 @@ class WCJ_PDF_Invoices {
150
 
151
  //$html .= print_r( $the_order , true );
152
 
 
153
  if ( get_option( 'wcj_pdf_invoices_seller_logo_url' ) !== '' )
154
  //$html .= get_option( 'wcj_pdf_invoices_seller_logo_url' );
155
  $html .= '<p><img src="' . get_option( 'wcj_pdf_invoices_seller_logo_url' ) . '"><div style="text-align:right;color:gray;font-weight:bold;">' . get_option( 'wcj_pdf_invoices_header_text' ) . '</div></p>';
@@ -158,11 +159,13 @@ class WCJ_PDF_Invoices {
158
 
159
  $order_number = $the_order->get_order_number();
160
 
 
161
  $html .= '<table><tbody>';
162
  $html .= '<tr><td>' . get_option( 'wcj_pdf_invoices_invoice_number_text' ) . '</td><td>' . $order_number . '</td></tr>';
163
  $html .= '<tr><td>' . get_option( 'wcj_pdf_invoices_invoice_date_text' ) . '</td><td>' . date( get_option('date_format') , strtotime( $the_order->order_date ) ) . '</td></tr>';
164
  $html .= '</tbody></table>';
165
 
 
166
  $html .= '<p><table><tbody>';
167
  $html .= '<tr><td>';
168
  $html .= '<h2>' . get_option( 'wcj_pdf_invoices_seller_text' ) . '</h2>';
@@ -172,22 +175,35 @@ class WCJ_PDF_Invoices {
172
  $html .= $the_order->get_formatted_billing_address();
173
  $html .= '</td></tr></tbody></table></p>';
174
 
 
175
  $html .= '<h2>' . get_option( 'wcj_pdf_invoices_items_text' ) . '</h2>';
176
  $html .= '<table class="custom_table"><tbody>';
177
- $html .= '<tr>
178
- <th style="width:10%;">' . get_option( 'wcj_pdf_invoices_column_nr_text' ) . '</th>
179
- <th style="width:55%;">' . get_option( 'wcj_pdf_invoices_column_item_name_text' ) . '</th>
180
- <th style="width:15%;">' . get_option( 'wcj_pdf_invoices_column_qty_text' ) . '</th>
181
- <th style="width:20%;">' . get_option( 'wcj_pdf_invoices_column_price_text' ) . '</th>
182
- </tr>';
 
 
 
 
 
 
 
 
183
  $item_counter = 0;
184
  foreach ( $the_items as $item ) {
 
 
185
 
186
  $item_counter++;
187
 
188
  //$html .= '<li>';
189
  $html .= '<tr>';
190
 
 
 
191
  $html .= '<td>' . $item_counter . '</td>';
192
 
193
  $html .= '<td>' . $item['name'];
@@ -209,15 +225,47 @@ class WCJ_PDF_Invoices {
209
  $html .= '</td>';
210
 
211
  $html .= '<td>' . $item['qty'] . '</td>';
212
- $html .= '<td>' . $the_order->get_formatted_line_subtotal( $item ) . '</td>';
 
 
 
213
  //$html .= '</li>';
214
  $html .= '</tr>';
215
  }
216
  //$html .= '</ol>';
217
  $html .= '</tbody></table>';
218
 
 
 
219
  //$html .= '<h3>Order total: ' . $the_order->get_formatted_order_total() . '</h3>';
220
- $html .= '<p><table style="font-size: smaller; padding: 10px; width: 100%;"><tbody><tr><td colspan="3"></td><td style="border: 1px solid #F0F0F0;">' . get_option( 'wcj_pdf_invoices_order_total_text' ) . '</td><td style="border: 1px solid #F0F0F0;">' . $the_order->get_formatted_order_total() . '</td></tr></tbody></table></p>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
 
222
  //$html .= print_r($the_order , true );
223
 
@@ -248,11 +296,11 @@ class WCJ_PDF_Invoices {
248
  'action' => "view pdf_invoice"
249
  );
250
 
251
- $actions['save_pdf_invoice'] = array(
252
  'url' => basename( $_SERVER['REQUEST_URI'] ) . '&pdf_invoice=' . $the_order->id . '&save_pdf_invoice=1',
253
  'name' => __( 'Save PDF', 'woocommerce-jetpack' ),
254
  'action' => "view save_pdf_invoice"
255
- );
256
 
257
  return $actions;
258
  }
@@ -387,14 +435,50 @@ class WCJ_PDF_Invoices {
387
  ),
388
 
389
  array(
390
- 'title' => __( 'Column - Price Text', 'woocommerce-jetpack' ),
 
 
 
 
 
 
 
 
 
391
  'desc_tip' => __( 'Price text', 'woocommerce-jetpack' ),
392
  'id' => 'wcj_pdf_invoices_column_price_text',
393
- 'default' => __( 'Price', 'woocommerce-jetpack' ),
 
 
 
 
 
 
 
 
 
394
  'type' => 'text',
395
  'css' => 'width:33%;min-width:300px;',
396
  ),
397
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
398
  array(
399
  'title' => __( 'Order Total Text', 'woocommerce-jetpack' ),
400
  'desc_tip' => __( 'Order Total text', 'woocommerce-jetpack' ),
95
  //$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 001', PDF_HEADER_STRING, array(0,64,255), array(0,64,128));
96
  //$pdf->SetHeaderData( get_option( 'wcj_pdf_invoices_seller_logo_url' ), 30, get_option( 'wcj_pdf_invoices_header_title' ), get_option( 'wcj_pdf_invoices_header_string' ), array(0,64,255), array(0,64,128));
97
  $pdf->SetPrintHeader(false);
98
+ $pdf->setFooterData(array(0,64,0), array(0,64,128));
99
+ //$pdf->SetPrintFooter(false);
100
 
101
  // set header and footer fonts
102
  $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
133
  // dejavusans is a UTF-8 Unicode font, if you only need to
134
  // print standard ASCII chars, you can use core fonts like
135
  // helvetica or times to reduce file size.
136
+ $pdf->SetFont('dejavusans', '', 12, '', true);
137
 
138
  // Add a page
139
  // This method has several options, check the source code documentation for more information.
150
 
151
  //$html .= print_r( $the_order , true );
152
 
153
+ // HEADER TEXT (AND IF SET - LOGO) //
154
  if ( get_option( 'wcj_pdf_invoices_seller_logo_url' ) !== '' )
155
  //$html .= get_option( 'wcj_pdf_invoices_seller_logo_url' );
156
  $html .= '<p><img src="' . get_option( 'wcj_pdf_invoices_seller_logo_url' ) . '"><div style="text-align:right;color:gray;font-weight:bold;">' . get_option( 'wcj_pdf_invoices_header_text' ) . '</div></p>';
159
 
160
  $order_number = $the_order->get_order_number();
161
 
162
+ // NUMBER AND DATE //
163
  $html .= '<table><tbody>';
164
  $html .= '<tr><td>' . get_option( 'wcj_pdf_invoices_invoice_number_text' ) . '</td><td>' . $order_number . '</td></tr>';
165
  $html .= '<tr><td>' . get_option( 'wcj_pdf_invoices_invoice_date_text' ) . '</td><td>' . date( get_option('date_format') , strtotime( $the_order->order_date ) ) . '</td></tr>';
166
  $html .= '</tbody></table>';
167
 
168
+ // SELLER AND BUYER INFO //
169
  $html .= '<p><table><tbody>';
170
  $html .= '<tr><td>';
171
  $html .= '<h2>' . get_option( 'wcj_pdf_invoices_seller_text' ) . '</h2>';
175
  $html .= $the_order->get_formatted_billing_address();
176
  $html .= '</td></tr></tbody></table></p>';
177
 
178
+ // ITEMS //
179
  $html .= '<h2>' . get_option( 'wcj_pdf_invoices_items_text' ) . '</h2>';
180
  $html .= '<table class="custom_table"><tbody>';
181
+ $html .= '<tr>';
182
+ $html .= '<th style="width:10%;">' . get_option( 'wcj_pdf_invoices_column_nr_text' ) . '</th>';
183
+ //if ( 0 != $the_order->get_line_tax( $item ) )
184
+ if ( $the_order->get_total_tax() != 0 )
185
+ $html .= '<th style="width:50%;">' . get_option( 'wcj_pdf_invoices_column_item_name_text' ) . '</th>';
186
+ else
187
+ $html .= '<th style="width:65%;">' . get_option( 'wcj_pdf_invoices_column_item_name_text' ) . '</th>';
188
+ $html .= '<th style="width:10%;">' . get_option( 'wcj_pdf_invoices_column_qty_text' ) . '</th>';
189
+ //if ( 0 !== $the_order->get_line_tax( $item ) )
190
+ //if ( $the_order->get_line_tax( $item ) != 0 )
191
+ if ( $the_order->get_total_tax() != 0 )
192
+ $html .= '<th style="width:15%;">' . get_option( 'wcj_pdf_invoices_column_price_tax_excl_text' ) . '</th>';
193
+ $html .= '<th style="width:15%;">' . get_option( 'wcj_pdf_invoices_column_price_text' ) . '</th>';
194
+ $html .= '</tr>';
195
  $item_counter = 0;
196
  foreach ( $the_items as $item ) {
197
+
198
+
199
 
200
  $item_counter++;
201
 
202
  //$html .= '<li>';
203
  $html .= '<tr>';
204
 
205
+ //$html .= '<td>' . $the_order->get_line_tax( $item ) . '</td>';
206
+
207
  $html .= '<td>' . $item_counter . '</td>';
208
 
209
  $html .= '<td>' . $item['name'];
225
  $html .= '</td>';
226
 
227
  $html .= '<td>' . $item['qty'] . '</td>';
228
+ //if ( '' !== $the_order->get_formatted_line_subtotal( $item, 'excl' ) ) $html .= '<td>' . $the_order->get_formatted_line_subtotal( $item, 'excl' ) . '</td>';
229
+ if ( $the_order->get_line_tax( $item ) != 0 )
230
+ $html .= '<td>' . wc_price( $the_order->get_line_subtotal( $item ), array( 'currency' => $the_order->get_order_currency() ) ) . '</td>';
231
+ $html .= '<td>' . $the_order->get_formatted_line_subtotal( $item, 'incl' ) . '</td>';
232
  //$html .= '</li>';
233
  $html .= '</tr>';
234
  }
235
  //$html .= '</ol>';
236
  $html .= '</tbody></table>';
237
 
238
+
239
+ // ORDER TOTALS //
240
  //$html .= '<h3>Order total: ' . $the_order->get_formatted_order_total() . '</h3>';
241
+ $html .= '<p><table style="font-size: smaller; padding: 10px; width: 100%;"><tbody>';
242
+
243
+ // SUBTOTAL
244
+ //$html .= '<tr><td colspan="3"></td><td style="border: 1px solid #F0F0F0;">' . get_option( 'wcj_pdf_invoices_order_subtotal_text' ) . '</td><td style="border: 1px solid #F0F0F0;">' . $the_order->get_subtotal_to_display( false, 'excl' ) . '</td></tr>';
245
+ $subtotal = wc_price( ( $the_order->get_total() - $the_order->get_total_shipping() - $the_order->get_total_tax() ), array( 'currency' => $the_order->get_order_currency() ) ); //$the_order->get_total_discount() $the_order->get_total_shipping()
246
+ $html .= '<tr><td colspan="3"></td><td style="border: 1px solid #F0F0F0;">' . get_option( 'wcj_pdf_invoices_order_subtotal_text' ) . '</td><td style="border: 1px solid #F0F0F0;">' . $subtotal . '</td></tr>';
247
+
248
+ // SHIPPING
249
+ if ( $the_order->get_total_shipping() != 0 )
250
+ $html .= '<tr><td colspan="3"></td><td style="border: 1px solid #F0F0F0;">' . get_option( 'wcj_pdf_invoices_order_shipping_text' ) . '</td><td style="border: 1px solid #F0F0F0;">' . wc_price( $the_order->get_total_shipping(), array( 'currency' => $the_order->get_order_currency() ) ) . '</td></tr>';
251
+
252
+ // DISCOUNT
253
+ if ( $the_order->get_total_discount() != 0 )
254
+ $html .= '<tr><td colspan="3"></td><td style="border: 1px solid #F0F0F0;">' . get_option( 'wcj_pdf_invoices_order_discount_text' ) . '</td><td style="border: 1px solid #F0F0F0;">' . wc_price( $the_order->get_total_discount(), array( 'currency' => $the_order->get_order_currency() ) ) . '</td></tr>';
255
+ //
256
+
257
+ // TAXES
258
+ foreach ( $the_order->get_tax_totals() as $tax_object )
259
+ $html .= '<tr><td colspan="3"></td><td style="border: 1px solid #F0F0F0;">' . $tax_object->label . '</td><td style="border: 1px solid #F0F0F0;">' . $tax_object->formatted_amount . '</td></tr>';
260
+
261
+ // TOTAL
262
+ $html .= '<tr><td colspan="3"></td><td style="border: 1px solid #F0F0F0;">' . get_option( 'wcj_pdf_invoices_order_total_text' ) . '</td><td style="border: 1px solid #F0F0F0;">' . $the_order->get_formatted_order_total() . '</td></tr>';
263
+
264
+ $html .= '</tbody></table></p>';
265
+
266
+ // $html .= '<p>' . get_option( 'wcj_pdf_invoices_order_shipping_text' ) . ': ' . $the_order->get_shipping_to_display( 'incl' ) . '</p>';
267
+
268
+ // $html .= '<p>' . wc_price( $the_order->get_total_shipping(), array( 'currency' => $the_order->get_order_currency() ) ) . '</p>';
269
 
270
  //$html .= print_r($the_order , true );
271
 
296
  'action' => "view pdf_invoice"
297
  );
298
 
299
+ /*$actions['save_pdf_invoice'] = array(
300
  'url' => basename( $_SERVER['REQUEST_URI'] ) . '&pdf_invoice=' . $the_order->id . '&save_pdf_invoice=1',
301
  'name' => __( 'Save PDF', 'woocommerce-jetpack' ),
302
  'action' => "view save_pdf_invoice"
303
+ );*/
304
 
305
  return $actions;
306
  }
435
  ),
436
 
437
  array(
438
+ 'title' => __( 'Column - Sum (TAX excl.) Text', 'woocommerce-jetpack' ),
439
+ 'desc_tip' => __( 'Price text', 'woocommerce-jetpack' ),
440
+ 'id' => 'wcj_pdf_invoices_column_price_tax_excl_text',
441
+ 'default' => __( 'Price (TAX excl.)', 'woocommerce-jetpack' ),
442
+ 'type' => 'text',
443
+ 'css' => 'width:33%;min-width:300px;',
444
+ ),
445
+
446
+ array(
447
+ 'title' => __( 'Column - Sum (TAX incl.) Text', 'woocommerce-jetpack' ),
448
  'desc_tip' => __( 'Price text', 'woocommerce-jetpack' ),
449
  'id' => 'wcj_pdf_invoices_column_price_text',
450
+ 'default' => __( 'Price (TAX incl.)', 'woocommerce-jetpack' ),
451
+ 'type' => 'text',
452
+ 'css' => 'width:33%;min-width:300px;',
453
+ ),
454
+
455
+ array(
456
+ 'title' => __( 'Order Subtotal Text', 'woocommerce-jetpack' ),
457
+ 'desc_tip' => __( 'Order Subtotal text', 'woocommerce-jetpack' ),
458
+ 'id' => 'wcj_pdf_invoices_order_subtotal_text',
459
+ 'default' => __( 'Order Subtotal', 'woocommerce-jetpack' ),
460
  'type' => 'text',
461
  'css' => 'width:33%;min-width:300px;',
462
  ),
463
 
464
+ array(
465
+ 'title' => __( 'Order Shipping Text', 'woocommerce-jetpack' ),
466
+ 'desc_tip' => __( 'Order Shipping text', 'woocommerce-jetpack' ),
467
+ 'id' => 'wcj_pdf_invoices_order_shipping_text',
468
+ 'default' => __( 'Shipping', 'woocommerce-jetpack' ),
469
+ 'type' => 'text',
470
+ 'css' => 'width:33%;min-width:300px;',
471
+ ),
472
+
473
+ array(
474
+ 'title' => __( 'Total Discount Text', 'woocommerce-jetpack' ),
475
+ 'desc_tip' => __( 'Total Discount text', 'woocommerce-jetpack' ),
476
+ 'id' => 'wcj_pdf_invoices_order_discount_text',
477
+ 'default' => __( 'Discount', 'woocommerce-jetpack' ),
478
+ 'type' => 'text',
479
+ 'css' => 'width:33%;min-width:300px;',
480
+ ),
481
+
482
  array(
483
  'title' => __( 'Order Total Text', 'woocommerce-jetpack' ),
484
  'desc_tip' => __( 'Order Total text', 'woocommerce-jetpack' ),
includes/class-wcj-product-info.php CHANGED
@@ -24,8 +24,12 @@ class WCJ_Product_Info {
24
  // Main hooks
25
  if ( 'yes' == get_option( 'wcj_product_info_enabled' ) ) {
26
 
27
- add_filter( 'woocommerce_product_tabs', array( $this, 'customize_product_tabs' ), 98 );
28
- add_filter( 'woocommerce_related_products_args', array( $this, 'related_products_limit' ), 100 );
 
 
 
 
29
  }
30
 
31
  // Settings hooks
@@ -48,15 +52,24 @@ class WCJ_Product_Info {
48
  /**
49
  * Change number of related products on product page.
50
  */
51
- function related_products_limit( $args ) {
 
 
 
 
 
 
 
52
 
53
- if ( get_option( 'wcj_product_info_related_products_enable' ) == 'yes' ) {
54
-
55
- $args['posts_per_page'] = get_option( 'wcj_product_info_related_products_num' );
56
- $args['orderby'] = get_option( 'wcj_product_info_related_products_orderby' );
57
- if ( get_option( 'wcj_product_info_related_products_orderby' ) != 'rand' ) $args['order'] = get_option( 'wcj_product_info_related_products_order' );
58
- }
59
-
 
 
60
  return $args;
61
  }
62
 
@@ -214,6 +227,13 @@ class WCJ_Product_Info {
214
  'type' => 'number',
215
  ),
216
 
 
 
 
 
 
 
 
217
  array(
218
  'title' => __( 'Order by', 'woocommerce-jetpack' ),
219
  'id' => 'wcj_product_info_related_products_orderby',
24
  // Main hooks
25
  if ( 'yes' == get_option( 'wcj_product_info_enabled' ) ) {
26
 
27
+ add_filter( 'woocommerce_product_tabs', array( $this, 'customize_product_tabs' ), 98 );
28
+
29
+ if ( get_option( 'wcj_product_info_related_products_enable' ) == 'yes' ) {
30
+ add_filter( 'woocommerce_related_products_args', array( $this, 'related_products_limit' ), 100 );
31
+ add_filter( 'woocommerce_output_related_products_args', array( $this, 'related_products_limit_args' ), 100 );
32
+ }
33
  }
34
 
35
  // Settings hooks
52
  /**
53
  * Change number of related products on product page.
54
  */
55
+ function related_products_limit_args( $args ) {
56
+
57
+ $args['posts_per_page'] = get_option( 'wcj_product_info_related_products_num' );
58
+ $args['orderby'] = get_option( 'wcj_product_info_related_products_orderby' );
59
+ $args['columns'] = get_option( 'wcj_product_info_related_products_columns' );
60
+
61
+ return $args;
62
+ }
63
 
64
+ /**
65
+ * Change number of related products on product page.
66
+ */
67
+ function related_products_limit( $args ) {
68
+
69
+ $args['posts_per_page'] = get_option( 'wcj_product_info_related_products_num' );
70
+ $args['orderby'] = get_option( 'wcj_product_info_related_products_orderby' );
71
+ if ( get_option( 'wcj_product_info_related_products_orderby' ) != 'rand' ) $args['order'] = get_option( 'wcj_product_info_related_products_order' );
72
+
73
  return $args;
74
  }
75
 
227
  'type' => 'number',
228
  ),
229
 
230
+ array(
231
+ 'title' => __( 'Related Products Columns', 'woocommerce-jetpack' ),
232
+ 'id' => 'wcj_product_info_related_products_columns',
233
+ 'default' => 3,
234
+ 'type' => 'number',
235
+ ),
236
+
237
  array(
238
  'title' => __( 'Order by', 'woocommerce-jetpack' ),
239
  'id' => 'wcj_product_info_related_products_orderby',
includes/class-wcj-shipping.php CHANGED
@@ -15,22 +15,16 @@ class WCJ_Shipping {
15
  /**
16
  * Constructor.
17
  */
18
- public function __construct() {
19
-
20
-
21
  if ( get_option( 'wcj_shipping_enabled' ) == 'yes' ) {
22
  // Include custom shipping method
23
- //include_once( 'shipping/class-wc-shipping-wcj-custom.php' );
24
-
25
-
26
  // Main hooks
27
  //add_filter( 'woocommerce_available_shipping_methods', array( $this, 'hide_all_shipping_when_free_is_available' ), 10, 1 );
28
- add_filter( 'woocommerce_package_rates', array( $this, 'hide_shipping_when_free_is_available' ), 10, 2 );
29
-
30
  // Settings
31
  add_filter( 'woocommerce_shipping_settings', array( $this, 'add_hide_shipping_if_free_available_fields' ), 100 );
32
- }
33
-
34
  // Settings hooks
35
  add_filter( 'wcj_settings_sections', array( $this, 'settings_section' ) );
36
  add_filter( 'wcj_settings_shipping', array( $this, 'get_settings' ), 100 );
@@ -199,7 +193,7 @@ class WCJ_Shipping {
199
  */
200
  function settings_section( $sections ) {
201
 
202
- $sections['shipping'] = 'Shipping';
203
 
204
  return $sections;
205
  }
15
  /**
16
  * Constructor.
17
  */
18
+ public function __construct() {
 
 
19
  if ( get_option( 'wcj_shipping_enabled' ) == 'yes' ) {
20
  // Include custom shipping method
21
+ //include_once( 'shipping/class-wc-shipping-wcj-custom.php' );
 
 
22
  // Main hooks
23
  //add_filter( 'woocommerce_available_shipping_methods', array( $this, 'hide_all_shipping_when_free_is_available' ), 10, 1 );
24
+ add_filter( 'woocommerce_package_rates', array( $this, 'hide_shipping_when_free_is_available' ), 10, 2 );
 
25
  // Settings
26
  add_filter( 'woocommerce_shipping_settings', array( $this, 'add_hide_shipping_if_free_available_fields' ), 100 );
27
+ }
 
28
  // Settings hooks
29
  add_filter( 'wcj_settings_sections', array( $this, 'settings_section' ) );
30
  add_filter( 'wcj_settings_shipping', array( $this, 'get_settings' ), 100 );
193
  */
194
  function settings_section( $sections ) {
195
 
196
+ $sections['shipping'] = __( 'Shipping', 'woocommerce-jetpack' );
197
 
198
  return $sections;
199
  }
includes/class-wcj-sorting.php CHANGED
@@ -29,7 +29,7 @@ class WCJ_Sorting {
29
  add_filter( 'woocommerce_get_catalog_ordering_args', array( $this, 'custom_woocommerce_get_catalog_ordering_args' ), 100 ); // Sorting
30
  add_filter( 'woocommerce_catalog_orderby', array( $this, 'custom_woocommerce_catalog_orderby' ), 100 ); // Front end
31
  add_filter( 'woocommerce_default_catalog_orderby_options', array( $this, 'custom_woocommerce_catalog_orderby' ), 100 ); // Back end (default sorting)
32
- if ( get_option( 'wcj_sorting_remove_all_enabled' ) )
33
  add_action( apply_filters( 'wcj_get_option_filter', 'wcj_empty_action', 'init' ), array( $this, 'remove_sorting' ), 100 ); // Remove sorting
34
 
35
  // Settings
@@ -202,9 +202,9 @@ class WCJ_Sorting {
202
  ),
203
 
204
  array(
205
- 'title' => __( 'Sort by Name - Asc', 'woocommerce-jetpack' ),
206
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
207
- 'desc_tip' => __( 'Check to enable.', 'woocommerce-jetpack' ),
208
  'id' => 'wcj_sorting_by_name_asc_enabled',
209
  'default' => 'yes',
210
  'type' => 'checkbox',
@@ -220,9 +220,9 @@ class WCJ_Sorting {
220
  ),
221
 
222
  array(
223
- 'title' => __( 'Sort by Name - Desc', 'woocommerce-jetpack' ),
224
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
225
- 'desc_tip' => __( 'Check to enable.', 'woocommerce-jetpack' ),
226
  'id' => 'wcj_sorting_by_name_desc_enabled',
227
  'default' => 'yes',
228
  'type' => 'checkbox',
@@ -238,9 +238,9 @@ class WCJ_Sorting {
238
  ),
239
 
240
  array(
241
- 'title' => __( 'Sort by SKU - Asc', 'woocommerce-jetpack' ),
242
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
243
- 'desc_tip' => __( 'Check to enable.', 'woocommerce-jetpack' ),
244
  'id' => 'wcj_sorting_by_sku_asc_enabled',
245
  'default' => 'yes',
246
  'type' => 'checkbox',
@@ -256,9 +256,9 @@ class WCJ_Sorting {
256
  ),
257
 
258
  array(
259
- 'title' => __( 'Sort by SKU - Desc', 'woocommerce-jetpack' ),
260
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
261
- 'desc_tip' => __( 'Check to enable.', 'woocommerce-jetpack' ),
262
  'id' => 'wcj_sorting_by_sku_desc_enabled',
263
  'default' => 'yes',
264
  'type' => 'checkbox',
29
  add_filter( 'woocommerce_get_catalog_ordering_args', array( $this, 'custom_woocommerce_get_catalog_ordering_args' ), 100 ); // Sorting
30
  add_filter( 'woocommerce_catalog_orderby', array( $this, 'custom_woocommerce_catalog_orderby' ), 100 ); // Front end
31
  add_filter( 'woocommerce_default_catalog_orderby_options', array( $this, 'custom_woocommerce_catalog_orderby' ), 100 ); // Back end (default sorting)
32
+ if ( get_option( 'wcj_sorting_remove_all_enabled' ) == 'yes' )
33
  add_action( apply_filters( 'wcj_get_option_filter', 'wcj_empty_action', 'init' ), array( $this, 'remove_sorting' ), 100 ); // Remove sorting
34
 
35
  // Settings
202
  ),
203
 
204
  array(
205
+ 'title' => __( '', 'woocommerce-jetpack' ),
206
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
207
+ //'desc_tip' => __( 'Check to enable.', 'woocommerce-jetpack' ),
208
  'id' => 'wcj_sorting_by_name_asc_enabled',
209
  'default' => 'yes',
210
  'type' => 'checkbox',
220
  ),
221
 
222
  array(
223
+ 'title' => __( '', 'woocommerce-jetpack' ),
224
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
225
+ //'desc_tip' => __( 'Check to enable.', 'woocommerce-jetpack' ),
226
  'id' => 'wcj_sorting_by_name_desc_enabled',
227
  'default' => 'yes',
228
  'type' => 'checkbox',
238
  ),
239
 
240
  array(
241
+ 'title' => __( '', 'woocommerce-jetpack' ),
242
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
243
+ //'desc_tip' => __( 'Check to enable.', 'woocommerce-jetpack' ),
244
  'id' => 'wcj_sorting_by_sku_asc_enabled',
245
  'default' => 'yes',
246
  'type' => 'checkbox',
256
  ),
257
 
258
  array(
259
+ 'title' => __( '', 'woocommerce-jetpack' ),
260
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
261
+ //'desc_tip' => __( 'Check to enable.', 'woocommerce-jetpack' ),
262
  'id' => 'wcj_sorting_by_sku_desc_enabled',
263
  'default' => 'yes',
264
  'type' => 'checkbox',
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,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
5
  Requires at least: 3.9.1
6
  Tested up to: 3.9.2
7
- Stable tag: 1.1.3
8
  License: GNU General Public License v3.0
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -17,7 +17,7 @@ WooCommerce Jetpack is a WordPress plugin that supercharges your site with aweso
17
  = Features =
18
 
19
  * Payment Gateways - Add and customize simple custom offline payment gateway. Change icons (images) for all default (COD - Cash on Delivery, Cheque, BACS, Mijireh Checkout, PayPal) WooCommerce payment gateways.
20
- * Orders - Set minimum order amount.
21
  * Checkout - Customize checkout fields: disable/enable fields, set required, change labels and/or placeholders.
22
  * Shipping - Hide shipping when free is available.
23
  * Emails - Add another email recipient(s) to all WooCommerce emails.
@@ -26,7 +26,6 @@ WooCommerce Jetpack is a WordPress plugin that supercharges your site with aweso
26
  * Custom Price Labels - Create any custom price label for any product.
27
  * Call for Price - Create any custom price label, like "Call for price", for all products with empty price.
28
  * Currencies - Add all world currencies, change currency symbol.
29
- * Order Numbers - Sequential order numbering, custom order number prefix and number width.
30
  * PDF Invoices - Add PDF invoices for store owners and for customers.
31
  * More Sorting Options - Add more sorting options or remove sorting at all (including WooCommerce default).
32
  * 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).
@@ -58,8 +57,16 @@ To unlock all WooCommerce Jetpack features, please install additional <a href="h
58
 
59
  == Changelog ==
60
 
 
 
 
 
 
 
 
 
61
  = 1.1.3 - 09/08/2014 =
62
- * Fix - "Warning: Invalid argument supplied for foreach() in..." bug fixed.
63
  * Feature Upgraded - Call for Price - different labels for single/archive/home.
64
 
65
  = 1.1.2 - 08/08/2014 =
@@ -79,22 +86,22 @@ To unlock all WooCommerce Jetpack features, please install additional <a href="h
79
  * Dev - Function wcj_get_option removed.
80
 
81
  = 1.1.0 - 24/07/2014 =
82
- * Dev - Orders Numbers feature moved to Orders feature.
83
  * Dev - PDF Invoices - Icons instead of text at orders list.
84
  * Fix - Currencies - Wrong readonly attribute for text field on WooCommerce > Settings > General, affecting Plus version, fixed.
85
- * Feature - Orders - Set minimum order amount.
86
  * Feature - Checkout - Customize checkout fields: disable/enable fields, set required, change labels and/or placeholders.
87
  * Feature - Shipping - Hide shipping when free is available.
88
  * Feature - Emails - Add another email recipient(s) to all WooCommerce emails.
89
  * Feature - Product Info - Customize single product tabs. Change related products number.
90
  * Feature - Cart - Add "Empty Cart" button to cart page, automatically add product to cart on visit.
91
  * Feature Upgraded - Add to Cart - Display "Product already in cart" instead of "Add to cart" button. Redirect add to cart button to any url (e.g. checkout page).
 
92
 
93
  = 1.0.6 - 15/07/2014 =
94
- * Feature - PDF Invoices.
95
 
96
  = 1.0.5 - 18/06/2014 =
97
- * Feature - Order Numbers.
98
 
99
  = 1.0.4 - 15/06/2014 =
100
  * Fix - Add to cart text - on archives now calling the right function.
@@ -109,6 +116,11 @@ To unlock all WooCommerce Jetpack features, please install additional <a href="h
109
  * Fix - Error with Custom Price Labels feature, affecting Plus version, fixed.
110
 
111
  = 1.0.0 - 13/06/2014 =
 
 
 
 
 
112
  * Initial Release.
113
 
114
  == Upgrade Notice ==
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,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
5
  Requires at least: 3.9.1
6
  Tested up to: 3.9.2
7
+ Stable tag: 1.1.5
8
  License: GNU General Public License v3.0
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
17
  = Features =
18
 
19
  * Payment Gateways - Add and customize simple custom offline payment gateway. Change icons (images) for all default (COD - Cash on Delivery, Cheque, BACS, Mijireh Checkout, PayPal) WooCommerce payment gateways.
20
+ * Orders - Sequential order numbering, custom order number prefix and number width. Set minimum order amount.
21
  * Checkout - Customize checkout fields: disable/enable fields, set required, change labels and/or placeholders.
22
  * Shipping - Hide shipping when free is available.
23
  * Emails - Add another email recipient(s) to all WooCommerce emails.
26
  * Custom Price Labels - Create any custom price label for any product.
27
  * Call for Price - Create any custom price label, like "Call for price", for all products with empty price.
28
  * Currencies - Add all world currencies, change currency symbol.
 
29
  * PDF Invoices - Add PDF invoices for store owners and for customers.
30
  * More Sorting Options - Add more sorting options or remove sorting at all (including WooCommerce default).
31
  * 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).
57
 
58
  == Changelog ==
59
 
60
+ = 1.1.5 - 11/08/2014 =
61
+ * Dev - PDF Invoices - "Save as..." disabled.
62
+ * Feature Upgraded - PDF Invoices - New fields added: line total excluding tax, subtotal, shipping, discount, taxes.
63
+
64
+ = 1.1.4 - 10/08/2014 =
65
+ * Fix - Sorting - "Remove all sorting" bug (always enabled), fixed (second time).
66
+ * Dev - Product Info - Related products: "columns" option added.
67
+
68
  = 1.1.3 - 09/08/2014 =
69
+ * Fix - "Warning: Invalid argument supplied for foreach() in..." bug fixed ("Payment Gateways" feature).
70
  * Feature Upgraded - Call for Price - different labels for single/archive/home.
71
 
72
  = 1.1.2 - 08/08/2014 =
86
  * Dev - Function wcj_get_option removed.
87
 
88
  = 1.1.0 - 24/07/2014 =
 
89
  * Dev - PDF Invoices - Icons instead of text at orders list.
90
  * Fix - Currencies - Wrong readonly attribute for text field on WooCommerce > Settings > General, affecting Plus version, fixed.
91
+ * Feature Upgraded - Orders - Set minimum order amount.
92
  * Feature - Checkout - Customize checkout fields: disable/enable fields, set required, change labels and/or placeholders.
93
  * Feature - Shipping - Hide shipping when free is available.
94
  * Feature - Emails - Add another email recipient(s) to all WooCommerce emails.
95
  * Feature - Product Info - Customize single product tabs. Change related products number.
96
  * Feature - Cart - Add "Empty Cart" button to cart page, automatically add product to cart on visit.
97
  * Feature Upgraded - Add to Cart - Display "Product already in cart" instead of "Add to cart" button. Redirect add to cart button to any url (e.g. checkout page).
98
+ * Dev - Feature "Orders Numbers" renamed to "Orders".
99
 
100
  = 1.0.6 - 15/07/2014 =
101
+ * Feature - PDF Invoices - PDF invoices for store owners and for customers.
102
 
103
  = 1.0.5 - 18/06/2014 =
104
+ * Feature - Order Numbers - Sequential order numbering, custom order number prefix and number width.
105
 
106
  = 1.0.4 - 15/06/2014 =
107
  * Fix - Add to cart text - on archives now calling the right function.
116
  * Fix - Error with Custom Price Labels feature, affecting Plus version, fixed.
117
 
118
  = 1.0.0 - 13/06/2014 =
119
+ * Feature - Custom Price Labels – Create any custom price label for any product.
120
+ * Feature - Call for Price – Create any custom price label, like "Call for price", for all products with empty price.
121
+ * Feature - Currencies – Add all world currencies, change currency symbol.
122
+ * Feature - More Sorting Options – Add more sorting options or remove sorting (including default) at all.
123
+ * Feature - Old Slugs – Remove old product slugs.
124
  * Initial Release.
125
 
126
  == Upgrade Notice ==
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: 1.1.3
7
  Author: Algoritmika Ltd
8
  Author URI: http://www.algoritmika.com
9
  Copyright: © 2014 Algoritmika Ltd.
3
  Plugin Name: WooCommerce Jetpack
4
  Plugin URI: http://woojetpack.com
5
  Description: Supercharge your WooCommerce site with these awesome powerful features.
6
+ Version: 1.1.5
7
  Author: Algoritmika Ltd
8
  Author URI: http://www.algoritmika.com
9
  Copyright: © 2014 Algoritmika Ltd.