Woocommerce Products Slider - Version 1.12.7

Version Description

  • 12/03/2017 fix - Featured product quesry compatible with WC - 3.0.0.
Download this release

Release Info

Developer pickplugins
Plugin Icon 128x128 Woocommerce Products Slider
Version 1.12.7
Comparing to
See all releases

Code changes from version 1.12.6 to 1.12.7

includes/class-shortcodes.php CHANGED
@@ -50,6 +50,34 @@ class class_wcps_shortcodes{
50
 
51
  while ( $wp_query->have_posts() ) : $wp_query->the_post();
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  global $product;
54
 
55
  $wcps_featured = get_post_meta( get_the_ID(), '_featured', true );
50
 
51
  while ( $wp_query->have_posts() ) : $wp_query->the_post();
52
 
53
+
54
+ $product_visibility = wp_get_post_terms( get_the_ID(), 'product_visibility' );
55
+ //if(!empty($product_visibility->slug))
56
+ //$is_featured = $product_visibility->slug;
57
+ $product_is_featured = 'no';
58
+
59
+ if(!empty($product_visibility)){
60
+
61
+ foreach($product_visibility as $visibility){
62
+
63
+ $is_featured = $visibility->slug;
64
+
65
+ if($is_featured=='featured'){
66
+
67
+ $product_is_featured = 'yes';
68
+ //echo '<pre>'.var_export($_featured, true).'</pre>';
69
+ }
70
+
71
+
72
+ }
73
+
74
+ }
75
+
76
+
77
+
78
+
79
+
80
+
81
  global $product;
82
 
83
  $wcps_featured = get_post_meta( get_the_ID(), '_featured', true );
readme.txt CHANGED
@@ -3,8 +3,8 @@
3
  Donate link: http://pickplugins.com
4
  Tags: carousel, product, slider, woocommerce, carousel slider, product slider, woocommerce slider, Woocommerce Product slider
5
  Requires at least: 3.8
6
- Tested up to: 4.7.3
7
- Stable tag: 1.12.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -18,9 +18,10 @@ A premium quality carousel slider to slide your woo-commerce product. easy to us
18
 
19
  ### Woocommerce Products Slider by http://pickplugins.com
20
 
21
- * [See the Live demo!&raquo;](http://www.pickplugins.com/demo/woocommerce-products-slider/)
 
22
  * [Watch Video Tutorial!&raquo;](https://www.youtube.com/watch?v=B0sOSp3h9fE)
23
- * [Upgrade to Premium!&raquo;](http://www.pickplugins.com/item/woocommerce-products-slider-for-wordpress/)
24
 
25
 
26
  <strong>Plugin Features</strong>
@@ -92,6 +93,9 @@ then paste this shortcode anywhere in your page to display slider<br />
92
  == Changelog ==
93
 
94
 
 
 
 
95
  = 1.12.6 =
96
  * 09/03/2017 update - Admin settings update, added new tab Elements.
97
  * 09/03/2017 add - on sale product display.
3
  Donate link: http://pickplugins.com
4
  Tags: carousel, product, slider, woocommerce, carousel slider, product slider, woocommerce slider, Woocommerce Product slider
5
  Requires at least: 3.8
6
+ Tested up to: 4.7
7
+ Stable tag: 1.12.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
18
 
19
  ### Woocommerce Products Slider by http://pickplugins.com
20
 
21
+ * [Buy Premium!&raquo;](http://www.pickplugins.com/item/woocommerce-products-slider-for-wordpress/?ref=wordpress.org)
22
+ * [See the Live demo!&raquo;](http://www.pickplugins.com/demo/woocommerce-products-slider/?ref=wordpress.org)
23
  * [Watch Video Tutorial!&raquo;](https://www.youtube.com/watch?v=B0sOSp3h9fE)
24
+
25
 
26
 
27
  <strong>Plugin Features</strong>
93
  == Changelog ==
94
 
95
 
96
+ = 1.12.7 =
97
+ * 12/03/2017 fix - Featured product quesry compatible with WC - 3.0.0.
98
+
99
  = 1.12.6 =
100
  * 09/03/2017 update - Admin settings update, added new tab Elements.
101
  * 09/03/2017 add - on sale product display.
templates/query.php CHANGED
@@ -9,7 +9,7 @@ if ( ! defined('ABSPATH')) exit; // if direct access
9
 
10
  global $wp_query;
11
  $meta_query = array();
12
-
13
 
14
  if($wcps_hide_out_of_stock=='yes'){
15
 
@@ -29,11 +29,26 @@ if ( ! defined('ABSPATH')) exit; // if direct access
29
 
30
  if($wcps_product_featured=='yes'){
31
 
 
 
32
  $meta_query[] = array(
33
 
34
  'key' => '_featured',
35
  'value' => 'yes',
36
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
  }
39
 
@@ -63,10 +78,14 @@ if ( ! defined('ABSPATH')) exit; // if direct access
63
  'orderby' => $wcps_query_orderby,
64
  'order' => $wcps_query_order,
65
  'posts_per_page' => $wcps_total_items,
66
- 'meta_query' => $meta_query
 
 
67
 
68
  );
69
 
70
  $query_args = apply_filters('wcps_filter_query_args', $query_args);
71
 
 
 
72
  $wp_query = new WP_Query($query_args);
9
 
10
  global $wp_query;
11
  $meta_query = array();
12
+ $tax_query = array();
13
 
14
  if($wcps_hide_out_of_stock=='yes'){
15
 
29
 
30
  if($wcps_product_featured=='yes'){
31
 
32
+ /*
33
+
34
  $meta_query[] = array(
35
 
36
  'key' => '_featured',
37
  'value' => 'yes',
38
  );
39
+
40
+ */
41
+
42
+
43
+ $tax_query[] = array(
44
+ 'taxonomy' => 'product_visibility',
45
+ 'field' => 'name',
46
+ 'terms' => 'featured',
47
+ 'operator' => 'IN',
48
+ );
49
+
50
+
51
+
52
 
53
  }
54
 
78
  'orderby' => $wcps_query_orderby,
79
  'order' => $wcps_query_order,
80
  'posts_per_page' => $wcps_total_items,
81
+ 'meta_query' => $meta_query,
82
+ 'tax_query' => $tax_query,
83
+
84
 
85
  );
86
 
87
  $query_args = apply_filters('wcps_filter_query_args', $query_args);
88
 
89
+ //echo '<pre>'.var_export($query_args, true).'</pre>';
90
+
91
  $wp_query = new WP_Query($query_args);
templates/wcps-featured.php CHANGED
@@ -17,7 +17,7 @@ if ( ! defined('ABSPATH')) exit; // if direct access
17
 
18
 
19
 
20
- if($wcps_featured=="yes")
21
  {
22
  $html.= '<div '.$wcps_featured_style.' title="'.__('Featured Product', wcps_textdomain).'" class="wcps-featured"></div>';
23
  }
17
 
18
 
19
 
20
+ if($product_is_featured=="yes")
21
  {
22
  $html.= '<div '.$wcps_featured_style.' title="'.__('Featured Product', wcps_textdomain).'" class="wcps-featured"></div>';
23
  }
woocommerce-products-slider.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Woocommerce Products Slider
4
  Plugin URI: http://pickplugins.com/items/woocommerce-product-slider-for-wordpress/
5
  Description: Fully responsive and mobile ready Carousel Slider for your woo-commerce product. unlimited slider anywhere via short-codes and easy admin setting.
6
- Version: 1.12.6
7
  Author: pickplugins
8
  Author URI: http://pickplugins.com
9
  Text Domain: woocommerce-products-slider
@@ -27,7 +27,7 @@ class WoocommerceProductsSlider{
27
  define('wcps_conatct_url', 'http://pickplugins.com/contact/' );
28
  define('wcps_qa_url', 'http://pickplugins.com/questions/' );
29
  define('wcps_plugin_name', 'Woocommerce Products Slider' );
30
- define('wcps_plugin_version', '1.12.6' );
31
  define('wcps_customer_type', 'free' ); // pro & free
32
  define('wcps_share_url', 'https://wordpress.org/plugins/woocommerce-products-slider/' );
33
  define('wcps_tutorial_video_url', '//www.youtube.com/embed/B0sOSp3h9fE?rel=0' );
3
  Plugin Name: Woocommerce Products Slider
4
  Plugin URI: http://pickplugins.com/items/woocommerce-product-slider-for-wordpress/
5
  Description: Fully responsive and mobile ready Carousel Slider for your woo-commerce product. unlimited slider anywhere via short-codes and easy admin setting.
6
+ Version: 1.12.7
7
  Author: pickplugins
8
  Author URI: http://pickplugins.com
9
  Text Domain: woocommerce-products-slider
27
  define('wcps_conatct_url', 'http://pickplugins.com/contact/' );
28
  define('wcps_qa_url', 'http://pickplugins.com/questions/' );
29
  define('wcps_plugin_name', 'Woocommerce Products Slider' );
30
+ define('wcps_plugin_version', '1.12.7' );
31
  define('wcps_customer_type', 'free' ); // pro & free
32
  define('wcps_share_url', 'https://wordpress.org/plugins/woocommerce-products-slider/' );
33
  define('wcps_tutorial_video_url', '//www.youtube.com/embed/B0sOSp3h9fE?rel=0' );