WC Vendors - Version 1.9.0

Version Description

No Upgrade required at this time.

Download this release

Release Info

Developer digitalchild
Plugin Icon 128x128 WC Vendors
Version 1.9.0
Comparing to
See all releases

Code changes from version 1.8.9 to 1.9.0

changelog.txt CHANGED
@@ -1,5 +1,29 @@
1
  Changelog for WC Vendors
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  Version 1.8.9
4
 
5
  * Fixed: Commission Totals Report Inaccurate #267
1
  Changelog for WC Vendors
2
 
3
+ Version 1.9.0
4
+
5
+ * Added: Support for WooCommerce 2.6
6
+ * Added: Vendor roles filter wcvendors_vendor_roles
7
+ * Added: Product and Vendor id's to sold_by filters
8
+ * Added: Vendor Signup Filters #269
9
+ * Added: Notify Vendors Email - Add Product SKU, if set #263
10
+ * Added: New Option: Notify Vendors show Purchase Price or Commissions #253
11
+ * Added: Option to disable sold by #236
12
+ * Added: Initial sub order management code #196 thanks Spreeuw
13
+ * Fixed: Sold by meta removal
14
+ * Fixed: Sequential Orders Support Commissions table #270
15
+ * Fixed: Notify Vendors Email Customizer Not Working #240
16
+ * Fixed: Commissions Total Report a-z sorting #239
17
+ * Fixed: need to agree to terms for this to process correctly
18
+ * Fixed: save pending vendor for login screen
19
+ * Fixed: Notify Vendors Email in WC 2.5+ #265
20
+ * Fixed: Order table layout
21
+ * Fixed: Orders screen for vendors in admin #231
22
+ * Fixed: product management in WC 2.6
23
+ * Fixed: Duplicate application emails firing in free and pro
24
+ * Fixed: Commission display issue in notify vendor email
25
+ * Fixed: New ítem meta compatability with WC 2.5 and above
26
+
27
  Version 1.8.9
28
 
29
  * Fixed: Commission Totals Report Inaccurate #267
class-wc-vendors.php CHANGED
@@ -7,9 +7,9 @@
7
  * Author: WC Vendors
8
  * Author URI: https://www.wcvendors.com
9
  *
10
- * Version: 1.8.9
11
  * Requires at least: 4.0.0
12
- * Tested up to: 4.5.1
13
  *
14
  * Text Domain: wcvendors
15
  * Domain Path: /languages/
@@ -55,6 +55,9 @@ if ( wcv_is_woocommerce_activated() ) {
55
  if ( !defined( 'wcv_plugin_base' ) ) define( 'wcv_plugin_base', plugin_basename( __FILE__ ) );
56
  if ( !defined( 'wcv_plugin_dir_path' ) ) define( 'wcv_plugin_dir_path', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
57
 
 
 
 
58
  /**
59
  * Main Product Vendor class
60
  *
@@ -172,6 +175,8 @@ if ( wcv_is_woocommerce_activated() ) {
172
  require_once wcv_plugin_dir . 'classes/class-cron.php';
173
  require_once wcv_plugin_dir . 'classes/class-commission.php';
174
  require_once wcv_plugin_dir . 'classes/class-shipping.php';
 
 
175
  require_once wcv_plugin_dir . 'classes/front/class-vendor-cart.php';
176
  require_once wcv_plugin_dir . 'classes/front/dashboard/class-vendor-dashboard.php';
177
  require_once wcv_plugin_dir . 'classes/front/class-vendor-shop.php';
@@ -192,6 +197,7 @@ if ( wcv_is_woocommerce_activated() ) {
192
  include_once(WC()->plugin_path() . '/includes/admin/wc-meta-box-functions.php');
193
  }
194
 
 
195
  new WCV_Vendor_Shop;
196
  new WCV_Vendor_Cart;
197
  new WCV_Commission;
7
  * Author: WC Vendors
8
  * Author URI: https://www.wcvendors.com
9
  *
10
+ * Version: 1.9.0
11
  * Requires at least: 4.0.0
12
+ * Tested up to: 4.5.2
13
  *
14
  * Text Domain: wcvendors
15
  * Domain Path: /languages/
55
  if ( !defined( 'wcv_plugin_base' ) ) define( 'wcv_plugin_base', plugin_basename( __FILE__ ) );
56
  if ( !defined( 'wcv_plugin_dir_path' ) ) define( 'wcv_plugin_dir_path', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
57
 
58
+
59
+ define('WCV_VERSION', '1.9.0' );
60
+
61
  /**
62
  * Main Product Vendor class
63
  *
175
  require_once wcv_plugin_dir . 'classes/class-cron.php';
176
  require_once wcv_plugin_dir . 'classes/class-commission.php';
177
  require_once wcv_plugin_dir . 'classes/class-shipping.php';
178
+ require_once wcv_plugin_dir . 'classes/class-vendor-order.php';
179
+ require_once wcv_plugin_dir . 'classes/class-vendor-post-types.php';
180
  require_once wcv_plugin_dir . 'classes/front/class-vendor-cart.php';
181
  require_once wcv_plugin_dir . 'classes/front/dashboard/class-vendor-dashboard.php';
182
  require_once wcv_plugin_dir . 'classes/front/class-vendor-shop.php';
197
  include_once(WC()->plugin_path() . '/includes/admin/wc-meta-box-functions.php');
198
  }
199
 
200
+ new WCV_Vendors;
201
  new WCV_Vendor_Shop;
202
  new WCV_Vendor_Cart;
203
  new WCV_Commission;
classes/admin/class-admin-page.php CHANGED
@@ -208,7 +208,8 @@ class WCV_Admin_Page extends WP_List_Table
208
  $wcv_total_sales = get_post_meta( $product_id, 'total_sales', true );
209
  return '<a href="' . admin_url( 'post.php?post=' . $product_id . '&action=edit' ) . '">' . get_the_title( $item->product_id ) . '</a> (<span title="' . get_the_title( $item->product_id ) .' has sold ' . $wcv_total_sales . ' times total.">' . $wcv_total_sales . '</span>)';
210
  case 'order_id' :
211
- return '<a href="' . admin_url( 'post.php?post=' . $item->order_id . '&action=edit' ) . '">' . $item->order_id . '</a>';
 
212
  case 'status' :
213
  return $item->status;
214
  case 'time' :
208
  $wcv_total_sales = get_post_meta( $product_id, 'total_sales', true );
209
  return '<a href="' . admin_url( 'post.php?post=' . $product_id . '&action=edit' ) . '">' . get_the_title( $item->product_id ) . '</a> (<span title="' . get_the_title( $item->product_id ) .' has sold ' . $wcv_total_sales . ' times total.">' . $wcv_total_sales . '</span>)';
210
  case 'order_id' :
211
+ $order = new WC_Order( $item->order_id );
212
+ return '<a href="' . admin_url( 'post.php?post=' . $item->order_id . '&action=edit' ) . '">' . $order->get_order_number() . '</a>';
213
  case 'status' :
214
  return $item->status;
215
  case 'time' :
classes/admin/class-admin-reports.php CHANGED
@@ -417,9 +417,6 @@ class WCV_Admin_Reports
417
  $commission_status = !empty( $_POST[ 'commission_status' ] ) ? $_POST[ 'commission_status' ] : 'due';
418
  $date_sql = ( !empty( $_POST[ 'total_start_date' ] ) && !empty( $_POST[ 'total_end_date' ] ) ) ? " time BETWEEN '$total_start_date 00:00:00' AND '$total_end_date 23:59:59' AND" : "";
419
 
420
- error_log( $total_start_date );
421
- error_log( $total_end_date );
422
-
423
  $status_sql = " status='$commission_status'";
424
 
425
  $sql = "SELECT vendor_id, total_due, total_shipping, tax, status FROM {$wpdb->prefix}pv_commission WHERE";
@@ -539,13 +536,7 @@ class WCV_Admin_Reports
539
  }
540
 
541
  usort( $totals, function( $a, $b ) {
542
- if ($a['user_login'] < $b['user_login']) {
543
- return -1;
544
- } else if ($a['user_login'] > $b['user_login']) {
545
- return 1;
546
- } else {
547
- return 0;
548
- }
549
  });
550
 
551
  return $totals;
417
  $commission_status = !empty( $_POST[ 'commission_status' ] ) ? $_POST[ 'commission_status' ] : 'due';
418
  $date_sql = ( !empty( $_POST[ 'total_start_date' ] ) && !empty( $_POST[ 'total_end_date' ] ) ) ? " time BETWEEN '$total_start_date 00:00:00' AND '$total_end_date 23:59:59' AND" : "";
419
 
 
 
 
420
  $status_sql = " status='$commission_status'";
421
 
422
  $sql = "SELECT vendor_id, total_due, total_shipping, tax, status FROM {$wpdb->prefix}pv_commission WHERE";
536
  }
537
 
538
  usort( $totals, function( $a, $b ) {
539
+ return strcmp( strtolower( $a[ 'user_login' ] ), strtolower( $b[ 'user_login' ] ) );
 
 
 
 
 
 
540
  });
541
 
542
  return $totals;
classes/admin/class-admin-users.php CHANGED
@@ -48,6 +48,7 @@ class WCV_Admin_Users
48
  add_action( 'add_meta_boxes', array( $this, 'remove_meta_boxes' ), 99 );
49
  add_filter( 'product_type_selector', array( $this, 'filter_product_types' ), 99, 2 );
50
  add_filter( 'product_type_options', array( $this, 'filter_product_type_options' ), 99 );
 
51
 
52
  add_filter( 'woocommerce_duplicate_product_capability', array( $this, 'add_duplicate_capability' ) );
53
 
@@ -155,7 +156,6 @@ class WCV_Admin_Users
155
  return $menu;
156
  }
157
 
158
-
159
  /**
160
  *
161
  *
@@ -166,15 +166,11 @@ class WCV_Admin_Users
166
  */
167
  function filter_product_types( $types, $product_type )
168
  {
169
- $product_panel = (array) WC_Vendors::$pv_options->get_option( 'hide_product_panel' );
170
- $product_misc = (array) WC_Vendors::$pv_options->get_option( 'hide_product_misc' );
171
  $product_types = (array) WC_Vendors::$pv_options->get_option( 'hide_product_types' );
 
172
  $css = WC_Vendors::$pv_options->get_option( 'product_page_css' );
173
- $count = 0;
174
 
175
- foreach ( $product_panel as $key => $value ) {
176
- if ( $value ) $css .= sprintf( '.%s_tab{display:none !important;}', $key );
177
- }
178
 
179
  if ( !empty( $product_misc[ 'taxes' ] ) ) {
180
  $css .= '.form-field._tax_status_field, .form-field._tax_class_field{display:none !important;}';
@@ -186,14 +182,6 @@ class WCV_Admin_Users
186
  if ( $value ) $css .= sprintf( '._%s_field{display:none !important;}', $key );
187
  }
188
 
189
- foreach ( $product_types as $value ) {
190
- if ( !$value ) $count++;
191
- }
192
-
193
- if ( $count === 1 ) {
194
- $css .= '#product-type{display:none !important;}';
195
- }
196
-
197
  echo '<style>';
198
  echo $css;
199
  echo '</style>';
@@ -207,6 +195,27 @@ class WCV_Admin_Users
207
  return $types;
208
  }
209
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
 
211
  /**
212
  *
48
  add_action( 'add_meta_boxes', array( $this, 'remove_meta_boxes' ), 99 );
49
  add_filter( 'product_type_selector', array( $this, 'filter_product_types' ), 99, 2 );
50
  add_filter( 'product_type_options', array( $this, 'filter_product_type_options' ), 99 );
51
+ add_filter( 'woocommerce_product_data_tabs', array( $this, 'filter_product_data_tabs' ), 99, 2 );
52
 
53
  add_filter( 'woocommerce_duplicate_product_capability', array( $this, 'add_duplicate_capability' ) );
54
 
156
  return $menu;
157
  }
158
 
 
159
  /**
160
  *
161
  *
166
  */
167
  function filter_product_types( $types, $product_type )
168
  {
169
+
 
170
  $product_types = (array) WC_Vendors::$pv_options->get_option( 'hide_product_types' );
171
+ $product_misc = (array) WC_Vendors::$pv_options->get_option( 'hide_product_misc' );
172
  $css = WC_Vendors::$pv_options->get_option( 'product_page_css' );
 
173
 
 
 
 
174
 
175
  if ( !empty( $product_misc[ 'taxes' ] ) ) {
176
  $css .= '.form-field._tax_status_field, .form-field._tax_class_field{display:none !important;}';
182
  if ( $value ) $css .= sprintf( '._%s_field{display:none !important;}', $key );
183
  }
184
 
 
 
 
 
 
 
 
 
185
  echo '<style>';
186
  echo $css;
187
  echo '</style>';
195
  return $types;
196
  }
197
 
198
+ /**
199
+ * Filter the product meta tabs in wp-admin
200
+ * @since 1.9.0
201
+ */
202
+ function filter_product_data_tabs( $tabs ){
203
+
204
+ $product_panel = (array) WC_Vendors::$pv_options->get_option( 'hide_product_panel' );
205
+
206
+ if ( !$product_panel ) return $tabs;
207
+
208
+ foreach ( $tabs as $key => $value ){
209
+ if ( !empty( $product_panel[ $key ] ) ) {
210
+ unset( $tabs[ $key ] );
211
+ }
212
+
213
+ }
214
+
215
+ return $tabs;
216
+
217
+ } // filter_product_data_tabs()
218
+
219
 
220
  /**
221
  *
classes/admin/class-vendor-admin-dashboard.php CHANGED
@@ -428,23 +428,56 @@ class WCV_Vendor_Order_Page extends WP_List_Table
428
 
429
  $items = $order->get_items();
430
 
431
- foreach ($items as $key => $value) {
432
- if ( in_array($value['variation_id'], $valid_items) || in_array($value['product_id'], $valid_items)) {
433
- $valid[] = $value;
434
  }
435
  }
436
 
437
  $products = '';
438
 
439
- foreach ($valid as $key => $item) {
440
- $item_meta = new WC_Order_Item_Meta( $item[ 'item_meta' ] );
441
- // $item_meta = $item_meta->display( false, true );
442
- $item_meta = $item_meta->get_formatted( );
443
- $products .= '<strong>'. $item['qty'] . ' x ' . $item['name'] . '</strong><br />';
444
- foreach ($item_meta as $key => $meta) {
445
- // Remove the sold by meta key for display
446
- if (strtolower($key) != 'sold by' ) $products .= $meta[ 'label' ] .' : ' . $meta[ 'value' ]. '<br />';
 
 
 
 
 
 
 
 
 
 
 
 
 
447
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
448
  }
449
 
450
  $shippers = (array) get_post_meta( $order->id, 'wc_pv_shipped', true );
@@ -457,44 +490,44 @@ class WCV_Vendor_Order_Page extends WP_List_Table
457
 
458
  // Need to fix how form is submitted for adding comments if at all possible.
459
 
460
- if ( $this->can_view_comments) {
461
 
462
- $order_notes = $order->get_customer_order_notes();
463
-
464
- $comment_output .= '<a href="#TB_inline?width=600&height=550&inlineId=order-comment-window-'.$model_id.'" class="thickbox">';
465
- $comment_output .= sprintf( __( 'Comments (%s)', 'wcvendors' ), count( $order_notes ) );
466
- $comment_output .= '</a>';
467
- $comment_output .= '<div id="order-comment-window-'.$model_id.'" style="display:none;">';
468
- $comment_output .= '<h3>'.__('Comments to Customer', 'wcvendors' ). '</h3>';
469
-
470
- if ( !empty( $order_notes ) ) {
471
-
472
- foreach ($order_notes as $order_note) {
473
- $last_added = human_time_diff( strtotime( $order_note->comment_date_gmt ), current_time( 'timestamp', 1 ) );
474
- $comment_output .= '<p>';
475
- $comment_output .= $order_note->comment_content;
476
- $comment_output .= '<br />';
477
- $comment_output .= sprintf(__( 'added %s ago', 'wcvendors' ), $last_added );
478
- $comment_output .= '<br />';
479
- $comment_output .= '</p>';
480
- }
481
-
482
- } else {
483
- $comment_output .= '<p>'.__('No comments currently to customer.', 'wcvendors' ). '</p>';
484
- }
485
-
486
- if ( $this->can_add_comments ) {
487
- $comment_output .= wp_nonce_field( 'add-comment' );
488
- $comment_output .= '
489
- <textarea name="comment_text" style="width:97%"></textarea>
490
- <input type="hidden" name="order_id" value="'. $order->id .'">
491
- <input type="hidden" name="action" value="add_comment">
492
- <input class="btn btn-large btn-block" type="submit" name="submit_comment" value="'.__( 'Add comment', 'wcvendors' ).'">';
493
- }
494
-
495
- $comment_output .= '</div>';
496
-
497
- }
498
 
499
  $order_items = array();
500
  $order_items[ 'order_id' ] = $order->id;
428
 
429
  $items = $order->get_items();
430
 
431
+ foreach ( $items as $key => $item) {
432
+ if ( in_array( $item[ 'variation_id' ], $valid_items) || in_array( $item[ 'product_id' ], $valid_items ) ) {
433
+ $valid[ ] = $item;
434
  }
435
  }
436
 
437
  $products = '';
438
 
439
+ foreach ( $valid as $key => $item ) {
440
+
441
+ $products .= '<strong>'. $item['qty'] . ' x ' . $item['name'] . '</strong><br />';
442
+
443
+ if ( $metadata = $order->has_meta( $item['product_id'] ) ) {
444
+ echo '<table cellspacing="0" class="wcv_display_meta">';
445
+ foreach ( $metadata as $meta ) {
446
+
447
+ // Skip hidden core fields
448
+ if ( in_array( $meta['meta_key'], apply_filters( 'woocommerce_hidden_order_itemmeta', array(
449
+ '_qty',
450
+ '_tax_class',
451
+ '_product_id',
452
+ '_variation_id',
453
+ '_line_subtotal',
454
+ '_line_subtotal_tax',
455
+ '_line_total',
456
+ '_line_tax',
457
+ WC_Vendors::$pv_options->get_option( 'sold_by_label' ),
458
+ ) ) ) ) {
459
+ continue;
460
  }
461
+
462
+ // Skip serialised meta
463
+ if ( is_serialized( $meta['meta_value'] ) ) {
464
+ continue;
465
+ }
466
+
467
+ // Get attribute data
468
+ if ( taxonomy_exists( wc_sanitize_taxonomy_name( $meta['meta_key'] ) ) ) {
469
+ $term = get_term_by( 'slug', $meta['meta_value'], wc_sanitize_taxonomy_name( $meta['meta_key'] ) );
470
+ $meta['meta_key'] = wc_attribute_label( wc_sanitize_taxonomy_name( $meta['meta_key'] ) );
471
+ $meta['meta_value'] = isset( $term->name ) ? $term->name : $meta['meta_value'];
472
+ } else {
473
+ $meta['meta_key'] = apply_filters( 'woocommerce_attribute_label', wc_attribute_label( $meta['meta_key'], $_product ), $meta['meta_key'] );
474
+ }
475
+
476
+ echo '<tr><th>' . wp_kses_post( rawurldecode( $meta['meta_key'] ) ) . ':</th><td>' . wp_kses_post( wpautop( make_clickable( rawurldecode( $meta['meta_value'] ) ) ) ) . '</td></tr>';
477
+ }
478
+ echo '</table>';
479
+ }
480
+
481
  }
482
 
483
  $shippers = (array) get_post_meta( $order->id, 'wc_pv_shipped', true );
490
 
491
  // Need to fix how form is submitted for adding comments if at all possible.
492
 
493
+ // if ( $this->can_view_comments) {
494
 
495
+ // $order_notes = $order->get_customer_order_notes();
496
+
497
+ // $comment_output .= '<a href="#TB_inline?width=600&height=550&inlineId=order-comment-window-'.$model_id.'" class="thickbox">';
498
+ // $comment_output .= sprintf( __( 'Comments (%s)', 'wcvendors' ), count( $order_notes ) );
499
+ // $comment_output .= '</a>';
500
+ // $comment_output .= '<div id="order-comment-window-'.$model_id.'" style="display:none;">';
501
+ // $comment_output .= '<h3>'.__('Comments to Customer', 'wcvendors' ). '</h3>';
502
+
503
+ // if ( !empty( $order_notes ) ) {
504
+
505
+ // foreach ($order_notes as $order_note) {
506
+ // $last_added = human_time_diff( strtotime( $order_note->comment_date_gmt ), current_time( 'timestamp', 1 ) );
507
+ // $comment_output .= '<p>';
508
+ // $comment_output .= $order_note->comment_content;
509
+ // $comment_output .= '<br />';
510
+ // $comment_output .= sprintf(__( 'added %s ago', 'wcvendors' ), $last_added );
511
+ // $comment_output .= '<br />';
512
+ // $comment_output .= '</p>';
513
+ // }
514
+
515
+ // } else {
516
+ // $comment_output .= '<p>'.__('No comments currently to customer.', 'wcvendors' ). '</p>';
517
+ // }
518
+
519
+ // if ( $this->can_add_comments ) {
520
+ // $comment_output .= wp_nonce_field( 'add-comment' );
521
+ // $comment_output .= '
522
+ // <textarea name="comment_text" style="width:97%"></textarea>
523
+ // <input type="hidden" name="order_id" value="'. $order->id .'">
524
+ // <input type="hidden" name="action" value="add_comment">
525
+ // <input class="btn btn-large btn-block" type="submit" name="submit_comment" value="'.__( 'Add comment', 'wcvendors' ).'">';
526
+ // }
527
+
528
+ // $comment_output .= '</div>';
529
+
530
+ // }
531
 
532
  $order_items = array();
533
  $order_items[ 'order_id' ] = $order->id;
classes/admin/emails/class-emails.php CHANGED
@@ -88,7 +88,7 @@ class WCV_Emails
88
  ? sprintf( '<a href="%s">%s</a>', WCV_Vendors::get_vendor_shop_page( $product->post_author ), WCV_Vendors::get_vendor_sold_by( $product->post_author ) )
89
  : get_bloginfo( 'name' );
90
 
91
- $name .= '<small class="wcvendors_sold_by_in_email"><br />' . apply_filters('wcvendors_sold_by_in_email', $sold_by_label ). $sold_by . '</small><br />';
92
 
93
  return $name;
94
  }
88
  ? sprintf( '<a href="%s">%s</a>', WCV_Vendors::get_vendor_shop_page( $product->post_author ), WCV_Vendors::get_vendor_sold_by( $product->post_author ) )
89
  : get_bloginfo( 'name' );
90
 
91
+ $name .= '<small class="wcvendors_sold_by_in_email"><br />' . apply_filters('wcvendors_sold_by_in_email', $sold_by_label, $_product->id, $product->post_author ). $sold_by . '</small><br />';
92
 
93
  return $name;
94
  }
classes/admin/emails/class-wc-approve-vendor.php CHANGED
@@ -85,7 +85,7 @@ class WC_Email_Approve_Vendor extends WC_Email
85
  'status' => $this->status,
86
  'user' => $this->user,
87
  'email_heading' => $this->get_heading()
88
- ), 'woocommerce/emails', $this->template_base );
89
 
90
  return ob_get_clean();
91
  }
@@ -104,7 +104,7 @@ class WC_Email_Approve_Vendor extends WC_Email
104
  'status' => $this->status,
105
  'user' => $this->user,
106
  'email_heading' => $this->get_heading()
107
- ), 'woocommerce/emails', $this->template_base );
108
 
109
  return ob_get_clean();
110
  }
85
  'status' => $this->status,
86
  'user' => $this->user,
87
  'email_heading' => $this->get_heading()
88
+ ), 'woocommerce', $this->template_base );
89
 
90
  return ob_get_clean();
91
  }
104
  'status' => $this->status,
105
  'user' => $this->user,
106
  'email_heading' => $this->get_heading()
107
+ ), 'woocommerce', $this->template_base );
108
 
109
  return ob_get_clean();
110
  }
classes/admin/emails/class-wc-notify-admin.php CHANGED
@@ -95,7 +95,7 @@ class WC_Email_Notify_Admin extends WC_Email
95
  'vendor_name' => $this->vendor_name,
96
  'post_id' => $this->post_id,
97
  'email_heading' => $this->get_heading()
98
- ), 'woocommerce/emails', $this->template_base );
99
 
100
  return ob_get_clean();
101
  }
@@ -115,7 +115,7 @@ class WC_Email_Notify_Admin extends WC_Email
115
  'vendor_name' => $this->vendor_name,
116
  'post_id' => $this->post_id,
117
  'email_heading' => $this->get_heading()
118
- ), 'woocommerce/emails', $this->template_base );
119
 
120
  return ob_get_clean();
121
  }
95
  'vendor_name' => $this->vendor_name,
96
  'post_id' => $this->post_id,
97
  'email_heading' => $this->get_heading()
98
+ ), 'woocommerce', $this->template_base );
99
 
100
  return ob_get_clean();
101
  }
115
  'vendor_name' => $this->vendor_name,
116
  'post_id' => $this->post_id,
117
  'email_heading' => $this->get_heading()
118
+ ), 'woocommerce', $this->template_base );
119
 
120
  return ob_get_clean();
121
  }
classes/admin/emails/class-wc-notify-shipped.php CHANGED
@@ -126,7 +126,7 @@ class WC_Email_Notify_Shipped extends WC_Email
126
  wc_get_template( $this->template_html, array(
127
  'order' => $this->object,
128
  'email_heading' => $this->get_heading()
129
- ), 'woocommerce/emails', $this->template_base );
130
 
131
  return ob_get_clean();
132
  }
@@ -144,7 +144,7 @@ class WC_Email_Notify_Shipped extends WC_Email
144
  wc_get_template( $this->template_plain, array(
145
  'order' => $this->object,
146
  'email_heading' => $this->get_heading()
147
- ), 'woocommerce/emails', $this->template_base );
148
 
149
  return ob_get_clean();
150
  }
126
  wc_get_template( $this->template_html, array(
127
  'order' => $this->object,
128
  'email_heading' => $this->get_heading()
129
+ ), 'woocommerce', $this->template_base );
130
 
131
  return ob_get_clean();
132
  }
144
  wc_get_template( $this->template_plain, array(
145
  'order' => $this->object,
146
  'email_heading' => $this->get_heading()
147
+ ), 'woocommerce', $this->template_base );
148
 
149
  return ob_get_clean();
150
  }
classes/admin/emails/class-wc-notify-vendor.php CHANGED
@@ -33,16 +33,7 @@ class WC_Email_Notify_Vendor extends WC_Email
33
  $this->template_html = 'vendor-new-order.php';
34
  $this->template_plain = 'vendor-new-order.php';
35
  $this->template_base = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/templates/emails/';
36
-
37
- // #216 is broken. Code below is from that. The filter is probably the culprit.
38
- //$completed_statuses = apply_filters( 'wcvendors_completed_statuses', array( 'completed', 'processing' ) ); // #216
39
- //foreach ( $completed_statuses as $status ) {
40
- //add_action( 'woocommerce_order_status_pending_to_{$status}_notification', array( $this, 'trigger' ) );
41
- //add_action( 'woocommerce_order_status_failed_to_{$status}_notification', array( $this, 'trigger' ) );
42
- //add_action( 'woocommerce_order_status_on-hold_to_{$status}_notification', array( $this, 'trigger' ) );
43
- //}
44
- // end #216
45
-
46
  // Triggers for this email
47
  add_action( 'woocommerce_order_status_pending_to_processing_notification', array( $this, 'trigger' ) );
48
  add_action( 'woocommerce_order_status_pending_to_completed_notification', array( $this, 'trigger' ) );
@@ -50,11 +41,9 @@ class WC_Email_Notify_Vendor extends WC_Email
50
  add_action( 'woocommerce_order_status_failed_to_completed_notification', array( $this, 'trigger' ) );
51
  add_action( 'woocommerce_order_status_on-hold_to_processing_notification', array( $this, 'trigger' ) ); // Added in 1.8.4
52
  add_action( 'woocommerce_order_status_on-hold_to_completed_notification', array( $this, 'trigger' ) ); // Added in 1.8.4
53
- $this->recipient = get_option( 'admin_email' );
54
 
55
  // Call parent constuctor
56
  parent::__construct();
57
-
58
  }
59
 
60
 
@@ -89,13 +78,16 @@ class WC_Email_Notify_Vendor extends WC_Email
89
 
90
  add_filter( 'woocommerce_order_get_items', array( $this, 'check_items' ), 10, 2 );
91
  add_filter( 'woocommerce_get_order_item_totals', array( $this, 'check_order_totals' ), 10, 2 );
 
 
92
  foreach ( $vendors as $user_id => $user_email ) {
93
  $this->current_vendor = $user_id;
94
  $this->send( $user_email, $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
95
  }
96
  remove_filter( 'woocommerce_get_order_item_totals', array( $this, 'check_order_totals' ), 10, 2 );
97
  remove_filter( 'woocommerce_order_get_items', array( $this, 'check_items' ), 10, 2 );
98
-
 
99
  }
100
 
101
 
@@ -115,7 +107,7 @@ class WC_Email_Notify_Vendor extends WC_Email
115
  $return[ 'cart_subtotal' ][ 'label' ] = $commission_label;
116
 
117
  if ( WC_Vendors::$pv_options->get_option( 'give_tax' ) ) {
118
- $return['tax_subtotal'] = array( 'label' => '', 'value' => '');
119
  $return[ 'tax_subtotal']['label'] = apply_filters('wcv_notify_vendor_tax_label', __( 'Tax Subtotal:', 'wcvendors' ) ) ;
120
  }
121
 
@@ -134,7 +126,7 @@ class WC_Email_Notify_Vendor extends WC_Email
134
  }
135
  // Format tax price
136
  if ( WC_Vendors::$pv_options->get_option( 'give_tax' ) ) {
137
- $return[ 'tax_subtotal']['value'] = woocommerce_price( $return[ 'tax_subtotal']['value'] );
138
  }
139
 
140
  return $return;
@@ -180,6 +172,9 @@ class WC_Email_Notify_Vendor extends WC_Email
180
  */
181
  function check_items( $items, $order )
182
  {
 
 
 
183
  foreach ( $items as $key => $product ) {
184
 
185
  // If this is a line item
@@ -191,20 +186,23 @@ class WC_Email_Notify_Vendor extends WC_Email
191
  unset( $items[ $key ] );
192
  continue;
193
  } else {
194
- $commission_due = WCV_Commission::calculate_commission( $product[ 'line_subtotal' ], $product[ 'product_id' ], $order, $product[ 'qty' ] );
195
-
196
- $items[ $key ][ 'line_subtotal' ] = $commission_due;
197
- $items[ $key ][ 'line_total' ] = $commission_due;
198
- // Don't display tax if give tax is not enabled.
199
- // if ( !WC_Vendors::$pv_options->get_option( 'give_tax' ) ) {
200
- // unset($items[ $key ][ 'line_tax' ]) ;
201
- // }
 
 
 
 
 
202
  }
203
  }
204
 
205
  }
206
-
207
-
208
  return $items;
209
  }
210
 
@@ -221,7 +219,7 @@ class WC_Email_Notify_Vendor extends WC_Email
221
  wc_get_template( $this->template_html, array(
222
  'order' => $this->object,
223
  'email_heading' => $this->get_heading()
224
- ), 'woocommerce/emails', $this->template_base );
225
 
226
  return ob_get_clean();
227
  }
@@ -239,7 +237,7 @@ class WC_Email_Notify_Vendor extends WC_Email
239
  wc_get_template( $this->template_plain, array(
240
  'order' => $this->object,
241
  'email_heading' => $this->get_heading()
242
- ), 'woocommerce/emails', $this->template_base );
243
 
244
  return ob_get_clean();
245
  }
@@ -274,6 +272,12 @@ class WC_Email_Notify_Vendor extends WC_Email
274
  'placeholder' => '',
275
  'default' => ''
276
  ),
 
 
 
 
 
 
277
  'email_type' => array(
278
  'title' => __( 'Email type', 'wcvendors' ),
279
  'type' => 'select',
@@ -290,4 +294,32 @@ class WC_Email_Notify_Vendor extends WC_Email
290
  }
291
 
292
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
293
  }
33
  $this->template_html = 'vendor-new-order.php';
34
  $this->template_plain = 'vendor-new-order.php';
35
  $this->template_base = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/templates/emails/';
36
+
 
 
 
 
 
 
 
 
 
37
  // Triggers for this email
38
  add_action( 'woocommerce_order_status_pending_to_processing_notification', array( $this, 'trigger' ) );
39
  add_action( 'woocommerce_order_status_pending_to_completed_notification', array( $this, 'trigger' ) );
41
  add_action( 'woocommerce_order_status_failed_to_completed_notification', array( $this, 'trigger' ) );
42
  add_action( 'woocommerce_order_status_on-hold_to_processing_notification', array( $this, 'trigger' ) ); // Added in 1.8.4
43
  add_action( 'woocommerce_order_status_on-hold_to_completed_notification', array( $this, 'trigger' ) ); // Added in 1.8.4
 
44
 
45
  // Call parent constuctor
46
  parent::__construct();
 
47
  }
48
 
49
 
78
 
79
  add_filter( 'woocommerce_order_get_items', array( $this, 'check_items' ), 10, 2 );
80
  add_filter( 'woocommerce_get_order_item_totals', array( $this, 'check_order_totals' ), 10, 2 );
81
+ add_filter( 'woocommerce_order_formatted_line_subtotal', array( $this, 'check_order_formatted_line_subtotal' ), 10, 3 );
82
+ add_filter( 'woocommerce_order_subtotal_to_display', array( $this, 'check_order_subtotal_to_display'), 10, 3 );
83
  foreach ( $vendors as $user_id => $user_email ) {
84
  $this->current_vendor = $user_id;
85
  $this->send( $user_email, $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
86
  }
87
  remove_filter( 'woocommerce_get_order_item_totals', array( $this, 'check_order_totals' ), 10, 2 );
88
  remove_filter( 'woocommerce_order_get_items', array( $this, 'check_items' ), 10, 2 );
89
+ remove_filter( 'woocommerce_order_formatted_line_subtotal', array( $this, 'check_order_formatted_line_subtotal' ), 10, 3 );
90
+ remove_filter( 'woocommerce_order_subtotal_to_display', array( $this, 'check_order_subtotal_to_display'), 10, 3 );
91
  }
92
 
93
 
107
  $return[ 'cart_subtotal' ][ 'label' ] = $commission_label;
108
 
109
  if ( WC_Vendors::$pv_options->get_option( 'give_tax' ) ) {
110
+ $return[ 'tax_subtotal'] = array( 'label' => '', 'value' => '');
111
  $return[ 'tax_subtotal']['label'] = apply_filters('wcv_notify_vendor_tax_label', __( 'Tax Subtotal:', 'wcvendors' ) ) ;
112
  }
113
 
126
  }
127
  // Format tax price
128
  if ( WC_Vendors::$pv_options->get_option( 'give_tax' ) ) {
129
+ $return[ 'tax_subtotal']['value'] = woocommerce_price( $return[ 'tax_subtotal'] ['value'] );
130
  }
131
 
132
  return $return;
172
  */
173
  function check_items( $items, $order )
174
  {
175
+
176
+ $settings = get_option( 'woocommerce_vendor_new_order_settings' );
177
+
178
  foreach ( $items as $key => $product ) {
179
 
180
  // If this is a line item
186
  unset( $items[ $key ] );
187
  continue;
188
  } else {
189
+
190
+ // If display commission is ticked show this otherwise show the full price.
191
+ if ( 'yes' == $settings['commission_display'] ){
192
+ $commission_due = WCV_Commission::calculate_commission( $product[ 'line_subtotal' ], $product[ 'product_id' ], $order, $product[ 'qty' ] );
193
+
194
+ $items[ $key ][ 'line_subtotal' ] = $commission_due;
195
+ $items[ $key ][ 'line_total' ] = $commission_due;
196
+
197
+ // Don't display tax if give tax is not enabled.
198
+ if ( !WC_Vendors::$pv_options->get_option( 'give_tax' ) ) {
199
+ unset($items[ $key ][ 'line_tax' ]) ;
200
+ }
201
+ }
202
  }
203
  }
204
 
205
  }
 
 
206
  return $items;
207
  }
208
 
219
  wc_get_template( $this->template_html, array(
220
  'order' => $this->object,
221
  'email_heading' => $this->get_heading()
222
+ ), 'woocommerce', $this->template_base );
223
 
224
  return ob_get_clean();
225
  }
237
  wc_get_template( $this->template_plain, array(
238
  'order' => $this->object,
239
  'email_heading' => $this->get_heading()
240
+ ), 'woocommerce', $this->template_base );
241
 
242
  return ob_get_clean();
243
  }
272
  'placeholder' => '',
273
  'default' => ''
274
  ),
275
+ 'commission_display' => array(
276
+ 'title' => __( 'Product Totals', 'wcvendors' ),
277
+ 'type' => 'checkbox',
278
+ 'label' => __( 'Show the commission due/paid as the product totals instead of the product prices.', 'wcvendors' ),
279
+ 'default' => 'yes'
280
+ ),
281
  'email_type' => array(
282
  'title' => __( 'Email type', 'wcvendors' ),
283
  'type' => 'select',
294
  }
295
 
296
 
297
+ /**
298
+ * check the order line item sub total to ensure that the tax is shown correctly on the vendor emails
299
+ */
300
+ function check_order_formatted_line_subtotal( $subtotal, $item, $order ){
301
+
302
+ $subtotal = wc_price( $order->get_line_subtotal( $item ), array( 'currency' => $order->get_order_currency() ) );
303
+
304
+ return $subtotal;
305
+
306
+ } // check_order_formatted_line_subtotal()
307
+
308
+
309
+ function check_order_subtotal_to_display( $subtotal, $compound, $order ){
310
+
311
+ $new_subtotal = 0;
312
+
313
+ foreach ( $order->get_items() as $key => $product ) {
314
+
315
+ $new_subtotal += $product[ 'line_subtotal' ];
316
+
317
+ }
318
+
319
+ return woocommerce_price( $new_subtotal );
320
+
321
+
322
+ } // check_order_subtotal_to_display()
323
+
324
+
325
  }
classes/admin/settings/sf-options.php CHANGED
@@ -99,6 +99,15 @@ $options[ ] = array(
99
 
100
  );
101
 
 
 
 
 
 
 
 
 
 
102
  $options[ ] = array(
103
  'name' => __( 'Sold By Label', 'wcvendors' ),
104
  'desc' => __( 'The sold by label used on the site and emails.', 'wcvendors' ),
99
 
100
  );
101
 
102
+ $options[ ] = array(
103
+ 'name' => __( 'Sold By', 'wcvendors' ),
104
+ 'desc' => __( 'Enable sold by labels', 'wcvendors' ),
105
+ 'tip' => __( 'This will enable or disable the sold by labels.', 'wcvendors' ),
106
+ 'id' => 'sold_by',
107
+ 'type' => 'checkbox',
108
+ 'std' => true,
109
+ );
110
+
111
  $options[ ] = array(
112
  'name' => __( 'Sold By Label', 'wcvendors' ),
113
  'desc' => __( 'The sold by label used on the site and emails.', 'wcvendors' ),
classes/class-install.php CHANGED
@@ -21,9 +21,30 @@ class WCV_Install
21
 
22
  // Initial Install
23
  if ( version_compare( $db_version, '1.0', '<' ) ) {
 
24
  $this->install_wcvendor();
25
  WC_Vendors::$pv_options->update_option( 'db_version', '1.5.0' );
26
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
  }
29
 
@@ -163,7 +184,7 @@ class WCV_Install
163
  global $wpdb;
164
 
165
  $vendor_page_id = $this->create_page( 'vendor_dashboard', __( 'Vendor Dashboard', 'wcvendors' ), '[wcv_vendor_dashboard]' );
166
- $this->create_page( 'orders', __( 'Orders', 'wcvendors' ), '[wcv_orders]', $vendor_page_id );
167
  $this->create_page( 'shop_settings', __( 'Shop Settings', 'wcvendors' ), '[wcv_shop_settings]', $vendor_page_id );
168
  }
169
 
21
 
22
  // Initial Install
23
  if ( version_compare( $db_version, '1.0', '<' ) ) {
24
+
25
  $this->install_wcvendor();
26
  WC_Vendors::$pv_options->update_option( 'db_version', '1.5.0' );
27
+
28
+ } else if ( version_compare( $db_version, '1.9.0', '<' ) ) {
29
+
30
+ $orders_page = get_post( WC_Vendors::$pv_options->get_option( 'orders_page' ) );
31
+
32
+ // Only update the page slug for orders if it is called orders
33
+ if ( $orders_page->post_name === 'orders' ) {
34
+
35
+ wp_update_post(
36
+ array (
37
+ 'ID' => $orders_page->ID,
38
+ 'post_name' => 'product_orders'
39
+ )
40
+ );
41
+
42
+ WC_Vendors::$pv_options->update_option( 'db_version', '1.9.0' );
43
+ }
44
+
45
+
46
+
47
+ }
48
 
49
  }
50
 
184
  global $wpdb;
185
 
186
  $vendor_page_id = $this->create_page( 'vendor_dashboard', __( 'Vendor Dashboard', 'wcvendors' ), '[wcv_vendor_dashboard]' );
187
+ $this->create_page( 'product_orders', __( 'Orders', 'wcvendors' ), '[wcv_orders]', $vendor_page_id );
188
  $this->create_page( 'shop_settings', __( 'Shop Settings', 'wcvendors' ), '[wcv_shop_settings]', $vendor_page_id );
189
  }
190
 
classes/class-vendor-order.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Order vendor_order
4
+ *
5
+ * @class WC_Order_Vendor
6
+ */
7
+ class WC_Order_Vendor extends WC_Abstract_Order {
8
+
9
+ /** @public string Order type */
10
+ public $order_type = 'vendor_order';
11
+
12
+ /** @var string Date */
13
+ public $date;
14
+
15
+ /**
16
+ * Init/load the vendor_order object. Called from the constructor.
17
+ *
18
+ * @param string|int|object|WC_Order_Vendor $vendor_order Vendor Order to init
19
+ * @uses WP_POST
20
+ */
21
+ protected function init( $vendor_order ) {
22
+ if ( is_numeric( $vendor_order ) ) {
23
+ $this->id = absint( $vendor_order );
24
+ $this->post = get_post( $vendor_order );
25
+ $this->get_vendor_order( $this->id );
26
+ } elseif ( $vendor_order instanceof WC_Order_Vendor ) {
27
+ $this->id = absint( $vendor_order->id );
28
+ $this->post = $vendor_order->post;
29
+ $this->get_vendor_order( $this->id );
30
+ } elseif ( isset( $vendor_order->ID ) ) {
31
+ $this->id = absint( $vendor_order->ID );
32
+ $this->post = $vendor_order;
33
+ $this->get_vendor_order( $this->id );
34
+ }
35
+ }
36
+
37
+ /**
38
+ * Gets an vendor_order from the database
39
+ *
40
+ * @since 2.2
41
+ * @param int $id
42
+ * @return bool
43
+ */
44
+ public function get_vendor_order( $id = 0 ) {
45
+ if ( ! $id ) {
46
+ return false;
47
+ }
48
+
49
+ if ( $result = get_post( $id ) ) {
50
+ $this->populate( $result );
51
+
52
+ return true;
53
+ }
54
+
55
+ return false;
56
+ }
57
+
58
+ /**
59
+ * Populates a vendor_order from the loaded post data
60
+ *
61
+ * @param mixed $result
62
+ */
63
+ public function populate( $result ) {
64
+ // Standard post data
65
+ $this->id = $result->ID;
66
+ $this->date = $result->post_date;
67
+ $this->modified_date = $result->post_modified;
68
+ $this->reason = $result->post_excerpt;
69
+ }
70
+
71
+ }
classes/class-vendor-post-types.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Post Types
4
+ *
5
+ * Registers post types and taxonomies
6
+ *
7
+ * @class WCV_Post_types
8
+ */
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit;
12
+ }
13
+
14
+ /**
15
+ * WCV_Post_types Class
16
+ */
17
+ class WCV_Post_types {
18
+
19
+ /**
20
+ * Hook in methods.
21
+ */
22
+ public static function init() {
23
+ add_action( 'woocommerce_register_post_type', array( __CLASS__, 'register_shop_order_vendor' ) );
24
+ }
25
+
26
+ /**
27
+ * Register vendor order type
28
+ */
29
+ public static function register_shop_order_vendor() {
30
+ wc_register_order_type(
31
+ 'shop_order_vendor',
32
+ apply_filters( 'woocommerce_register_post_type_shop_order_vendor',
33
+ array(
34
+ 'label' => __( 'Vendor Orders', 'woocommerce' ),
35
+ 'capability_type' => 'shop_order',
36
+ 'public' => false,
37
+ 'hierarchical' => false,
38
+ 'supports' => false,
39
+ 'exclude_from_orders_screen' => false,
40
+ 'add_order_meta_boxes' => false,
41
+ 'exclude_from_order_count' => true,
42
+ 'exclude_from_order_views' => false,
43
+ 'exclude_from_order_reports' => false,
44
+ 'exclude_from_order_sales_reports' => true,
45
+ 'class_name' => 'WC_Order_Vendor'
46
+ )
47
+ )
48
+ );
49
+ }
50
+ }
51
+
52
+ WCV_Post_types::init();
classes/class-vendors.php CHANGED
@@ -6,11 +6,19 @@
6
  * @author Matt Gates <http://mgates.me>, WC Vendors <http://wcvendors.com>
7
  * @package WCVendors
8
  */
9
-
10
 
11
  class WCV_Vendors
12
  {
13
 
 
 
 
 
 
 
 
 
14
  /**
15
  * Retrieve all products for a vendor
16
  *
@@ -301,9 +309,15 @@ class WCV_Vendors
301
  public static function is_vendor( $user_id )
302
  {
303
  $user = get_userdata( $user_id );
 
 
304
 
305
  if (is_object($user)) {
306
- $is_vendor = is_array( $user->roles ) ? in_array( 'vendor', $user->roles ) : false;
 
 
 
 
307
  } else {
308
  $is_vendor = false;
309
  }
@@ -423,7 +437,7 @@ class WCV_Vendors
423
 
424
  return $vendor_id ? true : false;
425
 
426
- }
427
 
428
  /*
429
  * Is this a vendor single product page ?
@@ -433,7 +447,7 @@ class WCV_Vendors
433
  $vendor_product = WCV_Vendors::is_vendor_product( wcv_get_user_role($vendor_id) );
434
  return $vendor_product ? true : false;
435
 
436
- }
437
 
438
  public static function get_vendor_sold_by( $vendor_id ){
439
 
@@ -456,7 +470,198 @@ class WCV_Vendors
456
  break;
457
  }
458
 
459
- return $display_name;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
460
  }
461
 
462
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  * @author Matt Gates <http://mgates.me>, WC Vendors <http://wcvendors.com>
7
  * @package WCVendors
8
  */
9
+
10
 
11
  class WCV_Vendors
12
  {
13
 
14
+ /**
15
+ * Constructor
16
+ */
17
+ function __construct()
18
+ {
19
+ add_action( 'woocommerce_checkout_order_processed', array( __CLASS__, 'create_child_orders' ), 10, 1 );
20
+ }
21
+
22
  /**
23
  * Retrieve all products for a vendor
24
  *
309
  public static function is_vendor( $user_id )
310
  {
311
  $user = get_userdata( $user_id );
312
+
313
+ $vendor_roles = apply_filters( 'wcvendors_vendor_roles', array( 'vendor') );
314
 
315
  if (is_object($user)) {
316
+
317
+ foreach ($vendor_roles as $role ) {
318
+ $is_vendor = is_array( $user->roles ) ? in_array( $role , $user->roles ) : false;
319
+ }
320
+
321
  } else {
322
  $is_vendor = false;
323
  }
437
 
438
  return $vendor_id ? true : false;
439
 
440
+ } // is_vendor_page()
441
 
442
  /*
443
  * Is this a vendor single product page ?
447
  $vendor_product = WCV_Vendors::is_vendor_product( wcv_get_user_role($vendor_id) );
448
  return $vendor_product ? true : false;
449
 
450
+ } // is_vendor_product_page()
451
 
452
  public static function get_vendor_sold_by( $vendor_id ){
453
 
470
  break;
471
  }
472
 
473
+ return $display_name;
474
+
475
+ } // get_vendor_sold_by()
476
+
477
+ /**
478
+ * Split order into vendor orders (when applicable) after checkout
479
+ *
480
+ * @since
481
+ * @param int $order_id
482
+ * @return void
483
+ */
484
+ public static function create_child_orders ( $order_id ) {
485
+ $order = wc_get_order( $order_id );
486
+ $items = $order->get_items();
487
+ $vendor_items = array();
488
+
489
+ foreach ($items as $item_id => $item) {
490
+ if ( isset($item['product_id']) && $item['product_id'] !== 0 ) {
491
+ // check if product is from vendor
492
+ $product_author = get_post_field( 'post_author', $item['product_id'] );
493
+ if (WCV_Vendors::is_vendor( $product_author ) ) {
494
+ $vendor_items[ $product_author ][ $item_id ] = array (
495
+ 'item_id' => $item_id,
496
+ 'qty' => $item['qty'],
497
+ 'total' => $item['line_total'],
498
+ 'subtotal' => $item['line_subtotal'],
499
+ 'tax' => $item['line_tax'],
500
+ 'subtotal_tax' => $item['line_subtotal_tax'],
501
+ 'tax_data' => maybe_unserialize( $item['line_tax_data'] ),
502
+ 'commission' => WCV_Commission::calculate_commission( $item['line_subtotal'], $item['product_id'], $order ),
503
+ );
504
+ }
505
+ }
506
+ }
507
+
508
+ foreach ($vendor_items as $vendor_id => $items) {
509
+ if (!empty($items)) {
510
+ $vendor_order = WCV_Vendors::create_vendor_order( array(
511
+ 'order_id' => $order_id,
512
+ 'vendor_id' => $vendor_id,
513
+ 'line_items' => $items
514
+ ) );
515
+ }
516
+ }
517
  }
518
 
519
+ /**
520
+ * Create a new vendor order programmatically
521
+ *
522
+ * Returns a new vendor_order object on success which can then be used to add additional data.
523
+ *
524
+ * @since
525
+ * @param array $args
526
+ * @return WC_Order_Vendor|WP_Error
527
+ */
528
+ public static function create_vendor_order( $args = array() ) {
529
+ $default_args = array(
530
+ 'vendor_id' => null,
531
+ 'order_id' => 0,
532
+ 'vendor_order_id' => 0,
533
+ 'line_items' => array(),
534
+ 'date' => current_time( 'mysql', 0 )
535
+ );
536
+
537
+ $args = wp_parse_args( $args, $default_args );
538
+ $vendor_order_data = array();
539
+
540
+ if ( $args['vendor_order_id'] > 0 ) {
541
+ $updating = true;
542
+ $vendor_order_data['ID'] = $args['vendor_order_id'];
543
+ } else {
544
+ $updating = false;
545
+ $vendor_order_data['post_type'] = 'shop_order_vendor';
546
+ $vendor_order_data['post_status'] = 'wc-completed';
547
+ $vendor_order_data['ping_status'] = 'closed';
548
+ $vendor_order_data['post_author'] = get_current_user_id();
549
+ $vendor_order_data['post_password'] = uniqid( 'vendor_' ); // password = 20 char max! (uniqid = 13)
550
+ $vendor_order_data['post_parent'] = absint( $args['order_id'] );
551
+ $vendor_order_data['post_title'] = sprintf( __( 'Vendor Order &ndash; %s', 'woocommerce' ), strftime( _x( '%b %d, %Y @ %I:%M %p', 'Order date parsed by strftime', 'woocommerce' ) ) );
552
+ $vendor_order_data['post_date'] = $args['date'];
553
+ }
554
+
555
+ if ( $updating ) {
556
+ $vendor_order_id = wp_update_post( $vendor_order_data );
557
+ } else {
558
+ $vendor_order_id = wp_insert_post( apply_filters( 'woocommerce_new_vendor_order_data', $vendor_order_data ), true );
559
+ }
560
+
561
+ if ( is_wp_error( $vendor_order_id ) ) {
562
+ return $vendor_order_id;
563
+ }
564
+
565
+ if ( ! $updating ) {
566
+ // Get vendor order object
567
+ $vendor_order = wc_get_order( $vendor_order_id );
568
+ $order = wc_get_order( $args['order_id'] );
569
+
570
+ // Order currency is the same used for the parent order
571
+ update_post_meta( $vendor_order_id, '_order_currency', $order->get_order_currency() );
572
+
573
+ if ( sizeof( $args['line_items'] ) > 0 ) {
574
+ $order_items = $order->get_items( array( 'line_item', 'fee', 'shipping' ) );
575
+
576
+ foreach ( $args['line_items'] as $vendor_order_item_id => $vendor_order_item ) {
577
+ if ( isset( $order_items[ $vendor_order_item_id ] ) ) {
578
+ if ( empty( $vendor_order_item['qty'] ) && empty( $vendor_order_item['total'] ) && empty( $vendor_order_item['tax'] ) ) {
579
+ continue;
580
+ }
581
+
582
+ // Prevents errors when the order has no taxes
583
+ if ( ! isset( $vendor_order_item['tax'] ) ) {
584
+ $vendor_order_item['tax'] = array();
585
+ }
586
+
587
+ switch ( $order_items[ $vendor_order_item_id ]['type'] ) {
588
+ case 'line_item' :
589
+ $line_item_args = array(
590
+ 'totals' => array(
591
+ 'subtotal' => $vendor_order_item['subtotal'],
592
+ 'total' => $vendor_order_item['total'],
593
+ 'subtotal_tax' => $vendor_order_item['subtotal_tax'],
594
+ 'tax' => $vendor_order_item['tax'],
595
+ 'tax_data' => $vendor_order_item['tax_data'],
596
+ )
597
+ );
598
+ $new_item_id = $vendor_order->add_product( $order->get_product_from_item( $order_items[ $vendor_order_item_id ] ), isset( $vendor_order_item['qty'] ) ? $vendor_order_item['qty'] : 0, $line_item_args );
599
+ wc_add_order_item_meta( $new_item_id, '_vendor_order_item_id', $vendor_order_item_id );
600
+ wc_add_order_item_meta( $new_item_id, '_vendor_commission', $vendor_order_item['commission'] );
601
+ break;
602
+ case 'shipping' :
603
+ $shipping = new stdClass();
604
+ $shipping->label = $order_items[ $vendor_order_item_id ]['name'];
605
+ $shipping->id = $order_items[ $vendor_order_item_id ]['method_id'];
606
+ $shipping->cost = $vendor_order_item['total'];
607
+ $shipping->taxes = $vendor_order_item['tax'];
608
+
609
+ $new_item_id = $vendor_order->add_shipping( $shipping );
610
+ wc_add_order_item_meta( $new_item_id, '_vendor_order_item_id', $vendor_order_item_id );
611
+ break;
612
+ case 'fee' :
613
+ $fee = new stdClass();
614
+ $fee->name = $order_items[ $vendor_order_item_id ]['name'];
615
+ $fee->tax_class = $order_items[ $vendor_order_item_id ]['tax_class'];
616
+ $fee->taxable = $fee->tax_class !== '0';
617
+ $fee->amount = $vendor_order_item['total'];
618
+ $fee->tax = array_sum( $vendor_order_item['tax'] );
619
+ $fee->tax_data = $vendor_order_item['tax'];
620
+
621
+ $new_item_id = $vendor_order->add_fee( $fee );
622
+ wc_add_order_item_meta( $new_item_id, '_vendor_order_item_id', $vendor_order_item_id );
623
+ break;
624
+ }
625
+ }
626
+ }
627
+ $vendor_order->update_taxes();
628
+ }
629
+
630
+ $vendor_order->calculate_totals( false );
631
+
632
+ do_action( 'woocommerce_vendor_order_created', $vendor_order_id, $args );
633
+ }
634
+
635
+ // Clear transients
636
+ wc_delete_shop_order_transients( $args['order_id'] );
637
+
638
+ return new WC_Order_Vendor( $vendor_order_id );
639
+ }
640
+
641
+
642
+ /**
643
+ * Get vendor orders
644
+ *
645
+ * @return array
646
+ */
647
+ public static function get_vendor_orders( $order_id ) {
648
+ $vendor_orders = array();
649
+ $vendor_order_ids = get_posts(
650
+ array(
651
+ 'post_type' => 'shop_order_vendor',
652
+ 'post_parent' => $order_id,
653
+ 'posts_per_page' => -1,
654
+ 'post_status' => 'any',
655
+ 'fields' => 'ids'
656
+ )
657
+ );
658
+
659
+ foreach ( $vendor_order_ids as $vendor_order_id ) {
660
+ $vendor_orders[] = new WC_Order_Vendor( $vendor_order_id );
661
+ }
662
+
663
+ return $vendor_orders;
664
+
665
+ } // get_vendor_orders()
666
+
667
+ } // WCV_Vendors
classes/front/class-vendor-cart.php CHANGED
@@ -17,8 +17,12 @@ class WCV_Vendor_Cart
17
  */
18
  function __construct()
19
  {
20
- add_filter( 'woocommerce_get_item_data', array( 'WCV_Vendor_Cart', 'sold_by' ), 10, 2 );
21
- add_action( 'woocommerce_product_meta_start', array( 'WCV_Vendor_Cart', 'sold_by_meta' ), 10, 2 );
 
 
 
 
22
  }
23
 
24
 
@@ -39,7 +43,7 @@ class WCV_Vendor_Cart
39
  : get_bloginfo( 'name' );
40
 
41
  $values[ ] = array(
42
- 'name' => apply_filters('wcvendors_cart_sold_by', $sold_by_label ),
43
  'display' => $sold_by,
44
  );
45
 
@@ -58,7 +62,7 @@ class WCV_Vendor_Cart
58
  ? sprintf( '<a href="%s" class="wcvendors_cart_sold_by_meta">%s</a>', WCV_Vendors::get_vendor_shop_page( $vendor_id ), WCV_Vendors::get_vendor_sold_by( $vendor_id ) )
59
  : get_bloginfo( 'name' );
60
 
61
- echo apply_filters('wcvendors_cart_sold_by_meta', $sold_by_label ) .'&nbsp;'. $sold_by . '<br/>';
62
  }
63
 
64
  }
17
  */
18
  function __construct()
19
  {
20
+
21
+ if ( WC_Vendors::$pv_options->get_option( 'sold_by' ) ) {
22
+ add_filter( 'woocommerce_get_item_data', array( 'WCV_Vendor_Cart', 'sold_by' ), 10, 2 );
23
+ add_action( 'woocommerce_product_meta_start', array( 'WCV_Vendor_Cart', 'sold_by_meta' ), 10, 2 );
24
+ }
25
+
26
  }
27
 
28
 
43
  : get_bloginfo( 'name' );
44
 
45
  $values[ ] = array(
46
+ 'name' => apply_filters('wcvendors_cart_sold_by', $sold_by_label, $cart_item[ 'data' ]->post->ID, $cart_item[ 'data' ]->post->post_author ),
47
  'display' => $sold_by,
48
  );
49
 
62
  ? sprintf( '<a href="%s" class="wcvendors_cart_sold_by_meta">%s</a>', WCV_Vendors::get_vendor_shop_page( $vendor_id ), WCV_Vendors::get_vendor_sold_by( $vendor_id ) )
63
  : get_bloginfo( 'name' );
64
 
65
+ echo apply_filters('wcvendors_cart_sold_by_meta', $sold_by_label, get_the_ID(), $vendor_id ) .'&nbsp;'. $sold_by . '<br/>';
66
  }
67
 
68
  }
classes/front/class-vendor-shop.php CHANGED
@@ -29,7 +29,9 @@ class WCV_Vendor_Shop
29
  add_filter( 'post_type_archive_link', array( 'WCV_Vendor_Shop', 'change_archive_link' ) );
30
 
31
  // Add sold by to product loop before add to cart
32
- add_action( 'woocommerce_after_shop_loop_item', array('WCV_Vendor_Shop', 'template_loop_sold_by'), 9 );
 
 
33
 
34
  // Remove Page Title if on Vendor Shop
35
  add_filter ( 'woocommerce_show_page_title', array('WCV_Vendor_Shop', 'remove_vendor_title') );
29
  add_filter( 'post_type_archive_link', array( 'WCV_Vendor_Shop', 'change_archive_link' ) );
30
 
31
  // Add sold by to product loop before add to cart
32
+ if ( WC_Vendors::$pv_options->get_option( 'sold_by' ) ) {
33
+ add_action( 'woocommerce_after_shop_loop_item', array('WCV_Vendor_Shop', 'template_loop_sold_by'), 9 );
34
+ }
35
 
36
  // Remove Page Title if on Vendor Shop
37
  add_filter ( 'woocommerce_show_page_title', array('WCV_Vendor_Shop', 'remove_vendor_title') );
classes/front/orders/class-export-csv.php CHANGED
@@ -32,28 +32,58 @@ class WCV_Export_CSV
32
  // New order row
33
  $new_row = $body[ $i ];
34
  // Remove order to redo
35
- unset( $body[ $i ] );
 
 
36
 
37
  foreach ( $items[ $i ][ 'items' ] as $item ) {
38
 
39
- $item_meta = new WC_Order_Item_Meta( $item[ 'item_meta' ] );
40
- $item_meta_options = $item_meta->get_formatted();
41
- // $item_meta = $item_meta->display( true, true );
42
 
43
  $new_row_with_meta = $new_row;
44
 
45
- if ( sizeof( $item_meta_options ) > 0 ) {
46
-
47
- $new_row_with_meta[] = $item[ 'qty' ];
48
-
49
- foreach ( $item_meta_options as $item_meta_option ) {
50
- if (!array_key_exists( $item_meta_option[ 'label' ], $headers ) ) $headers[$item_meta_option[ 'label' ]] = $item_meta_option[ 'label' ];
51
- $new_row_with_meta[] = $item_meta_option['value'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  }
 
53
 
54
- } else {
55
- $new_row_with_meta[] = $item[ 'qty' ];
56
- }
57
 
58
  $new_body[] = $new_row_with_meta;
59
  }
32
  // New order row
33
  $new_row = $body[ $i ];
34
  // Remove order to redo
35
+ unset( $body[ $i ] );
36
+
37
+ $order = new WC_Order( $i );
38
 
39
  foreach ( $items[ $i ][ 'items' ] as $item ) {
40
 
41
+ $product_id = !empty( $item['variation_id'] ) ? $item['variation_id'] : $item['product_id'];
 
 
42
 
43
  $new_row_with_meta = $new_row;
44
 
45
+ // Add the qty row
46
+ $new_row_with_meta[] = $item[ 'qty' ];
47
+
48
+ $item_meta = $item[ 'name' ];
49
+
50
+ if ( $metadata = $order->has_meta( $item['product_id'] ) ) {
51
+ foreach ( $metadata as $meta ) {
52
+
53
+ // Skip hidden core fields
54
+ if ( in_array( $meta['meta_key'], apply_filters( 'woocommerce_hidden_order_itemmeta', array(
55
+ '_qty',
56
+ '_tax_class',
57
+ '_product_id',
58
+ '_variation_id',
59
+ '_line_subtotal',
60
+ '_line_subtotal_tax',
61
+ '_line_total',
62
+ '_line_tax',
63
+ WC_Vendors::$pv_options->get_option( 'sold_by_label' ),
64
+ ) ) ) ) {
65
+ continue;
66
+ }
67
+
68
+ // Skip serialised meta
69
+ if ( is_serialized( $meta['meta_value'] ) ) {
70
+ continue;
71
+ }
72
+
73
+ // Get attribute data
74
+ if ( taxonomy_exists( wc_sanitize_taxonomy_name( $meta['meta_key'] ) ) ) {
75
+ $term = get_term_by( 'slug', $meta['meta_value'], wc_sanitize_taxonomy_name( $meta['meta_key'] ) );
76
+ $meta['meta_key'] = wc_attribute_label( wc_sanitize_taxonomy_name( $meta['meta_key'] ) );
77
+ $meta['meta_value'] = isset( $term->name ) ? $term->name : $meta['meta_value'];
78
+ } else {
79
+ $meta['meta_key'] = apply_filters( 'woocommerce_attribute_label', wc_attribute_label( $meta['meta_key'], $_product ), $meta['meta_key'] );
80
+ }
81
+
82
+ $item_meta .= wp_kses_post( rawurldecode( $meta['meta_key'] ) ) . ':' . wp_kses_post( wpautop( make_clickable( rawurldecode( $meta['meta_value'] ) ) ) );
83
  }
84
+ }
85
 
86
+ $new_row_with_meta['product'] = $item_meta;
 
 
87
 
88
  $new_body[] = $new_row_with_meta;
89
  }
classes/front/orders/class-orders.php CHANGED
@@ -23,6 +23,7 @@ class WCV_Orders
23
 
24
  add_action( 'template_redirect', array( $this, 'check_access' ) );
25
  add_action( 'wp', array( $this, 'display_shortcodes' ) );
 
26
  }
27
 
28
 
@@ -43,6 +44,7 @@ class WCV_Orders
43
  */
44
  public function display_shortcodes()
45
  {
 
46
  if ( is_page( WC_Vendors::$pv_options->get_option( 'orders_page' ) ) && $this->can_view_orders ) {
47
 
48
  wp_enqueue_script( 'jquery' );
@@ -96,6 +98,7 @@ class WCV_Orders
96
  */
97
  public function display_product_orders()
98
  {
 
99
  if ( !WCV_Vendors::is_vendor( get_current_user_id() ) ) {
100
  ob_start();
101
  wc_get_template( 'denied.php', array(), 'wc-vendors/dashboard/', wcv_plugin_dir . 'templates/dashboard/' );
@@ -144,6 +147,7 @@ class WCV_Orders
144
  }
145
 
146
  ob_start();
 
147
  // Show the Export CSV button
148
  if ( $this->can_export_csv ) {
149
  wc_get_template( 'csv-export.php', array(), 'wc-vendors/orders/', wcv_plugin_dir . 'templates/orders/' );
23
 
24
  add_action( 'template_redirect', array( $this, 'check_access' ) );
25
  add_action( 'wp', array( $this, 'display_shortcodes' ) );
26
+ add_shortcode( 'wcv_orders', array( $this, 'display_product_orders' ) );
27
  }
28
 
29
 
44
  */
45
  public function display_shortcodes()
46
  {
47
+
48
  if ( is_page( WC_Vendors::$pv_options->get_option( 'orders_page' ) ) && $this->can_view_orders ) {
49
 
50
  wp_enqueue_script( 'jquery' );
98
  */
99
  public function display_product_orders()
100
  {
101
+
102
  if ( !WCV_Vendors::is_vendor( get_current_user_id() ) ) {
103
  ob_start();
104
  wc_get_template( 'denied.php', array(), 'wc-vendors/dashboard/', wcv_plugin_dir . 'templates/dashboard/' );
147
  }
148
 
149
  ob_start();
150
+
151
  // Show the Export CSV button
152
  if ( $this->can_export_csv ) {
153
  wc_get_template( 'csv-export.php', array(), 'wc-vendors/orders/', wcv_plugin_dir . 'templates/orders/' );
classes/front/signup/class-vendor-signup.php CHANGED
@@ -22,21 +22,34 @@ class WCV_Vendor_Signup
22
  $this->terms_page = WC_Vendors::$pv_options->get_option( 'terms_to_apply_page' );
23
 
24
  add_action( 'register_form', array( $this, 'vendor_option' ) );
25
- add_action( 'woocommerce_created_customer', array( $this, 'save_pending' ), 10, 2 );
26
- // add_action( 'register_post', array( $this, 'apply_form' ), 10 );
 
 
 
 
27
  add_action( 'template_redirect', array( $this, 'apply_form_dashboard' ), 10 );
28
  add_action( 'woocommerce_register_post', array( $this, 'validate_vendor_registration' ), 10, 3 );
29
- }
30
 
 
31
 
32
  /**
33
  *
34
  */
35
  public function vendor_option()
36
  {
 
 
 
 
 
 
 
37
  ?>
38
  <div class="clear"></div>
39
 
 
 
40
  <p class="form-row">
41
  <input class="input-checkbox"
42
  id="apply_for_vendor" <?php checked( isset( $_POST[ 'apply_for_vendor' ] ), true ) ?> type="checkbox"
@@ -45,15 +58,22 @@ class WCV_Vendor_Signup
45
  class="checkbox"><?php echo apply_filters('wcvendors_vendor_registration_checkbox', __( 'Apply to become a vendor? ', 'wcvendors' )); ?></label>
46
  </p>
47
 
 
 
48
  <?php if ( $this->terms_page ) { ?>
 
 
 
49
  <p class="form-row agree-to-terms-container" style="display:none">
50
  <input class="input-checkbox"
51
  id="agree_to_terms" <?php checked( isset( $_POST[ 'agree_to_terms' ] ), true ) ?> type="checkbox"
52
  name="agree_to_terms" value="1"/>
53
  <label for="agree_to_terms"
54
- class="checkbox"><?php printf( __( 'I have read and accepted the <a target="top" href="%s">terms and conditions</a>', 'wcvendors' ), get_permalink( $this->terms_page ) ); ?></label>
55
  </p>
56
 
 
 
57
  <script type="text/javascript">
58
  jQuery(function () {
59
  if (jQuery('#apply_for_vendor').is(':checked')) {
@@ -69,9 +89,23 @@ class WCV_Vendor_Signup
69
 
70
  <div class="clear"></div>
71
  <?php
 
 
72
  }
73
 
74
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  /**
76
  *
77
  *
@@ -85,9 +119,9 @@ class WCV_Vendor_Signup
85
  wc_clear_notices();
86
 
87
  if ( user_can( $user_id, 'manage_options' ) ) {
88
- wc_add_notice( __( 'Application denied. You are an administrator.', 'wcvendors' ), 'error' );
89
  } else {
90
- wc_add_notice( __( 'Your application has been submitted.', 'wcvendors' ), 'notice' );
91
 
92
  $manual = WC_Vendors::$pv_options->get_option( 'manual_vendor_registration' );
93
  $role = apply_filters( 'wcvendors_pending_role', ( $manual ? 'pending_vendor' : 'vendor' ) );
@@ -102,6 +136,50 @@ class WCV_Vendor_Signup
102
  }
103
  }
104
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  public function redirect_to_vendor_dash( $redirect )
106
  {
107
  $vendor_dashboard_page = WC_Vendors::$pv_options->get_option( 'vendor_dashboard_page' );
@@ -127,7 +205,7 @@ class WCV_Vendor_Signup
127
  if ( isset( $_POST[ 'agree_to_terms' ] ) ) {
128
  self::save_pending( get_current_user_id() );
129
  } else {
130
- wc_add_notice( __( 'You must accept the terms and conditions to become a vendor.', 'wcvendors' ), 'error' );
131
  }
132
  } else {
133
  self::save_pending( get_current_user_id() );
@@ -139,7 +217,7 @@ class WCV_Vendor_Signup
139
 
140
  if ( isset( $_POST[ 'apply_for_vendor' ] ) ) {
141
  if ( $this->terms_page && !isset( $_POST[ 'agree_to_terms' ] ) ) {
142
- $validation_errors->add( 'agree_to_terms_error', __( 'You must accept the terms and conditions to become a vendor.', 'wcvendors' ) );
143
  }
144
  }
145
  }
22
  $this->terms_page = WC_Vendors::$pv_options->get_option( 'terms_to_apply_page' );
23
 
24
  add_action( 'register_form', array( $this, 'vendor_option' ) );
25
+ // add_action( 'login_form', array( $this, 'login_apply_vendor_option' ) );
26
+
27
+ if ( ! class_exists( 'WCVendors_Pro' ) ) {
28
+ add_action( 'woocommerce_created_customer', array( $this, 'save_pending' ), 10, 2 );
29
+ }
30
+
31
  add_action( 'template_redirect', array( $this, 'apply_form_dashboard' ), 10 );
32
  add_action( 'woocommerce_register_post', array( $this, 'validate_vendor_registration' ), 10, 3 );
 
33
 
34
+ }
35
 
36
  /**
37
  *
38
  */
39
  public function vendor_option()
40
  {
41
+
42
+ if ( isset( $_GET[ 'action'] ) && 'register' == $_GET[ 'action'] ) {
43
+
44
+ // include_once('views/html-vendor-signup.php');
45
+
46
+ } else {
47
+
48
  ?>
49
  <div class="clear"></div>
50
 
51
+ <?php do_action( 'wcvendors_apply_for_vendor_before' ); ?>
52
+
53
  <p class="form-row">
54
  <input class="input-checkbox"
55
  id="apply_for_vendor" <?php checked( isset( $_POST[ 'apply_for_vendor' ] ), true ) ?> type="checkbox"
58
  class="checkbox"><?php echo apply_filters('wcvendors_vendor_registration_checkbox', __( 'Apply to become a vendor? ', 'wcvendors' )); ?></label>
59
  </p>
60
 
61
+ <?php do_action( 'wcvendors_apply_for_vendor_after' ); ?>
62
+
63
  <?php if ( $this->terms_page ) { ?>
64
+
65
+ <?php do_action( 'wcvendors_agree_to_terms_before' ); ?>
66
+
67
  <p class="form-row agree-to-terms-container" style="display:none">
68
  <input class="input-checkbox"
69
  id="agree_to_terms" <?php checked( isset( $_POST[ 'agree_to_terms' ] ), true ) ?> type="checkbox"
70
  name="agree_to_terms" value="1"/>
71
  <label for="agree_to_terms"
72
+ class="checkbox"><?php apply_filters( 'wcvendors_vendor_registration_terms', printf( __( 'I have read and accepted the <a target="top" href="%s">terms and conditions</a>', 'wcvendors' ), get_permalink( $this->terms_page ) ) ); ?></label>
73
  </p>
74
 
75
+ <?php do_action( 'wcvendors_agree_to_terms_after' ); ?>
76
+
77
  <script type="text/javascript">
78
  jQuery(function () {
79
  if (jQuery('#apply_for_vendor').is(':checked')) {
89
 
90
  <div class="clear"></div>
91
  <?php
92
+ }
93
+
94
  }
95
 
96
 
97
+ /**
98
+ * Show apply to be vendor on the wp-login screen
99
+ *
100
+ * @since 1.9.0
101
+ * @version 1.0.0
102
+ */
103
+ public function login_apply_vendor_option(){
104
+
105
+
106
+
107
+ } // login_apply_vendor_option
108
+
109
  /**
110
  *
111
  *
119
  wc_clear_notices();
120
 
121
  if ( user_can( $user_id, 'manage_options' ) ) {
122
+ wc_add_notice( apply_filters( 'wcvendors_application_denied_msg', __( 'Application denied. You are an administrator.', 'wcvendors' ) ), 'error' );
123
  } else {
124
+ wc_add_notice( apply_filters( 'wcvendors_application_submitted_msg', __( 'Your application has been submitted.', 'wcvendors' ) ), 'notice' );
125
 
126
  $manual = WC_Vendors::$pv_options->get_option( 'manual_vendor_registration' );
127
  $role = apply_filters( 'wcvendors_pending_role', ( $manual ? 'pending_vendor' : 'vendor' ) );
136
  }
137
  }
138
 
139
+
140
+ /**
141
+ * Save the pending vendor from the login screen
142
+ *
143
+ * @since 1.9.0
144
+ * @version 1.0.0
145
+ */
146
+ public function login_save_pending( $user_id ){
147
+
148
+ if ( isset( $_POST[ 'apply_for_vendor' ] ) ) {
149
+
150
+ $manual = WC_Vendors::$pv_options->get_option( 'manual_vendor_registration' );
151
+ $role = apply_filters( 'wcvendors_pending_role', ( $manual ? 'pending_vendor' : 'vendor' ) );
152
+
153
+ $wp_user_object = new WP_User( $user_id );
154
+ $wp_user_object->set_role( $role );
155
+
156
+ do_action( 'wcvendors_application_submited', $user_id );
157
+
158
+ }
159
+
160
+ } // login_save_pending()
161
+
162
+ /**
163
+ * Login authentication check code for vendors
164
+ */
165
+ public function login_vendor_check( $user, $password ){
166
+
167
+ if ( isset( $_POST[ 'apply_for_vendor' ] ) ) {
168
+
169
+ if ( $this->terms_page && ! isset( $_POST[ 'agree_to_terms' ] ) ) {
170
+ $error = new WP_Error();
171
+ $error->add( 'no_terms', apply_filters( 'wcvendors_agree_to_terms_error', __( 'You must accept the terms and conditions to become a vendor.', 'wcvendors' ) ) );
172
+ return $error;
173
+ } else {
174
+ return $user;
175
+ }
176
+ }
177
+
178
+ return $user;
179
+
180
+ }
181
+
182
+
183
  public function redirect_to_vendor_dash( $redirect )
184
  {
185
  $vendor_dashboard_page = WC_Vendors::$pv_options->get_option( 'vendor_dashboard_page' );
205
  if ( isset( $_POST[ 'agree_to_terms' ] ) ) {
206
  self::save_pending( get_current_user_id() );
207
  } else {
208
+ wc_add_notice( apply_filters( 'wcvendors_agree_to_terms_error', __( 'You must accept the terms and conditions to become a vendor.', 'wcvendors' ), 'error' ) );
209
  }
210
  } else {
211
  self::save_pending( get_current_user_id() );
217
 
218
  if ( isset( $_POST[ 'apply_for_vendor' ] ) ) {
219
  if ( $this->terms_page && !isset( $_POST[ 'agree_to_terms' ] ) ) {
220
+ $validation_errors->add( 'agree_to_terms_error', apply_filters( 'wcvendors_agree_to_terms_error', __( 'You must accept the terms and conditions to become a vendor.', 'wcvendors' ) ) );
221
  }
222
  }
223
  }
classes/front/signup/views/html-vendor-signup.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Vendor Signup
5
+ *
6
+ * This file is used to output the vendor signup options on the wordpress login form.
7
+ *
8
+ * @link http://www.wcvendors.com
9
+ * @since 1.9.0
10
+ *
11
+ * @package WCVendors
12
+ * @subpackage WCVendors/classes/front/signup/views
13
+ */
14
+ ?>
15
+
16
+ <?php do_action( 'wcvendors_login_apply_for_vendor_before' ); ?>
17
+
18
+ <p class="forgetmenot">
19
+ <label for="apply_for_vendor">
20
+ <input class="input-checkbox" id="apply_for_vendor" <?php checked( isset( $_POST[ 'apply_for_vendor' ] ), true ) ?> type="checkbox" name="apply_for_vendor" value="1"/>
21
+ <?php echo apply_filters('wcvendors_vendor_registration_checkbox', __( 'Apply to become a vendor? ', 'wcvendors' )); ?>
22
+ </label>
23
+
24
+ </p>
25
+
26
+ <?php do_action( 'wcvendors_login_apply_for_vendor_before' ); ?>
27
+
28
+ <?php if ( $this->terms_page ) : ?>
29
+
30
+ <?php do_action( 'wcvendors_login_agree_to_terms_before' ); ?>
31
+
32
+ <p class="forgetmenot agree-to-terms-container" style="display:none;">
33
+ <label for="agree_to_terms">
34
+ <input class="input-checkbox" id="agree_to_terms" <?php checked( isset( $_POST[ 'agree_to_terms' ] ), true ); ?> type="checkbox" name="agree_to_terms" value="1"/>
35
+ <?php apply_filters( 'wcvendors_vendor_registration_terms', printf( __( 'I have read and accepted the <a target="top" href="%s">terms and conditions</a>', 'wcvendors' ), get_permalink( $this->terms_page ) ) ); ?>
36
+ </label>
37
+ </p>
38
+
39
+ <?php do_action( 'wcvendors_login_agree_to_terms_after' ); ?>
40
+
41
+
42
+ <script type="text/javascript">
43
+ jQuery(function () {
44
+ if (jQuery('#apply_for_vendor').is(':checked')) {
45
+ jQuery('.agree-to-terms-container').show();
46
+ }
47
+
48
+ jQuery( '#wp-submit' ).on( 'click', function( e ) {
49
+ alert('something here..');
50
+ e.preventDefault();
51
+ })
52
+ })
53
+ </script>
54
+
55
+ <?php endif; ?>
56
+
57
+ <div class="clear"></div>
languages/default.pot CHANGED
@@ -2,7 +2,7 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: WC Vendors\n"
5
- "POT-Creation-Date: 2016-05-02 11:07+1000\n"
6
  "PO-Revision-Date: 2015-04-24 09:29+1000\n"
7
  "Last-Translator: \n"
8
  "Language-Team: WC Vendors <support@wcvendors.com>\n"
@@ -24,54 +24,54 @@ msgid ""
24
  "activate before attempting to activate again."
25
  msgstr ""
26
 
27
- #: ../class-wc-vendors.php:81 ../classes/admin/class-admin-reports.php:41
28
- #: ../classes/admin/class-admin-users.php:399
29
  msgid "WC Vendors"
30
  msgstr ""
31
 
32
- #: ../class-wc-vendors.php:109
33
  msgid ""
34
  "<b>WC Vendors is disabled</b>. WC Vendors requires a minimum of WooCommerce "
35
  "v2.4.0."
36
  msgstr ""
37
 
38
- #: ../class-wc-vendors.php:248 ../classes/admin/settings/sf-options.php:183
39
  msgid "Capabilities"
40
  msgstr ""
41
 
42
- #: ../class-wc-vendors.php:271 ../classes/admin/class-admin-page.php:253
43
  #: ../classes/admin/class-admin-reports.php:175
44
- #: ../classes/admin/class-admin-reports.php:461
45
  #: ../classes/admin/class-product-meta.php:46
46
  #: ../classes/admin/class-product-meta.php:187
47
- #: ../classes/admin/class-product-meta.php:223 ../classes/class-install.php:66
48
  msgid "Vendor"
49
  msgstr ""
50
 
51
- #: ../class-wc-vendors.php:273 ../classes/admin/settings/sf-options.php:4
52
  msgid "General"
53
  msgstr ""
54
 
55
- #: ../class-wc-vendors.php:311
56
  msgid "Documentation/KB"
57
  msgstr ""
58
 
59
- #: ../class-wc-vendors.php:312
60
  msgid "Help Forums"
61
  msgstr ""
62
 
63
- #: ../class-wc-vendors.php:313
64
  msgid "Paid Support"
65
  msgstr ""
66
 
67
- #: ../class-wc-vendors.php:335
68
  #, php-format
69
  msgid ""
70
  "WC Vendors requires the Vendor shop page value be set <a href=\"%s\">click "
71
  "here to set it.</a> | <a href=\"%s\">Hide Notice</a>"
72
  msgstr ""
73
 
74
- #: ../class-wc-vendors.php:343
75
  #, php-format
76
  msgid ""
77
  "You must save your permalinks once you have modified your vendor page. <a "
@@ -94,7 +94,7 @@ msgstr ""
94
  msgid "Commission"
95
  msgstr ""
96
 
97
- #: ../classes/admin/class-admin-page.php:251
98
  #: ../classes/admin/class-admin-reports.php:174
99
  #: ../templates/dashboard/reports.php:17
100
  #: ../templates/emails/notify-vendor-shipped.php:22
@@ -102,12 +102,12 @@ msgstr ""
102
  msgid "Product"
103
  msgstr ""
104
 
105
- #: ../classes/admin/class-admin-page.php:252
106
  #: ../classes/admin/class-vendor-admin-dashboard.php:283
107
  msgid "Order ID"
108
  msgstr ""
109
 
110
- #: ../classes/admin/class-admin-page.php:254
111
  #: ../classes/admin/class-admin-reports.php:176
112
  #: ../classes/admin/class-admin-reports.php:374
113
  #: ../classes/admin/class-vendor-admin-dashboard.php:286
@@ -115,58 +115,58 @@ msgstr ""
115
  msgid "Total"
116
  msgstr ""
117
 
118
- #: ../classes/admin/class-admin-page.php:255
119
  #: ../classes/admin/class-admin-reports.php:178
120
- #: ../classes/admin/class-admin-reports.php:464
121
  msgid "Status"
122
  msgstr ""
123
 
124
- #: ../classes/admin/class-admin-page.php:256
125
  #: ../classes/admin/class-vendor-admin-dashboard.php:288
126
- #: ../classes/front/orders/class-orders.php:181
127
  #: ../templates/dashboard/orders.php:36
128
  msgid "Date"
129
  msgstr ""
130
 
131
- #: ../classes/admin/class-admin-page.php:293
132
  msgid "Mark paid"
133
  msgstr ""
134
 
135
- #: ../classes/admin/class-admin-page.php:294
136
  msgid "Mark due"
137
  msgstr ""
138
 
139
- #: ../classes/admin/class-admin-page.php:295
140
  msgid "Mark reversed"
141
  msgstr ""
142
 
143
- #: ../classes/admin/class-admin-page.php:312
144
- #: ../classes/admin/class-admin-page.php:316
145
  msgid "Filter"
146
  msgstr ""
147
 
148
- #: ../classes/admin/class-admin-page.php:351
149
  msgid "Show all dates"
150
  msgstr ""
151
 
152
- #: ../classes/admin/class-admin-page.php:364
153
  #, php-format
154
  msgid "%1$s %2$d"
155
  msgstr ""
156
 
157
- #: ../classes/admin/class-admin-page.php:386
158
  msgid "Show all Statuses"
159
  msgstr ""
160
 
161
- #: ../classes/admin/class-admin-page.php:412
162
  msgid "Commission marked paid."
163
  msgstr ""
164
 
165
- #: ../classes/admin/class-admin-page.php:419
166
  msgid "Commission marked due."
167
  msgstr ""
168
 
169
- #: ../classes/admin/class-admin-page.php:426
170
  msgid "Commission marked reversed."
171
  msgstr ""
172
 
@@ -195,20 +195,20 @@ msgid ""
195
  msgstr ""
196
 
197
  #: ../classes/admin/class-admin-reports.php:121
198
- #: ../classes/admin/class-admin-reports.php:440
199
  #: ../templates/dashboard/date-picker.php:3
200
  msgid "From:"
201
  msgstr ""
202
 
203
  #: ../classes/admin/class-admin-reports.php:123
204
- #: ../classes/admin/class-admin-reports.php:442
205
  #: ../templates/dashboard/date-picker.php:7
206
  msgid "To:"
207
  msgstr ""
208
 
209
  #: ../classes/admin/class-admin-reports.php:125
210
  #: ../classes/admin/class-admin-reports.php:283
211
- #: ../classes/admin/class-admin-reports.php:451
212
  #: ../templates/dashboard/date-picker.php:12
213
  msgid "Show"
214
  msgstr ""
@@ -236,7 +236,7 @@ msgid "Recent Commission"
236
  msgstr ""
237
 
238
  #: ../classes/admin/class-admin-reports.php:173
239
- #: ../classes/front/orders/class-orders.php:173
240
  #: ../templates/dashboard/orders.php:33
241
  msgid "Order"
242
  msgstr ""
@@ -283,102 +283,102 @@ msgstr ""
283
 
284
  #: ../classes/admin/class-admin-reports.php:347
285
  #: ../classes/admin/settings/sf-options.php:52
286
- #: ../classes/admin/settings/sf-options.php:127
287
  #: ../templates/dashboard/orders.php:34 ../templates/orders/orders.php:115
288
  msgid "Shipping"
289
  msgstr ""
290
 
291
  #: ../classes/admin/class-admin-reports.php:348
292
- #: ../classes/admin/class-admin-reports.php:448
293
  msgid "Reversed"
294
  msgstr ""
295
 
296
  #: ../classes/admin/class-admin-reports.php:349
297
- #: ../classes/admin/class-admin-reports.php:447
298
  msgid "Paid"
299
  msgstr ""
300
 
301
  #: ../classes/admin/class-admin-reports.php:350
302
- #: ../classes/admin/class-admin-reports.php:446
303
  msgid "Due"
304
  msgstr ""
305
 
306
- #: ../classes/admin/class-admin-reports.php:462
307
  msgid "Tax Total"
308
  msgstr ""
309
 
310
- #: ../classes/admin/class-admin-reports.php:463
311
  msgid "Shipping Total"
312
  msgstr ""
313
 
314
- #: ../classes/admin/class-admin-reports.php:465
315
  msgid "Commission Total"
316
  msgstr ""
317
 
318
- #: ../classes/admin/class-admin-reports.php:487
319
  msgid "No commissions found."
320
  msgstr ""
321
 
322
- #: ../classes/admin/class-admin-users.php:409
323
  msgid "Enable HTML for the shop description"
324
  msgstr ""
325
 
326
- #: ../classes/admin/class-admin-users.php:415
327
  msgid "Shop name"
328
  msgstr ""
329
 
330
- #: ../classes/admin/class-admin-users.php:422
331
  msgid "PayPal E-mail"
332
  msgstr ""
333
 
334
- #: ../classes/admin/class-admin-users.php:423
335
  msgid "required"
336
  msgstr ""
337
 
338
- #: ../classes/admin/class-admin-users.php:430
339
  msgid "Commission rate"
340
  msgstr ""
341
 
342
- #: ../classes/admin/class-admin-users.php:431
343
  #: ../classes/admin/class-product-meta.php:174
344
  msgid "Leave blank for default"
345
  msgstr ""
346
 
347
- #: ../classes/admin/class-admin-users.php:437
348
  msgid "Give Tax"
349
  msgstr ""
350
 
351
- #: ../classes/admin/class-admin-users.php:442
352
  msgid "Tax override for vendor"
353
  msgstr ""
354
 
355
- #: ../classes/admin/class-admin-users.php:448
356
  msgid "Give Shipping"
357
  msgstr ""
358
 
359
- #: ../classes/admin/class-admin-users.php:453
360
  msgid "Shipping override for vendor"
361
  msgstr ""
362
 
363
- #: ../classes/admin/class-admin-users.php:459
364
  #: ../classes/admin/views/html-vendor-settings-page.php:30
365
  #: ../templates/dashboard/settings/seller-info.php:3
366
  msgid "Seller info"
367
  msgstr ""
368
 
369
- #: ../classes/admin/class-admin-users.php:464
370
  msgid "Shop description"
371
  msgstr ""
372
 
373
  #: ../classes/admin/class-vendor-admin-dashboard.php:20
374
- #: ../classes/class-install.php:167
375
  msgid "Shop Settings"
376
  msgstr ""
377
 
378
  #: ../classes/admin/class-vendor-admin-dashboard.php:21
379
  #: ../classes/admin/class-vendor-admin-dashboard.php:146
380
- #: ../classes/admin/settings/sf-options.php:187
381
- #: ../classes/class-install.php:166 ../templates/dashboard/orders.php:24
382
  msgid "Orders"
383
  msgstr ""
384
 
@@ -403,8 +403,8 @@ msgid "Customer"
403
  msgstr ""
404
 
405
  #: ../classes/admin/class-vendor-admin-dashboard.php:285
406
- #: ../classes/admin/settings/sf-options.php:118
407
- #: ../classes/admin/settings/sf-options.php:245
408
  msgid "Products"
409
  msgstr ""
410
 
@@ -422,31 +422,6 @@ msgstr ""
422
  msgid "Orders marked shipped."
423
  msgstr ""
424
 
425
- #: ../classes/admin/class-vendor-admin-dashboard.php:465
426
- #: ../templates/orders/orders.php:84
427
- #, php-format
428
- msgid "Comments (%s)"
429
- msgstr ""
430
-
431
- #: ../classes/admin/class-vendor-admin-dashboard.php:468
432
- msgid "Comments to Customer"
433
- msgstr ""
434
-
435
- #: ../classes/admin/class-vendor-admin-dashboard.php:477
436
- #: ../templates/orders/comments/existing-comments.php:9
437
- #, php-format
438
- msgid "added %s ago"
439
- msgstr ""
440
-
441
- #: ../classes/admin/class-vendor-admin-dashboard.php:483
442
- msgid "No comments currently to customer."
443
- msgstr ""
444
-
445
- #: ../classes/admin/class-vendor-admin-dashboard.php:492
446
- #: ../templates/orders/comments/add-new-comment.php:11
447
- msgid "Add comment"
448
- msgstr ""
449
-
450
  #: ../classes/admin/class-vendor-applicants.php:26
451
  msgid "Approve"
452
  msgstr ""
@@ -499,7 +474,7 @@ msgstr ""
499
  #: ../classes/admin/emails/class-wc-approve-vendor.php:123
500
  #: ../classes/admin/emails/class-wc-notify-admin.php:134
501
  #: ../classes/admin/emails/class-wc-notify-shipped.php:163
502
- #: ../classes/admin/emails/class-wc-notify-vendor.php:258
503
  #: ../classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:62
504
  msgid "Enable/Disable"
505
  msgstr ""
@@ -507,7 +482,7 @@ msgstr ""
507
  #: ../classes/admin/emails/class-wc-approve-vendor.php:125
508
  #: ../classes/admin/emails/class-wc-notify-admin.php:136
509
  #: ../classes/admin/emails/class-wc-notify-shipped.php:165
510
- #: ../classes/admin/emails/class-wc-notify-vendor.php:260
511
  msgid "Enable this email notification"
512
  msgstr ""
513
 
@@ -527,14 +502,14 @@ msgstr ""
527
  #: ../classes/admin/emails/class-wc-approve-vendor.php:136
528
  #: ../classes/admin/emails/class-wc-notify-admin.php:147
529
  #: ../classes/admin/emails/class-wc-notify-shipped.php:169
530
- #: ../classes/admin/emails/class-wc-notify-vendor.php:264
531
  msgid "Subject"
532
  msgstr ""
533
 
534
  #: ../classes/admin/emails/class-wc-approve-vendor.php:138
535
  #: ../classes/admin/emails/class-wc-notify-admin.php:149
536
  #: ../classes/admin/emails/class-wc-notify-shipped.php:171
537
- #: ../classes/admin/emails/class-wc-notify-vendor.php:266
538
  #, php-format
539
  msgid ""
540
  "This controls the email subject line. Leave blank to use the default "
@@ -544,14 +519,14 @@ msgstr ""
544
  #: ../classes/admin/emails/class-wc-approve-vendor.php:143
545
  #: ../classes/admin/emails/class-wc-notify-admin.php:154
546
  #: ../classes/admin/emails/class-wc-notify-shipped.php:176
547
- #: ../classes/admin/emails/class-wc-notify-vendor.php:271
548
  msgid "Email Heading"
549
  msgstr ""
550
 
551
  #: ../classes/admin/emails/class-wc-approve-vendor.php:145
552
  #: ../classes/admin/emails/class-wc-notify-admin.php:156
553
  #: ../classes/admin/emails/class-wc-notify-shipped.php:178
554
- #: ../classes/admin/emails/class-wc-notify-vendor.php:273
555
  #, php-format
556
  msgid ""
557
  "This controls the main heading contained within the email notification. "
@@ -561,35 +536,35 @@ msgstr ""
561
  #: ../classes/admin/emails/class-wc-approve-vendor.php:150
562
  #: ../classes/admin/emails/class-wc-notify-admin.php:161
563
  #: ../classes/admin/emails/class-wc-notify-shipped.php:183
564
- #: ../classes/admin/emails/class-wc-notify-vendor.php:278
565
  msgid "Email type"
566
  msgstr ""
567
 
568
  #: ../classes/admin/emails/class-wc-approve-vendor.php:152
569
  #: ../classes/admin/emails/class-wc-notify-admin.php:163
570
  #: ../classes/admin/emails/class-wc-notify-shipped.php:185
571
- #: ../classes/admin/emails/class-wc-notify-vendor.php:280
572
  msgid "Choose which format of email to send."
573
  msgstr ""
574
 
575
  #: ../classes/admin/emails/class-wc-approve-vendor.php:156
576
  #: ../classes/admin/emails/class-wc-notify-admin.php:167
577
  #: ../classes/admin/emails/class-wc-notify-shipped.php:189
578
- #: ../classes/admin/emails/class-wc-notify-vendor.php:284
579
  msgid "Plain text"
580
  msgstr ""
581
 
582
  #: ../classes/admin/emails/class-wc-approve-vendor.php:157
583
  #: ../classes/admin/emails/class-wc-notify-admin.php:168
584
  #: ../classes/admin/emails/class-wc-notify-shipped.php:190
585
- #: ../classes/admin/emails/class-wc-notify-vendor.php:285
586
  msgid "HTML"
587
  msgstr ""
588
 
589
  #: ../classes/admin/emails/class-wc-approve-vendor.php:158
590
  #: ../classes/admin/emails/class-wc-notify-admin.php:169
591
  #: ../classes/admin/emails/class-wc-notify-shipped.php:191
592
- #: ../classes/admin/emails/class-wc-notify-vendor.php:286
593
  msgid "Multipart"
594
  msgstr ""
595
 
@@ -647,18 +622,28 @@ msgstr ""
647
  msgid "[{blogname}] New customer order ({order_number}) - {order_date}"
648
  msgstr ""
649
 
650
- #: ../classes/admin/emails/class-wc-notify-vendor.php:113
651
  msgid "Commission Subtotal:"
652
  msgstr ""
653
 
654
- #: ../classes/admin/emails/class-wc-notify-vendor.php:119
655
  msgid "Tax Subtotal:"
656
  msgstr ""
657
 
658
- #: ../classes/admin/emails/class-wc-notify-vendor.php:127
659
  msgid "Shipping Subtotal:"
660
  msgstr ""
661
 
 
 
 
 
 
 
 
 
 
 
662
  #: ../classes/admin/settings/classes/sf-class-format-options.php:211
663
  #: ../classes/admin/settings/classes/sf-class-settings.php:786
664
  msgid "Select a page..."
@@ -759,7 +744,7 @@ msgid ""
759
  msgstr ""
760
 
761
  #: ../classes/admin/settings/sf-options.php:43
762
- #: ../classes/admin/settings/sf-options.php:166
763
  msgid "Taxes"
764
  msgstr ""
765
 
@@ -849,252 +834,261 @@ msgid "User Email"
849
  msgstr ""
850
 
851
  #: ../classes/admin/settings/sf-options.php:103
852
- msgid "Sold By Label"
 
853
  msgstr ""
854
 
855
  #: ../classes/admin/settings/sf-options.php:104
856
- msgid "The sold by label used on the site and emails."
857
  msgstr ""
858
 
859
- #: ../classes/admin/settings/sf-options.php:107
860
- msgid "Sold By"
861
  msgstr ""
862
 
863
- #: ../classes/admin/settings/sf-options.php:111
 
 
 
 
 
 
 
 
864
  msgid "Seller Info Label"
865
  msgstr ""
866
 
867
- #: ../classes/admin/settings/sf-options.php:112
868
  msgid "The seller info tab title on the single product page."
869
  msgstr ""
870
 
871
- #: ../classes/admin/settings/sf-options.php:115
872
  msgid "Seller Info"
873
  msgstr ""
874
 
875
- #: ../classes/admin/settings/sf-options.php:119
876
  msgid "Product Add Page"
877
  msgstr ""
878
 
879
- #: ../classes/admin/settings/sf-options.php:119
880
  msgid "Configure what to hide from all vendors when adding a product"
881
  msgstr ""
882
 
883
- #: ../classes/admin/settings/sf-options.php:122
884
  msgid "Left side panel"
885
  msgstr ""
886
 
887
- #: ../classes/admin/settings/sf-options.php:123
888
  msgid ""
889
  "CHECKING these boxes will **HIDE** these areas of the add product page for "
890
  "vendors"
891
  msgstr ""
892
 
893
- #: ../classes/admin/settings/sf-options.php:126
894
  msgid "Inventory"
895
  msgstr ""
896
 
897
- #: ../classes/admin/settings/sf-options.php:128
898
  msgid "Linked Products"
899
  msgstr ""
900
 
901
- #: ../classes/admin/settings/sf-options.php:129
902
  msgid "Attributes"
903
  msgstr ""
904
 
905
- #: ../classes/admin/settings/sf-options.php:130
906
  msgid "Advanced"
907
  msgstr ""
908
 
909
- #: ../classes/admin/settings/sf-options.php:137
910
  msgid "Types"
911
  msgstr ""
912
 
913
- #: ../classes/admin/settings/sf-options.php:138
914
  msgid "CHECKING these boxes will HIDE these product types from the vendor"
915
  msgstr ""
916
 
917
- #: ../classes/admin/settings/sf-options.php:141
918
  msgid "Simple"
919
  msgstr ""
920
 
921
- #: ../classes/admin/settings/sf-options.php:142
922
  msgid "Variable"
923
  msgstr ""
924
 
925
- #: ../classes/admin/settings/sf-options.php:143
926
  msgid "Grouped"
927
  msgstr ""
928
 
929
- #: ../classes/admin/settings/sf-options.php:144
930
  msgid "External / affiliate"
931
  msgstr ""
932
 
933
- #: ../classes/admin/settings/sf-options.php:151
934
  msgid "Type options"
935
  msgstr ""
936
 
937
- #: ../classes/admin/settings/sf-options.php:152
938
  msgid ""
939
  "CHECKING these boxes will **HIDE** these product options from the vendor"
940
  msgstr ""
941
 
942
- #: ../classes/admin/settings/sf-options.php:155
943
  msgid "Virtual"
944
  msgstr ""
945
 
946
- #: ../classes/admin/settings/sf-options.php:156
947
  msgid "Downloadable"
948
  msgstr ""
949
 
950
- #: ../classes/admin/settings/sf-options.php:163
951
  msgid "Miscellaneous"
952
  msgstr ""
953
 
954
- #: ../classes/admin/settings/sf-options.php:167
955
  msgid "SKU"
956
  msgstr ""
957
 
958
- #: ../classes/admin/settings/sf-options.php:168
959
  msgid "Featured"
960
  msgstr ""
961
 
962
- #: ../classes/admin/settings/sf-options.php:169
963
  msgid "Duplicate Product"
964
  msgstr ""
965
 
966
- #: ../classes/admin/settings/sf-options.php:176
967
  msgid "Stylesheet"
968
  msgstr ""
969
 
970
- #: ../classes/admin/settings/sf-options.php:177
971
  msgid ""
972
  "You can add CSS in this textarea, which will be loaded on the product add/"
973
  "edit page for vendors."
974
  msgstr ""
975
 
976
- #: ../classes/admin/settings/sf-options.php:184
977
  msgid "Permissions"
978
  msgstr ""
979
 
980
- #: ../classes/admin/settings/sf-options.php:184
981
  msgid "General permissions used around the shop"
982
  msgstr ""
983
 
984
- #: ../classes/admin/settings/sf-options.php:188
985
  msgid "View orders"
986
  msgstr ""
987
 
988
- #: ../classes/admin/settings/sf-options.php:189
989
  msgid "Show customer details such as email, address, name, etc, for each order"
990
  msgstr ""
991
 
992
- #: ../classes/admin/settings/sf-options.php:196
993
  msgid "View comments"
994
  msgstr ""
995
 
996
- #: ../classes/admin/settings/sf-options.php:197
997
  msgid "View all vendor comments for an order on the frontend"
998
  msgstr ""
999
 
1000
- #: ../classes/admin/settings/sf-options.php:204
1001
  msgid "Submit comments"
1002
  msgstr ""
1003
 
1004
- #: ../classes/admin/settings/sf-options.php:205
1005
  msgid ""
1006
  "Submit comments for an order on the frontend. Eg, tracking ID for a product"
1007
  msgstr ""
1008
 
1009
- #: ../classes/admin/settings/sf-options.php:212
1010
  msgid "View email addresses"
1011
  msgstr ""
1012
 
1013
- #: ../classes/admin/settings/sf-options.php:213
1014
  msgid ""
1015
  "While viewing order details on the frontend, you can disable or enable email "
1016
  "addresses"
1017
  msgstr ""
1018
 
1019
- #: ../classes/admin/settings/sf-options.php:220
1020
  msgid "Export a CSV file of orders for a product"
1021
  msgstr ""
1022
 
1023
- #: ../classes/admin/settings/sf-options.php:221
1024
  msgid "Vendors could export orders for a product on the frontend"
1025
  msgstr ""
1026
 
1027
- #: ../classes/admin/settings/sf-options.php:228
1028
  msgid "Reports"
1029
  msgstr ""
1030
 
1031
- #: ../classes/admin/settings/sf-options.php:229
1032
  msgid ""
1033
  "<strike>View backend sales reports</strike>. <strong>Depreciated</strong>"
1034
  msgstr ""
1035
 
1036
- #: ../classes/admin/settings/sf-options.php:230
1037
  msgid ""
1038
  "This option has been removed and will no longer function. It will be "
1039
  "completely removed in future versions. Vendors should use their Vendor "
1040
  "Dashboard for reports as all identical functionality is already there. "
1041
  msgstr ""
1042
 
1043
- #: ../classes/admin/settings/sf-options.php:237
1044
  msgid "View Frontend sales reports"
1045
  msgstr ""
1046
 
1047
- #: ../classes/admin/settings/sf-options.php:238
1048
  msgid ""
1049
  "Sales table on the frontend on the Vendor Dashboard page. The table will "
1050
  "only display sales data that pertain to their products, and only for orders "
1051
  "that are processing or completed."
1052
  msgstr ""
1053
 
1054
- #: ../classes/admin/settings/sf-options.php:246
1055
  msgid "Submit products"
1056
  msgstr ""
1057
 
1058
- #: ../classes/admin/settings/sf-options.php:247
1059
  msgid ""
1060
  "Check to allow vendors to list new products. Admin must approve new "
1061
  "products by editing the product, and clicking Publish."
1062
  msgstr ""
1063
 
1064
- #: ../classes/admin/settings/sf-options.php:254
1065
  msgid "Edit live products"
1066
  msgstr ""
1067
 
1068
- #: ../classes/admin/settings/sf-options.php:255
1069
  msgid ""
1070
  "Vendors could edit an approved product after it has already gone live. There "
1071
  "is no approval or review after editing a live product. This could be "
1072
  "dangerous with malicious vendors, so take caution."
1073
  msgstr ""
1074
 
1075
- #: ../classes/admin/settings/sf-options.php:262
1076
  msgid "Submit products live without requiring approval"
1077
  msgstr ""
1078
 
1079
- #: ../classes/admin/settings/sf-options.php:263
1080
  msgid ""
1081
  "Vendors can submit products without review or approval from a shop admin. "
1082
  "This could be dangerous with malicious vendors, so take caution."
1083
  msgstr ""
1084
 
1085
- #: ../classes/admin/settings/sf-options.php:269
1086
  msgid "Pages"
1087
  msgstr ""
1088
 
1089
- #: ../classes/admin/settings/sf-options.php:270
1090
  msgid "Page configuration"
1091
  msgstr ""
1092
 
1093
- #: ../classes/admin/settings/sf-options.php:273
1094
  msgid "Vendor dashboard"
1095
  msgstr ""
1096
 
1097
- #: ../classes/admin/settings/sf-options.php:274
1098
  msgid ""
1099
  "Choose the page that has the shortcode <code>[wcv_vendor_dashboard]</"
1100
  "code><br/>. If this page is not set, you will break your site. If you "
@@ -1102,56 +1096,56 @@ msgid ""
1102
  "Dashboard page must be set."
1103
  msgstr ""
1104
 
1105
- #: ../classes/admin/settings/sf-options.php:281
1106
  msgid "Shop settings"
1107
  msgstr ""
1108
 
1109
- #: ../classes/admin/settings/sf-options.php:282
1110
  msgid ""
1111
  "Choose the page that has the shortcode <code>[wcv_shop_settings]</code><br/"
1112
  ">These are the shop settings a vendor can configure. By default, Vendor "
1113
  "Dashboard > Shop Settings should have this shortcode."
1114
  msgstr ""
1115
 
1116
- #: ../classes/admin/settings/sf-options.php:289
1117
  msgid "Orders page"
1118
  msgstr ""
1119
 
1120
- #: ../classes/admin/settings/sf-options.php:290
1121
  msgid ""
1122
  "Choose the page that has the shortcode <code>[wcv_orders]</code><br/>By "
1123
  "default, Vendor Dashboard > Orders should have the shortcode."
1124
  msgstr ""
1125
 
1126
- #: ../classes/admin/settings/sf-options.php:297
1127
  msgid "Vendor terms"
1128
  msgstr ""
1129
 
1130
- #: ../classes/admin/settings/sf-options.php:298
1131
  msgid ""
1132
  "These terms are shown to a user when submitting an application to become a "
1133
  "vendor.<br/>If left blank, no terms will be shown to the applicant. Vendor "
1134
  "must accept terms in order to register, if set."
1135
  msgstr ""
1136
 
1137
- #: ../classes/admin/settings/sf-options.php:305
1138
  msgid "payments"
1139
  msgstr ""
1140
 
1141
- #: ../classes/admin/settings/sf-options.php:316
1142
  msgid "Payments"
1143
  msgstr ""
1144
 
1145
- #: ../classes/admin/settings/sf-options.php:318
1146
  msgid "PayPal Adaptive Payments Scheduling"
1147
  msgstr ""
1148
 
1149
- #: ../classes/admin/settings/sf-options.php:319
1150
  #, php-format
1151
  msgid "Total commission currently due: %s. <a href=\"%s\">View details</a>."
1152
  msgstr ""
1153
 
1154
- #: ../classes/admin/settings/sf-options.php:320
1155
  #, php-format
1156
  msgid ""
1157
  "Make sure you update your PayPal Adaptive Payments settings <a href=\"%s"
@@ -1167,55 +1161,55 @@ msgid ""
1167
  "Vendors Pro</a>."
1168
  msgstr ""
1169
 
1170
- #: ../classes/admin/settings/sf-options.php:324
1171
  msgid "Instant pay"
1172
  msgstr ""
1173
 
1174
- #: ../classes/admin/settings/sf-options.php:325
1175
  msgid ""
1176
  "Instantly pay vendors their commission when an order is made, and if a "
1177
  "vendor has a valid PayPal email added on their Shop Settings page."
1178
  msgstr ""
1179
 
1180
- #: ../classes/admin/settings/sf-options.php:326
1181
  msgid ""
1182
  "For this to work, customers must checkout with the PayPal Adaptive Payments "
1183
  "gateway. Using any other gateways will not pay vendors instantly"
1184
  msgstr ""
1185
 
1186
- #: ../classes/admin/settings/sf-options.php:333
1187
  msgid "Payment schedule"
1188
  msgstr ""
1189
 
1190
- #: ../classes/admin/settings/sf-options.php:334
1191
  msgid "Note: Schedule will only work if instant pay is unchecked"
1192
  msgstr ""
1193
 
1194
- #: ../classes/admin/settings/sf-options.php:339
1195
  msgid "Weekly"
1196
  msgstr ""
1197
 
1198
- #: ../classes/admin/settings/sf-options.php:340
1199
  msgid "Biweekly"
1200
  msgstr ""
1201
 
1202
- #: ../classes/admin/settings/sf-options.php:341
1203
  msgid "Monthly"
1204
  msgstr ""
1205
 
1206
- #: ../classes/admin/settings/sf-options.php:342
1207
  msgid "Manual"
1208
  msgstr ""
1209
 
1210
- #: ../classes/admin/settings/sf-options.php:343
1211
  msgid "Now"
1212
  msgstr ""
1213
 
1214
- #: ../classes/admin/settings/sf-options.php:348
1215
  msgid "Email notification"
1216
  msgstr ""
1217
 
1218
- #: ../classes/admin/settings/sf-options.php:349
1219
  msgid ""
1220
  "Send the WooCommerce admin an email each time a payment has been made via "
1221
  "the payment schedule options above"
@@ -1273,11 +1267,11 @@ msgstr ""
1273
  msgid "Once a month"
1274
  msgstr ""
1275
 
1276
- #: ../classes/class-install.php:59 ../classes/class-install.php:214
1277
  msgid "Pending Vendor"
1278
  msgstr ""
1279
 
1280
- #: ../classes/class-install.php:165
1281
  msgid "Vendor Dashboard"
1282
  msgstr ""
1283
 
@@ -1305,41 +1299,41 @@ msgstr ""
1305
  msgid "Quantity"
1306
  msgstr ""
1307
 
1308
- #: ../classes/front/orders/class-orders.php:107
1309
  msgid ""
1310
  "You haven't selected a product's orders to view! Please go back to the "
1311
  "Vendor Dashboard and click Show Orders on the product you'd like to view."
1312
  msgstr ""
1313
 
1314
- #: ../classes/front/orders/class-orders.php:111
1315
  msgid "No orders."
1316
  msgstr ""
1317
 
1318
- #: ../classes/front/orders/class-orders.php:174
1319
  msgid "Product Title"
1320
  msgstr ""
1321
 
1322
- #: ../classes/front/orders/class-orders.php:175
1323
  msgid "Full name"
1324
  msgstr ""
1325
 
1326
- #: ../classes/front/orders/class-orders.php:176
1327
  msgid "Address"
1328
  msgstr ""
1329
 
1330
- #: ../classes/front/orders/class-orders.php:177
1331
  msgid "City"
1332
  msgstr ""
1333
 
1334
- #: ../classes/front/orders/class-orders.php:178
1335
  msgid "State"
1336
  msgstr ""
1337
 
1338
- #: ../classes/front/orders/class-orders.php:179
1339
  msgid "Zip"
1340
  msgstr ""
1341
 
1342
- #: ../classes/front/orders/class-orders.php:180
1343
  msgid "Email address"
1344
  msgstr ""
1345
 
@@ -1351,28 +1345,33 @@ msgstr ""
1351
  msgid "Success. The customer has been notified of your comment."
1352
  msgstr ""
1353
 
1354
- #: ../classes/front/signup/class-vendor-signup.php:45
 
1355
  #: ../templates/dashboard/denied.php:22
1356
  msgid "Apply to become a vendor? "
1357
  msgstr ""
1358
 
1359
- #: ../classes/front/signup/class-vendor-signup.php:54
 
1360
  #, php-format
1361
  msgid ""
1362
  "I have read and accepted the <a target=\"top\" href=\"%s\">terms and "
1363
  "conditions</a>"
1364
  msgstr ""
1365
 
1366
- #: ../classes/front/signup/class-vendor-signup.php:88
 
1367
  msgid "Application denied. You are an administrator."
1368
  msgstr ""
1369
 
1370
- #: ../classes/front/signup/class-vendor-signup.php:90
 
1371
  msgid "Your application has been submitted."
1372
  msgstr ""
1373
 
1374
- #: ../classes/front/signup/class-vendor-signup.php:130
1375
- #: ../classes/front/signup/class-vendor-signup.php:142
 
1376
  msgid "You must accept the terms and conditions to become a vendor."
1377
  msgstr ""
1378
 
@@ -1655,7 +1654,7 @@ msgstr ""
1655
  msgid "Tracking"
1656
  msgstr ""
1657
 
1658
- #: ../templates/dashboard/orders.php:176
1659
  msgid "You have no orders during this period."
1660
  msgstr ""
1661
 
@@ -1759,6 +1758,15 @@ msgstr ""
1759
  msgid "You have received an order from %s. Their order is as follows:"
1760
  msgstr ""
1761
 
 
 
 
 
 
 
 
 
 
1762
  #: ../templates/orders/csv-export.php:6
1763
  msgid "Export orders"
1764
  msgstr ""
@@ -1771,6 +1779,11 @@ msgstr ""
1771
  msgid "No customer note."
1772
  msgstr ""
1773
 
 
 
 
 
 
1774
  #: ../templates/orders/shipping/shipping-form.php:6
1775
  msgid "Provider:"
1776
  msgstr ""
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: WC Vendors\n"
5
+ "POT-Creation-Date: 2016-05-25 14:49-0600\n"
6
  "PO-Revision-Date: 2015-04-24 09:29+1000\n"
7
  "Last-Translator: \n"
8
  "Language-Team: WC Vendors <support@wcvendors.com>\n"
24
  "activate before attempting to activate again."
25
  msgstr ""
26
 
27
+ #: ../class-wc-vendors.php:84 ../classes/admin/class-admin-reports.php:41
28
+ #: ../classes/admin/class-admin-users.php:408
29
  msgid "WC Vendors"
30
  msgstr ""
31
 
32
+ #: ../class-wc-vendors.php:112
33
  msgid ""
34
  "<b>WC Vendors is disabled</b>. WC Vendors requires a minimum of WooCommerce "
35
  "v2.4.0."
36
  msgstr ""
37
 
38
+ #: ../class-wc-vendors.php:251 ../classes/admin/settings/sf-options.php:192
39
  msgid "Capabilities"
40
  msgstr ""
41
 
42
+ #: ../class-wc-vendors.php:274 ../classes/admin/class-admin-page.php:254
43
  #: ../classes/admin/class-admin-reports.php:175
44
+ #: ../classes/admin/class-admin-reports.php:458
45
  #: ../classes/admin/class-product-meta.php:46
46
  #: ../classes/admin/class-product-meta.php:187
47
+ #: ../classes/admin/class-product-meta.php:223 ../classes/class-install.php:87
48
  msgid "Vendor"
49
  msgstr ""
50
 
51
+ #: ../class-wc-vendors.php:276 ../classes/admin/settings/sf-options.php:4
52
  msgid "General"
53
  msgstr ""
54
 
55
+ #: ../class-wc-vendors.php:314
56
  msgid "Documentation/KB"
57
  msgstr ""
58
 
59
+ #: ../class-wc-vendors.php:315
60
  msgid "Help Forums"
61
  msgstr ""
62
 
63
+ #: ../class-wc-vendors.php:316
64
  msgid "Paid Support"
65
  msgstr ""
66
 
67
+ #: ../class-wc-vendors.php:338
68
  #, php-format
69
  msgid ""
70
  "WC Vendors requires the Vendor shop page value be set <a href=\"%s\">click "
71
  "here to set it.</a> | <a href=\"%s\">Hide Notice</a>"
72
  msgstr ""
73
 
74
+ #: ../class-wc-vendors.php:346
75
  #, php-format
76
  msgid ""
77
  "You must save your permalinks once you have modified your vendor page. <a "
94
  msgid "Commission"
95
  msgstr ""
96
 
97
+ #: ../classes/admin/class-admin-page.php:252
98
  #: ../classes/admin/class-admin-reports.php:174
99
  #: ../templates/dashboard/reports.php:17
100
  #: ../templates/emails/notify-vendor-shipped.php:22
102
  msgid "Product"
103
  msgstr ""
104
 
105
+ #: ../classes/admin/class-admin-page.php:253
106
  #: ../classes/admin/class-vendor-admin-dashboard.php:283
107
  msgid "Order ID"
108
  msgstr ""
109
 
110
+ #: ../classes/admin/class-admin-page.php:255
111
  #: ../classes/admin/class-admin-reports.php:176
112
  #: ../classes/admin/class-admin-reports.php:374
113
  #: ../classes/admin/class-vendor-admin-dashboard.php:286
115
  msgid "Total"
116
  msgstr ""
117
 
118
+ #: ../classes/admin/class-admin-page.php:256
119
  #: ../classes/admin/class-admin-reports.php:178
120
+ #: ../classes/admin/class-admin-reports.php:461
121
  msgid "Status"
122
  msgstr ""
123
 
124
+ #: ../classes/admin/class-admin-page.php:257
125
  #: ../classes/admin/class-vendor-admin-dashboard.php:288
126
+ #: ../classes/front/orders/class-orders.php:185
127
  #: ../templates/dashboard/orders.php:36
128
  msgid "Date"
129
  msgstr ""
130
 
131
+ #: ../classes/admin/class-admin-page.php:294
132
  msgid "Mark paid"
133
  msgstr ""
134
 
135
+ #: ../classes/admin/class-admin-page.php:295
136
  msgid "Mark due"
137
  msgstr ""
138
 
139
+ #: ../classes/admin/class-admin-page.php:296
140
  msgid "Mark reversed"
141
  msgstr ""
142
 
143
+ #: ../classes/admin/class-admin-page.php:313
144
+ #: ../classes/admin/class-admin-page.php:317
145
  msgid "Filter"
146
  msgstr ""
147
 
148
+ #: ../classes/admin/class-admin-page.php:352
149
  msgid "Show all dates"
150
  msgstr ""
151
 
152
+ #: ../classes/admin/class-admin-page.php:365
153
  #, php-format
154
  msgid "%1$s %2$d"
155
  msgstr ""
156
 
157
+ #: ../classes/admin/class-admin-page.php:387
158
  msgid "Show all Statuses"
159
  msgstr ""
160
 
161
+ #: ../classes/admin/class-admin-page.php:413
162
  msgid "Commission marked paid."
163
  msgstr ""
164
 
165
+ #: ../classes/admin/class-admin-page.php:420
166
  msgid "Commission marked due."
167
  msgstr ""
168
 
169
+ #: ../classes/admin/class-admin-page.php:427
170
  msgid "Commission marked reversed."
171
  msgstr ""
172
 
195
  msgstr ""
196
 
197
  #: ../classes/admin/class-admin-reports.php:121
198
+ #: ../classes/admin/class-admin-reports.php:437
199
  #: ../templates/dashboard/date-picker.php:3
200
  msgid "From:"
201
  msgstr ""
202
 
203
  #: ../classes/admin/class-admin-reports.php:123
204
+ #: ../classes/admin/class-admin-reports.php:439
205
  #: ../templates/dashboard/date-picker.php:7
206
  msgid "To:"
207
  msgstr ""
208
 
209
  #: ../classes/admin/class-admin-reports.php:125
210
  #: ../classes/admin/class-admin-reports.php:283
211
+ #: ../classes/admin/class-admin-reports.php:448
212
  #: ../templates/dashboard/date-picker.php:12
213
  msgid "Show"
214
  msgstr ""
236
  msgstr ""
237
 
238
  #: ../classes/admin/class-admin-reports.php:173
239
+ #: ../classes/front/orders/class-orders.php:177
240
  #: ../templates/dashboard/orders.php:33
241
  msgid "Order"
242
  msgstr ""
283
 
284
  #: ../classes/admin/class-admin-reports.php:347
285
  #: ../classes/admin/settings/sf-options.php:52
286
+ #: ../classes/admin/settings/sf-options.php:136
287
  #: ../templates/dashboard/orders.php:34 ../templates/orders/orders.php:115
288
  msgid "Shipping"
289
  msgstr ""
290
 
291
  #: ../classes/admin/class-admin-reports.php:348
292
+ #: ../classes/admin/class-admin-reports.php:445
293
  msgid "Reversed"
294
  msgstr ""
295
 
296
  #: ../classes/admin/class-admin-reports.php:349
297
+ #: ../classes/admin/class-admin-reports.php:444
298
  msgid "Paid"
299
  msgstr ""
300
 
301
  #: ../classes/admin/class-admin-reports.php:350
302
+ #: ../classes/admin/class-admin-reports.php:443
303
  msgid "Due"
304
  msgstr ""
305
 
306
+ #: ../classes/admin/class-admin-reports.php:459
307
  msgid "Tax Total"
308
  msgstr ""
309
 
310
+ #: ../classes/admin/class-admin-reports.php:460
311
  msgid "Shipping Total"
312
  msgstr ""
313
 
314
+ #: ../classes/admin/class-admin-reports.php:462
315
  msgid "Commission Total"
316
  msgstr ""
317
 
318
+ #: ../classes/admin/class-admin-reports.php:484
319
  msgid "No commissions found."
320
  msgstr ""
321
 
322
+ #: ../classes/admin/class-admin-users.php:418
323
  msgid "Enable HTML for the shop description"
324
  msgstr ""
325
 
326
+ #: ../classes/admin/class-admin-users.php:424
327
  msgid "Shop name"
328
  msgstr ""
329
 
330
+ #: ../classes/admin/class-admin-users.php:431
331
  msgid "PayPal E-mail"
332
  msgstr ""
333
 
334
+ #: ../classes/admin/class-admin-users.php:432
335
  msgid "required"
336
  msgstr ""
337
 
338
+ #: ../classes/admin/class-admin-users.php:439
339
  msgid "Commission rate"
340
  msgstr ""
341
 
342
+ #: ../classes/admin/class-admin-users.php:440
343
  #: ../classes/admin/class-product-meta.php:174
344
  msgid "Leave blank for default"
345
  msgstr ""
346
 
347
+ #: ../classes/admin/class-admin-users.php:446
348
  msgid "Give Tax"
349
  msgstr ""
350
 
351
+ #: ../classes/admin/class-admin-users.php:451
352
  msgid "Tax override for vendor"
353
  msgstr ""
354
 
355
+ #: ../classes/admin/class-admin-users.php:457
356
  msgid "Give Shipping"
357
  msgstr ""
358
 
359
+ #: ../classes/admin/class-admin-users.php:462
360
  msgid "Shipping override for vendor"
361
  msgstr ""
362
 
363
+ #: ../classes/admin/class-admin-users.php:468
364
  #: ../classes/admin/views/html-vendor-settings-page.php:30
365
  #: ../templates/dashboard/settings/seller-info.php:3
366
  msgid "Seller info"
367
  msgstr ""
368
 
369
+ #: ../classes/admin/class-admin-users.php:473
370
  msgid "Shop description"
371
  msgstr ""
372
 
373
  #: ../classes/admin/class-vendor-admin-dashboard.php:20
374
+ #: ../classes/class-install.php:188
375
  msgid "Shop Settings"
376
  msgstr ""
377
 
378
  #: ../classes/admin/class-vendor-admin-dashboard.php:21
379
  #: ../classes/admin/class-vendor-admin-dashboard.php:146
380
+ #: ../classes/admin/settings/sf-options.php:196
381
+ #: ../classes/class-install.php:187 ../templates/dashboard/orders.php:24
382
  msgid "Orders"
383
  msgstr ""
384
 
403
  msgstr ""
404
 
405
  #: ../classes/admin/class-vendor-admin-dashboard.php:285
406
+ #: ../classes/admin/settings/sf-options.php:127
407
+ #: ../classes/admin/settings/sf-options.php:254
408
  msgid "Products"
409
  msgstr ""
410
 
422
  msgid "Orders marked shipped."
423
  msgstr ""
424
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
425
  #: ../classes/admin/class-vendor-applicants.php:26
426
  msgid "Approve"
427
  msgstr ""
474
  #: ../classes/admin/emails/class-wc-approve-vendor.php:123
475
  #: ../classes/admin/emails/class-wc-notify-admin.php:134
476
  #: ../classes/admin/emails/class-wc-notify-shipped.php:163
477
+ #: ../classes/admin/emails/class-wc-notify-vendor.php:256
478
  #: ../classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:62
479
  msgid "Enable/Disable"
480
  msgstr ""
482
  #: ../classes/admin/emails/class-wc-approve-vendor.php:125
483
  #: ../classes/admin/emails/class-wc-notify-admin.php:136
484
  #: ../classes/admin/emails/class-wc-notify-shipped.php:165
485
+ #: ../classes/admin/emails/class-wc-notify-vendor.php:258
486
  msgid "Enable this email notification"
487
  msgstr ""
488
 
502
  #: ../classes/admin/emails/class-wc-approve-vendor.php:136
503
  #: ../classes/admin/emails/class-wc-notify-admin.php:147
504
  #: ../classes/admin/emails/class-wc-notify-shipped.php:169
505
+ #: ../classes/admin/emails/class-wc-notify-vendor.php:262
506
  msgid "Subject"
507
  msgstr ""
508
 
509
  #: ../classes/admin/emails/class-wc-approve-vendor.php:138
510
  #: ../classes/admin/emails/class-wc-notify-admin.php:149
511
  #: ../classes/admin/emails/class-wc-notify-shipped.php:171
512
+ #: ../classes/admin/emails/class-wc-notify-vendor.php:264
513
  #, php-format
514
  msgid ""
515
  "This controls the email subject line. Leave blank to use the default "
519
  #: ../classes/admin/emails/class-wc-approve-vendor.php:143
520
  #: ../classes/admin/emails/class-wc-notify-admin.php:154
521
  #: ../classes/admin/emails/class-wc-notify-shipped.php:176
522
+ #: ../classes/admin/emails/class-wc-notify-vendor.php:269
523
  msgid "Email Heading"
524
  msgstr ""
525
 
526
  #: ../classes/admin/emails/class-wc-approve-vendor.php:145
527
  #: ../classes/admin/emails/class-wc-notify-admin.php:156
528
  #: ../classes/admin/emails/class-wc-notify-shipped.php:178
529
+ #: ../classes/admin/emails/class-wc-notify-vendor.php:271
530
  #, php-format
531
  msgid ""
532
  "This controls the main heading contained within the email notification. "
536
  #: ../classes/admin/emails/class-wc-approve-vendor.php:150
537
  #: ../classes/admin/emails/class-wc-notify-admin.php:161
538
  #: ../classes/admin/emails/class-wc-notify-shipped.php:183
539
+ #: ../classes/admin/emails/class-wc-notify-vendor.php:282
540
  msgid "Email type"
541
  msgstr ""
542
 
543
  #: ../classes/admin/emails/class-wc-approve-vendor.php:152
544
  #: ../classes/admin/emails/class-wc-notify-admin.php:163
545
  #: ../classes/admin/emails/class-wc-notify-shipped.php:185
546
+ #: ../classes/admin/emails/class-wc-notify-vendor.php:284
547
  msgid "Choose which format of email to send."
548
  msgstr ""
549
 
550
  #: ../classes/admin/emails/class-wc-approve-vendor.php:156
551
  #: ../classes/admin/emails/class-wc-notify-admin.php:167
552
  #: ../classes/admin/emails/class-wc-notify-shipped.php:189
553
+ #: ../classes/admin/emails/class-wc-notify-vendor.php:288
554
  msgid "Plain text"
555
  msgstr ""
556
 
557
  #: ../classes/admin/emails/class-wc-approve-vendor.php:157
558
  #: ../classes/admin/emails/class-wc-notify-admin.php:168
559
  #: ../classes/admin/emails/class-wc-notify-shipped.php:190
560
+ #: ../classes/admin/emails/class-wc-notify-vendor.php:289
561
  msgid "HTML"
562
  msgstr ""
563
 
564
  #: ../classes/admin/emails/class-wc-approve-vendor.php:158
565
  #: ../classes/admin/emails/class-wc-notify-admin.php:169
566
  #: ../classes/admin/emails/class-wc-notify-shipped.php:191
567
+ #: ../classes/admin/emails/class-wc-notify-vendor.php:290
568
  msgid "Multipart"
569
  msgstr ""
570
 
622
  msgid "[{blogname}] New customer order ({order_number}) - {order_date}"
623
  msgstr ""
624
 
625
+ #: ../classes/admin/emails/class-wc-notify-vendor.php:105
626
  msgid "Commission Subtotal:"
627
  msgstr ""
628
 
629
+ #: ../classes/admin/emails/class-wc-notify-vendor.php:111
630
  msgid "Tax Subtotal:"
631
  msgstr ""
632
 
633
+ #: ../classes/admin/emails/class-wc-notify-vendor.php:119
634
  msgid "Shipping Subtotal:"
635
  msgstr ""
636
 
637
+ #: ../classes/admin/emails/class-wc-notify-vendor.php:276
638
+ msgid "Product Totals"
639
+ msgstr ""
640
+
641
+ #: ../classes/admin/emails/class-wc-notify-vendor.php:278
642
+ msgid ""
643
+ "Show thecommission due/paid as the product totals instead of the product "
644
+ "prices."
645
+ msgstr ""
646
+
647
  #: ../classes/admin/settings/classes/sf-class-format-options.php:211
648
  #: ../classes/admin/settings/classes/sf-class-settings.php:786
649
  msgid "Select a page..."
744
  msgstr ""
745
 
746
  #: ../classes/admin/settings/sf-options.php:43
747
+ #: ../classes/admin/settings/sf-options.php:175
748
  msgid "Taxes"
749
  msgstr ""
750
 
834
  msgstr ""
835
 
836
  #: ../classes/admin/settings/sf-options.php:103
837
+ #: ../classes/admin/settings/sf-options.php:116
838
+ msgid "Sold By"
839
  msgstr ""
840
 
841
  #: ../classes/admin/settings/sf-options.php:104
842
+ msgid "Enable sold by labels"
843
  msgstr ""
844
 
845
+ #: ../classes/admin/settings/sf-options.php:105
846
+ msgid "This will enable or disable the sold by labels."
847
  msgstr ""
848
 
849
+ #: ../classes/admin/settings/sf-options.php:112
850
+ msgid "Sold By Label"
851
+ msgstr ""
852
+
853
+ #: ../classes/admin/settings/sf-options.php:113
854
+ msgid "The sold by label used on the site and emails."
855
+ msgstr ""
856
+
857
+ #: ../classes/admin/settings/sf-options.php:120
858
  msgid "Seller Info Label"
859
  msgstr ""
860
 
861
+ #: ../classes/admin/settings/sf-options.php:121
862
  msgid "The seller info tab title on the single product page."
863
  msgstr ""
864
 
865
+ #: ../classes/admin/settings/sf-options.php:124
866
  msgid "Seller Info"
867
  msgstr ""
868
 
869
+ #: ../classes/admin/settings/sf-options.php:128
870
  msgid "Product Add Page"
871
  msgstr ""
872
 
873
+ #: ../classes/admin/settings/sf-options.php:128
874
  msgid "Configure what to hide from all vendors when adding a product"
875
  msgstr ""
876
 
877
+ #: ../classes/admin/settings/sf-options.php:131
878
  msgid "Left side panel"
879
  msgstr ""
880
 
881
+ #: ../classes/admin/settings/sf-options.php:132
882
  msgid ""
883
  "CHECKING these boxes will **HIDE** these areas of the add product page for "
884
  "vendors"
885
  msgstr ""
886
 
887
+ #: ../classes/admin/settings/sf-options.php:135
888
  msgid "Inventory"
889
  msgstr ""
890
 
891
+ #: ../classes/admin/settings/sf-options.php:137
892
  msgid "Linked Products"
893
  msgstr ""
894
 
895
+ #: ../classes/admin/settings/sf-options.php:138
896
  msgid "Attributes"
897
  msgstr ""
898
 
899
+ #: ../classes/admin/settings/sf-options.php:139
900
  msgid "Advanced"
901
  msgstr ""
902
 
903
+ #: ../classes/admin/settings/sf-options.php:146
904
  msgid "Types"
905
  msgstr ""
906
 
907
+ #: ../classes/admin/settings/sf-options.php:147
908
  msgid "CHECKING these boxes will HIDE these product types from the vendor"
909
  msgstr ""
910
 
911
+ #: ../classes/admin/settings/sf-options.php:150
912
  msgid "Simple"
913
  msgstr ""
914
 
915
+ #: ../classes/admin/settings/sf-options.php:151
916
  msgid "Variable"
917
  msgstr ""
918
 
919
+ #: ../classes/admin/settings/sf-options.php:152
920
  msgid "Grouped"
921
  msgstr ""
922
 
923
+ #: ../classes/admin/settings/sf-options.php:153
924
  msgid "External / affiliate"
925
  msgstr ""
926
 
927
+ #: ../classes/admin/settings/sf-options.php:160
928
  msgid "Type options"
929
  msgstr ""
930
 
931
+ #: ../classes/admin/settings/sf-options.php:161
932
  msgid ""
933
  "CHECKING these boxes will **HIDE** these product options from the vendor"
934
  msgstr ""
935
 
936
+ #: ../classes/admin/settings/sf-options.php:164
937
  msgid "Virtual"
938
  msgstr ""
939
 
940
+ #: ../classes/admin/settings/sf-options.php:165
941
  msgid "Downloadable"
942
  msgstr ""
943
 
944
+ #: ../classes/admin/settings/sf-options.php:172
945
  msgid "Miscellaneous"
946
  msgstr ""
947
 
948
+ #: ../classes/admin/settings/sf-options.php:176
949
  msgid "SKU"
950
  msgstr ""
951
 
952
+ #: ../classes/admin/settings/sf-options.php:177
953
  msgid "Featured"
954
  msgstr ""
955
 
956
+ #: ../classes/admin/settings/sf-options.php:178
957
  msgid "Duplicate Product"
958
  msgstr ""
959
 
960
+ #: ../classes/admin/settings/sf-options.php:185
961
  msgid "Stylesheet"
962
  msgstr ""
963
 
964
+ #: ../classes/admin/settings/sf-options.php:186
965
  msgid ""
966
  "You can add CSS in this textarea, which will be loaded on the product add/"
967
  "edit page for vendors."
968
  msgstr ""
969
 
970
+ #: ../classes/admin/settings/sf-options.php:193
971
  msgid "Permissions"
972
  msgstr ""
973
 
974
+ #: ../classes/admin/settings/sf-options.php:193
975
  msgid "General permissions used around the shop"
976
  msgstr ""
977
 
978
+ #: ../classes/admin/settings/sf-options.php:197
979
  msgid "View orders"
980
  msgstr ""
981
 
982
+ #: ../classes/admin/settings/sf-options.php:198
983
  msgid "Show customer details such as email, address, name, etc, for each order"
984
  msgstr ""
985
 
986
+ #: ../classes/admin/settings/sf-options.php:205
987
  msgid "View comments"
988
  msgstr ""
989
 
990
+ #: ../classes/admin/settings/sf-options.php:206
991
  msgid "View all vendor comments for an order on the frontend"
992
  msgstr ""
993
 
994
+ #: ../classes/admin/settings/sf-options.php:213
995
  msgid "Submit comments"
996
  msgstr ""
997
 
998
+ #: ../classes/admin/settings/sf-options.php:214
999
  msgid ""
1000
  "Submit comments for an order on the frontend. Eg, tracking ID for a product"
1001
  msgstr ""
1002
 
1003
+ #: ../classes/admin/settings/sf-options.php:221
1004
  msgid "View email addresses"
1005
  msgstr ""
1006
 
1007
+ #: ../classes/admin/settings/sf-options.php:222
1008
  msgid ""
1009
  "While viewing order details on the frontend, you can disable or enable email "
1010
  "addresses"
1011
  msgstr ""
1012
 
1013
+ #: ../classes/admin/settings/sf-options.php:229
1014
  msgid "Export a CSV file of orders for a product"
1015
  msgstr ""
1016
 
1017
+ #: ../classes/admin/settings/sf-options.php:230
1018
  msgid "Vendors could export orders for a product on the frontend"
1019
  msgstr ""
1020
 
1021
+ #: ../classes/admin/settings/sf-options.php:237
1022
  msgid "Reports"
1023
  msgstr ""
1024
 
1025
+ #: ../classes/admin/settings/sf-options.php:238
1026
  msgid ""
1027
  "<strike>View backend sales reports</strike>. <strong>Depreciated</strong>"
1028
  msgstr ""
1029
 
1030
+ #: ../classes/admin/settings/sf-options.php:239
1031
  msgid ""
1032
  "This option has been removed and will no longer function. It will be "
1033
  "completely removed in future versions. Vendors should use their Vendor "
1034
  "Dashboard for reports as all identical functionality is already there. "
1035
  msgstr ""
1036
 
1037
+ #: ../classes/admin/settings/sf-options.php:246
1038
  msgid "View Frontend sales reports"
1039
  msgstr ""
1040
 
1041
+ #: ../classes/admin/settings/sf-options.php:247
1042
  msgid ""
1043
  "Sales table on the frontend on the Vendor Dashboard page. The table will "
1044
  "only display sales data that pertain to their products, and only for orders "
1045
  "that are processing or completed."
1046
  msgstr ""
1047
 
1048
+ #: ../classes/admin/settings/sf-options.php:255
1049
  msgid "Submit products"
1050
  msgstr ""
1051
 
1052
+ #: ../classes/admin/settings/sf-options.php:256
1053
  msgid ""
1054
  "Check to allow vendors to list new products. Admin must approve new "
1055
  "products by editing the product, and clicking Publish."
1056
  msgstr ""
1057
 
1058
+ #: ../classes/admin/settings/sf-options.php:263
1059
  msgid "Edit live products"
1060
  msgstr ""
1061
 
1062
+ #: ../classes/admin/settings/sf-options.php:264
1063
  msgid ""
1064
  "Vendors could edit an approved product after it has already gone live. There "
1065
  "is no approval or review after editing a live product. This could be "
1066
  "dangerous with malicious vendors, so take caution."
1067
  msgstr ""
1068
 
1069
+ #: ../classes/admin/settings/sf-options.php:271
1070
  msgid "Submit products live without requiring approval"
1071
  msgstr ""
1072
 
1073
+ #: ../classes/admin/settings/sf-options.php:272
1074
  msgid ""
1075
  "Vendors can submit products without review or approval from a shop admin. "
1076
  "This could be dangerous with malicious vendors, so take caution."
1077
  msgstr ""
1078
 
1079
+ #: ../classes/admin/settings/sf-options.php:278
1080
  msgid "Pages"
1081
  msgstr ""
1082
 
1083
+ #: ../classes/admin/settings/sf-options.php:279
1084
  msgid "Page configuration"
1085
  msgstr ""
1086
 
1087
+ #: ../classes/admin/settings/sf-options.php:282
1088
  msgid "Vendor dashboard"
1089
  msgstr ""
1090
 
1091
+ #: ../classes/admin/settings/sf-options.php:283
1092
  msgid ""
1093
  "Choose the page that has the shortcode <code>[wcv_vendor_dashboard]</"
1094
  "code><br/>. If this page is not set, you will break your site. If you "
1096
  "Dashboard page must be set."
1097
  msgstr ""
1098
 
1099
+ #: ../classes/admin/settings/sf-options.php:290
1100
  msgid "Shop settings"
1101
  msgstr ""
1102
 
1103
+ #: ../classes/admin/settings/sf-options.php:291
1104
  msgid ""
1105
  "Choose the page that has the shortcode <code>[wcv_shop_settings]</code><br/"
1106
  ">These are the shop settings a vendor can configure. By default, Vendor "
1107
  "Dashboard > Shop Settings should have this shortcode."
1108
  msgstr ""
1109
 
1110
+ #: ../classes/admin/settings/sf-options.php:298
1111
  msgid "Orders page"
1112
  msgstr ""
1113
 
1114
+ #: ../classes/admin/settings/sf-options.php:299
1115
  msgid ""
1116
  "Choose the page that has the shortcode <code>[wcv_orders]</code><br/>By "
1117
  "default, Vendor Dashboard > Orders should have the shortcode."
1118
  msgstr ""
1119
 
1120
+ #: ../classes/admin/settings/sf-options.php:306
1121
  msgid "Vendor terms"
1122
  msgstr ""
1123
 
1124
+ #: ../classes/admin/settings/sf-options.php:307
1125
  msgid ""
1126
  "These terms are shown to a user when submitting an application to become a "
1127
  "vendor.<br/>If left blank, no terms will be shown to the applicant. Vendor "
1128
  "must accept terms in order to register, if set."
1129
  msgstr ""
1130
 
1131
+ #: ../classes/admin/settings/sf-options.php:314
1132
  msgid "payments"
1133
  msgstr ""
1134
 
1135
+ #: ../classes/admin/settings/sf-options.php:325
1136
  msgid "Payments"
1137
  msgstr ""
1138
 
1139
+ #: ../classes/admin/settings/sf-options.php:327
1140
  msgid "PayPal Adaptive Payments Scheduling"
1141
  msgstr ""
1142
 
1143
+ #: ../classes/admin/settings/sf-options.php:328
1144
  #, php-format
1145
  msgid "Total commission currently due: %s. <a href=\"%s\">View details</a>."
1146
  msgstr ""
1147
 
1148
+ #: ../classes/admin/settings/sf-options.php:329
1149
  #, php-format
1150
  msgid ""
1151
  "Make sure you update your PayPal Adaptive Payments settings <a href=\"%s"
1161
  "Vendors Pro</a>."
1162
  msgstr ""
1163
 
1164
+ #: ../classes/admin/settings/sf-options.php:333
1165
  msgid "Instant pay"
1166
  msgstr ""
1167
 
1168
+ #: ../classes/admin/settings/sf-options.php:334
1169
  msgid ""
1170
  "Instantly pay vendors their commission when an order is made, and if a "
1171
  "vendor has a valid PayPal email added on their Shop Settings page."
1172
  msgstr ""
1173
 
1174
+ #: ../classes/admin/settings/sf-options.php:335
1175
  msgid ""
1176
  "For this to work, customers must checkout with the PayPal Adaptive Payments "
1177
  "gateway. Using any other gateways will not pay vendors instantly"
1178
  msgstr ""
1179
 
1180
+ #: ../classes/admin/settings/sf-options.php:342
1181
  msgid "Payment schedule"
1182
  msgstr ""
1183
 
1184
+ #: ../classes/admin/settings/sf-options.php:343
1185
  msgid "Note: Schedule will only work if instant pay is unchecked"
1186
  msgstr ""
1187
 
1188
+ #: ../classes/admin/settings/sf-options.php:348
1189
  msgid "Weekly"
1190
  msgstr ""
1191
 
1192
+ #: ../classes/admin/settings/sf-options.php:349
1193
  msgid "Biweekly"
1194
  msgstr ""
1195
 
1196
+ #: ../classes/admin/settings/sf-options.php:350
1197
  msgid "Monthly"
1198
  msgstr ""
1199
 
1200
+ #: ../classes/admin/settings/sf-options.php:351
1201
  msgid "Manual"
1202
  msgstr ""
1203
 
1204
+ #: ../classes/admin/settings/sf-options.php:352
1205
  msgid "Now"
1206
  msgstr ""
1207
 
1208
+ #: ../classes/admin/settings/sf-options.php:357
1209
  msgid "Email notification"
1210
  msgstr ""
1211
 
1212
+ #: ../classes/admin/settings/sf-options.php:358
1213
  msgid ""
1214
  "Send the WooCommerce admin an email each time a payment has been made via "
1215
  "the payment schedule options above"
1267
  msgid "Once a month"
1268
  msgstr ""
1269
 
1270
+ #: ../classes/class-install.php:80 ../classes/class-install.php:235
1271
  msgid "Pending Vendor"
1272
  msgstr ""
1273
 
1274
+ #: ../classes/class-install.php:186
1275
  msgid "Vendor Dashboard"
1276
  msgstr ""
1277
 
1299
  msgid "Quantity"
1300
  msgstr ""
1301
 
1302
+ #: ../classes/front/orders/class-orders.php:110
1303
  msgid ""
1304
  "You haven't selected a product's orders to view! Please go back to the "
1305
  "Vendor Dashboard and click Show Orders on the product you'd like to view."
1306
  msgstr ""
1307
 
1308
+ #: ../classes/front/orders/class-orders.php:114
1309
  msgid "No orders."
1310
  msgstr ""
1311
 
1312
+ #: ../classes/front/orders/class-orders.php:178
1313
  msgid "Product Title"
1314
  msgstr ""
1315
 
1316
+ #: ../classes/front/orders/class-orders.php:179
1317
  msgid "Full name"
1318
  msgstr ""
1319
 
1320
+ #: ../classes/front/orders/class-orders.php:180
1321
  msgid "Address"
1322
  msgstr ""
1323
 
1324
+ #: ../classes/front/orders/class-orders.php:181
1325
  msgid "City"
1326
  msgstr ""
1327
 
1328
+ #: ../classes/front/orders/class-orders.php:182
1329
  msgid "State"
1330
  msgstr ""
1331
 
1332
+ #: ../classes/front/orders/class-orders.php:183
1333
  msgid "Zip"
1334
  msgstr ""
1335
 
1336
+ #: ../classes/front/orders/class-orders.php:184
1337
  msgid "Email address"
1338
  msgstr ""
1339
 
1345
  msgid "Success. The customer has been notified of your comment."
1346
  msgstr ""
1347
 
1348
+ #: ../classes/front/signup/class-vendor-signup.php:59
1349
+ #: ../classes/front/signup/views/html-vendor-signup.php:21
1350
  #: ../templates/dashboard/denied.php:22
1351
  msgid "Apply to become a vendor? "
1352
  msgstr ""
1353
 
1354
+ #: ../classes/front/signup/class-vendor-signup.php:73
1355
+ #: ../classes/front/signup/views/html-vendor-signup.php:35
1356
  #, php-format
1357
  msgid ""
1358
  "I have read and accepted the <a target=\"top\" href=\"%s\">terms and "
1359
  "conditions</a>"
1360
  msgstr ""
1361
 
1362
+ #: ../classes/front/signup/class-vendor-signup.php:134
1363
+ #: ../classes/front/signup/class-vendor-signup.php:169
1364
  msgid "Application denied. You are an administrator."
1365
  msgstr ""
1366
 
1367
+ #: ../classes/front/signup/class-vendor-signup.php:136
1368
+ #: ../classes/front/signup/class-vendor-signup.php:171
1369
  msgid "Your application has been submitted."
1370
  msgstr ""
1371
 
1372
+ #: ../classes/front/signup/class-vendor-signup.php:190
1373
+ #: ../classes/front/signup/class-vendor-signup.php:228
1374
+ #: ../classes/front/signup/class-vendor-signup.php:240
1375
  msgid "You must accept the terms and conditions to become a vendor."
1376
  msgstr ""
1377
 
1654
  msgid "Tracking"
1655
  msgstr ""
1656
 
1657
+ #: ../templates/dashboard/orders.php:213
1658
  msgid "You have no orders during this period."
1659
  msgstr ""
1660
 
1758
  msgid "You have received an order from %s. Their order is as follows:"
1759
  msgstr ""
1760
 
1761
+ #: ../templates/orders/comments/add-new-comment.php:11
1762
+ msgid "Add comment"
1763
+ msgstr ""
1764
+
1765
+ #: ../templates/orders/comments/existing-comments.php:9
1766
+ #, php-format
1767
+ msgid "added %s ago"
1768
+ msgstr ""
1769
+
1770
  #: ../templates/orders/csv-export.php:6
1771
  msgid "Export orders"
1772
  msgstr ""
1779
  msgid "No customer note."
1780
  msgstr ""
1781
 
1782
+ #: ../templates/orders/orders.php:84
1783
+ #, php-format
1784
+ msgid "Comments (%s)"
1785
+ msgstr ""
1786
+
1787
  #: ../templates/orders/shipping/shipping-form.php:6
1788
  msgid "Provider:"
1789
  msgstr ""
readme.txt CHANGED
@@ -5,8 +5,8 @@ Donate link: http://www.wcvendors.com/
5
  Author URI: http://www.wcvendors.com/
6
  Plugin URI: http://www.wcvendors.com/
7
  Requires at least: 4.0
8
- Tested up to: 4.5.0
9
- Stable tag: 1.8.9
10
  License: GPLv2 or later
11
 
12
  The free multi-vendor plugin for WooCommerce. Now you can allow anyone to open a store on your site!
@@ -31,7 +31,7 @@ This plugin has been around since 2011 and remains still the #1 multi vendor plu
31
  * Customizable Vendor Pages
32
  * Global, Per Vendor, or Per product Commission Rates
33
  * Notification to Vendors of new orders
34
- * Vendors have their own individual storefronts, and blend in with the site through your categories
35
  * Advanced Product Management
36
  * Customizable Vendor Headers
37
  * Front-End Vendor Registration and Back-End Vendor Registration
@@ -47,20 +47,21 @@ This plugin has been around since 2011 and remains still the #1 multi vendor plu
47
 
48
  = WC Vendors Pro =
49
  * The following features are part of <a href="https://www.wcvendors.com/product/wc-vendors-pro/">WC Vendors Pro</a>
50
- * <strong>Pro Dashboard</strong> making your vendors sales reports a piece of cake</li>
51
- * <strong>Fully featured front-end product add/edit capabilities</strong></li>
52
- * <strong>eBay style feedback</strong> system for Vendor Ratings</li>
53
- * <strong>Shipment Tracking</strong> for Vendors to enter tracking numbers</li>
54
  * <strong>Vendor Shipping</strong> so vendors can enter flat rates for national/shipping, or country/state table rate shipping and receive the shipping fees from each sale.
55
- * <strong>Multiple commission types</strong> such as percentage, percentage + fee, fixed fee, and even fixed fee + fee.</li>
56
- * <strong>Vendor-Only coupons</strong> that vendors can create to make their own coupons for only their products</li>
57
- * <strong>Vendor Stores</strong> post types, which give Vendors their own true actual store</li>
58
- * Vendor <strong>store banners, avatars/icons</strong> and extra information fully customizable</li>
59
- * <strong>Social module</strong> for adding facebook/twitter/google+ and many more</li>
60
- * Extended <strong>Order Notes</strong></li>
61
- * <strong>Insanely customizable template system</strong> to configure, tweak and style your store and dashboard any way you see fit.</li>
62
- * MUCH MORE TO COME including <strong>WooThemes Bookings</strong> support, <strong>Variable Product</strong> support, integration with even more Woo plugins, and good features that you, the customer, ask us to code! <strong>Pro will always be continually updated with new features</strong>, just as you have grown to expect from WC Vendors Free</li>
63
- * <strong>INSANELY FAST SUPPORT</strong> on our <a href="https://www.wcvendors.com/help/forum/wc-vendors-pro-support/">Pro Help Forum</a></li>
 
64
  * There's more features to Pro than listed here!
65
 
66
 
@@ -119,6 +120,30 @@ No Upgrade required at this time.
119
 
120
  == Changelog ==
121
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  = Version 1.8.9 - 1st May 2016 =
123
 
124
  * Fixed: Commission Totals Report Inaccurate #267
5
  Author URI: http://www.wcvendors.com/
6
  Plugin URI: http://www.wcvendors.com/
7
  Requires at least: 4.0
8
+ Tested up to: 4.5.2
9
+ Stable tag: 1.9.0
10
  License: GPLv2 or later
11
 
12
  The free multi-vendor plugin for WooCommerce. Now you can allow anyone to open a store on your site!
31
  * Customizable Vendor Pages
32
  * Global, Per Vendor, or Per product Commission Rates
33
  * Notification to Vendors of new orders
34
+ * Vendors have their own individual storefronts, and blend in with the site through your regular shop pages too
35
  * Advanced Product Management
36
  * Customizable Vendor Headers
37
  * Front-End Vendor Registration and Back-End Vendor Registration
47
 
48
  = WC Vendors Pro =
49
  * The following features are part of <a href="https://www.wcvendors.com/product/wc-vendors-pro/">WC Vendors Pro</a>
50
+ * <strong>Pro Dashboard</strong> making your vendors sales reports a piece of cake
51
+ * <strong>Fully featured front-end product add/edit capabilities</strong>
52
+ * <strong>eBay style feedback</strong> system for Vendor Ratings
53
+ * <strong>Shipment Tracking</strong> for Vendors to enter tracking numbers
54
  * <strong>Vendor Shipping</strong> so vendors can enter flat rates for national/shipping, or country/state table rate shipping and receive the shipping fees from each sale.
55
+ * <strong>Multiple commission types</strong> such as percentage, percentage + fee, fixed fee, and even fixed fee + fee.
56
+ * <strong>Vendor-Only coupons</strong> that vendors can create to make their own coupons for only their products
57
+ * <strong>Vendor Stores</strong>, which give Vendors their own true actual store
58
+ * Vendor <strong>store banners, avatars/icons</strong> and extra information fully customizable
59
+ * <strong>Social module</strong> for adding facebook/twitter/google+ and many more
60
+ * Vacation Mode - So your vendors can go away for a while and not worry about losing sales
61
+ * Extended <strong>Order Notes</strong>
62
+ * <strong>Insanely customizable template system</strong> to configure, tweak and style your store and dashboard any way you see fit.
63
+ * MUCH MORE TO COME including <strong>WooThemes Bookings</strong> support, integration with even more Woo plugins, and good features that you, the customer, ask us to code! <strong>Pro will always be continually updated with new features</strong>, just as you have grown to expect from WC Vendors Free
64
+ * <strong>INSANELY FAST SUPPORT</strong> on our <a href="https://www.wcvendors.com/help/forum/wc-vendors-pro-support/">Pro Help Forum</a>
65
  * There's more features to Pro than listed here!
66
 
67
 
120
 
121
  == Changelog ==
122
 
123
+ = Version 1.9.0 - 25th of May 2016
124
+
125
+ * Added: Support for WooCommerce 2.6
126
+ * Added: Vendor roles filter wcvendors_vendor_roles
127
+ * Added: Product and Vendor id's to sold_by filters
128
+ * Added: Vendor Signup Filters #269
129
+ * Added: Notify Vendors Email - Add Product SKU, if set #263
130
+ * Added: New Option: Notify Vendors show Purchase Price or Commissions #253
131
+ * Added: Option to disable sold by #236
132
+ * Added: Initial sub order management code #196 thanks Spreeuw
133
+ * Fixed: Sold by meta removal
134
+ * Fixed: Sequential Orders Support Commissions table #270
135
+ * Fixed: Notify Vendors Email Customizer Not Working #240
136
+ * Fixed: Commissions Total Report a-z sorting #239
137
+ * Fixed: need to agree to terms for this to process correctly
138
+ * Fixed: save pending vendor for login screen
139
+ * Fixed: Notify Vendors Email in WC 2.5+ #265
140
+ * Fixed: Order table layout
141
+ * Fixed: Orders screen for vendors in admin #231
142
+ * Fixed: product management in WC 2.6
143
+ * Fixed: Duplicate application emails firing in free and pro
144
+ * Fixed: Commission display issue in notify vendor email
145
+ * Fixed: New ítem meta compatability with WC 2.5 and above
146
+
147
  = Version 1.8.9 - 1st May 2016 =
148
 
149
  * Fixed: Commission Totals Report Inaccurate #267
templates/dashboard/orders.php CHANGED
@@ -125,14 +125,51 @@ jQuery(function () {
125
  <?php
126
  $product_id = '';
127
  foreach ($valid as $key => $item):
128
- $product_id = $item['product_id'];
 
129
  $item_meta = new WC_Order_Item_Meta( $item );
130
  $item_meta = $item_meta->display( false, true ); ?>
131
  <?php echo $item['qty'] . 'x ' . $item['name']; ?>
132
 
133
- <?php if (!empty( $item_meta ) && $item_meta != '<dl class="variation"></dl>') : ?>
134
- <?php echo $item_meta; ?>
135
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
 
137
  <br/>
138
 
125
  <?php
126
  $product_id = '';
127
  foreach ($valid as $key => $item):
128
+
129
+ $product_id = !empty( $item['variation_id'] ) ? $item['variation_id'] : $item['product_id'];
130
  $item_meta = new WC_Order_Item_Meta( $item );
131
  $item_meta = $item_meta->display( false, true ); ?>
132
  <?php echo $item['qty'] . 'x ' . $item['name']; ?>
133
 
134
+ <?php
135
+ if ( $metadata = $order->has_meta( $item['product_id'] ) ) {
136
+ echo '<table cellspacing="1" class="wcv_display_meta">';
137
+ foreach ( $metadata as $meta ) {
138
+
139
+ // Skip hidden core fields
140
+ if ( in_array( $meta['meta_key'], apply_filters( 'woocommerce_hidden_order_itemmeta', array(
141
+ '_qty',
142
+ '_tax_class',
143
+ '_product_id',
144
+ '_variation_id',
145
+ '_line_subtotal',
146
+ '_line_subtotal_tax',
147
+ '_line_total',
148
+ '_line_tax',
149
+ WC_Vendors::$pv_options->get_option( 'sold_by_label' ),
150
+ ) ) ) ) {
151
+ continue;
152
+ }
153
+
154
+ // Skip serialised meta
155
+ if ( is_serialized( $meta['meta_value'] ) ) {
156
+ continue;
157
+ }
158
+
159
+ // Get attribute data
160
+ if ( taxonomy_exists( wc_sanitize_taxonomy_name( $meta['meta_key'] ) ) ) {
161
+ $term = get_term_by( 'slug', $meta['meta_value'], wc_sanitize_taxonomy_name( $meta['meta_key'] ) );
162
+ $meta['meta_key'] = wc_attribute_label( wc_sanitize_taxonomy_name( $meta['meta_key'] ) );
163
+ $meta['meta_value'] = isset( $term->name ) ? $term->name : $meta['meta_value'];
164
+ } else {
165
+ $meta['meta_key'] = apply_filters( 'woocommerce_attribute_label', wc_attribute_label( $meta['meta_key'], $_product ), $meta['meta_key'] );
166
+ }
167
+
168
+ echo '<tr><th>' . wp_kses_post( rawurldecode( $meta['meta_key'] ) ) . ':</th><td>' . wp_kses_post( wpautop( make_clickable( rawurldecode( $meta['meta_value'] ) ) ) ) . '</td></tr>';
169
+ }
170
+ echo '</table>';
171
+ }
172
+ ?>
173
 
174
  <br/>
175
 
templates/emails/vendor-new-order.php CHANGED
@@ -26,7 +26,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
26
  </thead>
27
  <tbody>
28
  <?php echo $order->email_order_items_table( array(
29
- 'show_sku' => false,
30
  'show_image' => false,
31
  'image_size' => array( 32, 32 ),
32
  'plain_text' => false,
26
  </thead>
27
  <tbody>
28
  <?php echo $order->email_order_items_table( array(
29
+ 'show_sku' => true,
30
  'show_image' => false,
31
  'image_size' => array( 32, 32 ),
32
  'plain_text' => false,
templates/orders/table-body.php CHANGED
@@ -14,7 +14,7 @@ if ($count > 1) : ?>
14
  <?php echo $item_meta; ?>
15
  </td>
16
 
17
- <td colspan="2">
18
 
19
  <?php else : ?>
20
 
14
  <?php echo $item_meta; ?>
15
  </td>
16
 
17
+ <td colspan="3">
18
 
19
  <?php else : ?>
20