YITH WooCommerce Wishlist - Version 1.1.7

Version Description

  • Added: Support to WooCommerce Endpoints (@use yit_wcwl_add_to_cart_redirect_url filter)
  • Add filter to shortcode html
  • Add title to share
Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Wishlist
Version 1.1.7
Comparing to
See all releases

Code changes from version 1.1.6 to 1.1.7

README.txt CHANGED
@@ -3,8 +3,8 @@
3
  Contributors: yithemes
4
  Tags: wishlist, woocommerce, products, themes, yit, e-commerce, shop
5
  Requires at least: 3.5.1
6
- Tested up to: 4.0
7
- Stable tag: 1.1.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -20,9 +20,9 @@ afterwards add them to the cart or remove them.
20
 
21
  Working demo are available:
22
 
23
- **[LIVE DEMO 1](http://demo.yithemes.com/room09/product/africa-style/)** - **[LIVE DEMO 2](http://demo.yithemes.com/bazar/shop/ankle-shoes/)**
24
 
25
- Full documentation is available [here](http://yithemes.com/docs-plugins/yith_wishlist/).
26
 
27
  This plugin is 100% compatible with [WPML](http://wpml.org/?aid=24889&affiliate_key=Qn1wDeBNTcZV)
28
 
@@ -36,7 +36,7 @@ YITH WooCommerce Wishlist will add a new tab called "Wishlist" below the Woocomm
36
 
37
  = Developer =
38
 
39
- Are you a developer? Want to customize the templates or the style of the plugin? Read on the [documentation](http://yithemes.com/docs-plugins/yith_wishlist/) and discover how to do that.
40
 
41
  = Support =
42
 
@@ -75,6 +75,11 @@ Yes, you can change the colors of background, text and border or apply a custom
75
 
76
  == Changelog ==
77
 
 
 
 
 
 
78
  = 1.1.6 =
79
 
80
  * Updated: Plugin Core Framework
@@ -168,7 +173,7 @@ If you have created your own language pack, or have an update for an existing on
168
 
169
  == Documentation ==
170
 
171
- Full documentation is available [here](http://yithemes.com/docs-plugins/yith_wishlist/).
172
 
173
  == Upgrade notice ==
174
 
3
  Contributors: yithemes
4
  Tags: wishlist, woocommerce, products, themes, yit, e-commerce, shop
5
  Requires at least: 3.5.1
6
+ Tested up to: 4.1
7
+ Stable tag: 1.1.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
20
 
21
  Working demo are available:
22
 
23
+ **[LIVE DEMO 1](http://preview.yithemes.com/room09/product/africa-style/)** - **[LIVE DEMO 2](http://preview.yithemes.com/bazar/shop/ankle-shoes/)**
24
 
25
+ Full documentation is available [here](http://yithemes.com/docs-plugins/yith_woocommerce_wishlist).
26
 
27
  This plugin is 100% compatible with [WPML](http://wpml.org/?aid=24889&affiliate_key=Qn1wDeBNTcZV)
28
 
36
 
37
  = Developer =
38
 
39
+ Are you a developer? Want to customize the templates or the style of the plugin? Read on the [documentation](http://yithemes.com/docs-plugins/yith_woocommerce_wishlist/) and discover how to do that.
40
 
41
  = Support =
42
 
75
 
76
  == Changelog ==
77
 
78
+ = 1.1.7 =
79
+ * Added: Support to WooCommerce Endpoints (@use yit_wcwl_add_to_cart_redirect_url filter)
80
+ * Add filter to shortcode html
81
+ * Add title to share
82
+
83
  = 1.1.6 =
84
 
85
  * Updated: Plugin Core Framework
173
 
174
  == Documentation ==
175
 
176
+ Full documentation is available [here](http://yithemes.com/docs-plugins/yith_woocommerce_wishlist).
177
 
178
  == Upgrade notice ==
179
 
add-to-cart.php CHANGED
@@ -6,7 +6,7 @@
6
  * @package YITH WooCommerce Wishlist
7
  * @version 1.1.5
8
  */
9
-
10
  // Handles all ajax requests pertaining to this plugin
11
  require_once( 'safe-wp-load.php' );
12
  require_once( 'functions.yith-wcwl.php' );
@@ -29,7 +29,7 @@ if ( isset( $_GET['redirect_to_cart'] ) && $_GET['redirect_to_cart'] == 'true' )
29
  }
30
  }
31
  else {
32
- $redirect_url = $yith_wcwl->get_wishlist_url();
33
  }
34
 
35
  //get the details of the product
@@ -48,9 +48,9 @@ if( WC()->cart->add_to_cart( $details[0]['prod_id'], 1 ) ) {
48
 
49
  if( get_option( 'yith_wcwl_remove_after_add_to_cart' ) == 'yes' )
50
  { $yith_wcwl->remove( $details[0]['ID'] ); }
51
-
52
  header( "Location: $redirect_url" );
53
-
54
  } else { //if failed, redirect to wishlist page with errors
55
  if ( function_exists('wc_get_notices') ) {
56
  $_SESSION['errors'] = wc_get_notices( "error" );
6
  * @package YITH WooCommerce Wishlist
7
  * @version 1.1.5
8
  */
9
+
10
  // Handles all ajax requests pertaining to this plugin
11
  require_once( 'safe-wp-load.php' );
12
  require_once( 'functions.yith-wcwl.php' );
29
  }
30
  }
31
  else {
32
+ $redirect_url = apply_filters( 'yit_wcwl_add_to_cart_redirect_url', $yith_wcwl->get_wishlist_url() );
33
  }
34
 
35
  //get the details of the product
48
 
49
  if( get_option( 'yith_wcwl_remove_after_add_to_cart' ) == 'yes' )
50
  { $yith_wcwl->remove( $details[0]['ID'] ); }
51
+
52
  header( "Location: $redirect_url" );
53
+
54
  } else { //if failed, redirect to wishlist page with errors
55
  if ( function_exists('wc_get_notices') ) {
56
  $_SESSION['errors'] = wc_get_notices( "error" );
class.yith-wcwl-init.php CHANGED
@@ -24,7 +24,7 @@ if ( ! class_exists( 'YITH_WCWL_Init' ) ) {
24
  * @var string
25
  * @since 1.0.0
26
  */
27
- public $version = '1.1.6';
28
 
29
  /**
30
  * Plugin database version
@@ -259,6 +259,7 @@ if ( ! class_exists( 'YITH_WCWL_Init' ) ) {
259
 
260
  // Add the link "Add to wishlist"
261
  $position = get_option( 'yith_wcwl_button_position' );
 
262
  $position = empty( $position ) ? 'add-to-cart' : $position;
263
 
264
  if ( $position != 'shortcode' ) {
24
  * @var string
25
  * @since 1.0.0
26
  */
27
+ public $version = '1.1.7';
28
 
29
  /**
30
  * Plugin database version
259
 
260
  // Add the link "Add to wishlist"
261
  $position = get_option( 'yith_wcwl_button_position' );
262
+
263
  $position = empty( $position ) ? 'add-to-cart' : $position;
264
 
265
  if ( $position != 'shortcode' ) {
class.yith-wcwl-ui.php CHANGED
@@ -61,7 +61,7 @@ public static function popup_message() {
61
  $html .= $exists ? ' hide" style="display:none;"' : ' show"';
62
 
63
  $html .= '><a href="' . esc_url( $yith_wcwl->get_addtowishlist_url() ) . '" data-product-id="' . $product->id . '" data-product-type="' . $product_type . '" ' . $classes . ' >' . $icon . $label . '</a>';
64
- $html .= '<img src="' . esc_url( admin_url( 'images/wpspin_light.gif' ) ) . '" class="ajax-loading" id="add-items-ajax-loading" alt="" width="16" height="16" style="visibility:hidden" />';
65
  $html .= '</div>';
66
 
67
  $html .= '<div class="yith-wcwl-wishlistaddedbrowse hide" style="display:none;"><span class="feedback">' . __( 'Product added!','yit' ) . '</span> <a href="' . esc_url( $url ) . '">' . apply_filters( 'yith-wcwl-browse-wishlist-label', __( 'Browse Wishlist', 'yit' ) ) . '</a></div>';
@@ -71,7 +71,7 @@ public static function popup_message() {
71
  $html .= '</div>';
72
  $html .= '<div class="clear"></div>';
73
 
74
- return $html;
75
  }
76
 
77
  /**
@@ -152,13 +152,13 @@ public static function popup_message() {
152
  { $html .= '<li style="list-style-type: none; display: inline-block;"><a target="_blank" class="twitter" href="https://twitter.com/share?url=' . $url . '&amp;text=' . $twitter_summary . '" title="' . __( 'Twitter', 'yit' ) . '"></a></li>'; }
153
 
154
  if( get_option( 'yith_wcwl_share_pinterest' ) == 'yes' )
155
- { $html .= '<li style="list-style-type: none; display: inline-block;"><a target="_blank" class="pinterest" href="http://pinterest.com/pin/create/button/?url=' . $url . '&amp;description=' . $summary . '&media=' . $imageurl . '" onclick="window.open(this.href); return false;"></a></li>'; }
156
 
157
  if( get_option( 'yith_wcwl_share_googleplus' ) == 'yes' )
158
- { $html .= '<li style="list-style-type: none; display: inline-block;"><a target="_blank" class="googleplus" href="https://plus.google.com/share?url=' . $url . '&amp;title="' . $title . '" onclick=\'javascript:window.open(this.href, "", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600");return false;\'></a></li>'; }
159
 
160
  if( get_option( 'yith_wcwl_share_email' ) == 'yes' )
161
- { $html .= '<li style="list-style-type: none; display: inline-block;"><a class="email" href="mailto:?subject=I wanted you to see this site&amp;body= ' . $url . '&amp;title="' . __('email', 'yit') . '" ></a></li>'; }
162
 
163
  $html .= '</ul>';
164
  $html .= '</div>';
61
  $html .= $exists ? ' hide" style="display:none;"' : ' show"';
62
 
63
  $html .= '><a href="' . esc_url( $yith_wcwl->get_addtowishlist_url() ) . '" data-product-id="' . $product->id . '" data-product-type="' . $product_type . '" ' . $classes . ' >' . $icon . $label . '</a>';
64
+ $html .= '<img src="' . esc_url( admin_url( 'images/wpspin_light.gif' ) ) . '" class="ajax-loading" alt="loading" width="16" height="16" style="visibility:hidden" />';
65
  $html .= '</div>';
66
 
67
  $html .= '<div class="yith-wcwl-wishlistaddedbrowse hide" style="display:none;"><span class="feedback">' . __( 'Product added!','yit' ) . '</span> <a href="' . esc_url( $url ) . '">' . apply_filters( 'yith-wcwl-browse-wishlist-label', __( 'Browse Wishlist', 'yit' ) ) . '</a></div>';
71
  $html .= '</div>';
72
  $html .= '<div class="clear"></div>';
73
 
74
+ return apply_filters( 'yith_wcwl_add_to_wishlisth_button_html', $html, $url, $product_type, $exists );
75
  }
76
 
77
  /**
152
  { $html .= '<li style="list-style-type: none; display: inline-block;"><a target="_blank" class="twitter" href="https://twitter.com/share?url=' . $url . '&amp;text=' . $twitter_summary . '" title="' . __( 'Twitter', 'yit' ) . '"></a></li>'; }
153
 
154
  if( get_option( 'yith_wcwl_share_pinterest' ) == 'yes' )
155
+ { $html .= '<li style="list-style-type: none; display: inline-block;"><a target="_blank" class="pinterest" href="http://pinterest.com/pin/create/button/?url=' . $url . '&amp;description=' . $summary . '&media=' . $imageurl . '" onclick="window.open(this.href); return false;" title="' . __( 'Pinterest', 'yit' ) . '"></a></li>'; }
156
 
157
  if( get_option( 'yith_wcwl_share_googleplus' ) == 'yes' )
158
+ { $html .= '<li style="list-style-type: none; display: inline-block;"><a target="_blank" class="googleplus" href="https://plus.google.com/share?url=' . $url . '&amp;title=' . $title . '" title="' . __( 'Google Plus', 'yit' ) . '" onclick=\'javascript:window.open(this.href, "", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600");return false;\'></a></li>'; }
159
 
160
  if( get_option( 'yith_wcwl_share_email' ) == 'yes' )
161
+ { $html .= '<li style="list-style-type: none; display: inline-block;"><a class="email" href="mailto:?subject=I wanted you to see this site&amp;body= ' . $url . '&amp;title=' . $title . '" title="' . __( 'email', 'yit' ) . '" ></a></li>'; }
162
 
163
  $html .= '</ul>';
164
  $html .= '</div>';
class.yith-wcwl.php CHANGED
@@ -245,6 +245,7 @@ if( !class_exists( 'YITH_WCWL' ) ) {
245
  * @since 1.0.0
246
  */
247
  public function get_wishlist_url() {
 
248
  return get_permalink( get_option( 'yith_wcwl_wishlist_page_id' ) );
249
  }
250
 
245
  * @since 1.0.0
246
  */
247
  public function get_wishlist_url() {
248
+
249
  return get_permalink( get_option( 'yith_wcwl_wishlist_page_id' ) );
250
  }
251
 
init.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: YITH WooCommerce Wishlist
4
  * Plugin URI: http://yithemes.com/
5
  * Description: YITH WooCommerce Wishlist allows you to add Wishlist functionality to your e-commerce.
6
- * Version: 1.1.6
7
  * Author: Your Inspiration Themes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yit
3
  * Plugin Name: YITH WooCommerce Wishlist
4
  * Plugin URI: http://yithemes.com/
5
  * Description: YITH WooCommerce Wishlist allows you to add Wishlist functionality to your e-commerce.
6
+ * Version: 1.1.7
7
  * Author: Your Inspiration Themes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yit