WC Vendors - Version 1.9.15

Version Description

No Upgrade required at this time.

Download this release

Release Info

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

Code changes from version 1.9.14 to 1.9.15

Files changed (3) hide show
  1. changelog.txt +4 -0
  2. class-wc-vendors.php +42 -4
  3. readme.txt +7 -3
changelog.txt CHANGED
@@ -1,5 +1,9 @@
1
  Changelog for WC Vendors
2
 
 
 
 
 
3
  Version 1.9.14
4
 
5
  * Added: Export commissions via CSV
1
  Changelog for WC Vendors
2
 
3
+ Version 1.9.15
4
+
5
+ * Added: Upgrade notice code
6
+
7
  Version 1.9.14
8
 
9
  * Added: Export commissions via CSV
class-wc-vendors.php CHANGED
@@ -8,11 +8,11 @@
8
  * Author URI: https://www.wcvendors.com
9
  * GitHub Plugin URI: https://github.com/wcvendors/wcvendors
10
  *
11
- * Version: 1.9.14
12
  * Requires at least: 4.4.0
13
- * Tested up to: 4.9.4
14
  * WC requires at least: 3.0.0
15
- * WC tested up to: 3.3.1
16
  *
17
  * Text Domain: wcvendors
18
  * Domain Path: /languages/
@@ -74,7 +74,7 @@ if ( wcv_is_woocommerce_activated() ) {
74
  if ( !defined( 'wcv_plugin_dir_path' ) ) define( 'wcv_plugin_dir_path', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
75
 
76
 
77
- define('WCV_VERSION', '1.9.14' );
78
 
79
  /**
80
  * Main Product Vendor class
@@ -120,6 +120,13 @@ if ( wcv_is_woocommerce_activated() ) {
120
  add_action( 'wp_logout', array( $this, 'destroy_session') );
121
  add_action( 'wp_login', array( $this, 'destroy_session') );
122
 
 
 
 
 
 
 
 
123
  add_filter( 'wc_prd_vendor_options', array( $this, 'upgrade_pro_notice' ) );
124
  }
125
 
@@ -454,6 +461,37 @@ if ( wcv_is_woocommerce_activated() ) {
454
  return $options;
455
  }
456
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
457
  }
458
 
459
  $wc_vendors = new WC_Vendors;
8
  * Author URI: https://www.wcvendors.com
9
  * GitHub Plugin URI: https://github.com/wcvendors/wcvendors
10
  *
11
+ * Version: 1.9.15
12
  * Requires at least: 4.4.0
13
+ * Tested up to: 4.9.5
14
  * WC requires at least: 3.0.0
15
+ * WC tested up to: 3.3.5
16
  *
17
  * Text Domain: wcvendors
18
  * Domain Path: /languages/
74
  if ( !defined( 'wcv_plugin_dir_path' ) ) define( 'wcv_plugin_dir_path', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
75
 
76
 
77
+ define('WCV_VERSION', '1.9.15' );
78
 
79
  /**
80
  * Main Product Vendor class
120
  add_action( 'wp_logout', array( $this, 'destroy_session') );
121
  add_action( 'wp_login', array( $this, 'destroy_session') );
122
 
123
+ // Show update notices
124
+ $file = basename( __FILE__ );
125
+ $folder = basename( dirname( __FILE__ ) );
126
+ $hook = "in_plugin_update_message-{$folder}/{$file}";
127
+ add_action( $hook, array( $this, 'show_upgrade_notification') , 10, 2);
128
+
129
+
130
  add_filter( 'wc_prd_vendor_options', array( $this, 'upgrade_pro_notice' ) );
131
  }
132
 
461
  return $options;
462
  }
463
 
464
+ /*
465
+ * Upgrade notice displayed on the plugin screen
466
+ *
467
+ */
468
+ public function show_upgrade_notification( $args, $response ) {
469
+
470
+ $new_version = $response->new_version;
471
+ $upgrade_notice = sprintf( __( '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.', 'wc-vendors' ), 'https://docs.wcvendors.com/knowledge-base/upgrading-to-wc-vendors-2-0/');
472
+
473
+ if ( version_compare( WCV_VERSION, $new_version, '<' ) && version_compare( $new_version, '2.0.0', '>=') ){
474
+ echo '<h3>Important Upgrade Notice:</h3>';
475
+ echo '<p style="background-color: #d54e21; padding: 10px; color: #f9f9f9; margin-top: 10px">';
476
+ echo $upgrade_notice;
477
+ if ( !class_exists( 'WCVendors_Pro' ) ) echo '</p>';
478
+
479
+ if ( class_exists( 'WCVendors_Pro' ) ){
480
+
481
+ if ( version_compare( WCV_PRO_VERSION, '1.5.0', '<' ) ){
482
+ echo '<h3>WC Vendors Pro Notice</h3>';
483
+ echo '<p style="background-color: #d54e21; padding: 10px; color: #f9f9f9; margin-top: 10px">';
484
+ $pro_upgrade = sprintf( __( '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.', 'wc-vendors' ), WCV_PRO_VERSION );
485
+
486
+ echo $pro_upgrade;
487
+ // echo '</p>';
488
+ }
489
+
490
+ }
491
+
492
+ }
493
+ }
494
+
495
  }
496
 
497
  $wc_vendors = new WC_Vendors;
readme.txt CHANGED
@@ -6,8 +6,8 @@ Author URI: http://www.wcvendors.com/
6
  Plugin URI: http://www.wcvendors.com/
7
  Text Domain: wcvendors
8
  Requires at least: 4.4.0
9
- Tested up to: 4.9.4
10
- Stable tag: 1.9.14
11
  License: GPLv2 or later
12
 
13
  The free marketplace plugin for WooCommerce. Now you can allow anyone to open a store on your site!
@@ -23,7 +23,7 @@ WC Vendors was released to the market in October of 2014 having gotten its roots
23
 
24
  = Features =
25
  * All features listed here are included in the free plugin.
26
- * Instantly pay vendors their commission as soon as an order is placed using PayPal Adaptive Payments or <a href="https://www.wcvendors.com/product/stripe-commissions-gateway/">Stripe</a>. NOTE (September 2017): PayPal Adaptive Payments has been deprecated by PayPal; we are working to implement a replacement.
27
  * Vendors can submit products for admin review, or send new products live to the site immediately.
28
  * Vendors can view live sales and reports for their products
29
  * Vendors can comment on their orders (eg, to inform customers of a tracking number)
@@ -130,6 +130,10 @@ WC Vendors does not work with multisite WordPress. There are no plans to support
130
  No Upgrade required at this time.
131
 
132
  == Changelog ==
 
 
 
 
133
  =Version 1.9.14 - 18th Feburary 2018
134
 
135
  * Added: Export commissions via CSV
6
  Plugin URI: http://www.wcvendors.com/
7
  Text Domain: wcvendors
8
  Requires at least: 4.4.0
9
+ Tested up to: 4.9.5
10
+ Stable tag: 1.9.15
11
  License: GPLv2 or later
12
 
13
  The free marketplace plugin for WooCommerce. Now you can allow anyone to open a store on your site!
23
 
24
  = Features =
25
  * All features listed here are included in the free plugin.
26
+ * Instantly pay vendors their commission as soon as an order is placed using PayPal Adaptive Payments or <a href="https://www.wcvendors.com/product/stripe-commissions-gateway/">Stripe</a>. NOTE (September 2017): PayPal Adaptive Payments has been deprecated by PayPal;
27
  * Vendors can submit products for admin review, or send new products live to the site immediately.
28
  * Vendors can view live sales and reports for their products
29
  * Vendors can comment on their orders (eg, to inform customers of a tracking number)
130
  No Upgrade required at this time.
131
 
132
  == Changelog ==
133
+ =Version 1.9.15 - 9th May 2018
134
+
135
+ * Added: Upgrade notice code
136
+
137
  =Version 1.9.14 - 18th Feburary 2018
138
 
139
  * Added: Export commissions via CSV