WC Vendors - Version 2.4.4

Version Description

Download this release

Release Info

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

Code changes from version 2.4.3 to 2.4.4

changelog.txt CHANGED
@@ -1,5 +1,10 @@
1
  Changelog for WC Vendors Marketplace
2
 
 
 
 
 
 
3
  Version 2.4.3 - 21 July 2022
4
 
5
  * Added: Paypal Masspay Web CSV export (#860)
1
  Changelog for WC Vendors Marketplace
2
 
3
+ Version 2.4.4 - 24 November 2022
4
+
5
+ * Fixed: Admin notify product email firing twice
6
+ * Fixed: New vendor list pagination doesn't work when using the display options grid or list. (#870)
7
+
8
  Version 2.4.3 - 21 July 2022
9
 
10
  * Added: Paypal Masspay Web CSV export (#860)
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.4.3
11
  * Requires at least: 5.3.0
12
- * Tested up to: 6.1.0
13
  * WC requires at least: 5.0
14
- * WC tested up to: 6.7
15
  *
16
  * Text Domain: wc-vendors
17
  * Domain Path: /languages/
@@ -106,7 +106,7 @@ if ( wcv_is_woocommerce_activated() ) {
106
  */
107
  class WC_Vendors {
108
 
109
- public $version = '2.4.3';
110
 
111
  /**
112
  * @var
7
  * Author URI: https://www.wcvendors.com
8
  * GitHub Plugin URI: https://github.com/wcvendors/wcvendors
9
  *
10
+ * Version: 2.4.4
11
  * Requires at least: 5.3.0
12
+ * Tested up to: 6.1.1
13
  * WC requires at least: 5.0
14
+ * WC tested up to: 7.1.0
15
  *
16
  * Text Domain: wc-vendors
17
  * Domain Path: /languages/
106
  */
107
  class WC_Vendors {
108
 
109
+ public $version = '2.4.4';
110
 
111
  /**
112
  * @var
classes/admin/emails/class-wcv-admin-notify-product.php CHANGED
@@ -37,8 +37,8 @@ if ( ! class_exists( 'WCVendors_Admin_Notify_Product' ) ) :
37
  );
38
 
39
  // Triggers for this email
40
- add_action( 'pending_product', array( $this, 'trigger' ), 10, 2 );
41
- add_action( 'pending_product_variation', array( $this, 'trigger' ), 10, 2 );
42
 
43
  // Call parent constructor
44
  parent::__construct();
@@ -72,17 +72,31 @@ if ( ! class_exists( 'WCVendors_Admin_Notify_Product' ) ) :
72
  /**
73
  * Trigger the sending of this email.
74
  *
75
- * @param int $order_id The order ID.
76
- * @param WC_Order $order Order object.
77
  */
78
- public function trigger( $post_id, $post ) {
79
 
80
  $this->setup_locale();
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  if ( ! WCV_Vendors::is_vendor( $post->post_author ) ) {
83
  return;
84
  }
85
 
 
86
  $this->post_id = $post_id;
87
  $this->vendor_id = $post->post_author;
88
  $this->product = wc_get_product( $post_id );
37
  );
38
 
39
  // Triggers for this email
40
+ add_action( 'draft_to_pending', array( $this, 'trigger' ), 10, 1 );
41
+ add_action( 'new_to_pending', array( $this, 'trigger' ), 10, 1 );
42
 
43
  // Call parent constructor
44
  parent::__construct();
72
  /**
73
  * Trigger the sending of this email.
74
  *
75
+ * @param WP_Post $post The post object.
 
76
  */
77
+ public function trigger( $post ) {
78
 
79
  $this->setup_locale();
80
 
81
+ $allow_posttype = apply_filters( 'wcvendors_notify_allow_product_type', array( 'product', 'product_variation' ) );
82
+
83
+ if ( ! is_a( $post, 'WP_Post' ) ) {
84
+ return;
85
+ }
86
+
87
+ if ( $post->post_status !== 'pending' ) {
88
+ return;
89
+ }
90
+
91
+ if ( ! in_array( $post->post_type, $allow_posttype ) ) {
92
+ return;
93
+ }
94
+
95
  if ( ! WCV_Vendors::is_vendor( $post->post_author ) ) {
96
  return;
97
  }
98
 
99
+ $post_id = $post->ID;
100
  $this->post_id = $post_id;
101
  $this->vendor_id = $post->post_author;
102
  $this->product = wc_get_product( $post_id );
classes/includes/class-wcv-shortcodes.php CHANGED
@@ -646,9 +646,11 @@ class WCV_Shortcodes {
646
  }
647
 
648
  /**
649
- * list of vendors
650
  *
651
- * @param $atts shortcode attributs
 
 
652
  */
653
  public function wcv_vendorslist( $atts ) {
654
 
@@ -759,11 +761,12 @@ class WCV_Shortcodes {
759
  $html .= ob_get_clean();
760
 
761
  if ( $total_vendors > $total_vendors_paged ) {
762
- $html .= '<div class="wcv_pagination">';
763
  $current_page = max( 1, get_query_var( 'paged' ) );
 
764
  $html .= paginate_links(
765
  array(
766
- 'base' => get_pagenum_link() . '%_%',
767
  'format' => 'page/%#%/',
768
  'current' => $current_page,
769
  'total' => $total_pages,
646
  }
647
 
648
  /**
649
+ * List of vendors
650
  *
651
+ * @param array $atts shortcode attributs.
652
+ * @version 2.5 Fix pagination conflit with display mode
653
+ * @return string
654
  */
655
  public function wcv_vendorslist( $atts ) {
656
 
761
  $html .= ob_get_clean();
762
 
763
  if ( $total_vendors > $total_vendors_paged ) {
764
+ $html .= '<div class="woocommerce-pagination">';
765
  $current_page = max( 1, get_query_var( 'paged' ) );
766
+ $big = 999999999; // need an unlikely integer.
767
  $html .= paginate_links(
768
  array(
769
+ 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
770
  'format' => 'page/%#%/',
771
  'current' => $current_page,
772
  'total' => $total_pages,
readme.txt CHANGED
@@ -6,10 +6,10 @@ Author URI: https://www.wcvendors.com/
6
  Plugin URI: https://www.wcvendors.com/
7
  Requires at least: 5.3.0
8
  Requires PHP: 7.4
9
- Tested up to: 6.1
10
  WC requires at least: 5.0.0
11
- WC tested up to: 6.7
12
- Stable tag: 2.4.3
13
  License: GPLv2 or later
14
 
15
  The original multi-vendor marketplace plugin for WordPress and WooCommerce. Best support available.
@@ -275,6 +275,23 @@ WC Vendors Marketplace does not work with multisite WordPress. There are no plan
275
  * Fixed: Order status not getting updated with partial refund (#829)
276
  * Fixed: Shipping issue with WC Vendors Pro #1661 (#855)
277
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  == Version 2.4.2 - 19th May 2022 ==
279
 
280
  * Updated: Dev tools (#842)
6
  Plugin URI: https://www.wcvendors.com/
7
  Requires at least: 5.3.0
8
  Requires PHP: 7.4
9
+ Tested up to: 6.1.1
10
  WC requires at least: 5.0.0
11
+ WC tested up to: 7.1.0
12
+ Stable tag: 2.4.4
13
  License: GPLv2 or later
14
 
15
  The original multi-vendor marketplace plugin for WordPress and WooCommerce. Best support available.
275
  * Fixed: Order status not getting updated with partial refund (#829)
276
  * Fixed: Shipping issue with WC Vendors Pro #1661 (#855)
277
 
278
+
279
+ == Version 2.4.4 - 24 November 2022 ==
280
+
281
+ * Fixed: Admin notify product email firing twice
282
+ * Fixed: New vendor list pagination doesn't work when using the display options grid or list. (#870)
283
+
284
+ == Version 2.4.3 - 21 July 2022 ==
285
+
286
+ * Added: Paypal Masspay Web CSV export (#860)
287
+ * Added: Vendor ID and Product Count Columns on user screen (#858)
288
+ * Updated: Vendors list page redesign (#846)
289
+ * Updated: Dutch translations thanks Eric (#865)
290
+ * Updated: Show the Vendor selectbox while using Gutenberg for products (#853)
291
+ * Fixed: Order Notification for the vendor does not include the coupon discount (#849)
292
+ * Fixed: Order status not getting updated with partial refund (#829)
293
+ * Fixed: Shipping issue with WC Vendors Pro #1661 (#855)
294
+
295
  == Version 2.4.2 - 19th May 2022 ==
296
 
297
  * Updated: Dev tools (#842)