Storefront Sticky Add to Cart - Version 1.1.6

Version Description

  • 15.06.2017 =
  • Tweak - WooCommerce 2.6/2.7 compatibility.
Download this release

Release Info

Developer jameskoster
Plugin Icon 128x128 Storefront Sticky Add to Cart
Version 1.1.6
Comparing to
See all releases

Code changes from version 1.1.5 to 1.1.6

Files changed (2) hide show
  1. readme.txt +4 -1
  2. storefront-sticky-add-to-cart.php +9 -3
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: jameskoster, woothemes
3
  Tags: woocommerce, ecommerce, storefront, sticky
4
  Requires at least: 4.0
5
  Tested up to: 4.7.3
6
- Stable tag: 1.1.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -39,6 +39,9 @@ It simply takes up too much valuable screen real estate. You can display it on m
39
 
40
  == Changelog ==
41
 
 
 
 
42
  = 1.1.5 - 10.06.2017 =
43
  * Tweak - WooCommerce 2.7 compatibility.
44
 
3
  Tags: woocommerce, ecommerce, storefront, sticky
4
  Requires at least: 4.0
5
  Tested up to: 4.7.3
6
+ Stable tag: 1.1.6
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
39
 
40
  == Changelog ==
41
 
42
+ = 1.1.6 - 15.06.2017 =
43
+ * Tweak - WooCommerce 2.6/2.7 compatibility.
44
+
45
  = 1.1.5 - 10.06.2017 =
46
  * Tweak - WooCommerce 2.7 compatibility.
47
 
storefront-sticky-add-to-cart.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Storefront Sticky Add to Cart
4
  * Plugin URI: https://wordpress.org/plugins/storefront-sticky-add-to-cart/
5
  * Description: Adds a sticky add-to-cart bar in single product pages that is revealed as the user scrolls down the page.
6
- * Version: 1.1.5
7
  * Author: WooThemes
8
  * Author URI: http://woothemes.com/
9
  * Requires at least: 4.0.0
@@ -90,7 +90,7 @@ final class Storefront_Sticky_Add_to_Cart {
90
  $this->token = 'storefront-sticky-add-to-cart';
91
  $this->plugin_url = plugin_dir_url( __FILE__ );
92
  $this->plugin_path = plugin_dir_path( __FILE__ );
93
- $this->version = '1.1.5';
94
 
95
  register_activation_hook( __FILE__, array( $this, 'install' ) );
96
 
@@ -287,10 +287,16 @@ final class Storefront_Sticky_Add_to_Cart {
287
  <section class="ssatc-sticky-add-to-cart animated">
288
  <div class="col-full">
289
  <?php
 
 
 
 
 
 
290
  $ssatc->ssatc_product_image();
291
  echo '<div class="ssatc-content">';
292
  echo esc_attr__( 'You\'re viewing:', 'storefront-sticky-add-to-cart' ) . ' <strong>' . get_the_title() . '</strong><br />';
293
- echo '<span class="price">' . wp_kses_post( $product->get_price_html() ) . '</span> ' . wp_kses_post( wc_get_rating_html( $product->get_average_rating() ) );
294
  echo wp_kses_post( apply_filters( 'woocommerce_stock_html', $availability_html, $availability['availability'], $product ) );
295
 
296
  ob_start();
3
  * Plugin Name: Storefront Sticky Add to Cart
4
  * Plugin URI: https://wordpress.org/plugins/storefront-sticky-add-to-cart/
5
  * Description: Adds a sticky add-to-cart bar in single product pages that is revealed as the user scrolls down the page.
6
+ * Version: 1.1.6
7
  * Author: WooThemes
8
  * Author URI: http://woothemes.com/
9
  * Requires at least: 4.0.0
90
  $this->token = 'storefront-sticky-add-to-cart';
91
  $this->plugin_url = plugin_dir_url( __FILE__ );
92
  $this->plugin_path = plugin_dir_path( __FILE__ );
93
+ $this->version = '1.1.6';
94
 
95
  register_activation_hook( __FILE__, array( $this, 'install' ) );
96
 
287
  <section class="ssatc-sticky-add-to-cart animated">
288
  <div class="col-full">
289
  <?php
290
+ if ( version_compare( WC_VERSION, '2.7.0', '<' ) ) {
291
+ $rating_html = $product->get_rating_html();
292
+ } else {
293
+ $rating_html = wc_get_rating_html( $product->get_average_rating() );
294
+ }
295
+
296
  $ssatc->ssatc_product_image();
297
  echo '<div class="ssatc-content">';
298
  echo esc_attr__( 'You\'re viewing:', 'storefront-sticky-add-to-cart' ) . ' <strong>' . get_the_title() . '</strong><br />';
299
+ echo '<span class="price">' . wp_kses_post( $product->get_price_html() ) . '</span> ' . wp_kses_post( $rating_html );
300
  echo wp_kses_post( apply_filters( 'woocommerce_stock_html', $availability_html, $availability['availability'], $product ) );
301
 
302
  ob_start();