WooCommerce Wishlist Plugin - Version 1.1.14

Version Description

Release Date - 04 April 2017

  • Fixed multiple issues with WPML support.
Download this release

Release Info

Developer templateinvaders
Plugin Icon 128x128 WooCommerce Wishlist Plugin
Version 1.1.14
Comparing to
See all releases

Code changes from version 1.1.13 to 1.1.14

admin/tinvwl.class.php CHANGED
@@ -80,7 +80,7 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base {
80
  */
81
  function wizard_run_admin_notice() {
82
  printf( '<div class="notice notice-error"><p>%1$s</p><p><a href="%2$s" class="button-primary">%3$s</a> <a href="%4$s" class="button-secondary">%5$s</a></p></div>',
83
- __( '<strong>Welcome to TI WooCommerce Wishlist<strong> – You‘re almost ready to start :)', 'ti-woocommerce-wishlist' ), // @codingStandardsIgnoreLine WordPress.XSS.EscapeOutput.OutputNotEscaped
84
  esc_url( admin_url( 'index.php?page=tinvwl-wizard' ) ),
85
  esc_html__( 'Run the Setup Wizard', 'ti-woocommerce-wishlist' ),
86
  esc_url( admin_url( 'index.php?page=' . $this->_n . '&' . $this->_n . '-wizard=skip' ) ),
@@ -169,7 +169,7 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base {
169
  * Add plugin footer copywriting
170
  */
171
  function footer_admin() {
172
- echo 'Made with <i class="fa fa-heart"></i> by <a href="https://templateinvaders.com/?utm_source=wishlist_plugin_free&utm_campaign=made_by&utm_medium=footer">TemplateInvaders</a><br />If you like TI WooCommerce Wishlist please leave us a <a href="https://wordpress.org/support/plugin/ti-woocommerce-wishlist/reviews/#new-post"><span><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i></span></a> rating.';
173
  }
174
 
175
  /**
80
  */
81
  function wizard_run_admin_notice() {
82
  printf( '<div class="notice notice-error"><p>%1$s</p><p><a href="%2$s" class="button-primary">%3$s</a> <a href="%4$s" class="button-secondary">%5$s</a></p></div>',
83
+ __( '<strong>Welcome to WooCommerce Wishlist Plugin<strong> – You‘re almost ready to start :)', 'ti-woocommerce-wishlist' ), // @codingStandardsIgnoreLine WordPress.XSS.EscapeOutput.OutputNotEscaped
84
  esc_url( admin_url( 'index.php?page=tinvwl-wizard' ) ),
85
  esc_html__( 'Run the Setup Wizard', 'ti-woocommerce-wishlist' ),
86
  esc_url( admin_url( 'index.php?page=' . $this->_n . '&' . $this->_n . '-wizard=skip' ) ),
169
  * Add plugin footer copywriting
170
  */
171
  function footer_admin() {
172
+ echo 'Made with <i class="fa fa-heart"></i> by <a href="https://templateinvaders.com/?utm_source=wishlist_plugin_free&utm_campaign=made_by&utm_medium=footer">TemplateInvaders</a><br />If you like WooCommerce Wishlist Plugin please leave us a <a href="https://wordpress.org/support/plugin/ti-woocommerce-wishlist/reviews/#new-post"><span><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i></span></a> rating.';
173
  }
174
 
175
  /**
includes/product/local.class.php CHANGED
@@ -57,26 +57,20 @@ class TInvWL_Product_Local {
57
  /**
58
  * Constructor
59
  *
60
- * @global array $tinv_wishlist Local Wishlist.
61
  * @param string $plugin_name Plugin name.
62
  */
63
  function __construct( $plugin_name = TINVWL_PREFIX ) {
64
- global $tinv_wishlist;
65
 
66
  $this->_n = $plugin_name;
67
  $this->products = array();
68
  $this->products_autoinc = 0;
69
 
70
- if ( ! empty( $tinv_wishlist ) && is_array( $tinv_wishlist ) ) {
71
- $this->products = $tinv_wishlist;
72
- } else {
73
- $products = filter_input( INPUT_COOKIE, 'tinv_wishlist' );
74
- if ( ! empty( $products ) ) {
75
- $products = urldecode( $products );
76
- $products = @json_decode( $products, true ); // @codingStandardsIgnoreLine Generic.PHP.NoSilencedErrors.Discouraged
77
- if ( is_array( $products ) ) {
78
- $tinv_wishlist = $this->products = $products;
79
- }
80
  }
81
  }
82
  if ( ! empty( $this->products ) ) {
@@ -138,13 +132,8 @@ class TInvWL_Product_Local {
138
 
139
  /**
140
  * Update cookie
141
- *
142
- * @global array $tinv_wishlist Local Wishlist.
143
  */
144
  function update_cookie() {
145
- global $tinv_wishlist;
146
-
147
- $tinv_wishlist = $this->products;
148
  @setcookie( 'tinv_wishlist', urlencode( wp_json_encode( $this->products ) ), time() + 31 * DAY_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN ); // @codingStandardsIgnoreLine Generic.PHP.NoSilencedErrors.Discouraged WordPress.Sniffs.VIP.RestrictedFunctions
149
  }
150
 
@@ -265,7 +254,7 @@ class TInvWL_Product_Local {
265
  * @param array $data Request.
266
  * @return array
267
  */
268
- private function get( $data = array() ) {
269
  $default = array(
270
  'count' => 10,
271
  'offset' => 0,
57
  /**
58
  * Constructor
59
  *
 
60
  * @param string $plugin_name Plugin name.
61
  */
62
  function __construct( $plugin_name = TINVWL_PREFIX ) {
 
63
 
64
  $this->_n = $plugin_name;
65
  $this->products = array();
66
  $this->products_autoinc = 0;
67
 
68
+ $products = filter_input( INPUT_COOKIE, 'tinv_wishlist' );
69
+ if ( ! empty( $products ) ) {
70
+ $products = urldecode( $products );
71
+ $products = @json_decode( $products, true ); // @codingStandardsIgnoreLine Generic.PHP.NoSilencedErrors.Discouraged
72
+ if ( is_array( $products ) ) {
73
+ $this->products = $products;
 
 
 
 
74
  }
75
  }
76
  if ( ! empty( $this->products ) ) {
132
 
133
  /**
134
  * Update cookie
 
 
135
  */
136
  function update_cookie() {
 
 
 
137
  @setcookie( 'tinv_wishlist', urlencode( wp_json_encode( $this->products ) ), time() + 31 * DAY_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN ); // @codingStandardsIgnoreLine Generic.PHP.NoSilencedErrors.Discouraged WordPress.Sniffs.VIP.RestrictedFunctions
138
  }
139
 
254
  * @param array $data Request.
255
  * @return array
256
  */
257
+ function get( $data = array() ) {
258
  $default = array(
259
  'count' => 10,
260
  'offset' => 0,
languages/ti-woocommerce-wishlist.pot CHANGED
@@ -1,9 +1,9 @@
1
  #, fuzzy
2
  msgid ""
3
  msgstr ""
4
- "Project-Id-Version: TI WooCommerce Wishlist\n"
5
  "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2017-03-16 22:32+0700\n"
7
  "POT-Revision-Date: Sun Apr 10 2016 12:21:06 GMT+0200 (Västeuropa, "
8
  "sommartid)\n"
9
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
@@ -80,7 +80,7 @@ msgid "Wishlist Page Options"
80
  msgstr ""
81
 
82
  #: admin/settings/general.class.php:90 admin/settings/general.class.php:107
83
- #: public/tinvwl.class.php:221
84
  msgid "Coming soon"
85
  msgstr ""
86
 
@@ -634,8 +634,8 @@ msgstr ""
634
 
635
  #: admin/tinvwl.class.php:83
636
  msgid ""
637
- "<strong>Welcome to TI WooCommerce Wishlist<strong> – You‘re almost ready to "
638
- "start :)"
639
  msgstr ""
640
 
641
  #: admin/tinvwl.class.php:85 admin/tinvwl.class.php:101
@@ -744,7 +744,7 @@ msgid "Page Setup"
744
  msgstr ""
745
 
746
  #: includes/wizard.class.php:282 includes/wizard.class.php:312
747
- #: public/tinvwl.class.php:423
748
  msgid "Wishlist"
749
  msgstr ""
750
 
@@ -780,16 +780,16 @@ msgstr ""
780
  msgid "Product option is not selected!"
781
  msgstr ""
782
 
783
- #: public/tinvwl.class.php:220
784
  #, php-format
785
  msgid "%1$s of %2$s"
786
  msgstr ""
787
 
788
- #: public/tinvwl.class.php:359
789
  msgid "Create New"
790
  msgstr ""
791
 
792
- #: public/tinvwl.class.php:361
793
  msgid ""
794
  "Please select some product options before adding this product to your "
795
  "wishlist."
@@ -894,11 +894,11 @@ msgstr ""
894
  msgid "In stock"
895
  msgstr ""
896
 
897
- #: tinv-wishlists-function.php:655
898
  msgid "Select options"
899
  msgstr ""
900
 
901
- #: tinv-wishlists-function.php:805
902
  #, php-format
903
  msgid ""
904
  "Please help us improve %2$s! If you opt-in, some data about your usage of "
@@ -906,18 +906,18 @@ msgid ""
906
  "work just fine."
907
  msgstr ""
908
 
909
- #: tinv-wishlists-function.php:826
910
  #, php-format
911
  msgid ""
912
  "Allow %6$s to collect some usage data with %5$s to make the plugin even more "
913
  "awesome. If you skip this, that's okay! %2$s will still work just fine."
914
  msgstr ""
915
 
916
- #: tinv-wishlists-function.php:828
917
- msgid "TI WooCommerce Wishlist"
918
  msgstr ""
919
 
920
- #: tinv-wishlists-function.php:832
921
  msgid "TemplateInvaders"
922
  msgstr ""
923
 
@@ -1021,12 +1021,13 @@ msgid ""
1021
  msgstr ""
1022
 
1023
  #: views/wizard/finish.php:18
1024
- msgid "TI WooCommerce Wishlist Settings"
1025
  msgstr ""
1026
 
1027
  #: views/wizard/finish.php:19
1028
  #, php-format
1029
- msgid "Details about TI WooCommerce Wishlist options can be found in our %s."
 
1030
  msgstr ""
1031
 
1032
  #: views/wizard/finish.php:19
1
  #, fuzzy
2
  msgid ""
3
  msgstr ""
4
+ "Project-Id-Version: WooCommerce Wishlist Plugin\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2017-04-04 23:21+0700\n"
7
  "POT-Revision-Date: Sun Apr 10 2016 12:21:06 GMT+0200 (Västeuropa, "
8
  "sommartid)\n"
9
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
80
  msgstr ""
81
 
82
  #: admin/settings/general.class.php:90 admin/settings/general.class.php:107
83
+ #: public/tinvwl.class.php:228
84
  msgid "Coming soon"
85
  msgstr ""
86
 
634
 
635
  #: admin/tinvwl.class.php:83
636
  msgid ""
637
+ "<strong>Welcome to WooCommerce Wishlist Plugin<strong> – You‘re almost ready "
638
+ "to start :)"
639
  msgstr ""
640
 
641
  #: admin/tinvwl.class.php:85 admin/tinvwl.class.php:101
744
  msgstr ""
745
 
746
  #: includes/wizard.class.php:282 includes/wizard.class.php:312
747
+ #: public/tinvwl.class.php:430
748
  msgid "Wishlist"
749
  msgstr ""
750
 
780
  msgid "Product option is not selected!"
781
  msgstr ""
782
 
783
+ #: public/tinvwl.class.php:227
784
  #, php-format
785
  msgid "%1$s of %2$s"
786
  msgstr ""
787
 
788
+ #: public/tinvwl.class.php:366
789
  msgid "Create New"
790
  msgstr ""
791
 
792
+ #: public/tinvwl.class.php:368
793
  msgid ""
794
  "Please select some product options before adding this product to your "
795
  "wishlist."
894
  msgid "In stock"
895
  msgstr ""
896
 
897
+ #: tinv-wishlists-function.php:693
898
  msgid "Select options"
899
  msgstr ""
900
 
901
+ #: tinv-wishlists-function.php:869
902
  #, php-format
903
  msgid ""
904
  "Please help us improve %2$s! If you opt-in, some data about your usage of "
906
  "work just fine."
907
  msgstr ""
908
 
909
+ #: tinv-wishlists-function.php:890
910
  #, php-format
911
  msgid ""
912
  "Allow %6$s to collect some usage data with %5$s to make the plugin even more "
913
  "awesome. If you skip this, that's okay! %2$s will still work just fine."
914
  msgstr ""
915
 
916
+ #: tinv-wishlists-function.php:892
917
+ msgid "WooCommerce Wishlist Plugin"
918
  msgstr ""
919
 
920
+ #: tinv-wishlists-function.php:896
921
  msgid "TemplateInvaders"
922
  msgstr ""
923
 
1021
  msgstr ""
1022
 
1023
  #: views/wizard/finish.php:18
1024
+ msgid "WooCommerce Wishlist Plugin Settings"
1025
  msgstr ""
1026
 
1027
  #: views/wizard/finish.php:19
1028
  #, php-format
1029
+ msgid ""
1030
+ "Details about WooCommerce Wishlist Plugin options can be found in our %s."
1031
  msgstr ""
1032
 
1033
  #: views/wizard/finish.php:19
public/tinvwl.class.php CHANGED
@@ -162,20 +162,27 @@ class TInvWL_Public_TInvWL {
162
 
163
  /**
164
  * Create rewrite url for wishlist
165
- *
166
- * @return boolean
167
  */
168
  function add_rewrite_rules() {
169
- $page = tinv_get_option( 'page', 'wishlist' );
170
- if ( empty( $page ) ) {
171
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
172
  }
173
-
174
- $page = get_post( $page );
175
- $page_slug = $page->post_name;
176
-
177
- add_rewrite_rule( '(([^/]+/)*' . $page_slug . ')/([A-Fa-f0-9]{6})?/page/([0-9]{1,})/?$', 'index.php?pagename=$matches[1]&tinvwlID=$matches[3]&paged=$matches[4]', 'top' );
178
- add_rewrite_rule( '(([^/]+/)*' . $page_slug . ')/([A-Fa-f0-9]{6})?/?$', 'index.php?pagename=$matches[1]&tinvwlID=$matches[3]', 'top' );
179
  }
180
 
181
  /**
@@ -195,7 +202,7 @@ class TInvWL_Public_TInvWL {
195
  * Create social meta tags
196
  */
197
  function add_meta_tags() {
198
- if ( is_page( tinv_get_option( 'page', 'wishlist' ) ) ) {
199
  $wishlist = tinv_wishlist_get();
200
  if ( 0 < $wishlist['ID'] && 'private' !== $wishlist['status'] ) {
201
  $user = get_user_by( 'id', $wishlist['author'] );
@@ -248,7 +255,7 @@ class TInvWL_Public_TInvWL {
248
  * @return string
249
  */
250
  function add_ogp( $text ) {
251
- if ( is_page( tinv_get_option( 'page', 'wishlist' ) ) ) {
252
  $text = 'prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# product: http://ogp.me/ns/product#" itemscope itemtype="http://schema.org/Offer" ' . $text;
253
  }
254
  return $text;
@@ -263,7 +270,7 @@ class TInvWL_Public_TInvWL {
263
  $pages = tinv_get_option( 'page' );
264
  $pages = array_filter( $pages );
265
  foreach ( $pages as $page ) {
266
- if ( is_page( $page ) ) {
267
  return true;
268
  }
269
  }
162
 
163
  /**
164
  * Create rewrite url for wishlist
 
 
165
  */
166
  function add_rewrite_rules() {
167
+ $id = tinv_get_option( 'page', 'wishlist' );
168
+ $pages = array( $id );
169
+ $languages = apply_filters( 'wpml_active_languages', array(), array( 'skip_missing' => 0, 'orderby' => 'code' ) );
170
+ if ( ! empty( $languages ) ) {
171
+ foreach ( $languages as $l ) {
172
+ $pages[] = apply_filters( 'wpml_object_id', $id, 'page', true, $l['language_code'] );
173
+ }
174
+ $pages = array_unique( $pages );
175
+ }
176
+ $pages = array_filter( $pages );
177
+ if ( ! empty( $pages ) ) {
178
+ foreach ( $pages as $page ) {
179
+ $page = get_post( $page );
180
+ $page_slug = $page->post_name;
181
+
182
+ add_rewrite_rule( '(([^/]+/)*' . $page_slug . ')/([A-Fa-f0-9]{6})?/page/([0-9]{1,})/?$', 'index.php?pagename=$matches[1]&tinvwlID=$matches[3]&paged=$matches[4]', 'top' );
183
+ add_rewrite_rule( '(([^/]+/)*' . $page_slug . ')/([A-Fa-f0-9]{6})?/?$', 'index.php?pagename=$matches[1]&tinvwlID=$matches[3]', 'top' );
184
+ }
185
  }
 
 
 
 
 
 
186
  }
187
 
188
  /**
202
  * Create social meta tags
203
  */
204
  function add_meta_tags() {
205
+ if ( is_page( apply_filters( 'wpml_object_id', tinv_get_option( 'page', 'wishlist' ), 'page', true ) ) ) {
206
  $wishlist = tinv_wishlist_get();
207
  if ( 0 < $wishlist['ID'] && 'private' !== $wishlist['status'] ) {
208
  $user = get_user_by( 'id', $wishlist['author'] );
255
  * @return string
256
  */
257
  function add_ogp( $text ) {
258
+ if ( is_page( apply_filters( 'wpml_object_id', tinv_get_option( 'page', 'wishlist' ), 'page', true ) ) ) {
259
  $text = 'prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# product: http://ogp.me/ns/product#" itemscope itemtype="http://schema.org/Offer" ' . $text;
260
  }
261
  return $text;
270
  $pages = tinv_get_option( 'page' );
271
  $pages = array_filter( $pages );
272
  foreach ( $pages as $page ) {
273
+ if ( is_page( apply_filters( 'wpml_object_id', $page, 'page', true ) ) ) {
274
  return true;
275
  }
276
  }
public/wishlist/view.class.php CHANGED
@@ -172,7 +172,7 @@ class TInvWL_Public_Wishlist_View {
172
  * @return boolean
173
  */
174
  function wishlist_action() {
175
- if ( is_page( tinv_get_option( 'page', 'wishlist' ) ) ) {
176
  $wishlist = $this->get_current_wishlist();
177
  if ( empty( $wishlist ) ) {
178
  return false;
172
  * @return boolean
173
  */
174
  function wishlist_action() {
175
+ if ( is_page( apply_filters( 'wpml_object_id', tinv_get_option( 'page', 'wishlist' ), 'page', true ) ) ) {
176
  $wishlist = $this->get_current_wishlist();
177
  if ( empty( $wishlist ) ) {
178
  return false;
readme.txt CHANGED
@@ -1,20 +1,20 @@
1
- === TI WooCommerce Wishlist ===
2
  Contributors: templateinvaders
3
  Donate link: https://templateinvaders.com/?utm_source=wordpressorg&utm_content=donate
4
  Tags: wishlist, woocommerce, products, e-commerce, shop, ecommerce wishlist, woocommerce wishlist, woocommerce , shop wishlist, wishlist for Woocommerce
5
  Requires at least: 4.5
6
- Tested up to: 4.7.2
7
- Stable tag: 1.1.13
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
11
  Allow your store guests and customers to add products to Wishlist.
12
- Add Wishlist functionality to your store for free with TI WooCommerce Wishlist
13
 
14
  == Description ==
15
 
16
  = Increase Sales and Conversions =
17
- Wishlist is a simple but powerful tool that can help you to convert your site visitors into loyal customers. There are many situations when customers can’t buy a product at this time or simply don’t want. Possibility to save products for later encourages users to return to your site and after all, make a purchase. Adding products to Wishlist is easy and convenient so it may also force your customers to buy even more products than they planned. Users can share their wishlist, for example, to help their friends choose a gift for upcoming holiday and so on. By sharing their Wishlists, they are bringing you new potential customers. All in all this increase amount of your site visitors, conversion and as a result sales.
18
 
19
  [Live Preview](https://demo.templateinvaders.com/wordpress/plugins/wishlist/?utm_source=wordpressorg&utm_content=preview)
20
 
@@ -55,11 +55,11 @@ Make it a link or a button, choose from predefined icons or upload your own. Sel
55
  You can show/hide any column in wishlist table on wishlist page. So it is for you to decide what information to show and what not. Make your wishlist page informative or simple.
56
 
57
  = Make it fit your website perfectly =
58
- TI Wishlist plugin comes with over 60 appearance options such as colors, font size, borders, etc. Not enough? You can add your custom CSS styles directly in admin panel.
59
 
60
  = Translation Ready =
61
 
62
- You can easily translate TI Wishlist plugin to any language. Simply choose the most convenient way for you: using poEdit tool, Loco Translate or WPML.
63
 
64
  = Responsive & Retina Ready =
65
  We know how important responsive website for the online store in nowadays.
@@ -68,13 +68,13 @@ That is why we made sure that Wishlist looks and works perfectly on any devices
68
 
69
  == Installation ==
70
 
71
- There are few ways to install TI WooCommerce Wishlist plugin:
72
 
73
  = 1. From WordPress admin panel: =
74
 
75
- + Go to "Plugins" > "Add New" and search for "TI WooCommerce Wishlist"
76
 
77
- + Press "Install Now" button for the "TI WooCommerce Wishlist" plugin
78
 
79
  + After the installation is complete click "Activate" link (Plugins > Installed Plugins).
80
 
@@ -96,6 +96,17 @@ There are few ways to install TI WooCommerce Wishlist plugin:
96
 
97
  + After the installation is complete click "Activate" link (Plugins > Installed Plugins).
98
 
 
 
 
 
 
 
 
 
 
 
 
99
  == Screenshots ==
100
 
101
  1. Wishlist Settings page
@@ -108,12 +119,17 @@ There are few ways to install TI WooCommerce Wishlist plugin:
108
  8. Wishlist page, Tablet view
109
  9. Wishlist page, Mobile view
110
  10. Simplified Wishlist page, Mobile view
111
- 11. TI Wishlist Plugin Comes with a setup Wizard to help you configure the settings.
112
 
113
 
114
 
115
  == Changelog ==
116
 
 
 
 
 
 
117
  = 1.1.13 =
118
  *Release Date - 16 March 2017*
119
 
1
+ === WooCommerce Wishlist Plugin ===
2
  Contributors: templateinvaders
3
  Donate link: https://templateinvaders.com/?utm_source=wordpressorg&utm_content=donate
4
  Tags: wishlist, woocommerce, products, e-commerce, shop, ecommerce wishlist, woocommerce wishlist, woocommerce , shop wishlist, wishlist for Woocommerce
5
  Requires at least: 4.5
6
+ Tested up to: 4.7.3
7
+ Stable tag: 1.1.14
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
11
  Allow your store guests and customers to add products to Wishlist.
12
+ Add Wishlist functionality to your store for free with WooCommerce Wishlist Plugin
13
 
14
  == Description ==
15
 
16
  = Increase Sales and Conversions =
17
+ WooCommerce Wishlist is a simple but powerful tool that can help you to convert your site visitors into loyal customers. There are many situations when customers can’t buy a product at this time or simply don’t want. Possibility to save products for later encourages users to return to your site and after all, make a purchase. Adding products to Wishlist is easy and convenient so it may also force your customers to buy even more products than they planned. Users can share their wishlist, for example, to help their friends choose a gift for upcoming holiday and so on. By sharing their Wishlists, they are bringing you new potential customers. All in all this increase amount of your site visitors, conversion and as a result sales.
18
 
19
  [Live Preview](https://demo.templateinvaders.com/wordpress/plugins/wishlist/?utm_source=wordpressorg&utm_content=preview)
20
 
55
  You can show/hide any column in wishlist table on wishlist page. So it is for you to decide what information to show and what not. Make your wishlist page informative or simple.
56
 
57
  = Make it fit your website perfectly =
58
+ WooCommerce Wishlist Plugin comes with over 60 appearance options such as colors, font size, borders, etc. Not enough? You can add your custom CSS styles directly in admin panel.
59
 
60
  = Translation Ready =
61
 
62
+ You can easily translate WooCommerce Wishlist Plugin to any language. Simply choose the most convenient way for you: using poEdit tool, Loco Translate or WPML.
63
 
64
  = Responsive & Retina Ready =
65
  We know how important responsive website for the online store in nowadays.
68
 
69
  == Installation ==
70
 
71
+ There are few ways to install WooCommerce Wishlist Plugin:
72
 
73
  = 1. From WordPress admin panel: =
74
 
75
+ + Go to "Plugins" > "Add New" and search for "WooCommerce Wishlist Plugin"
76
 
77
+ + Press "Install Now" button for the "WooCommerce Wishlist Plugin" plugin
78
 
79
  + After the installation is complete click "Activate" link (Plugins > Installed Plugins).
80
 
96
 
97
  + After the installation is complete click "Activate" link (Plugins > Installed Plugins).
98
 
99
+ == Frequently Asked Questions ==
100
+
101
+ = Where can I find documentation? =
102
+
103
+ For help setting up and configuring, please refer to our [online documentation](https://templateinvaders.com/documentation/ti-woocommerce-wishlist-free/?utm_source=wordpressorg&utm_content=documentation_faq)
104
+
105
+ = Where can I get support or talk to other users? =
106
+
107
+ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.org/support/plugin/ti-woocommerce-wishlist) or [help page](https://templateinvaders.com/help/?utm_source=wordpressorg&utm_content=help_faq) on our website.
108
+
109
+
110
  == Screenshots ==
111
 
112
  1. Wishlist Settings page
119
  8. Wishlist page, Tablet view
120
  9. Wishlist page, Mobile view
121
  10. Simplified Wishlist page, Mobile view
122
+ 11. WooCommerce Wishlist Plugin Comes with a setup Wizard to help you configure the settings.
123
 
124
 
125
 
126
  == Changelog ==
127
 
128
+ = 1.1.14 =
129
+ *Release Date - 04 April 2017*
130
+
131
+ * Fixed multiple issues with WPML support.
132
+
133
  = 1.1.13 =
134
  *Release Date - 16 March 2017*
135
 
templates/ti-addedtowishlist-dialogbox.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * The Template for displaying dialog for message added to wishlist product.
4
  *
5
- * @since 1.0.0
6
  * @package TInvWishlist\Template
7
  */
8
 
2
  /**
3
  * The Template for displaying dialog for message added to wishlist product.
4
  *
5
+ * @version 1.0.0
6
  * @package TInvWishlist\Template
7
  */
8
 
templates/ti-addtowishlist.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * The Template for displaying add to wishlist product button.
4
  *
5
- * @since 1.0.0
6
  * @package TInvWishlist\Template
7
  */
8
 
2
  /**
3
  * The Template for displaying add to wishlist product button.
4
  *
5
+ * @version 1.0.0
6
  * @package TInvWishlist\Template
7
  */
8
 
templates/ti-wishlist-empty.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * The Template for displaying empty wishlist.
4
  *
5
- * @since 1.0.0
6
  * @package TInvWishlist\Template
7
  */
8
 
2
  /**
3
  * The Template for displaying empty wishlist.
4
  *
5
+ * @version 1.0.0
6
  * @package TInvWishlist\Template
7
  */
8
 
templates/ti-wishlist-header.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * The Template for displaying header for wishlist.
4
  *
5
- * @since 1.0.0
6
  * @package TInvWishlist\Template
7
  */
8
 
2
  /**
3
  * The Template for displaying header for wishlist.
4
  *
5
+ * @version 1.0.0
6
  * @package TInvWishlist\Template
7
  */
8
 
templates/ti-wishlist-item-data.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * The Template for displaying variation product data.
4
  *
5
- * @since 1.0.0
6
  * @package TInvWishlist\Template
7
  */
8
 
2
  /**
3
  * The Template for displaying variation product data.
4
  *
5
+ * @version 1.0.0
6
  * @package TInvWishlist\Template
7
  */
8
 
templates/ti-wishlist-null.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * The Template for displaying not found wishlist.
4
  *
5
- * @since 1.0.0
6
  * @package TInvWishlist\Template
7
  */
8
 
2
  /**
3
  * The Template for displaying not found wishlist.
4
  *
5
+ * @version 1.0.0
6
  * @package TInvWishlist\Template
7
  */
8
 
templates/ti-wishlist-social.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * The Template for displaying social buttons.
4
  *
5
- * @since 1.0.0
6
  * @package TInvWishlist\Template
7
  */
8
 
2
  /**
3
  * The Template for displaying social buttons.
4
  *
5
+ * @version 1.0.0
6
  * @package TInvWishlist\Template
7
  */
8
 
templates/ti-wishlist-user.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * The Template for displaying user wishlist.
4
  *
5
- * @since 1.0.0
6
  * @package TInvWishlist\Template
7
  */
8
 
2
  /**
3
  * The Template for displaying user wishlist.
4
  *
5
+ * @version 1.0.0
6
  * @package TInvWishlist\Template
7
  */
8
 
templates/ti-wishlist.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * The Template for displaying wishlist.
4
  *
5
- * @since 1.0.0
6
  * @package TInvWishlist\Template
7
  */
8
 
2
  /**
3
  * The Template for displaying wishlist.
4
  *
5
+ * @version 1.0.0
6
  * @package TInvWishlist\Template
7
  */
8
 
ti-woocommerce-wishlist.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
  /**
3
- * Wishlist Plugin for WooCoommerce.
4
- * Plugin Name: TI WooCommerce Wishlist
5
  * Plugin URI: https://wordpress.org/plugins/ti-woocommerce-wishlist/
6
  * Description: Wishlist functionality for your WooCommerce store.
7
- * Version: 1.1.13
8
  * Author: TemplateInvaders
9
  * Author URI: https://templateinvaders.com/
10
  * License: GPL-2.0+
@@ -37,7 +37,7 @@ if ( ! defined( 'TINVWL_DOMAIN' ) ) {
37
  }
38
 
39
  if ( ! defined( 'TINVWL_FVERSION' ) ) {
40
- define( 'TINVWL_FVERSION', '1.1.13' );
41
  }
42
 
43
  if ( ! defined( 'TINVWL_LOAD_FREE' ) ) {
1
  <?php
2
  /**
3
+ * WooCommerce Wishlist Plugin.
4
+ * Plugin Name: WooCommerce Wishlist Plugin
5
  * Plugin URI: https://wordpress.org/plugins/ti-woocommerce-wishlist/
6
  * Description: Wishlist functionality for your WooCommerce store.
7
+ * Version: 1.1.14
8
  * Author: TemplateInvaders
9
  * Author URI: https://templateinvaders.com/
10
  * License: GPL-2.0+
37
  }
38
 
39
  if ( ! defined( 'TINVWL_FVERSION' ) ) {
40
+ define( 'TINVWL_FVERSION', '1.1.14' );
41
  }
42
 
43
  if ( ! defined( 'TINVWL_LOAD_FREE' ) ) {
tinv-wishlists-function.php CHANGED
@@ -406,7 +406,7 @@ if ( ! function_exists( 'tinv_url_wishlist_default' ) ) {
406
  * @return string
407
  */
408
  function tinv_url_wishlist_default() {
409
- $page = tinv_get_option( 'page', 'wishlist' ); // @codingStandardsIgnoreLine WordPress.Variables.GlobalVariables.OverrideProhibited
410
  if ( empty( $page ) ) {
411
  return '';
412
  }
@@ -541,7 +541,21 @@ if ( ! function_exists( 'tinvwl_rocket_reject_uri' ) ) {
541
  * @return array
542
  */
543
  function tinvwl_rocket_reject_uri( $uri = array() ) {
544
- $uri[] = str_replace( get_site_url(), '', get_permalink( tinv_get_option( 'page', 'wishlist' ) ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
545
  return $uri;
546
  }
547
 
@@ -576,7 +590,21 @@ if ( ! function_exists( 'tinvwl_supercache_reject_uri' ) ) {
576
  function tinvwl_supercache_reject_uri( $buffer ) {
577
  global $cache_rejected_uri;
578
  if ( ! is_null( $cache_rejected_uri ) && is_array( $cache_rejected_uri ) ) {
579
- $cache_rejected_uri[] = str_replace( get_site_url(), '', get_permalink( tinv_get_option( 'page', 'wishlist' ) ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
580
  }
581
  return $buffer;
582
  }
@@ -593,33 +621,43 @@ if ( ! function_exists( 'tinvwl_w3total_reject_uri' ) ) {
593
  if ( ! function_exists( 'w3tc_pgcache_flush' ) || ! function_exists( 'w3_instance' ) ) {
594
  return;
595
  }
596
- $config = w3_instance( 'W3_Config' );
597
- $settings = array_map( 'trim', $config->get_array( 'dbcache.reject.uri' ) );
598
- $page = preg_replace( "/^\//", '', str_replace( get_site_url(), '', get_permalink( tinv_get_option( 'page', 'wishlist' ) ) ) ); // @codingStandardsIgnoreLine Squiz.Strings.DoubleQuoteUsage.NotRequired
599
- if ( ! in_array( $page, $settings ) ) { // @codingStandardsIgnoreLine WordPress.PHP.StrictInArray.MissingTrueStrict
600
- $settings[] = $page;
601
- $config->set( 'dbcache.reject.uri', $settings );
602
- $config->save();
603
- }
604
- $page = preg_replace( "/^\//", '', str_replace( get_site_url(), '', get_permalink( tinv_get_option( 'page', 'manage' ) ) ) ); // @codingStandardsIgnoreLine Squiz.Strings.DoubleQuoteUsage.NotRequired
605
- if ( ! in_array( $page, $settings ) ) { // @codingStandardsIgnoreLine WordPress.PHP.StrictInArray.MissingTrueStrict
606
- $settings[] = $page;
607
- $config->set( 'dbcache.reject.uri', $settings );
608
- $config->save();
609
  }
610
- $settings = array_map( 'trim', $config->get_array( 'pgcache.reject.uri' ) );
611
- $page = preg_replace( "/^\//", '', str_replace( get_site_url(), '', get_permalink( tinv_get_option( 'page', 'wishlist' ) ) ) ); // @codingStandardsIgnoreLine Squiz.Strings.DoubleQuoteUsage.NotRequired
612
- if ( ! in_array( $page, $settings ) ) { // @codingStandardsIgnoreLine WordPress.PHP.StrictInArray.MissingTrueStrict
613
- $settings[] = $page;
614
- $config->set( 'pgcache.reject.uri', $settings );
615
- $config->save();
616
  }
617
- $page = preg_replace( "/^\//", '', str_replace( get_site_url(), '', get_permalink( tinv_get_option( 'page', 'manage' ) ) ) ); // @codingStandardsIgnoreLine Squiz.Strings.DoubleQuoteUsage.NotRequired
618
- if ( ! in_array( $page, $settings ) ) { // @codingStandardsIgnoreLine WordPress.PHP.StrictInArray.MissingTrueStrict
619
- $settings[] = $page;
620
- $config->set( 'pgcache.reject.uri', $settings );
621
- $config->save();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
622
  }
 
623
  $settings = array_map( 'trim', $config->get_array( 'pgcache.reject.cookie' ) );
624
  if ( ! in_array( 'tinv_wishlist', $settings ) ) { // @codingStandardsIgnoreLine WordPress.PHP.StrictInArray.MissingTrueStrict
625
  $settings[] = 'tinv_wishlist';
@@ -757,6 +795,32 @@ if ( ! function_exists( 'tinvwl_clean_url' ) ) {
757
  }
758
  }
759
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
760
 
761
  // Create a helper function for easy SDK access.
762
  if ( ! function_exists( 'tinvwl_fs' ) ) {
@@ -825,7 +889,7 @@ if ( ! function_exists( 'tinvwl_fs' ) ) {
825
  __fs( 'hey-x' ) . '<br>' .
826
  __( 'Allow %6$s to collect some usage data with %5$s to make the plugin even more awesome. If you skip this, that\'s okay! %2$s will still work just fine.', 'ti-woocommerce-wishlist' ),
827
  $user_first_name,
828
- '<b>' . __('TI WooCommerce Wishlist', 'ti-woocommerce-wishlist') . '</b>',
829
  '<b>' . $user_login . '</b>',
830
  $site_link,
831
  $freemius_link,
406
  * @return string
407
  */
408
  function tinv_url_wishlist_default() {
409
+ $page = apply_filters( 'wpml_object_id', tinv_get_option( 'page', 'wishlist' ), 'page', true ); // @codingStandardsIgnoreLine WordPress.Variables.GlobalVariables.OverrideProhibited
410
  if ( empty( $page ) ) {
411
  return '';
412
  }
541
  * @return array
542
  */
543
  function tinvwl_rocket_reject_uri( $uri = array() ) {
544
+ $id = tinv_get_option( 'page', 'wishlist' );
545
+ $pages = array( $id );
546
+ $languages = apply_filters( 'wpml_active_languages', array(), array( 'skip_missing' => 0, 'orderby' => 'code' ) );
547
+ if ( ! empty( $languages ) ) {
548
+ foreach ( $languages as $l ) {
549
+ $pages[] = apply_filters( 'wpml_object_id', $id, 'page', true, $l['language_code'] );
550
+ }
551
+ $pages = array_unique( $pages );
552
+ }
553
+ $pages = array_filter( $pages );
554
+ if ( ! empty( $pages ) ) {
555
+ foreach ( $pages as $page ) {
556
+ $uri[] = str_replace( get_site_url(), '', get_permalink( $page ) );
557
+ }
558
+ }
559
  return $uri;
560
  }
561
 
590
  function tinvwl_supercache_reject_uri( $buffer ) {
591
  global $cache_rejected_uri;
592
  if ( ! is_null( $cache_rejected_uri ) && is_array( $cache_rejected_uri ) ) {
593
+ $id = tinv_get_option( 'page', 'wishlist' );
594
+ $pages = array( $id );
595
+ $languages = apply_filters( 'wpml_active_languages', array(), array( 'skip_missing' => 0, 'orderby' => 'code' ) );
596
+ if ( ! empty( $languages ) ) {
597
+ foreach ( $languages as $l ) {
598
+ $pages[] = apply_filters( 'wpml_object_id', $id, 'page', true, $l['language_code'] );
599
+ }
600
+ $pages = array_unique( $pages );
601
+ }
602
+ $pages = array_filter( $pages );
603
+ if ( ! empty( $pages ) ) {
604
+ foreach ( $pages as $page ) {
605
+ $cache_rejected_uri[] = str_replace( get_site_url(), '', get_permalink( $page ) );
606
+ }
607
+ }
608
  }
609
  return $buffer;
610
  }
621
  if ( ! function_exists( 'w3tc_pgcache_flush' ) || ! function_exists( 'w3_instance' ) ) {
622
  return;
623
  }
624
+ $id = tinv_get_option( 'page', 'wishlist' );
625
+ $pages = array( $id );
626
+ $languages = apply_filters( 'wpml_active_languages', array(), array( 'skip_missing' => 0, 'orderby' => 'code' ) );
627
+ if ( ! empty( $languages ) ) {
628
+ foreach ( $languages as $l ) {
629
+ $pages[] = apply_filters( 'wpml_object_id', $id, 'page', true, $l['language_code'] );
630
+ }
631
+ $pages = array_unique( $pages );
 
 
 
 
 
632
  }
633
+ $pages = array_filter( $pages );
634
+ if ( ! empty( $pages ) ) {
635
+ foreach ( $pages as $i => $page ) {
636
+ $pages[ $i ] = preg_replace( "/^\//", '', str_replace( get_site_url(), '', get_permalink( $page ) ) ); // @codingStandardsIgnoreLine Squiz.Strings.DoubleQuoteUsage.NotRequired
637
+ }
 
638
  }
639
+ $pages = array_unique( $pages );
640
+ $pages = array_filter( $pages );
641
+
642
+ if ( ! empty( $pages ) ) {
643
+ $config = w3_instance( 'W3_Config' );
644
+ $sections = array( 'dbcache.reject.uri', 'pgcache.reject.uri' );
645
+ foreach ( $sections as $section ) {
646
+ $settings = array_map( 'trim', $config->get_array( $section ) );
647
+ $changed = false;
648
+ foreach ( $pages as $page ) {
649
+ if ( ! in_array( $page, $settings ) ) { // @codingStandardsIgnoreLine WordPress.PHP.StrictInArray.MissingTrueStrict
650
+ $settings[] = $page;
651
+ $changed = true;
652
+ }
653
+ }
654
+ if ( $changed ) {
655
+ $config->set( $section, $settings );
656
+ $config->save();
657
+ }
658
+ }
659
  }
660
+
661
  $settings = array_map( 'trim', $config->get_array( 'pgcache.reject.cookie' ) );
662
  if ( ! in_array( 'tinv_wishlist', $settings ) ) { // @codingStandardsIgnoreLine WordPress.PHP.StrictInArray.MissingTrueStrict
663
  $settings[] = 'tinv_wishlist';
795
  }
796
  }
797
 
798
+ if ( ! function_exists( 'tinvwl_wpml_product_get' ) ) {
799
+
800
+ /**
801
+ * Change product data if product need translate
802
+ *
803
+ * @param array $product Wishlistl product.
804
+ * @return array
805
+ */
806
+ function tinvwl_wpml_product_get( $product ) {
807
+ if ( array_key_exists( 'data', $product ) ) {
808
+ $_product_id = $product_id = $product['product_id'];
809
+ $_variation_id = $variation_id = $product['variation_id'];
810
+ $_product_id = apply_filters( 'wpml_object_id', $_product_id, 'product', true );
811
+ if ( ! empty( $_variation_id ) ) {
812
+ $_variation_id = apply_filters( 'wpml_object_id', $_variation_id, 'product', true );
813
+ }
814
+ if ( $_product_id !== $product_id || $_variation_id !== $variation_id ) {
815
+ $product['data'] = wc_get_product( $variation_id ? $_variation_id : $_product_id );
816
+ }
817
+ }
818
+ return $product;
819
+ }
820
+ add_filter( 'tinvwl_wishlist_product_get', 'tinvwl_wpml_product_get' );
821
+ }
822
+
823
+
824
 
825
  // Create a helper function for easy SDK access.
826
  if ( ! function_exists( 'tinvwl_fs' ) ) {
889
  __fs( 'hey-x' ) . '<br>' .
890
  __( 'Allow %6$s to collect some usage data with %5$s to make the plugin even more awesome. If you skip this, that\'s okay! %2$s will still work just fine.', 'ti-woocommerce-wishlist' ),
891
  $user_first_name,
892
+ '<b>' . __('WooCommerce Wishlist Plugin', 'ti-woocommerce-wishlist') . '</b>',
893
  '<b>' . $user_login . '</b>',
894
  $site_link,
895
  $freemius_link,
views/wizard/finish.php CHANGED
@@ -15,8 +15,8 @@ if ( ! defined( 'ABSPATH' ) ) {
15
  <h2 class="tinvwl-sub-title"><?php esc_html_e( 'Congratulations', 'ti-woocommerce-wishlist' ); ?></h2>
16
  <h1 class="tinvwl-title"><?php esc_html_e( 'Your Wishlist is ready!', 'ti-woocommerce-wishlist' ); ?></h1>
17
  <div class="tinvwl-desc">
18
- <?php printf( esc_html__( 'You have set basic Wishlist settings. If you want to make more in-depth plugin setup you can make it in plugin settings page %s.', 'ti-woocommerce-wishlist' ), sprintf( '<a target="_blank" href="%s">%s</a>', esc_url( self::admin_url( '' ) ), esc_html__( 'TI WooCommerce Wishlist Settings', 'ti-woocommerce-wishlist' ) ) ); // WPCS: xss ok. ?><br/>
19
- <?php printf( esc_html__( 'Details about TI WooCommerce Wishlist options can be found in our %s.', 'ti-woocommerce-wishlist' ), sprintf( '<a target="_blank" href="%s">%s</a>', 'https://templateinvaders.com/documentation/ti-woocommerce-wishlist?utm_source=wishlist_plugin_free&utm_campaign=online_documentation&utm_medium=wizard&utm_content=donate', esc_html__( 'Online Documentation', 'ti-woocommerce-wishlist' ) ) );
20
  ?>
21
  </div>
22
  <a class="tinvwl-btn grey w-icon xl-icon round" href="<?php echo 'https://templateinvaders.com/documentation/ti-woocommerce-wishlist?utm_source=wishlist_plugin_free&utm_campaign=documentation&utm_medium=wizard&utm_content=donate';
15
  <h2 class="tinvwl-sub-title"><?php esc_html_e( 'Congratulations', 'ti-woocommerce-wishlist' ); ?></h2>
16
  <h1 class="tinvwl-title"><?php esc_html_e( 'Your Wishlist is ready!', 'ti-woocommerce-wishlist' ); ?></h1>
17
  <div class="tinvwl-desc">
18
+ <?php printf( esc_html__( 'You have set basic Wishlist settings. If you want to make more in-depth plugin setup you can make it in plugin settings page %s.', 'ti-woocommerce-wishlist' ), sprintf( '<a target="_blank" href="%s">%s</a>', esc_url( self::admin_url( '' ) ), esc_html__( 'WooCommerce Wishlist Plugin Settings', 'ti-woocommerce-wishlist' ) ) ); // WPCS: xss ok. ?><br/>
19
+ <?php printf( esc_html__( 'Details about WooCommerce Wishlist Plugin options can be found in our %s.', 'ti-woocommerce-wishlist' ), sprintf( '<a target="_blank" href="%s">%s</a>', 'https://templateinvaders.com/documentation/ti-woocommerce-wishlist?utm_source=wishlist_plugin_free&utm_campaign=online_documentation&utm_medium=wizard&utm_content=donate', esc_html__( 'Online Documentation', 'ti-woocommerce-wishlist' ) ) );
20
  ?>
21
  </div>
22
  <a class="tinvwl-btn grey w-icon xl-icon round" href="<?php echo 'https://templateinvaders.com/documentation/ti-woocommerce-wishlist?utm_source=wishlist_plugin_free&utm_campaign=documentation&utm_medium=wizard&utm_content=donate';