WC Vendors - Version 2.0.7

Version Description

Download this release

Release Info

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

Code changes from version 2.0.6 to 2.0.7

changelog.txt CHANGED
@@ -1,5 +1,21 @@
1
  Changelog for WC Vendors
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  Version 2.0.6
4
 
5
  * Added: Payment details to totals CSV export #414
@@ -82,7 +98,7 @@ Version 2.0.0
82
  * Updated: Brazilian Portuguese translation thanks CasperBraske
83
  * Fixed: Permalinks not flushing on settings save
84
  * Fixed: Terms & Conditions Checkbox for Vendor Registration does not show #392
85
- * Fixed: Depreciated calls on orders screen
86
  * Fixed: Vendor role capabilities updated when new settings updated.
87
  * Fixed: Vendors can delete media they uploaded
88
  * Fixed: Added check for woocommerce shipping tax class setting
@@ -132,7 +148,7 @@ Version 1.9.14
132
 
133
  Version 1.9.13
134
 
135
- * Added: Notice for depreciated gateway
136
  * Added: A filter for role change: Denied Vendor #351
137
  * Added: WooCommerce tested header for new WooCommerce Status page
138
  * Added: Filter for vendor signup form so it can be overriden
@@ -140,7 +156,7 @@ Version 1.9.13
140
  * Updated: Brazillian Port wcvendors-pt_BR.pot
141
  * Fixed: Moved sprintf must be outside #381 thanks CasperBraske
142
  * Fixed: Re-Send email options in admin/orders are not available after WooCommerce update #383
143
- * Fixed: depreciated screen_icon method call
144
  * Fixed: Use wc_get_order instead of new WC_Order #382
145
  * Fixed: Post called incorrectly #378
146
  * Fixed: Get correct product name in commission table if variation deleted
@@ -148,7 +164,7 @@ Version 1.9.13
148
  * Fixed: mistake in vendor_shop_query
149
  * Fixed: Return 404 if vendor doesn't exist
150
  * Fixed: The shop name background doesn’t scale with shop image #366
151
- * Fixed: Depreciated functions #368 thanks @stodorovic
152
  * Fixed: Changed how customer address is displayed based on Woo Options. Thanks @debain
153
 
154
  Version 1.9.12
@@ -190,7 +206,7 @@ Version 1.9.9
190
  * Fixed: Capabilities Fix for Resetting Roles #329
191
  * Fixed: HTML title attribute doesn't change for store pages #328
192
  * Fixed: Login form not displayed if get variable set
193
- * Fixed: Depreciated action in product edit screen
194
 
195
  Templates Updated:
196
  templates/emails/vendor-new-order.php
@@ -340,7 +356,7 @@ Version 1.8.7
340
  * Fixed: Sold By:Name spaces issue #256
341
  * Fixed: Show extended fields for vendor and pending vendor roles
342
  * Fixed: Check if product is taxable
343
- * Fixed: Depreciated function calls in email templates
344
  * Fixed: Commission giving tax on none taxable items #251
345
  * Fixed: Sold by label issues with WC 2.5 #250
346
 
@@ -433,7 +449,7 @@ Version 1.7.6
433
  * Fixed: Instant Pay bug #174
434
  * Fixed: wcv_vendorslist paging #178
435
  * Added: Vendor display name now translatable
436
- * Depreciated: Dashboard vendor reports
437
  * Added: Chinese Language files thanks to SundayLau
438
  * Fixed: Added support for WPML #177
439
  * Update: default pot language file
@@ -473,7 +489,7 @@ Version 1.7.4
473
  * Fixed: Made PayPal optional on Vendor Dashboard Shop Settings #144
474
  * Update: fixed return query var
475
  * Fixed: Test for product post types #149
476
- * Fixed: 2.1 Depreciated return call
477
  * Fixed: PHP Strict static call in commissions class
478
  * Merged: Is Vendor checks all user roles #147 thanks crabilld
479
 
@@ -521,7 +537,7 @@ Version 1.6.0
521
  * Fixed: Plugin row meta links
522
  * Added: Upgrade notice
523
  * Fixed: Rounding issue #120
524
- * Fixed: Paypal https host check depreciated call
525
  * Added: show_products attribute #107
526
  * Updated: Text in denied template to make more sense when registration disabled #123
527
  * Updated: wcv_vendorslist shortcode now shows 3 column output #123
@@ -549,7 +565,7 @@ Version 1.4.5
549
  * Fixed: Table Rate Shipping issue #103
550
  * Fixed: Featured column issue #100
551
  * Updated: Filter call for report
552
- * Fixed: Call to depreciated function #98
553
 
554
  Version 1.4.4
555
 
1
  Changelog for WC Vendors
2
 
3
+ Version 2.0.7
4
+
5
+ * Added: Become a vendor link to WooCommerce My Account page
6
+ * Fixed: Fatal Error WP Admin vendor orders #422
7
+ * Fixed: Only run vendor dashboard class on the front end
8
+ * Fixed: Admin dashboard error
9
+ * Fixed: fatal error get_id on integer
10
+ * Fixed: Hide signup form if current user is already a vendor
11
+ * Fixed: Tags stripped from wysiwyg settings #419
12
+ * Fixed: Spelling mistake across the code base
13
+ * Updated: language files
14
+ * Updated: Wording for settings
15
+
16
+ Templates Updated:
17
+ templates/dashboard/dashboard/denied.php
18
+
19
  Version 2.0.6
20
 
21
  * Added: Payment details to totals CSV export #414
98
  * Updated: Brazilian Portuguese translation thanks CasperBraske
99
  * Fixed: Permalinks not flushing on settings save
100
  * Fixed: Terms & Conditions Checkbox for Vendor Registration does not show #392
101
+ * Fixed: deprecated calls on orders screen
102
  * Fixed: Vendor role capabilities updated when new settings updated.
103
  * Fixed: Vendors can delete media they uploaded
104
  * Fixed: Added check for woocommerce shipping tax class setting
148
 
149
  Version 1.9.13
150
 
151
+ * Added: Notice for deprecated gateway
152
  * Added: A filter for role change: Denied Vendor #351
153
  * Added: WooCommerce tested header for new WooCommerce Status page
154
  * Added: Filter for vendor signup form so it can be overriden
156
  * Updated: Brazillian Port wcvendors-pt_BR.pot
157
  * Fixed: Moved sprintf must be outside #381 thanks CasperBraske
158
  * Fixed: Re-Send email options in admin/orders are not available after WooCommerce update #383
159
+ * Fixed: deprecated screen_icon method call
160
  * Fixed: Use wc_get_order instead of new WC_Order #382
161
  * Fixed: Post called incorrectly #378
162
  * Fixed: Get correct product name in commission table if variation deleted
164
  * Fixed: mistake in vendor_shop_query
165
  * Fixed: Return 404 if vendor doesn't exist
166
  * Fixed: The shop name background doesn’t scale with shop image #366
167
+ * Fixed: deprecated functions #368 thanks @stodorovic
168
  * Fixed: Changed how customer address is displayed based on Woo Options. Thanks @debain
169
 
170
  Version 1.9.12
206
  * Fixed: Capabilities Fix for Resetting Roles #329
207
  * Fixed: HTML title attribute doesn't change for store pages #328
208
  * Fixed: Login form not displayed if get variable set
209
+ * Fixed: deprecated action in product edit screen
210
 
211
  Templates Updated:
212
  templates/emails/vendor-new-order.php
356
  * Fixed: Sold By:Name spaces issue #256
357
  * Fixed: Show extended fields for vendor and pending vendor roles
358
  * Fixed: Check if product is taxable
359
+ * Fixed: deprecated function calls in email templates
360
  * Fixed: Commission giving tax on none taxable items #251
361
  * Fixed: Sold by label issues with WC 2.5 #250
362
 
449
  * Fixed: Instant Pay bug #174
450
  * Fixed: wcv_vendorslist paging #178
451
  * Added: Vendor display name now translatable
452
+ * deprecated: Dashboard vendor reports
453
  * Added: Chinese Language files thanks to SundayLau
454
  * Fixed: Added support for WPML #177
455
  * Update: default pot language file
489
  * Fixed: Made PayPal optional on Vendor Dashboard Shop Settings #144
490
  * Update: fixed return query var
491
  * Fixed: Test for product post types #149
492
+ * Fixed: 2.1 deprecated return call
493
  * Fixed: PHP Strict static call in commissions class
494
  * Merged: Is Vendor checks all user roles #147 thanks crabilld
495
 
537
  * Fixed: Plugin row meta links
538
  * Added: Upgrade notice
539
  * Fixed: Rounding issue #120
540
+ * Fixed: Paypal https host check deprecated call
541
  * Added: show_products attribute #107
542
  * Updated: Text in denied template to make more sense when registration disabled #123
543
  * Updated: wcv_vendorslist shortcode now shows 3 column output #123
565
  * Fixed: Table Rate Shipping issue #103
566
  * Fixed: Featured column issue #100
567
  * Updated: Filter call for report
568
+ * Fixed: Call to deprecated function #98
569
 
570
  Version 1.4.4
571
 
class-wc-vendors.php CHANGED
@@ -7,11 +7,11 @@
7
  * Author URI: https://www.wcvendors.com
8
  * GitHub Plugin URI: https://github.com/wcvendors/wcvendors
9
  *
10
- * Version: 2.0.6
11
  * Requires at least: 4.4.0
12
  * Tested up to: 4.9.5
13
  * WC requires at least: 3.0.0
14
- * WC tested up to: 3.4.0
15
  *
16
  * Text Domain: wc-vendors
17
  * Domain Path: /languages/
@@ -80,7 +80,7 @@ if ( wcv_is_woocommerce_activated() ) {
80
  class WC_Vendors
81
  {
82
 
83
- public $version = '2.0.6';
84
 
85
  /**
86
  * @var
@@ -237,6 +237,7 @@ if ( wcv_is_woocommerce_activated() ) {
237
  include_once( wcv_plugin_dir . 'classes/admin/emails/class-emails.php');
238
  include_once( wcv_plugin_dir . 'classes/admin/class-vendor-applicants.php');
239
  include_once( wcv_plugin_dir . 'classes/admin/class-admin-reports.php');
 
240
  include_once( wcv_plugin_dir . 'classes/admin/class-wcv-commissions-page.php');
241
  include_once( wcv_plugin_dir . 'classes/admin/class-wcv-admin-setup.php');
242
  include_once( wcv_plugin_dir . 'classes/admin/class-wcv-admin-notices.php');
@@ -272,6 +273,7 @@ if ( wcv_is_woocommerce_activated() ) {
272
  new WCV_Emails;
273
  new WCV_Vendor_Signup;
274
  new WCV_Shortcodes;
 
275
  }
276
 
277
 
7
  * Author URI: https://www.wcvendors.com
8
  * GitHub Plugin URI: https://github.com/wcvendors/wcvendors
9
  *
10
+ * Version: 2.0.7
11
  * Requires at least: 4.4.0
12
  * Tested up to: 4.9.5
13
  * WC requires at least: 3.0.0
14
+ * WC tested up to: 3.4.2
15
  *
16
  * Text Domain: wc-vendors
17
  * Domain Path: /languages/
80
  class WC_Vendors
81
  {
82
 
83
+ public $version = '2.0.7';
84
 
85
  /**
86
  * @var
237
  include_once( wcv_plugin_dir . 'classes/admin/emails/class-emails.php');
238
  include_once( wcv_plugin_dir . 'classes/admin/class-vendor-applicants.php');
239
  include_once( wcv_plugin_dir . 'classes/admin/class-admin-reports.php');
240
+ include_once( wcv_plugin_dir . 'classes/front/account/class-wc-account-links.php');
241
  include_once( wcv_plugin_dir . 'classes/admin/class-wcv-commissions-page.php');
242
  include_once( wcv_plugin_dir . 'classes/admin/class-wcv-admin-setup.php');
243
  include_once( wcv_plugin_dir . 'classes/admin/class-wcv-admin-notices.php');
273
  new WCV_Emails;
274
  new WCV_Vendor_Signup;
275
  new WCV_Shortcodes;
276
+ new WCV_Account_Links;
277
  }
278
 
279
 
classes/admin/class-vendor-admin-dashboard.php CHANGED
@@ -482,15 +482,11 @@ class WCV_Vendor_Order_Page extends WP_List_Table
482
  function get_orders() {
483
 
484
  $user_id = get_current_user_id();
485
-
486
  $orders = array();
487
-
488
- $vendor_products = $this->get_vendor_products( $user_id );
489
-
490
  $products = array();
 
491
 
492
  foreach ( $vendor_products as $_product ) {
493
-
494
  $products[] = $_product->ID;
495
  }
496
 
@@ -500,14 +496,15 @@ class WCV_Vendor_Order_Page extends WP_List_Table
500
 
501
  if ( !empty( $_orders ) ) {
502
 
503
- foreach ( $_orders as $order ) {
504
 
505
- $order = wc_get_order( $order->order_id );
506
- $order_id = $order->get_id();
507
- $valid_items = WCV_Queries::get_products_for_order( $order_id );
508
- $valid = array();
509
 
510
- $items = $order->get_items();
 
 
 
511
 
512
  foreach ( $items as $order_item_id => $item) {
513
  if ( in_array( $item[ 'variation_id' ], $valid_items) || in_array( $item[ 'product_id' ], $valid_items ) ) {
482
  function get_orders() {
483
 
484
  $user_id = get_current_user_id();
 
485
  $orders = array();
 
 
 
486
  $products = array();
487
+ $vendor_products = $this->get_vendor_products( $user_id );
488
 
489
  foreach ( $vendor_products as $_product ) {
 
490
  $products[] = $_product->ID;
491
  }
492
 
496
 
497
  if ( !empty( $_orders ) ) {
498
 
499
+ foreach ( $_orders as $_order ) {
500
 
501
+ // Check to see that the order hasn't been deleted or in the trash
502
+ if ( ! get_post_status( $_order->order_id ) || 'trash' === get_post_status( $_order->order_id ) ) continue;
 
 
503
 
504
+ $order = wc_get_order( $_order->order_id );
505
+ $valid_items = WCV_Queries::get_products_for_order( $_order->order_id );
506
+ $valid = array();
507
+ $items = $order->get_items();
508
 
509
  foreach ( $items as $order_item_id => $item) {
510
  if ( in_array( $item[ 'variation_id' ], $valid_items) || in_array( $item[ 'product_id' ], $valid_items ) ) {
classes/admin/class-wcv-admin-settings.php CHANGED
@@ -616,6 +616,9 @@ if ( ! defined( 'ABSPATH' ) ) {
616
  $default = ( empty( $option['default'] ) ? $allowed_values[0] : $option['default'] );
617
  $value = in_array( $raw_value, $allowed_values ) ? $raw_value : $default;
618
  break;
 
 
 
619
  default :
620
  $value = wc_clean( $raw_value );
621
  break;
616
  $default = ( empty( $option['default'] ) ? $allowed_values[0] : $option['default'] );
617
  $value = in_array( $raw_value, $allowed_values ) ? $raw_value : $default;
618
  break;
619
+ case 'wysiwyg':
620
+ $value = $raw_value;
621
+ break;
622
  default :
623
  $value = wc_clean( $raw_value );
624
  break;
classes/admin/emails/class-emails.php CHANGED
@@ -40,10 +40,13 @@ class WCV_Emails
40
  add_action( 'wcvendors_email_customer_details', array( $this, 'vendor_customer_details'), 10, 4 );
41
  add_action( 'set_user_role', array( $this, 'vendor_application' ), 10, 2 );
42
 
 
 
 
43
  }
44
 
45
 
46
- // Depreciated
47
  public function trigger_new_product( $from, $to, $post )
48
  {
49
  global $woocommerce;
@@ -58,7 +61,7 @@ class WCV_Emails
58
 
59
 
60
  /**
61
- * @depreciated
62
  *
63
  * @param unknown $user_id
64
  * @param unknown $role
@@ -106,14 +109,23 @@ class WCV_Emails
106
  $emails[ 'WC_Email_Notify_Shipped' ] = new WC_Email_Notify_Shipped();
107
 
108
  // New emails introduced in @since 2.0.0
109
- $emails[ 'WCVendors_Customer_Notify_Shipped'] = include( wcv_plugin_dir . 'classes/admin/emails/class-wcv-customer-notify-shipped.php' );
110
- $emails[ 'WCVendors_Admin_Notify_Shipped'] = include( wcv_plugin_dir . 'classes/admin/emails/class-wcv-admin-notify-shipped.php' );
111
- $emails[ 'WCVendors_Admin_Notify_Product'] = include( wcv_plugin_dir . 'classes/admin/emails/class-wcv-admin-notify-product.php' );
112
- $emails[ 'WCVendors_Admin_Notify_Application'] = include( wcv_plugin_dir . 'classes/admin/emails/class-wcv-admin-notify-application.php' );
113
- $emails[ 'WCVendors_Vendor_Notify_Application'] = include( wcv_plugin_dir . 'classes/admin/emails/class-wcv-vendor-notify-application.php' );
114
- $emails[ 'WCVendors_Vendor_Notify_Approved'] = include( wcv_plugin_dir . 'classes/admin/emails/class-wcv-vendor-notify-approved.php' );
115
- $emails[ 'WCVendors_Vendor_Notify_Denied'] = include( wcv_plugin_dir . 'classes/admin/emails/class-wcv-vendor-notify-denied.php' );
116
- $emails[ 'WCVendors_Vendor_Notify_Order'] = include( wcv_plugin_dir . 'classes/admin/emails/class-wcv-vendor-notify-order.php' );
 
 
 
 
 
 
 
 
 
117
 
118
  return $emails;
119
 
@@ -153,7 +165,9 @@ class WCV_Emails
153
  *
154
  */
155
  public function order_actions_save( $order ){
156
-
 
 
157
  WC()->mailer()->emails[ 'WC_Email_Notify_Vendor' ]->trigger( $order->get_id(), $order );
158
  WC()->mailer()->emails[ 'WCVendors_Vendor_Notify_Order' ]->trigger( $order->get_id(), $order );
159
  }
@@ -164,6 +178,9 @@ class WCV_Emails
164
  * @since 2.0.0
165
  */
166
  public function vendor_shipped( $order_id, $user_id, $order ){
 
 
 
167
  // Notify the admin
168
  WC()->mailer()->emails[ 'WCVendors_Admin_Notify_Shipped' ]->trigger( $order->get_id(), $user_id, $order );
169
  // Notify the customer
@@ -176,7 +193,14 @@ class WCV_Emails
176
  *
177
  * @since 2.0.0
178
  */
179
- public function vendor_application( $user_id, $role ){
 
 
 
 
 
 
 
180
 
181
  if ( !empty( $_POST[ 'apply_for_vendor' ] ) || ( !empty( $_GET[ 'action' ] ) && ( $_GET[ 'action' ] == 'approve_vendor' || $_GET[ 'action' ] == 'deny_vendor' ) ) ) {
182
 
40
  add_action( 'wcvendors_email_customer_details', array( $this, 'vendor_customer_details'), 10, 4 );
41
  add_action( 'set_user_role', array( $this, 'vendor_application' ), 10, 2 );
42
 
43
+ //Trigger emails during user registration
44
+ add_action( 'user_register', array( $this, 'vendor_application' ), 10, 1 );
45
+
46
  }
47
 
48
 
49
+ // deprecated
50
  public function trigger_new_product( $from, $to, $post )
51
  {
52
  global $woocommerce;
61
 
62
 
63
  /**
64
+ * @deprecated
65
  *
66
  * @param unknown $user_id
67
  * @param unknown $role
109
  $emails[ 'WC_Email_Notify_Shipped' ] = new WC_Email_Notify_Shipped();
110
 
111
  // New emails introduced in @since 2.0.0
112
+ require_once wcv_plugin_dir . 'classes/admin/emails/class-wcv-customer-notify-shipped.php';
113
+ require_once wcv_plugin_dir . 'classes/admin/emails/class-wcv-admin-notify-shipped.php';
114
+ require_once wcv_plugin_dir . 'classes/admin/emails/class-wcv-admin-notify-product.php';
115
+ require_once wcv_plugin_dir . 'classes/admin/emails/class-wcv-admin-notify-application.php';
116
+ require_once wcv_plugin_dir . 'classes/admin/emails/class-wcv-vendor-notify-application.php';
117
+ require_once wcv_plugin_dir . 'classes/admin/emails/class-wcv-vendor-notify-approved.php';
118
+ require_once wcv_plugin_dir . 'classes/admin/emails/class-wcv-vendor-notify-denied.php';
119
+ require_once wcv_plugin_dir . 'classes/admin/emails/class-wcv-vendor-notify-order.php';
120
+
121
+ $emails[ 'WCVendors_Customer_Notify_Shipped'] = new WCVendors_Customer_Notify_Shipped();
122
+ $emails[ 'WCVendors_Admin_Notify_Shipped'] = new WCVendors_Admin_Notify_Shipped();
123
+ $emails[ 'WCVendors_Admin_Notify_Product'] = new WCVendors_Admin_Notify_Product();
124
+ $emails[ 'WCVendors_Admin_Notify_Application'] = new WCVendors_Admin_Notify_Application();
125
+ $emails[ 'WCVendors_Vendor_Notify_Application'] = new WCVendors_Vendor_Notify_Application();
126
+ $emails[ 'WCVendors_Vendor_Notify_Approved'] = new WCVendors_Vendor_Notify_Approved();
127
+ $emails[ 'WCVendors_Vendor_Notify_Denied'] = new WCVendors_Vendor_Notify_Denied();
128
+ $emails[ 'WCVendors_Vendor_Notify_Order'] = new WCVendors_Vendor_Notify_Order();
129
 
130
  return $emails;
131
 
165
  *
166
  */
167
  public function order_actions_save( $order ){
168
+ if ( ! is_a( $order, 'WC_Order' ) ) {
169
+ $order = wc_get_order( $order );
170
+ }
171
  WC()->mailer()->emails[ 'WC_Email_Notify_Vendor' ]->trigger( $order->get_id(), $order );
172
  WC()->mailer()->emails[ 'WCVendors_Vendor_Notify_Order' ]->trigger( $order->get_id(), $order );
173
  }
178
  * @since 2.0.0
179
  */
180
  public function vendor_shipped( $order_id, $user_id, $order ){
181
+ if ( ! is_a( $order, 'WC_Order' ) ) {
182
+ $order = wc_get_order( $order_id );
183
+ }
184
  // Notify the admin
185
  WC()->mailer()->emails[ 'WCVendors_Admin_Notify_Shipped' ]->trigger( $order->get_id(), $user_id, $order );
186
  // Notify the customer
193
  *
194
  * @since 2.0.0
195
  */
196
+ public function vendor_application( $user_id, $role = "" ){
197
+ /**
198
+ * If the role is not given, set it according to the vendor approval option in admin
199
+ */
200
+ if ( $role == "" ) {
201
+ $manual = wc_string_to_bool( get_option( 'wcvendors_vendor_approve_registration', 'no' ) );
202
+ $role = apply_filters( 'wcvendors_pending_role', ( $manual ? 'pending_vendor' : 'vendor' ) );
203
+ }
204
 
205
  if ( !empty( $_POST[ 'apply_for_vendor' ] ) || ( !empty( $_GET[ 'action' ] ) && ( $_GET[ 'action' ] == 'approve_vendor' || $_GET[ 'action' ] == 'deny_vendor' ) ) ) {
206
 
classes/admin/emails/class-wc-approve-vendor.php CHANGED
@@ -26,7 +26,7 @@ class WC_Email_Approve_Vendor extends WC_Email
26
  {
27
  $this->id = 'vendor_application';
28
  $this->title = __( 'Vendor Application', 'wc-vendors' );
29
- $this->description = __( 'Vendor application will either be approved, denied, or pending. <strong>This email has been depreciated.</strong>', 'wc-vendors' );
30
 
31
  $this->heading = __( 'Application {status}', 'wc-vendors' );
32
  $this->subject = __( '[{blogname}] Your vendor application has been {status}', 'wc-vendors' );
26
  {
27
  $this->id = 'vendor_application';
28
  $this->title = __( 'Vendor Application', 'wc-vendors' );
29
+ $this->description = __( 'Vendor application will either be approved, denied, or pending. <strong>This email has been deprecated.</strong>', 'wc-vendors' );
30
 
31
  $this->heading = __( 'Application {status}', 'wc-vendors' );
32
  $this->subject = __( '[{blogname}] Your vendor application has been {status}', 'wc-vendors' );
classes/admin/emails/class-wc-notify-shipped.php CHANGED
@@ -26,7 +26,7 @@ class WC_Email_Notify_Shipped extends WC_Email
26
  {
27
  $this->id = 'vendor_notify_shipped';
28
  $this->title = __( 'Vendor has shipped', 'wc-vendors' );
29
- $this->description = __( 'An email is sent when a vendor has marked one of their orders as shipped. <strong>This email has been depreciated.</strong>', 'wc-vendors' );
30
 
31
  $this->heading = __( 'Your order has been shipped', 'wc-vendors' );
32
  $this->subject = __( '[{blogname}] Your order has been shipped ({order_number}) - {order_date}', 'wc-vendors' );
26
  {
27
  $this->id = 'vendor_notify_shipped';
28
  $this->title = __( 'Vendor has shipped', 'wc-vendors' );
29
+ $this->description = __( 'An email is sent when a vendor has marked one of their orders as shipped. <strong>This email has been deprecated.</strong>', 'wc-vendors' );
30
 
31
  $this->heading = __( 'Your order has been shipped', 'wc-vendors' );
32
  $this->subject = __( '[{blogname}] Your order has been shipped ({order_number}) - {order_date}', 'wc-vendors' );
classes/admin/emails/class-wc-notify-vendor.php CHANGED
@@ -25,7 +25,7 @@ class WC_Email_Notify_Vendor extends WC_Email
25
  {
26
  $this->id = 'vendor_new_order';
27
  $this->title = __( 'Notify vendors', 'wc-vendors' );
28
- $this->description = __( 'New order emails are sent when an order is received/paid by a customer. <strong>This email has been depreciated.</strong>', 'wc-vendors' );
29
 
30
  $this->heading = __( 'New customer order', 'wc-vendors' );
31
  $this->subject = __( '[{blogname}] New customer order ({order_number}) - {order_date}', 'wc-vendors' );
25
  {
26
  $this->id = 'vendor_new_order';
27
  $this->title = __( 'Notify vendors', 'wc-vendors' );
28
+ $this->description = __( 'New order emails are sent when an order is received/paid by a customer. <strong>This email has been deprecated.</strong>', 'wc-vendors' );
29
 
30
  $this->heading = __( 'New customer order', 'wc-vendors' );
31
  $this->subject = __( '[{blogname}] New customer order ({order_number}) - {order_date}', 'wc-vendors' );
classes/admin/emails/class-wcv-admin-notify-application.php CHANGED
@@ -181,6 +181,4 @@ class WCVendors_Admin_Notify_Application extends WC_Email {
181
  }
182
  }
183
 
184
- endif;
185
-
186
- return new WCVendors_Admin_Notify_Application();
181
  }
182
  }
183
 
184
+ endif;
 
 
classes/admin/emails/class-wcv-admin-notify-product.php CHANGED
@@ -187,6 +187,4 @@ class WCVendors_Admin_Notify_Product extends WC_Email {
187
  }
188
  }
189
 
190
- endif;
191
-
192
- return new WCVendors_Admin_Notify_Product();
187
  }
188
  }
189
 
190
+ endif;
 
 
classes/admin/emails/class-wcv-admin-notify-shipped.php CHANGED
@@ -176,6 +176,4 @@ class WCVendors_Admin_Notify_Shipped extends WC_Email {
176
  }
177
  }
178
 
179
- endif;
180
-
181
- return new WCVendors_Admin_Notify_Shipped();
176
  }
177
  }
178
 
179
+ endif;
 
 
classes/admin/emails/class-wcv-customer-notify-shipped.php CHANGED
@@ -230,6 +230,4 @@ class WCVendors_Customer_Notify_Shipped extends WC_Email {
230
  }
231
  }
232
 
233
- endif;
234
-
235
- return new WCVendors_Customer_Notify_Shipped();
230
  }
231
  }
232
 
233
+ endif;
 
 
classes/admin/emails/class-wcv-vendor-notify-application.php CHANGED
@@ -162,6 +162,4 @@ class WCVendors_Vendor_Notify_Application extends WC_Email {
162
  }
163
  }
164
 
165
- endif;
166
-
167
- return new WCVendors_Vendor_Notify_Application();
162
  }
163
  }
164
 
165
+ endif;
 
 
classes/admin/emails/class-wcv-vendor-notify-approved.php CHANGED
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
4
  exit;
5
  }
6
 
7
- if ( ! class_exists( 'WCVendors_Notify_Vendor_Approved' ) ) :
8
 
9
  /**
10
  * Notify vendor application has started
@@ -17,7 +17,7 @@ if ( ! class_exists( 'WCVendors_Notify_Vendor_Approved' ) ) :
17
  * @author WC Vendors
18
  * @extends WC_Email
19
  */
20
- class WCVendors_Notify_Vendor_Approved extends WC_Email {
21
 
22
  /**
23
  * Constructor.
@@ -180,6 +180,4 @@ class WCVendors_Notify_Vendor_Approved extends WC_Email {
180
  }
181
  }
182
 
183
- endif;
184
-
185
- return new WCVendors_Notify_Vendor_Approved();
4
  exit;
5
  }
6
 
7
+ if ( ! class_exists( 'WCVendors_Vendor_Notify_Approved' ) ) :
8
 
9
  /**
10
  * Notify vendor application has started
17
  * @author WC Vendors
18
  * @extends WC_Email
19
  */
20
+ class WCVendors_Vendor_Notify_Approved extends WC_Email {
21
 
22
  /**
23
  * Constructor.
180
  }
181
  }
182
 
183
+ endif;
 
 
classes/admin/emails/class-wcv-vendor-notify-denied.php CHANGED
@@ -198,6 +198,4 @@ class WCVendors_Vendor_Notify_Denied extends WC_Email {
198
  }
199
  }
200
 
201
- endif;
202
-
203
- return new WCVendors_Vendor_Notify_Denied();
198
  }
199
  }
200
 
201
+ endif;
 
 
classes/admin/emails/class-wcv-vendor-notify-order.php CHANGED
@@ -222,6 +222,4 @@ class WCVendors_Vendor_Notify_Order extends WC_Email {
222
 
223
  }
224
 
225
- endif;
226
-
227
- return new WCVendors_Vendor_Notify_Order();
222
 
223
  }
224
 
225
+ endif;
 
 
classes/admin/settings/class-wcv-settings-display.php CHANGED
@@ -232,7 +232,7 @@ class WCVendors_Settings_Display extends WCVendors_Settings_Page {
232
  array(
233
  'title' => __( 'Shop HTML', 'wc-vendors' ),
234
  'desc' => sprintf( __( 'Allow HTML in %s shop desription', 'wc-vendors' ), wcv_get_vendor_name( true, false ) ),
235
- 'desc_tip' => sprintf( __( 'Enable HTML for the %1$s shop description. You can enable or disable this per %1$s by editing the %1$s user account.', 'wc-vendors' ), wcv_get_vendor_name( true, false ) ),
236
  'id' => 'wcvendors_display_shop_description_html',
237
  'default' => 'no',
238
  'type' => 'checkbox',
232
  array(
233
  'title' => __( 'Shop HTML', 'wc-vendors' ),
234
  'desc' => sprintf( __( 'Allow HTML in %s shop desription', 'wc-vendors' ), wcv_get_vendor_name( true, false ) ),
235
+ 'desc_tip' => sprintf( __( 'This will enable the WYSIWYG editor and for the %1$s shop description. You can enable or disable this per %1$s by editing the %1$s user account.', 'wc-vendors' ), wcv_get_vendor_name( true, false ) ),
236
  'id' => 'wcvendors_display_shop_description_html',
237
  'default' => 'no',
238
  'type' => 'checkbox',
classes/admin/settings/class-wcv-settings-payments.php CHANGED
@@ -64,7 +64,7 @@ class WCVendors_Settings_Payments extends WCVendors_Settings_Page {
64
  array(
65
  'title' => __( '', 'wc-vendors' ),
66
  'type' => 'title',
67
- 'desc' => sprintf( __( '<h3>PayPal Adaptive Payments - Please Note: PayPal Adaptive Payments has been depreciated by PayPal as of September 2017. These options are for existing users only. This will be completely removed in a future version.</h3>', 'wc-vendors' ), wcv_get_vendor_name( true, false ) ),
68
  'id' => 'paypal_options',
69
  ),
70
 
64
  array(
65
  'title' => __( '', 'wc-vendors' ),
66
  'type' => 'title',
67
+ 'desc' => sprintf( __( '<h3>PayPal Adaptive Payments - Please Note: PayPal Adaptive Payments has been deprecated by PayPal as of September 2017. These options are for existing users only. This will be completely removed in a future version.</h3>', 'wc-vendors' ), wcv_get_vendor_name( true, false ) ),
68
  'id' => 'paypal_options',
69
  ),
70
 
classes/front/account/class-wc-account-links.php ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Add vendor signup option on WooCommerce My Account Page
4
+ *
5
+ * @author Lindeni Mahlalela <https://lindeni.co.za>
6
+ * @package WCVendors
7
+ */
8
+ class WCV_Account_Links extends WCV_Vendor_Signup {
9
+
10
+ public $terms_page;
11
+
12
+ /**
13
+ * Constructor
14
+ *
15
+ * @description adds the action hooks and gets the terms page
16
+ * @package
17
+ * @since
18
+ */
19
+ public function __construct(){
20
+
21
+ // Only enable this if registration for vendors is enabled
22
+ if ( ! wc_string_to_bool( get_option( 'wcvendors_vendor_allow_registration', 'no' ) ) ) return;
23
+
24
+ $this->terms_page = get_option( 'wcvendors_vendor_terms_page_id' );
25
+ add_filter( 'woocommerce_account_menu_items', array( $this, 'add_account_menu_items') );
26
+ add_action( 'init', array( $this, 'add_rewrite_endpoint' ) );
27
+ add_action( 'woocommerce_account_become-a-vendor_endpoint', array( $this, 'render_vendor_signup' ) );
28
+ add_filter( 'query_vars', array( $this, 'query_vars'), 0 );
29
+ add_action( 'after_switch_theme', array( $this, 'flush_rewrite_rules') );
30
+ }
31
+
32
+ /**
33
+ * Add accounts menu item
34
+ *
35
+ * @param array $items
36
+ * @return void
37
+ * @description Add Become a Vendor Link to my accounts navigation
38
+ * @package
39
+ * @since
40
+ */
41
+ public function add_account_menu_items( $items ) {
42
+ $add_items = array(
43
+ 'become-a-vendor' => __( 'Become a Vendor', 'wc-vendors')
44
+ );
45
+ //slice the array so the logout link goes at the end of the list
46
+ $first_part = array_slice( $items, 0, count( $items ) - 1, true);
47
+ $last_part = array_slice( $items, count( $items ) - 1, true);
48
+ //put the arrays together putting the logout link at the end
49
+ $items = $first_part + $add_items + $last_part;
50
+ return $items;
51
+ }
52
+
53
+ /**
54
+ * Add the become-a-vendor in the global query object
55
+ *
56
+ * @param array $vars
57
+ * @return void
58
+ */
59
+ public function query_vars( $vars ){
60
+ $vars[] = 'become-a-vendor';
61
+ return $vars;
62
+ }
63
+
64
+ /**
65
+ * Flushes rewrite rules when a theme is changed
66
+ *
67
+ * @return void
68
+ */
69
+ public function flush_rewrite_rules(){
70
+ flush_rewrite_rules();
71
+ }
72
+
73
+ /**
74
+ * Add rewrite endpoint
75
+ *
76
+ * @return void
77
+ */
78
+ public function add_rewrite_endpoint(){
79
+ add_rewrite_endpoint( 'become-a-vendor', EP_PAGES );
80
+ }
81
+
82
+ /**
83
+ * Render the become a vendor signup page in the my account page
84
+ * If the current user is already a vendor, hide the signup form and show a message
85
+ * @return void
86
+ */
87
+ public function render_vendor_signup(){
88
+ if ( WCV_Vendors::is_vendor( get_current_user_id() ) ) {
89
+ echo '<div class="woocommerce-message" role="alert"><p>' .__( 'You are already an approved vendor, no need to apply', 'wc-vendors') . '</p></div>';
90
+ } else {
91
+
92
+ if ( ! class_exists( 'WCV_Vendor_Signup' ) ) {
93
+ include_once( wcv_plugin_dir . 'classes/front/signup/class-vendor-signup.php');
94
+ }
95
+
96
+ if ( isset( $_POST['apply_for_vendor'] ) ) {
97
+ self::apply_form_dashboard();
98
+ }
99
+
100
+ require_once( wcv_plugin_dir . 'templates/dashboard/denied.php');
101
+ }
102
+ }
103
+ }
classes/front/dashboard/class-vendor-dashboard.php CHANGED
@@ -16,13 +16,15 @@ class WCV_Vendor_Dashboard
16
  /**
17
  * __construct()
18
  */
19
- function __construct()
20
- {
21
- add_shortcode( 'wcv_shop_settings', array( $this, 'display_vendor_settings' ) );
22
- add_shortcode( 'wcv_vendor_dashboard', array( $this, 'display_vendor_products' ) );
 
 
23
 
24
- add_action( 'template_redirect', array( $this, 'check_access' ) );
25
- add_action( 'init', array( $this, 'save_vendor_settings' ) );
26
  }
27
 
28
  public function save_vendor_settings()
@@ -281,7 +283,7 @@ class WCV_Vendor_Dashboard
281
  'providers' => $providers,
282
  'provider_array' => $provider_array,
283
  'can_view_orders' => $can_view_orders,
284
- 'can_view_address' => $can_view_address,
285
  ), 'wc-vendors/dashboard/', wcv_plugin_dir . 'templates/dashboard/' );
286
  do_action( 'wcvendors_after_dashboard' );
287
 
16
  /**
17
  * __construct()
18
  */
19
+ function __construct() {
20
+
21
+ if ( is_admin() ) return;
22
+
23
+ add_shortcode( 'wcv_shop_settings', array( $this, 'display_vendor_settings' ) );
24
+ add_shortcode( 'wcv_vendor_dashboard', array( $this, 'display_vendor_products' ) );
25
 
26
+ add_action( 'template_redirect', array( $this, 'check_access' ) );
27
+ add_action( 'template_redirect', array( $this, 'save_vendor_settings' ) );
28
  }
29
 
30
  public function save_vendor_settings()
283
  'providers' => $providers,
284
  'provider_array' => $provider_array,
285
  'can_view_orders' => $can_view_orders,
286
+ 'can_view_address' => $can_view_address,
287
  ), 'wc-vendors/dashboard/', wcv_plugin_dir . 'templates/dashboard/' );
288
  do_action( 'wcvendors_after_dashboard' );
289
 
classes/front/signup/class-vendor-signup.php CHANGED
@@ -37,8 +37,8 @@ class WCV_Vendor_Signup
37
  add_filter( 'registration_errors', array( $this, 'vendor_registration_errors'), 10, 3 );
38
  }
39
 
40
-
41
-
42
  }
43
 
44
  /**
@@ -172,14 +172,16 @@ class WCV_Vendor_Signup
172
  *
173
  * @return unknown
174
  */
175
- public function apply_form_dashboard()
176
- {
 
 
177
  if ( !isset( $_POST[ 'apply_for_vendor' ] ) ) return false;
178
 
179
  $vendor_dashboard_page = get_option( 'wcvendors_vendor_dashboard_page_id' );
180
  $page_id = get_queried_object_id();
181
 
182
- if ( $page_id == $vendor_dashboard_page ) {
183
  if ( $this->terms_page ) {
184
  if ( isset( $_POST[ 'agree_to_terms' ] ) ) {
185
  self::save_pending( get_current_user_id() );
37
  add_filter( 'registration_errors', array( $this, 'vendor_registration_errors'), 10, 3 );
38
  }
39
 
40
+ //Change user role if they applied to become vendor on registration
41
+ add_action( 'user_register', array( $this, 'save_pending' ), 10, 1 );
42
  }
43
 
44
  /**
172
  *
173
  * @return unknown
174
  */
175
+ public function apply_form_dashboard() {
176
+
177
+ global $wp_query;
178
+
179
  if ( !isset( $_POST[ 'apply_for_vendor' ] ) ) return false;
180
 
181
  $vendor_dashboard_page = get_option( 'wcvendors_vendor_dashboard_page_id' );
182
  $page_id = get_queried_object_id();
183
 
184
+ if ( $page_id == $vendor_dashboard_page || isset( $wp_query->query['become-a-vendor'] ) ) {
185
  if ( $this->terms_page ) {
186
  if ( isset( $_POST[ 'agree_to_terms' ] ) ) {
187
  self::save_pending( get_current_user_id() );
classes/gateways/PayPal_AdvPayments/paypal_ap.php CHANGED
@@ -267,7 +267,7 @@ class WC_PaypalAP extends WC_Payment_Gateway
267
  ?>
268
  <h3><?php echo $this->method_title; ?></h3>
269
  <p><?php _e( 'The PayPal Adaptive Payments gateway can instantly pay your vendors their due commission (if enabled). Also used to mass pay vendors on a schedule / manual method (if enabled).', 'wc-vendors' ); ?></p>
270
- <p><strong><?php _e( 'Please Note: PayPal has depreciated Adaptive Payments. This will soon cease to function.', 'wc-vendors' ); ?></strong></p>
271
  <table class="form-table">
272
 
273
  <?php if ( $this->is_valid_currency() ) :
267
  ?>
268
  <h3><?php echo $this->method_title; ?></h3>
269
  <p><?php _e( 'The PayPal Adaptive Payments gateway can instantly pay your vendors their due commission (if enabled). Also used to mass pay vendors on a schedule / manual method (if enabled).', 'wc-vendors' ); ?></p>
270
+ <p><strong><?php _e( 'Please Note: PayPal has deprecated Adaptive Payments. This will soon cease to function.', 'wc-vendors' ); ?></strong></p>
271
  <table class="form-table">
272
 
273
  <?php if ( $this->is_valid_currency() ) :
classes/includes/class-sf-settings.php CHANGED
@@ -20,7 +20,7 @@ class SF_Settings_API {
20
  $mappings = wcv_get_settings_mapping();
21
 
22
  if ( array_key_exists( $name, $mappings ) ) {
23
- WC_Vendors::log( __function__ . ' has been depreciated please replace WC_Vendors::$pv_options->get_option(\'' . $name . '\') with get_option(\'' . $mappings[ $name ] . '\')' );
24
 
25
  }
26
 
20
  $mappings = wcv_get_settings_mapping();
21
 
22
  if ( array_key_exists( $name, $mappings ) ) {
23
+ WC_Vendors::log( __function__ . ' has been deprecated please replace WC_Vendors::$pv_options->get_option(\'' . $name . '\') with get_option(\'' . $mappings[ $name ] . '\')' );
24
 
25
  }
26
 
languages/wc-vendors.pot CHANGED
@@ -28,11 +28,11 @@ msgstr ""
28
  msgid "<b>WC Vendors is inactive</b>. WC Vendors requires a minimum of WooCommerce 3.0.0 to operate."
29
  msgstr ""
30
 
31
- #: class-wc-vendors.php:397
32
  msgid "WC Vendors 2.0 is a major update. This is not compatible with any of our existing extensions. You should test this update on a staging server before updating. Backup your site and update your theme and extensions, and <a href=\"%s\">review update details here</a> before upgrading."
33
  msgstr ""
34
 
35
- #: class-wc-vendors.php:410
36
  msgid "WC Vendors Pro 1.5.0 is required to run WC Vendors 2.0.0. Your current version %s will be deactivated. Please upgrade to the latest version."
37
  msgstr ""
38
 
@@ -322,15 +322,15 @@ msgstr ""
322
  msgid "Orders"
323
  msgstr ""
324
 
325
- #: classes/admin/class-vendor-admin-dashboard.php:71, classes/front/dashboard/class-vendor-dashboard.php:117
326
  msgid "Your PayPal address is not a valid email address."
327
  msgstr ""
328
 
329
- #: classes/admin/class-vendor-admin-dashboard.php:83, classes/front/dashboard/class-vendor-dashboard.php:128
330
  msgid "That shop name is already taken. Your shop name must be unique."
331
  msgstr ""
332
 
333
- #: classes/admin/class-vendor-admin-dashboard.php:141, classes/front/dashboard/class-vendor-dashboard.php:169
334
  msgid "Settings saved."
335
  msgstr ""
336
 
@@ -370,11 +370,11 @@ msgstr ""
370
  msgid "Orders marked shipped."
371
  msgstr ""
372
 
373
- #: classes/admin/class-vendor-admin-dashboard.php:573
374
  msgid "Yes"
375
  msgstr ""
376
 
377
- #: classes/admin/class-vendor-admin-dashboard.php:573
378
  msgid "No"
379
  msgstr ""
380
 
@@ -730,11 +730,11 @@ msgstr ""
730
  msgid "Apply to become a vendor? "
731
  msgstr ""
732
 
733
- #: templates/dashboard/denied.php:47
734
  msgid "I have read and accepted the <a href=\"%s\">terms and conditions</a>"
735
  msgstr ""
736
 
737
- #: templates/dashboard/denied.php:67
738
  msgid "Submit"
739
  msgstr ""
740
 
@@ -911,19 +911,19 @@ msgstr ""
911
  msgid "Quantity: %d"
912
  msgstr ""
913
 
914
- #: classes/admin/emails/class-emails.php:73, classes/admin/emails/class-emails.php:184, classes/admin/emails/class-wc-approve-vendor.php:70
915
  msgid "pending"
916
  msgstr ""
917
 
918
- #: classes/admin/emails/class-emails.php:75
919
  msgid "approved"
920
  msgstr ""
921
 
922
- #: classes/admin/emails/class-emails.php:77
923
  msgid "denied"
924
  msgstr ""
925
 
926
- #: classes/admin/emails/class-emails.php:147
927
  msgid "Resend %s new order notification"
928
  msgstr ""
929
 
@@ -932,7 +932,7 @@ msgid "Vendor Application"
932
  msgstr ""
933
 
934
  #: classes/admin/emails/class-wc-approve-vendor.php:29
935
- msgid "Vendor application will either be approved, denied, or pending. <strong>This email has been depreciated.</strong>"
936
  msgstr ""
937
 
938
  #: classes/admin/emails/class-wc-approve-vendor.php:31
@@ -1012,7 +1012,7 @@ msgid "Vendor has shipped"
1012
  msgstr ""
1013
 
1014
  #: classes/admin/emails/class-wc-notify-shipped.php:29
1015
- msgid "An email is sent when a vendor has marked one of their orders as shipped. <strong>This email has been depreciated.</strong>"
1016
  msgstr ""
1017
 
1018
  #: classes/admin/emails/class-wc-notify-shipped.php:31
@@ -1032,7 +1032,7 @@ msgid "Notify vendors"
1032
  msgstr ""
1033
 
1034
  #: classes/admin/emails/class-wc-notify-vendor.php:28
1035
- msgid "New order emails are sent when an order is received/paid by a customer. <strong>This email has been depreciated.</strong>"
1036
  msgstr ""
1037
 
1038
  #: classes/admin/emails/class-wc-notify-vendor.php:30
@@ -1660,7 +1660,7 @@ msgid "Allow HTML in %s shop desription"
1660
  msgstr ""
1661
 
1662
  #: classes/admin/settings/class-wcv-settings-display.php:235
1663
- msgid "Enable HTML for the %1$s shop description. You can enable or disable this per %1$s by editing the %1$s user account."
1664
  msgstr ""
1665
 
1666
  #: classes/admin/settings/class-wcv-settings-display.php:242
@@ -1736,7 +1736,7 @@ msgid "PayPal Adaptive Payments"
1736
  msgstr ""
1737
 
1738
  #: classes/admin/settings/class-wcv-settings-payments.php:67
1739
- msgid "<h3>PayPal Adaptive Payments - Please Note: PayPal Adaptive Payments has been depreciated by PayPal as of September 2017. These options are for existing users only. This will be completely removed in a future version.</h3>"
1740
  msgstr ""
1741
 
1742
  #: classes/admin/settings/class-wcv-settings-payments.php:75
@@ -1995,19 +1995,27 @@ msgstr ""
1995
  msgid "Save Shop Settings"
1996
  msgstr ""
1997
 
1998
- #: classes/front/dashboard/class-vendor-dashboard.php:56
 
 
 
 
 
 
 
 
1999
  msgid "Order marked shipped."
2000
  msgstr ""
2001
 
2002
- #: classes/front/dashboard/class-vendor-dashboard.php:59
2003
  msgid "%s has marked as shipped. "
2004
  msgstr ""
2005
 
2006
- #: classes/front/dashboard/class-vendor-dashboard.php:88, classes/front/dashboard/class-vendor-dashboard.php:89
2007
  msgid "Tracking number"
2008
  msgstr ""
2009
 
2010
- #: classes/front/dashboard/class-vendor-dashboard.php:91
2011
  msgid "Success. Your tracking number has been updated."
2012
  msgstr ""
2013
 
@@ -2075,7 +2083,7 @@ msgstr ""
2075
  msgid "Your application has been submitted."
2076
  msgstr ""
2077
 
2078
- #: classes/front/signup/class-vendor-signup.php:150, classes/front/signup/class-vendor-signup.php:187, classes/front/signup/class-vendor-signup.php:199
2079
  msgid "You must accept the terms and conditions to become a vendor."
2080
  msgstr ""
2081
 
@@ -2172,7 +2180,7 @@ msgid "The PayPal Adaptive Payments gateway can instantly pay your vendors their
2172
  msgstr ""
2173
 
2174
  #: classes/gateways/PayPal_AdvPayments/paypal_ap.php:270
2175
- msgid "Please Note: PayPal has depreciated Adaptive Payments. This will soon cease to function."
2176
  msgstr ""
2177
 
2178
  #: classes/gateways/PayPal_AdvPayments/paypal_ap.php:281
28
  msgid "<b>WC Vendors is inactive</b>. WC Vendors requires a minimum of WooCommerce 3.0.0 to operate."
29
  msgstr ""
30
 
31
+ #: class-wc-vendors.php:399
32
  msgid "WC Vendors 2.0 is a major update. This is not compatible with any of our existing extensions. You should test this update on a staging server before updating. Backup your site and update your theme and extensions, and <a href=\"%s\">review update details here</a> before upgrading."
33
  msgstr ""
34
 
35
+ #: class-wc-vendors.php:412
36
  msgid "WC Vendors Pro 1.5.0 is required to run WC Vendors 2.0.0. Your current version %s will be deactivated. Please upgrade to the latest version."
37
  msgstr ""
38
 
322
  msgid "Orders"
323
  msgstr ""
324
 
325
+ #: classes/admin/class-vendor-admin-dashboard.php:71, classes/front/dashboard/class-vendor-dashboard.php:119
326
  msgid "Your PayPal address is not a valid email address."
327
  msgstr ""
328
 
329
+ #: classes/admin/class-vendor-admin-dashboard.php:83, classes/front/dashboard/class-vendor-dashboard.php:130
330
  msgid "That shop name is already taken. Your shop name must be unique."
331
  msgstr ""
332
 
333
+ #: classes/admin/class-vendor-admin-dashboard.php:141, classes/front/dashboard/class-vendor-dashboard.php:171
334
  msgid "Settings saved."
335
  msgstr ""
336
 
370
  msgid "Orders marked shipped."
371
  msgstr ""
372
 
373
+ #: classes/admin/class-vendor-admin-dashboard.php:570
374
  msgid "Yes"
375
  msgstr ""
376
 
377
+ #: classes/admin/class-vendor-admin-dashboard.php:570
378
  msgid "No"
379
  msgstr ""
380
 
730
  msgid "Apply to become a vendor? "
731
  msgstr ""
732
 
733
+ #: templates/dashboard/denied.php:50
734
  msgid "I have read and accepted the <a href=\"%s\">terms and conditions</a>"
735
  msgstr ""
736
 
737
+ #: templates/dashboard/denied.php:70
738
  msgid "Submit"
739
  msgstr ""
740
 
911
  msgid "Quantity: %d"
912
  msgstr ""
913
 
914
+ #: classes/admin/emails/class-emails.php:76, classes/admin/emails/class-emails.php:208, classes/admin/emails/class-wc-approve-vendor.php:70
915
  msgid "pending"
916
  msgstr ""
917
 
918
+ #: classes/admin/emails/class-emails.php:78
919
  msgid "approved"
920
  msgstr ""
921
 
922
+ #: classes/admin/emails/class-emails.php:80
923
  msgid "denied"
924
  msgstr ""
925
 
926
+ #: classes/admin/emails/class-emails.php:159
927
  msgid "Resend %s new order notification"
928
  msgstr ""
929
 
932
  msgstr ""
933
 
934
  #: classes/admin/emails/class-wc-approve-vendor.php:29
935
+ msgid "Vendor application will either be approved, denied, or pending. <strong>This email has been deprecated.</strong>"
936
  msgstr ""
937
 
938
  #: classes/admin/emails/class-wc-approve-vendor.php:31
1012
  msgstr ""
1013
 
1014
  #: classes/admin/emails/class-wc-notify-shipped.php:29
1015
+ msgid "An email is sent when a vendor has marked one of their orders as shipped. <strong>This email has been deprecated.</strong>"
1016
  msgstr ""
1017
 
1018
  #: classes/admin/emails/class-wc-notify-shipped.php:31
1032
  msgstr ""
1033
 
1034
  #: classes/admin/emails/class-wc-notify-vendor.php:28
1035
+ msgid "New order emails are sent when an order is received/paid by a customer. <strong>This email has been deprecated.</strong>"
1036
  msgstr ""
1037
 
1038
  #: classes/admin/emails/class-wc-notify-vendor.php:30
1660
  msgstr ""
1661
 
1662
  #: classes/admin/settings/class-wcv-settings-display.php:235
1663
+ msgid "This will enable the WYSIWYG editor and for the %1$s shop description. You can enable or disable this per %1$s by editing the %1$s user account."
1664
  msgstr ""
1665
 
1666
  #: classes/admin/settings/class-wcv-settings-display.php:242
1736
  msgstr ""
1737
 
1738
  #: classes/admin/settings/class-wcv-settings-payments.php:67
1739
+ msgid "<h3>PayPal Adaptive Payments - Please Note: PayPal Adaptive Payments has been deprecated by PayPal as of September 2017. These options are for existing users only. This will be completely removed in a future version.</h3>"
1740
  msgstr ""
1741
 
1742
  #: classes/admin/settings/class-wcv-settings-payments.php:75
1995
  msgid "Save Shop Settings"
1996
  msgstr ""
1997
 
1998
+ #: classes/front/account/class-wc-account-links.php:36
1999
+ msgid "Become a Vendor"
2000
+ msgstr ""
2001
+
2002
+ #: classes/front/account/class-wc-account-links.php:78
2003
+ msgid "You are already an approved vendor, no need to apply"
2004
+ msgstr ""
2005
+
2006
+ #: classes/front/dashboard/class-vendor-dashboard.php:58
2007
  msgid "Order marked shipped."
2008
  msgstr ""
2009
 
2010
+ #: classes/front/dashboard/class-vendor-dashboard.php:61
2011
  msgid "%s has marked as shipped. "
2012
  msgstr ""
2013
 
2014
+ #: classes/front/dashboard/class-vendor-dashboard.php:90, classes/front/dashboard/class-vendor-dashboard.php:91
2015
  msgid "Tracking number"
2016
  msgstr ""
2017
 
2018
+ #: classes/front/dashboard/class-vendor-dashboard.php:93
2019
  msgid "Success. Your tracking number has been updated."
2020
  msgstr ""
2021
 
2083
  msgid "Your application has been submitted."
2084
  msgstr ""
2085
 
2086
+ #: classes/front/signup/class-vendor-signup.php:150, classes/front/signup/class-vendor-signup.php:189, classes/front/signup/class-vendor-signup.php:201
2087
  msgid "You must accept the terms and conditions to become a vendor."
2088
  msgstr ""
2089
 
2180
  msgstr ""
2181
 
2182
  #: classes/gateways/PayPal_AdvPayments/paypal_ap.php:270
2183
+ msgid "Please Note: PayPal has deprecated Adaptive Payments. This will soon cease to function."
2184
  msgstr ""
2185
 
2186
  #: classes/gateways/PayPal_AdvPayments/paypal_ap.php:281
package-lock.json CHANGED
@@ -422,7 +422,7 @@
422
  "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
423
  "dev": true,
424
  "requires": {
425
- "hoek": "4.2.1"
426
  }
427
  },
428
  "brace-expansion": {
@@ -2932,12 +2932,12 @@
2932
  "requires": {
2933
  "boom": "2.10.1",
2934
  "cryptiles": "2.0.5",
2935
- "hoek": "4.2.1",
2936
  "sntp": "1.0.9"
2937
  }
2938
  },
2939
  "hoek": {
2940
- "version": "4.2.1",
2941
  "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz",
2942
  "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=",
2943
  "dev": true
@@ -5181,7 +5181,7 @@
5181
  "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=",
5182
  "dev": true,
5183
  "requires": {
5184
- "hoek": "4.2.1"
5185
  }
5186
  },
5187
  "source-map": {
422
  "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
423
  "dev": true,
424
  "requires": {
425
+ "hoek": "2.16.3"
426
  }
427
  },
428
  "brace-expansion": {
2932
  "requires": {
2933
  "boom": "2.10.1",
2934
  "cryptiles": "2.0.5",
2935
+ "hoek": "2.16.3",
2936
  "sntp": "1.0.9"
2937
  }
2938
  },
2939
  "hoek": {
2940
+ "version": "2.16.3",
2941
  "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz",
2942
  "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=",
2943
  "dev": true
5181
  "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=",
5182
  "dev": true,
5183
  "requires": {
5184
+ "hoek": "2.16.3"
5185
  }
5186
  },
5187
  "source-map": {
readme.txt CHANGED
@@ -7,7 +7,7 @@ Plugin URI: https://www.wcvendors.com/
7
  Requires at least: 4.4.0
8
  Requires PHP: 5.6
9
  Tested up to: 4.9.5
10
- Stable tag: 2.0.6
11
  License: GPLv2 or later
12
 
13
  The free marketplace plugin for WooCommerce. Now you can allow anyone to open a store on your WooCommerce site!
@@ -22,7 +22,7 @@ WC Vendors was released to the market in October of 2014 having gotten its roots
22
  * Questions about GDPR and WC Vendors? Please read our recent blog post <a href="https://www.wcvendors.com/2018/05/gdpr-and-wc-vendors/?utm_campaign=announcements?utm_source=wporg">GDPR and WC Vendors</a>.
23
  * Please read our recent blog post <a href="https://www.wcvendors.com/2018/05/payments-explained/?utm_campaign=announcements?utm_source=wporg">Payments Explained</a> for solutions to your vendor commission payments. Including Stripe, Paypal and others.
24
  * WC Vendors 2.0 is a major update, this will affect some stores using other WC Vendors integrations.
25
- * PayPal has depreciated Adaptive Payments as of September 1st 2017. This will soon cease to function. We provide an instant payment solution via our <a href="https://www.wcvendors.com/product/wc-vendors-pro/?utm_campaign=annoucements?utm_source=wporg">Stripe Gateway</a> however there are 3rd party extensions from MangoPay and Escrow that also provide vendor commission payouts.
26
 
27
 
28
  == Features ==
@@ -143,7 +143,23 @@ WC Vendors does not work with multisite WordPress. There are no plans to support
143
 
144
  == Changelog ==
145
 
146
- = Version 2.0.6 - 28th May 2018 =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147
 
148
  * Added: Payment details to totals CSV export #414
149
  * Added: New background updater
@@ -225,7 +241,7 @@ Templates Updated:
225
  * Updated: Brazilian Portuguese translation thanks CasperBraske
226
  * Fixed: Permalinks not flushing on settings save
227
  * Fixed: Terms & Conditions Checkbox for Vendor Registration does not show #392
228
- * Fixed: Depreciated calls on orders screen
229
  * Fixed: Vendor role capabilities updated when new settings updated.
230
  * Fixed: Vendors can delete media they uploaded
231
  * Fixed: Added check for woocommerce shipping tax class setting
@@ -273,7 +289,7 @@ Templates Updated:
273
 
274
  = Version 1.9.13 - 28th November 2017 =
275
 
276
- * Added: Notice for depreciated gateway
277
  * Added: A filter for role change: Denied Vendor #351
278
  * Added: WooCommerce tested header for new WooCommerce Status page
279
  * Added: Filter for vendor signup form so it can be overriden
@@ -281,7 +297,7 @@ Templates Updated:
281
  * Updated: Brazillian Port wcvendors-pt_BR.pot
282
  * Fixed: Moved sprintf must be outside #381 thanks CasperBraske
283
  * Fixed: Re-Send email options in admin/orders are not available after WooCommerce update #383
284
- * Fixed: depreciated screen_icon method call
285
  * Fixed: Use wc_get_order instead of new WC_Order #382
286
  * Fixed: Post called incorrectly #378
287
  * Fixed: Get correct product name in commission table if variation deleted
@@ -289,7 +305,7 @@ Templates Updated:
289
  * Fixed: mistake in vendor_shop_query
290
  * Fixed: Return 404 if vendor doesn't exist
291
  * Fixed: The shop name background doesn’t scale with shop image #366
292
- * Fixed: Depreciated functions #368 thanks @stodorovic
293
  * Fixed: Changed how customer address is displayed based on Woo Options. Thanks @debain
294
 
295
  = Version 1.9.12 - June 26 2017 =
@@ -331,7 +347,7 @@ Templates Updated:
331
  * Fixed: Capabilities Fix for Resetting Roles #329
332
  * Fixed: HTML title attribute doesn't change for store pages #328
333
  * Fixed: Login form not displayed if get variable set
334
- * Fixed: Depreciated action in product edit screen
335
 
336
  Templates Updated:
337
  templates/emails/vendor-new-order.php
@@ -481,7 +497,7 @@ Templates Updated:
481
  * Fixed: Sold By:Name spaces issue #256
482
  * Fixed: Show extended fields for vendor and pending vendor roles
483
  * Fixed: Check if product is taxable
484
- * Fixed: Depreciated function calls in email templates
485
  * Fixed: Commission giving tax on none taxable items #251
486
  * Fixed: Sold by label issues with WC 2.5 #250
487
 
@@ -574,7 +590,7 @@ Templates Updated:
574
  * Fixed: Instant Pay bug #174
575
  * Fixed: wcv_vendorslist paging #178
576
  * Added: Vendor display name now translatable
577
- * Depreciated: Dashboard vendor reports
578
  * Added: Chinese Language files thanks to SundayLau
579
  * Fixed: Added support for WPML #177
580
  * Update: default pot language file
@@ -614,7 +630,7 @@ Templates Updated:
614
  * Fixed: Made PayPal optional on Vendor Dashboard Shop Settings #144
615
  * Update: fixed return query var
616
  * Fixed: Test for product post types #149
617
- * Fixed: 2.1 Depreciated return call
618
  * Fixed: PHP Strict static call in commissions class
619
  * Merged: Is Vendor checks all user roles #147 thanks crabilld
620
 
@@ -662,7 +678,7 @@ Templates Updated:
662
  * Fixed: Plugin row meta links
663
  * Added: Upgrade notice
664
  * Fixed: Rounding issue #120
665
- * Fixed: Paypal https host check depreciated call
666
  * Added: show_products attribute #107
667
  * Updated: Text in denied template to make more sense when registration disabled #123
668
  * Updated: wcv_vendorslist shortcode now shows 3 column output #123
@@ -690,7 +706,7 @@ Templates Updated:
690
  * Fixed: Table Rate Shipping issue #103
691
  * Fixed: Featured column issue #100
692
  * Updated: Filter call for report
693
- * Fixed: Call to depreciated function #98
694
 
695
  = Version 1.4.4 - February 17th 2015 =
696
 
7
  Requires at least: 4.4.0
8
  Requires PHP: 5.6
9
  Tested up to: 4.9.5
10
+ Stable tag: 2.0.7
11
  License: GPLv2 or later
12
 
13
  The free marketplace plugin for WooCommerce. Now you can allow anyone to open a store on your WooCommerce site!
22
  * Questions about GDPR and WC Vendors? Please read our recent blog post <a href="https://www.wcvendors.com/2018/05/gdpr-and-wc-vendors/?utm_campaign=announcements?utm_source=wporg">GDPR and WC Vendors</a>.
23
  * Please read our recent blog post <a href="https://www.wcvendors.com/2018/05/payments-explained/?utm_campaign=announcements?utm_source=wporg">Payments Explained</a> for solutions to your vendor commission payments. Including Stripe, Paypal and others.
24
  * WC Vendors 2.0 is a major update, this will affect some stores using other WC Vendors integrations.
25
+ * PayPal has deprecated Adaptive Payments as of September 1st 2017. This will soon cease to function. We provide an instant payment solution via our <a href="https://www.wcvendors.com/product/wc-vendors-pro/?utm_campaign=annoucements?utm_source=wporg">Stripe Gateway</a> however there are 3rd party extensions from MangoPay and Escrow that also provide vendor commission payouts.
26
 
27
 
28
  == Features ==
143
 
144
  == Changelog ==
145
 
146
+ = Version 2.0.7 - 11th June 2018 =
147
+
148
+ * Added: Become a vendor link to WooCommerce My Account page
149
+ * Fixed: Fatal Error WP Admin vendor orders #422
150
+ * Fixed: Only run vendor dashboard class on the front end
151
+ * Fixed: Admin dashboard error
152
+ * Fixed: fatal error get_id on integer
153
+ * Fixed: Hide signup form if current user is already a vendor
154
+ * Fixed: Tags stripped from wysiwyg settings #419
155
+ * Fixed: Spelling mistake across the code base
156
+ * Updated: language files
157
+ * Updated: Wording for settings
158
+
159
+ Templates Updated:
160
+ templates/dashboard/dashboard/denied.php
161
+
162
+ = Version 2.0.6 - 28th May 2018 =
163
 
164
  * Added: Payment details to totals CSV export #414
165
  * Added: New background updater
241
  * Updated: Brazilian Portuguese translation thanks CasperBraske
242
  * Fixed: Permalinks not flushing on settings save
243
  * Fixed: Terms & Conditions Checkbox for Vendor Registration does not show #392
244
+ * Fixed: deprecated calls on orders screen
245
  * Fixed: Vendor role capabilities updated when new settings updated.
246
  * Fixed: Vendors can delete media they uploaded
247
  * Fixed: Added check for woocommerce shipping tax class setting
289
 
290
  = Version 1.9.13 - 28th November 2017 =
291
 
292
+ * Added: Notice for deprecated gateway
293
  * Added: A filter for role change: Denied Vendor #351
294
  * Added: WooCommerce tested header for new WooCommerce Status page
295
  * Added: Filter for vendor signup form so it can be overriden
297
  * Updated: Brazillian Port wcvendors-pt_BR.pot
298
  * Fixed: Moved sprintf must be outside #381 thanks CasperBraske
299
  * Fixed: Re-Send email options in admin/orders are not available after WooCommerce update #383
300
+ * Fixed: deprecated screen_icon method call
301
  * Fixed: Use wc_get_order instead of new WC_Order #382
302
  * Fixed: Post called incorrectly #378
303
  * Fixed: Get correct product name in commission table if variation deleted
305
  * Fixed: mistake in vendor_shop_query
306
  * Fixed: Return 404 if vendor doesn't exist
307
  * Fixed: The shop name background doesn’t scale with shop image #366
308
+ * Fixed: deprecated functions #368 thanks @stodorovic
309
  * Fixed: Changed how customer address is displayed based on Woo Options. Thanks @debain
310
 
311
  = Version 1.9.12 - June 26 2017 =
347
  * Fixed: Capabilities Fix for Resetting Roles #329
348
  * Fixed: HTML title attribute doesn't change for store pages #328
349
  * Fixed: Login form not displayed if get variable set
350
+ * Fixed: deprecated action in product edit screen
351
 
352
  Templates Updated:
353
  templates/emails/vendor-new-order.php
497
  * Fixed: Sold By:Name spaces issue #256
498
  * Fixed: Show extended fields for vendor and pending vendor roles
499
  * Fixed: Check if product is taxable
500
+ * Fixed: deprecated function calls in email templates
501
  * Fixed: Commission giving tax on none taxable items #251
502
  * Fixed: Sold by label issues with WC 2.5 #250
503
 
590
  * Fixed: Instant Pay bug #174
591
  * Fixed: wcv_vendorslist paging #178
592
  * Added: Vendor display name now translatable
593
+ * deprecated: Dashboard vendor reports
594
  * Added: Chinese Language files thanks to SundayLau
595
  * Fixed: Added support for WPML #177
596
  * Update: default pot language file
630
  * Fixed: Made PayPal optional on Vendor Dashboard Shop Settings #144
631
  * Update: fixed return query var
632
  * Fixed: Test for product post types #149
633
+ * Fixed: 2.1 deprecated return call
634
  * Fixed: PHP Strict static call in commissions class
635
  * Merged: Is Vendor checks all user roles #147 thanks crabilld
636
 
678
  * Fixed: Plugin row meta links
679
  * Added: Upgrade notice
680
  * Fixed: Rounding issue #120
681
+ * Fixed: Paypal https host check deprecated call
682
  * Added: show_products attribute #107
683
  * Updated: Text in denied template to make more sense when registration disabled #123
684
  * Updated: wcv_vendorslist shortcode now shows 3 column output #123
706
  * Fixed: Table Rate Shipping issue #103
707
  * Fixed: Featured column issue #100
708
  * Updated: Filter call for report
709
+ * Fixed: Call to deprecated function #98
710
 
711
  = Version 1.4.4 - February 17th 2015 =
712
 
templates/dashboard/denied.php CHANGED
@@ -6,7 +6,7 @@
6
  *
7
  * @author Jamie Madden, WC Vendors
8
  * @package WCVendors/Templates/dashboard
9
- * @version 2.0.0
10
 
11
  */
12
 
@@ -38,7 +38,10 @@
38
 
39
  <div class="clear"></div>
40
 
41
- <?php if ( $terms_page = get_option( 'terms_to_apply_page' ) ) { ?>
 
 
 
42
  <p class="form-row agree-to-terms-container" style="display:none">
43
  <input class="input-checkbox"
44
  id="agree_to_terms" <?php checked( isset( $_POST[ 'agree_to_terms' ] ), true ) ?>
6
  *
7
  * @author Jamie Madden, WC Vendors
8
  * @package WCVendors/Templates/dashboard
9
+ * @version 2.0.7
10
 
11
  */
12
 
38
 
39
  <div class="clear"></div>
40
 
41
+ <?php
42
+ $terms_page = get_option( 'wcvendors_vendor_terms_page_id' );
43
+
44
+ if ( $terms_page ) { ?>
45
  <p class="form-row agree-to-terms-container" style="display:none">
46
  <input class="input-checkbox"
47
  id="agree_to_terms" <?php checked( isset( $_POST[ 'agree_to_terms' ] ), true ) ?>