Woocommerce Products Slider - Version 1.13.19

Version Description

  • 2020-07-19 fix - thumbnail lazy loading issue fixed.
Download this release

Release Info

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

Code changes from version 1.13.17 to 1.13.19

includes/functions-layout-element.php CHANGED
@@ -84,6 +84,11 @@ function wcps_layout_element_title_text($post_title, $args){
84
  add_action('wcps_layout_element_thumbnail', 'wcps_layout_element_thumbnail', 10);
85
  function wcps_layout_element_thumbnail($args){
86
 
 
 
 
 
 
87
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
88
  $element_class = !empty($element_index) ? 'wcps-items-thumb element-'.$element_index : 'wcps-items-thumb';
89
  $element_class = apply_filters('wcps_layout_element_thumbnail_class', $element_class, $args);
@@ -104,19 +109,38 @@ function wcps_layout_element_thumbnail($args){
104
  //echo '<pre>'.var_export($elementData, true).'</pre>';
105
 
106
  if(!empty( get_the_post_thumbnail($product_id, $thumb_size))){
107
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  <div class=" <?php echo $element_class; ?>"><a href="<?php echo $product_url; ?>"><?php echo get_the_post_thumbnail($product_id, $thumb_size); ?></a>
109
  </div>
110
- <?php
 
 
 
111
 
112
  }else{
113
  $wcps_thumb = wp_get_attachment_image_src(get_post_thumbnail_id($product_id), $thumb_size);
114
- $member_image_url = isset($wcps_thumb[0]) ? $wcps_thumb[0] : '';
115
- $member_image_url = !empty($member_image_url) ? $member_image_url : $default_thumb_src;
116
- $member_image_url = apply_filters('wcps_layout_element_thumbnail_src', $member_image_url, $args);
117
 
118
  ?>
119
- <div class=" <?php echo $element_class; ?>"><a href="<?php echo $product_url; ?>"><img src="<?php echo $member_image_url; ?>" /></a></div>
120
 
121
  <?php
122
  }
84
  add_action('wcps_layout_element_thumbnail', 'wcps_layout_element_thumbnail', 10);
85
  function wcps_layout_element_thumbnail($args){
86
 
87
+ $wcps_id = isset($args['wcps_id']) ? $args['wcps_id'] : '';
88
+
89
+ $wcps_options = get_post_meta($wcps_id,'wcps_options', true);
90
+ $lazy_load = isset($wcps_options['slider']['lazy_load']) ? $wcps_options['slider']['lazy_load'] : 'false';
91
+
92
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
93
  $element_class = !empty($element_index) ? 'wcps-items-thumb element-'.$element_index : 'wcps-items-thumb';
94
  $element_class = apply_filters('wcps_layout_element_thumbnail_class', $element_class, $args);
109
  //echo '<pre>'.var_export($elementData, true).'</pre>';
110
 
111
  if(!empty( get_the_post_thumbnail($product_id, $thumb_size))){
112
+
113
+ $wcps_thumb = wp_get_attachment_image_src(get_post_thumbnail_id($product_id), $thumb_size);
114
+ $thumb_image_url = isset($wcps_thumb[0]) ? $wcps_thumb[0] : '';
115
+ $thumb_image_url = !empty($thumb_image_url) ? $thumb_image_url : $default_thumb_src;
116
+
117
+
118
+
119
+ if($lazy_load == 'true'){
120
+ ?>
121
+ <div class=" <?php echo $element_class; ?>">
122
+ <a href="<?php echo $product_url; ?>">
123
+ <img class="owl-lazy" alt="<?php echo get_the_title(); ?>" data-src="<?php echo $thumb_image_url; ?>" src="<?php echo $default_thumb_src; ?>" />
124
+ </a>
125
+ </div>
126
+ <?php
127
+ }else{
128
+ ?>
129
  <div class=" <?php echo $element_class; ?>"><a href="<?php echo $product_url; ?>"><?php echo get_the_post_thumbnail($product_id, $thumb_size); ?></a>
130
  </div>
131
+ <?php
132
+ }
133
+
134
+
135
 
136
  }else{
137
  $wcps_thumb = wp_get_attachment_image_src(get_post_thumbnail_id($product_id), $thumb_size);
138
+ $thumb_image_url = isset($wcps_thumb[0]) ? $wcps_thumb[0] : '';
139
+ $thumb_image_url = !empty($thumb_image_url) ? $thumb_image_url : $default_thumb_src;
140
+ $thumb_image_url = apply_filters('wcps_layout_element_thumbnail_src', $thumb_image_url, $args);
141
 
142
  ?>
143
+ <div class=" <?php echo $element_class; ?>"><a href="<?php echo $product_url; ?>"><img class="owl-lazy" data-src="<?php echo $thumb_image_url; ?>" src="<?php echo $default_thumb_src; ?>" /></a></div>
144
 
145
  <?php
146
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@
4
  Tags: product slider, woocommerce slider, carousel slider, product category slider, woo slider, carousel slider, woocommerce product slider
5
  Requires at least: 3.8
6
  Tested up to: 5.4
7
- Stable tag: 1.13.17
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -141,6 +141,13 @@ then paste this shortcode anywhere in your page to display slider<br />
141
 
142
  == Changelog ==
143
 
 
 
 
 
 
 
 
144
  = 1.13.17 =
145
  * 2020-07-05 fix - navigation display issue fixed.
146
 
4
  Tags: product slider, woocommerce slider, carousel slider, product category slider, woo slider, carousel slider, woocommerce product slider
5
  Requires at least: 3.8
6
  Tested up to: 5.4
7
+ Stable tag: 1.13.19
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
141
 
142
  == Changelog ==
143
 
144
+ = 1.13.19 =
145
+ * 2020-07-19 fix - thumbnail lazy loading issue fixed.
146
+
147
+ = 1.13.18 =
148
+ * 2020-07-18 fix - thumbnail lazy loading issue fixed.
149
+
150
+
151
  = 1.13.17 =
152
  * 2020-07-05 fix - navigation display issue fixed.
153
 
woocommerce-products-slider.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: PickPlugins Product Slider for WooCommerce
4
  Plugin URI: http://pickplugins.com/items/woocommerce-product-slider-for-wordpress/
5
  Description: Fully responsive and mobile ready Carousel Slider for your WooCommerce product. unlimited slider anywhere via short-codes and easy admin setting.
6
- Version: 1.13.17
7
  WC requires at least: 3.0.0
8
  WC tested up to: 4.2
9
  Author: PickPlugins
@@ -23,7 +23,7 @@ class WoocommerceProductsSlider{
23
  define('wcps_plugin_url', plugins_url('/', __FILE__) );
24
  define('wcps_plugin_dir', plugin_dir_path( __FILE__ ) );
25
  define('wcps_plugin_name', 'PickPlugins Product Slider' );
26
- define('wcps_plugin_version', '1.13.17' );
27
  define('wcps_server_url', 'https://www.pickplugins.com/demo/woocommerce-products-slider/');
28
  //define('wcps_server_url', 'http://localhost/wp/');
29
 
3
  Plugin Name: PickPlugins Product Slider for WooCommerce
4
  Plugin URI: http://pickplugins.com/items/woocommerce-product-slider-for-wordpress/
5
  Description: Fully responsive and mobile ready Carousel Slider for your WooCommerce product. unlimited slider anywhere via short-codes and easy admin setting.
6
+ Version: 1.13.19
7
  WC requires at least: 3.0.0
8
  WC tested up to: 4.2
9
  Author: PickPlugins
23
  define('wcps_plugin_url', plugins_url('/', __FILE__) );
24
  define('wcps_plugin_dir', plugin_dir_path( __FILE__ ) );
25
  define('wcps_plugin_name', 'PickPlugins Product Slider' );
26
+ define('wcps_plugin_version', '1.13.19' );
27
  define('wcps_server_url', 'https://www.pickplugins.com/demo/woocommerce-products-slider/');
28
  //define('wcps_server_url', 'http://localhost/wp/');
29