Storefront Sticky Add to Cart - Version 1.1.5

Version Description

  • 10.06.2017 =
  • Tweak - WooCommerce 2.7 compatibility.
Download this release

Release Info

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

Code changes from version 1.1.4 to 1.1.5

assets/css/style.css CHANGED
@@ -50,7 +50,6 @@
50
  position: relative;
51
  line-height: 1.387; }
52
  .ssatc-sticky-add-to-cart .star-rating {
53
- display: inline-block;
54
  font-size: .75em;
55
  margin-right: 1em;
56
  -webkit-transform: translateY(1px);
50
  position: relative;
51
  line-height: 1.387; }
52
  .ssatc-sticky-add-to-cart .star-rating {
 
53
  font-size: .75em;
54
  margin-right: 1em;
55
  -webkit-transform: translateY(1px);
assets/css/style.scss CHANGED
@@ -75,7 +75,6 @@
75
  }
76
 
77
  .star-rating {
78
- display: inline-block;
79
  font-size: .75em;
80
  margin-right: 1em;
81
  @include transform(translateY(1px));
75
  }
76
 
77
  .star-rating {
 
78
  font-size: .75em;
79
  margin-right: 1em;
80
  @include transform(translateY(1px));
languages/storefront-sticky-add-to-cart.pot CHANGED
@@ -1,35 +1,35 @@
1
- # Copyright (C) 2015 Storefront Sticky Add to Cart
2
  # This file is distributed under the same license as the Storefront Sticky Add to Cart package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Storefront Sticky Add to Cart 1.1.0\n"
6
- "Report-Msgid-Bugs-To: http://wordpress.org/tag/storefront-sticky-add-to-"
7
- "cart\n"
8
- "POT-Creation-Date: 2015-11-06 10:13:51+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
 
16
- #: storefront-sticky-add-to-cart.php:130 storefront-sticky-add-to-cart.php:139
17
  msgid "Cheatin&#8217; huh?"
18
  msgstr ""
19
 
20
- #: storefront-sticky-add-to-cart.php:149
21
  msgid "Support"
22
  msgstr ""
23
 
24
- #: storefront-sticky-add-to-cart.php:256
25
  msgid "Placeholder"
26
  msgstr ""
27
 
28
- #: storefront-sticky-add-to-cart.php:289
29
  msgid "You're viewing:"
30
  msgstr ""
31
 
32
- #: storefront-sticky-add-to-cart.php:296
33
  msgid "Select options"
34
  msgstr ""
35
 
1
+ # Copyright (C) 2017 Storefront Sticky Add to Cart
2
  # This file is distributed under the same license as the Storefront Sticky Add to Cart package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Storefront Sticky Add to Cart 1.1.5\n"
6
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/storefront-sticky-"
7
+ "add-to-cart\n"
8
+ "POT-Creation-Date: 2017-03-10 12:44:51+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
 
16
+ #: storefront-sticky-add-to-cart.php:139 storefront-sticky-add-to-cart.php:148
17
  msgid "Cheatin&#8217; huh?"
18
  msgstr ""
19
 
20
+ #: storefront-sticky-add-to-cart.php:159
21
  msgid "Support"
22
  msgstr ""
23
 
24
+ #: storefront-sticky-add-to-cart.php:260
25
  msgid "Placeholder"
26
  msgstr ""
27
 
28
+ #: storefront-sticky-add-to-cart.php:292
29
  msgid "You're viewing:"
30
  msgstr ""
31
 
32
+ #: storefront-sticky-add-to-cart.php:301
33
  msgid "Select options"
34
  msgstr ""
35
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: jameskoster, woothemes
3
  Tags: woocommerce, ecommerce, storefront, sticky
4
  Requires at least: 4.0
5
- Tested up to: 4.6.1
6
- Stable tag: 1.1.4
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.4 - 10.06.2016 =
43
  * Tweak - Hide the sticky add to cart component on mobile as it takes up too much screen real estate.
44
 
2
  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
 
40
  == Changelog ==
41
 
42
+ = 1.1.5 - 10.06.2017 =
43
+ * Tweak - WooCommerce 2.7 compatibility.
44
+
45
  = 1.1.4 - 10.06.2016 =
46
  * Tweak - Hide the sticky add to cart component on mobile as it takes up too much screen real estate.
47
 
storefront-sticky-add-to-cart.php CHANGED
@@ -3,11 +3,11 @@
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.4
7
  * Author: WooThemes
8
  * Author URI: http://woothemes.com/
9
  * Requires at least: 4.0.0
10
- * Tested up to: 4.6.1
11
  *
12
  * Text Domain: storefront-sticky-add-to-cart
13
  * Domain Path: /languages/
@@ -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.4';
94
 
95
  register_activation_hook( __FILE__, array( $this, 'install' ) );
96
 
@@ -204,8 +204,7 @@ final class Storefront_Sticky_Add_to_Cart {
204
  */
205
  public function ssatc_script() {
206
  $theme = wp_get_theme();
207
-
208
- wp_enqueue_style( 'ssatc-styles', plugins_url( '/assets/css/style.css', __FILE__ ) );
209
  wp_register_script( 'waypoints', plugins_url( '/assets/js/jquery.waypoints.min.js', __FILE__ ), array( 'jquery' ), '4.0.0' );
210
  wp_register_script( 'waypoints-init', plugins_url( '/assets/js/waypoints.init.min.js', __FILE__ ), array( 'jquery' ) );
211
  wp_register_script( 'ssatc-variable', plugins_url( '/assets/js/variable.min.js', __FILE__ ), array( 'jquery' ) );
@@ -276,7 +275,6 @@ final class Storefront_Sticky_Add_to_Cart {
276
 
277
  // And if we're on a product page.
278
  if ( is_product() ) {
279
- $_product = new WC_Product( $product->ID );
280
  $availability = $product->get_availability();
281
  $ssatc = new Storefront_Sticky_Add_to_Cart();
282
  $availability_html = empty( $availability['availability'] ) ? '' : '<span class="stock ' . esc_attr( $availability['class'] ) . '">' . esc_html( $availability['availability'] ) . '</span>';
@@ -292,15 +290,15 @@ final class Storefront_Sticky_Add_to_Cart {
292
  $ssatc->ssatc_product_image();
293
  echo '<div class="ssatc-content">';
294
  echo esc_attr__( 'You\'re viewing:', 'storefront-sticky-add-to-cart' ) . ' <strong>' . get_the_title() . '</strong><br />';
295
- echo '<span class="price">' . wp_kses_post( $product->get_price_html() ) . '</span> ' . wp_kses_post( $product->get_rating_html() );
296
  echo wp_kses_post( apply_filters( 'woocommerce_stock_html', $availability_html, $availability['availability'], $product ) );
297
 
298
  ob_start();
299
 
300
  if ( $product->is_type( 'simple' ) ) {
301
- echo '<br /><a href="' . esc_url( $product->add_to_cart_url() ) . '" class="button alt">' . esc_attr( $product->single_add_to_cart_text() ) . '</a>';
302
  } else {
303
- echo '<br /><a class="button alt variable">' . esc_attr__( 'Select options', 'storefront-sticky-add-to-cart' ) . '</a>';
304
  wp_enqueue_script( 'ssatc-variable' );
305
  }
306
 
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
10
+ * Tested up to: 4.7.3
11
  *
12
  * Text Domain: storefront-sticky-add-to-cart
13
  * Domain Path: /languages/
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
 
204
  */
205
  public function ssatc_script() {
206
  $theme = wp_get_theme();
207
+ wp_enqueue_style( 'ssatc-styles', plugins_url( '/assets/css/style.css', __FILE__ ), '', get_option( 'storefront-sticky-add-to-cart-version' ) );
 
208
  wp_register_script( 'waypoints', plugins_url( '/assets/js/jquery.waypoints.min.js', __FILE__ ), array( 'jquery' ), '4.0.0' );
209
  wp_register_script( 'waypoints-init', plugins_url( '/assets/js/waypoints.init.min.js', __FILE__ ), array( 'jquery' ) );
210
  wp_register_script( 'ssatc-variable', plugins_url( '/assets/js/variable.min.js', __FILE__ ), array( 'jquery' ) );
275
 
276
  // And if we're on a product page.
277
  if ( is_product() ) {
 
278
  $availability = $product->get_availability();
279
  $ssatc = new Storefront_Sticky_Add_to_Cart();
280
  $availability_html = empty( $availability['availability'] ) ? '' : '<span class="stock ' . esc_attr( $availability['class'] ) . '">' . esc_html( $availability['availability'] ) . '</span>';
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();
297
 
298
  if ( $product->is_type( 'simple' ) ) {
299
+ echo '<a href="' . esc_url( $product->add_to_cart_url() ) . '" class="button alt">' . esc_attr( $product->single_add_to_cart_text() ) . '</a>';
300
  } else {
301
+ echo '<a class="button alt variable">' . esc_attr__( 'Select options', 'storefront-sticky-add-to-cart' ) . '</a>';
302
  wp_enqueue_script( 'ssatc-variable' );
303
  }
304