WPC Smart Wishlist for WooCommerce - Version 3.0.4

Version Description

  • Fixed: Minor security issue
Download this release

Release Info

Developer wpclever
Plugin Icon 128x128 WPC Smart Wishlist for WooCommerce
Version 3.0.4
Comparing to
See all releases

Code changes from version 3.0.3 to 3.0.4

includes/wpc-kit.php CHANGED
@@ -112,7 +112,7 @@ if ( ! class_exists( 'WPCleverKit' ) ) {
112
  }
113
 
114
  function admin_menu() {
115
- add_submenu_page( 'wpclever', esc_html__( 'WPC Essential Kit', 'wpckit' ), esc_html__( 'Essential Kit', 'wpckit' ), 'manage_options', 'wpclever-kit', array(
116
  $this,
117
  'essential_kit_content'
118
  ) );
@@ -194,7 +194,7 @@ if ( ! class_exists( 'WPCleverKit' ) ) {
194
  <div class="name column-name">
195
  <h3>
196
  <a class="thickbox" href="<?php echo esc_url( $details_link ); ?>">
197
- <?php echo $plugin_info['name']; ?>
198
  </a>
199
  </h3>
200
  </div>
@@ -206,30 +206,30 @@ if ( ! class_exists( 'WPCleverKit' ) ) {
206
  ?>
207
  <a href="<?php echo esc_url( $this->deactivate_plugin_link( $_plugin ) ); ?>"
208
  class="button deactivate-now">
209
- <?php esc_html_e( 'Deactivate', 'wpckit' ); ?>
210
  </a>
211
  <?php
212
  } else {
213
  ?>
214
  <a href="<?php echo esc_url( $this->activate_plugin_link( $_plugin ) ); ?>"
215
  class="button activate-now">
216
- <?php esc_html_e( 'Activate', 'wpckit' ); ?>
217
  </a>
218
  <?php
219
  }
220
  } else { ?>
221
  <a href="<?php echo esc_url( $this->install_plugin_link( $_plugin ) ); ?>"
222
  class="install-now button wpckit-install-now">
223
- <?php esc_html_e( 'Install Now', 'wpckit' ); ?>
224
  </a>
225
  <?php } ?>
226
  </li>
227
  <li>
228
  <a href="<?php echo esc_url( $details_link ); ?>"
229
  class="thickbox open-plugin-details-modal"
230
- aria-label="<?php echo esc_attr( sprintf( esc_html__( 'More information about %s', 'wpckit' ), $plugin_info['name'] ) ); ?>"
231
  data-title="<?php echo esc_attr( $plugin_info['name'] ); ?>">
232
- <?php esc_html_e( 'More Details', 'wpckit' ); ?>
233
  </a>
234
  </li>
235
  </ul>
@@ -259,14 +259,14 @@ if ( ! class_exists( 'WPCleverKit' ) ) {
259
  ?>
260
  <a href="<?php echo esc_url( $this->deactivate_plugin_link( $_plugin, true ) ); ?>"
261
  class="button deactivate-now">
262
- <?php esc_html_e( 'Deactivate', 'wpckit' ); ?>
263
  </a>
264
  <?php
265
  } else {
266
  ?>
267
  <a href="<?php echo esc_url( $this->activate_plugin_link( $_plugin, true ) ); ?>"
268
  class="button activate-now">
269
- <?php esc_html_e( 'Activate', 'wpckit' ); ?>
270
  </a>
271
  <?php
272
  }
@@ -294,20 +294,20 @@ if ( ! class_exists( 'WPCleverKit' ) ) {
294
 
295
  if ( isset( $plugin_info['version'] ) ) { ?>
296
  <div class="column-updated">
297
- <?php echo esc_html__( 'Version', 'wpckit' ) . ' ' . $plugin_info['version']; ?>
298
  </div>
299
  <?php }
300
 
301
  if ( isset( $plugin_info['active_installs'] ) ) { ?>
302
  <div class="column-downloaded">
303
- <?php echo number_format_i18n( $plugin_info['active_installs'] ) . esc_html__( '+ Active Installations', 'wpckit' ); ?>
304
  </div>
305
  <?php }
306
 
307
  if ( isset( $plugin_info['last_updated'] ) ) { ?>
308
  <div class="column-compatibility">
309
- <strong><?php esc_html_e( 'Last Updated:', 'wpckit' ); ?></strong>
310
- <span><?php printf( esc_html__( '%s ago', 'wpckit' ), esc_html( human_time_diff( strtotime( $plugin_info['last_updated'] ) ) ) ); ?></span>
311
  </div>
312
  <?php }
313
 
112
  }
113
 
114
  function admin_menu() {
115
+ add_submenu_page( 'wpclever', esc_html__( 'WPC Essential Kit', 'wpc-kit' ), esc_html__( 'Essential Kit', 'wpc-kit' ), 'manage_options', 'wpclever-kit', array(
116
  $this,
117
  'essential_kit_content'
118
  ) );
194
  <div class="name column-name">
195
  <h3>
196
  <a class="thickbox" href="<?php echo esc_url( $details_link ); ?>">
197
+ <?php echo esc_html( $plugin_info['name'] ); ?>
198
  </a>
199
  </h3>
200
  </div>
206
  ?>
207
  <a href="<?php echo esc_url( $this->deactivate_plugin_link( $_plugin ) ); ?>"
208
  class="button deactivate-now">
209
+ <?php esc_html_e( 'Deactivate', 'wpc-kit' ); ?>
210
  </a>
211
  <?php
212
  } else {
213
  ?>
214
  <a href="<?php echo esc_url( $this->activate_plugin_link( $_plugin ) ); ?>"
215
  class="button activate-now">
216
+ <?php esc_html_e( 'Activate', 'wpc-kit' ); ?>
217
  </a>
218
  <?php
219
  }
220
  } else { ?>
221
  <a href="<?php echo esc_url( $this->install_plugin_link( $_plugin ) ); ?>"
222
  class="install-now button wpckit-install-now">
223
+ <?php esc_html_e( 'Install Now', 'wpc-kit' ); ?>
224
  </a>
225
  <?php } ?>
226
  </li>
227
  <li>
228
  <a href="<?php echo esc_url( $details_link ); ?>"
229
  class="thickbox open-plugin-details-modal"
230
+ aria-label="<?php echo esc_attr( sprintf( esc_html__( 'More information about %s', 'wpc-kit' ), $plugin_info['name'] ) ); ?>"
231
  data-title="<?php echo esc_attr( $plugin_info['name'] ); ?>">
232
+ <?php esc_html_e( 'More Details', 'wpc-kit' ); ?>
233
  </a>
234
  </li>
235
  </ul>
259
  ?>
260
  <a href="<?php echo esc_url( $this->deactivate_plugin_link( $_plugin, true ) ); ?>"
261
  class="button deactivate-now">
262
+ <?php esc_html_e( 'Deactivate', 'wpc-kit' ); ?>
263
  </a>
264
  <?php
265
  } else {
266
  ?>
267
  <a href="<?php echo esc_url( $this->activate_plugin_link( $_plugin, true ) ); ?>"
268
  class="button activate-now">
269
+ <?php esc_html_e( 'Activate', 'wpc-kit' ); ?>
270
  </a>
271
  <?php
272
  }
294
 
295
  if ( isset( $plugin_info['version'] ) ) { ?>
296
  <div class="column-updated">
297
+ <?php echo esc_html__( 'Version', 'wpc-kit' ) . ' ' . esc_html( $plugin_info['version'] ); ?>
298
  </div>
299
  <?php }
300
 
301
  if ( isset( $plugin_info['active_installs'] ) ) { ?>
302
  <div class="column-downloaded">
303
+ <?php echo number_format_i18n( $plugin_info['active_installs'] ) . esc_html__( '+ Active Installations', 'wpc-kit' ); ?>
304
  </div>
305
  <?php }
306
 
307
  if ( isset( $plugin_info['last_updated'] ) ) { ?>
308
  <div class="column-compatibility">
309
+ <strong><?php esc_html_e( 'Last Updated:', 'wpc-kit' ); ?></strong>
310
+ <span><?php printf( esc_html__( '%s ago', 'wpc-kit' ), esc_html( human_time_diff( strtotime( $plugin_info['last_updated'] ) ) ) ); ?></span>
311
  </div>
312
  <?php }
313
 
includes/wpc-notice.php CHANGED
@@ -16,7 +16,7 @@ if ( ! class_exists( 'WPCleverNotice' ) ) {
16
  }
17
 
18
  function notice_scripts() {
19
- wp_enqueue_style( 'wpclever-notice', WOOSW_URI . 'assets/css/notice.css' );
20
  }
21
 
22
  function admin_notice() {
@@ -32,7 +32,8 @@ if ( ! class_exists( 'WPCleverNotice' ) ) {
32
  <div class="wpclever-notice notice">
33
  <div class="wpclever-notice-thumbnail">
34
  <a href="https://wordpress.org/themes/wpcstore/" target="_blank">
35
- <img src="<?php echo WOOSW_URI . 'assets/images/wpc-store.png'; ?>" alt="WPCstore"/>
 
36
  </a>
37
  </div>
38
  <div class="wpclever-notice-text">
16
  }
17
 
18
  function notice_scripts() {
19
+ wp_enqueue_style( 'wpc-notice', WOOSW_URI . 'assets/css/notice.css' );
20
  }
21
 
22
  function admin_notice() {
32
  <div class="wpclever-notice notice">
33
  <div class="wpclever-notice-thumbnail">
34
  <a href="https://wordpress.org/themes/wpcstore/" target="_blank">
35
+ <img src="<?php echo esc_url( WOOSW_URI . 'assets/images/wpc-store.png' ); ?>"
36
+ alt="WPCstore"/>
37
  </a>
38
  </div>
39
  <div class="wpclever-notice-text">
languages/woo-smart-wishlist.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the WPC Smart Wishlist for WooCommerce plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WPC Smart Wishlist for WooCommerce 3.0.3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woo-smart-wishlist\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2022-05-20T19:14:01+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.5.0\n"
15
  "X-Domain: woo-smart-wishlist\n"
2
  # This file is distributed under the same license as the WPC Smart Wishlist for WooCommerce plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WPC Smart Wishlist for WooCommerce 3.0.4\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woo-smart-wishlist\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2022-05-21T00:41:59+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.5.0\n"
15
  "X-Domain: woo-smart-wishlist\n"
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://wpclever.net
4
  Tags: woocommerce, woo, wpc, smart, wishlist, wish list
5
  Requires at least: 4.0
6
  Tested up to: 5.9
7
- Stable tag: 3.0.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -106,6 +106,9 @@ Example:
106
 
107
  == Changelog ==
108
 
 
 
 
109
  = 3.0.3 =
110
  * Fixed: Security issues
111
 
4
  Tags: woocommerce, woo, wpc, smart, wishlist, wish list
5
  Requires at least: 4.0
6
  Tested up to: 5.9
7
+ Stable tag: 3.0.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
106
 
107
  == Changelog ==
108
 
109
+ = 3.0.4 =
110
+ * Fixed: Minor security issue
111
+
112
  = 3.0.3 =
113
  * Fixed: Security issues
114
 
wpc-smart-wishlist.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WPC Smart Wishlist for WooCommerce
4
  Plugin URI: https://wpclever.net/
5
  Description: WPC Smart Wishlist is a simple but powerful tool that can help your customer save products for buy later.
6
- Version: 3.0.3
7
  Author: WPClever
8
  Author URI: https://wpclever.net
9
  Text Domain: woo-smart-wishlist
@@ -16,7 +16,7 @@ WC tested up to: 6.5
16
 
17
  defined( 'ABSPATH' ) || exit;
18
 
19
- ! defined( 'WOOSW_VERSION' ) && define( 'WOOSW_VERSION', '3.0.3' );
20
  ! defined( 'WOOSW_FILE' ) && define( 'WOOSW_FILE', __FILE__ );
21
  ! defined( 'WOOSW_URI' ) && define( 'WOOSW_URI', plugin_dir_url( __FILE__ ) );
22
  ! defined( 'WOOSW_DIR' ) && define( 'WOOSW_DIR', plugin_dir_path( __FILE__ ) );
@@ -551,7 +551,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
551
  if ( get_option( 'woosw_page_copy', 'yes' ) === 'yes' ) {
552
  $return_html .= '<div class="woosw-copy">';
553
  $return_html .= '<span class="woosw-copy-label">' . esc_html__( 'Wishlist link:', 'woo-smart-wishlist' ) . '</span>';
554
- $return_html .= '<span class="woosw-copy-url"><input id="woosw_copy_url" type="url" value="' . $share_url_raw . '" readonly/></span>';
555
  $return_html .= '<span class="woosw-copy-btn"><input id="woosw_copy_btn" type="button" value="' . esc_html__( 'Copy', 'woo-smart-wishlist' ) . '"/></span>';
556
  $return_html .= '</div><!-- /woosw-copy -->';
557
  }
@@ -676,7 +676,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
676
  <th scope="row"><?php esc_html_e( 'Maximum wishlists per user', 'woo-smart-wishlist' ); ?></th>
677
  <td>
678
  <input type="number" min="1" max="100" name="woosw_maximum_wishlists"
679
- value="<?php echo get_option( 'woosw_maximum_wishlists', '5' ); ?>"/>
680
  </td>
681
  </tr>
682
  <tr class="heading">
@@ -735,7 +735,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
735
  <th scope="row"><?php esc_html_e( 'Extra class (optional)', 'woo-smart-wishlist' ); ?></th>
736
  <td>
737
  <input type="text" name="woosw_button_class" class="regular-text"
738
- value="<?php echo get_option( 'woosw_button_class', '' ); ?>"/>
739
  <span class="description"><?php esc_html_e( 'Add extra class for action button/link, split by one space.', 'woo-smart-wishlist' ); ?></span>
740
  </td>
741
  </tr>
@@ -854,7 +854,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
854
  <td>
855
  <?php $color_default = apply_filters( 'woosw_color_default', '#5fbd74' ); ?>
856
  <input type="text" name="woosw_color"
857
- value="<?php echo get_option( 'woosw_color', $color_default ); ?>"
858
  class="woosw_color_picker"/>
859
  <span class="description"><?php printf( esc_html__( 'Choose the color, default %s', 'woo-smart-wishlist' ), '<code>' . $color_default . '</code>' ); ?></span>
860
  </td>
@@ -918,7 +918,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
918
  <th scope="row"><?php esc_html_e( 'Continue shopping link', 'woo-smart-wishlist' ); ?></th>
919
  <td>
920
  <input type="url" name="woosw_continue_url"
921
- value="<?php echo get_option( 'woosw_continue_url' ); ?>"
922
  class="regular-text code"/>
923
  <span class="description"><?php esc_html_e( 'By default, the wishlist popup will only be closed when customers click on the "Continue Shopping" button.', 'woo-smart-wishlist' ); ?></span>
924
  </td>
@@ -1030,7 +1030,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1030
  $saved_menus = get_option( 'woosw_menus', array() );
1031
 
1032
  foreach ( $nav_menus as $nav_id => $nav_name ) {
1033
- echo '<input type="checkbox" name="woosw_menus[]" value="' . $nav_id . '" ' . ( is_array( $saved_menus ) && in_array( $nav_id, $saved_menus, false ) ? 'checked' : '' ) . '/><label>' . $nav_name . '</label><br/>';
1034
  }
1035
  ?>
1036
  <span class="description"><?php esc_html_e( 'Choose the menu(s) you want to add the "wishlist menu" at the end.', 'woo-smart-wishlist' ); ?></span>
@@ -1510,7 +1510,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1510
  </div>
1511
 
1512
  <div class="woosw-item--add">
1513
- <?php echo do_shortcode( '[add_to_cart style="" show_price="false" id="' . $product_id . '"]' ); ?>
1514
  </div>
1515
 
1516
  <?php do_action( 'woosw_wishlist_item_actions', $product, $product_id, $key ); ?>
@@ -1566,7 +1566,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1566
  }
1567
 
1568
  if ( $selected ) {
1569
- $menu_item = '<li class="' . esc_attr( apply_filters( 'woosw_menu_item_class', 'menu-item woosw-menu-item menu-item-type-woosw' ) ) . '"><a href="' . self::get_url() . '"><span class="woosw-menu-item-inner" data-count="' . esc_attr( self::get_count() ) . '">' . esc_html( apply_filters( 'woosw_menu_item_label', self::localization( 'menu_label', esc_html__( 'Wishlist', 'woo-smart-wishlist' ) ) ) ) . '</span></a></li>';
1570
  $items .= apply_filters( 'woosw_menu_item', $menu_item );
1571
  }
1572
 
@@ -1621,7 +1621,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1621
  </div>
1622
  <div class="woosw-popup-content-bot">
1623
  <div class="woosw-popup-content-bot-inner">
1624
- <a class="woosw-page" href="<?php echo self::get_url( $key, true ); ?>">
1625
  <?php echo self::localization( 'open_page', esc_html__( 'Open wishlist page', 'woo-smart-wishlist' ) ); ?>
1626
  </a>
1627
  <span class="woosw-continue"
@@ -1801,7 +1801,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1801
  function posts_custom_column( $column, $postid ) {
1802
  if ( $column == 'woosw' ) {
1803
  if ( ( $count = (int) get_post_meta( $postid, 'woosw_count', true ) ) > 0 ) {
1804
- echo '<a href="#" class="woosw_action" data-pid="' . $postid . '">' . $count . '</a>';
1805
  }
1806
  }
1807
  }
@@ -1892,7 +1892,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1892
 
1893
  if ( ! empty( $key ) && ( $products = get_option( 'woosw_list_' . $key, true ) ) ) {
1894
  if ( is_array( $products ) && ( $count = count( $products ) ) ) {
1895
- $val = '<a href="#" class="woosw_action" data-key="' . $key . '">' . $count . '</a>';
1896
  }
1897
  }
1898
  }
@@ -1919,7 +1919,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1919
  $user = $wpdb->get_results( $wpdb->prepare( 'SELECT user_id FROM `' . $wpdb->prefix . 'usermeta` WHERE `meta_key` = "woosw_key" AND `meta_value` = "%s" LIMIT 1', $key ) );
1920
 
1921
  echo '<div class="woosw-quickview-item">';
1922
- echo '<div class="woosw-quickview-item-image"><a href="' . self::get_url( $key, true ) . '" target="_blank">#' . $key . '</a></div>';
1923
  echo '<div class="woosw-quickview-item-info">';
1924
 
1925
  if ( ! empty( $user ) ) {
@@ -1943,8 +1943,8 @@ if ( ! function_exists( 'woosw_init' ) ) {
1943
  echo '<div class="woosw-quickview-item">';
1944
  echo '<div class="woosw-quickview-item-image">' . $_product->get_image() . '</div>';
1945
  echo '<div class="woosw-quickview-item-info">';
1946
- echo '<div class="woosw-quickview-item-title"><a href="' . $_product->get_permalink() . '" target="_blank">' . $_product->get_name() . '</a></div>';
1947
- echo '<div class="woosw-quickview-item-data">' . date_i18n( get_option( 'date_format' ), $data['time'] ) . ' <span class="woosw-quickview-item-links">| ID: ' . $pid . ' | <a href="' . get_edit_post_link( $pid ) . '" target="_blank">' . esc_html__( 'Edit', 'woo-smart-wishlist' ) . '</a> | <a href="#" class="woosw_action" data-pid="' . $pid . '">' . esc_html__( 'See in wishlist', 'woo-smart-wishlist' ) . '</a></span></div>';
1948
  echo '</div><!-- /woosw-quickview-item-info -->';
1949
  echo '</div><!-- /woosw-quickview-item -->';
1950
  }
@@ -1972,7 +1972,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1972
  echo '<div class="woosw-quickview-item">';
1973
  echo '<div class="woosw-quickview-item-image">' . $_product->get_image() . '</div>';
1974
  echo '<div class="woosw-quickview-item-info">';
1975
- echo '<div class="woosw-quickview-item-title"><a href="' . $_product->get_permalink() . '" target="_blank">' . $_product->get_name() . '</a></div>';
1976
  echo '<div class="woosw-quickview-item-data">ID: ' . $pid . ' | ' . sprintf( _n( '%s wishlist', '%s wishlists', $count, 'woosw' ), number_format_i18n( $count ) ) . ' <span class="woosw-quickview-item-links">| <a href="' . get_edit_post_link( $pid ) . '" target="_blank">' . esc_html__( 'Edit', 'woo-smart-wishlist' ) . '</a></span></div>';
1977
  echo '</div><!-- /woosw-quickview-item-info -->';
1978
  echo '</div><!-- /woosw-quickview-item -->';
@@ -1985,7 +1985,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1985
  $user = $wpdb->get_results( $wpdb->prepare( 'SELECT user_id FROM `' . $wpdb->prefix . 'usermeta` WHERE `meta_key` = "woosw_key" AND `meta_value` = "%s" LIMIT 1', $key ) );
1986
 
1987
  echo '<div class="woosw-quickview-item">';
1988
- echo '<div class="woosw-quickview-item-image"><a href="' . self::get_url( $key, true ) . '" target="_blank">#' . $key . '</a></div>';
1989
  echo '<div class="woosw-quickview-item-info">';
1990
 
1991
  if ( ! empty( $user ) ) {
@@ -1994,10 +1994,10 @@ if ( ! function_exists( 'woosw_init' ) ) {
1994
 
1995
 
1996
  echo '<div class="woosw-quickview-item-title"><a href="' . get_edit_user_link( $user_id ) . '" target="_blank">' . $user_data->user_login . '</a></div>';
1997
- echo '<div class="woosw-quickview-item-data">' . $user_data->user_email . ' | <a href="#" class="woosw_action" data-key="' . $key . '">' . sprintf( _n( '%s product', '%s products', $count, 'woo-smart-wishlist' ), number_format_i18n( $count ) ) . '</a></div>';
1998
  } else {
1999
  echo '<div class="woosw-quickview-item-title">' . esc_html__( 'Guest', 'woo-smart-wishlist' ) . '</div>';
2000
- echo '<div class="woosw-quickview-item-data"><a href="#" class="woosw_action" data-key="' . $key . '">' . sprintf( _n( '%s product', '%s products', $count, 'woo-smart-wishlist' ), number_format_i18n( $count ) ) . '</a></div>';
2001
  }
2002
 
2003
  echo '</div><!-- /woosw-quickview-item-info -->';
3
  Plugin Name: WPC Smart Wishlist for WooCommerce
4
  Plugin URI: https://wpclever.net/
5
  Description: WPC Smart Wishlist is a simple but powerful tool that can help your customer save products for buy later.
6
+ Version: 3.0.4
7
  Author: WPClever
8
  Author URI: https://wpclever.net
9
  Text Domain: woo-smart-wishlist
16
 
17
  defined( 'ABSPATH' ) || exit;
18
 
19
+ ! defined( 'WOOSW_VERSION' ) && define( 'WOOSW_VERSION', '3.0.4' );
20
  ! defined( 'WOOSW_FILE' ) && define( 'WOOSW_FILE', __FILE__ );
21
  ! defined( 'WOOSW_URI' ) && define( 'WOOSW_URI', plugin_dir_url( __FILE__ ) );
22
  ! defined( 'WOOSW_DIR' ) && define( 'WOOSW_DIR', plugin_dir_path( __FILE__ ) );
551
  if ( get_option( 'woosw_page_copy', 'yes' ) === 'yes' ) {
552
  $return_html .= '<div class="woosw-copy">';
553
  $return_html .= '<span class="woosw-copy-label">' . esc_html__( 'Wishlist link:', 'woo-smart-wishlist' ) . '</span>';
554
+ $return_html .= '<span class="woosw-copy-url"><input id="woosw_copy_url" type="url" value="' . esc_attr( $share_url_raw ) . '" readonly/></span>';
555
  $return_html .= '<span class="woosw-copy-btn"><input id="woosw_copy_btn" type="button" value="' . esc_html__( 'Copy', 'woo-smart-wishlist' ) . '"/></span>';
556
  $return_html .= '</div><!-- /woosw-copy -->';
557
  }
676
  <th scope="row"><?php esc_html_e( 'Maximum wishlists per user', 'woo-smart-wishlist' ); ?></th>
677
  <td>
678
  <input type="number" min="1" max="100" name="woosw_maximum_wishlists"
679
+ value="<?php echo esc_attr( get_option( 'woosw_maximum_wishlists', '5' ) ); ?>"/>
680
  </td>
681
  </tr>
682
  <tr class="heading">
735
  <th scope="row"><?php esc_html_e( 'Extra class (optional)', 'woo-smart-wishlist' ); ?></th>
736
  <td>
737
  <input type="text" name="woosw_button_class" class="regular-text"
738
+ value="<?php echo esc_attr( get_option( 'woosw_button_class', '' ) ); ?>"/>
739
  <span class="description"><?php esc_html_e( 'Add extra class for action button/link, split by one space.', 'woo-smart-wishlist' ); ?></span>
740
  </td>
741
  </tr>
854
  <td>
855
  <?php $color_default = apply_filters( 'woosw_color_default', '#5fbd74' ); ?>
856
  <input type="text" name="woosw_color"
857
+ value="<?php echo esc_attr( get_option( 'woosw_color', $color_default ) ); ?>"
858
  class="woosw_color_picker"/>
859
  <span class="description"><?php printf( esc_html__( 'Choose the color, default %s', 'woo-smart-wishlist' ), '<code>' . $color_default . '</code>' ); ?></span>
860
  </td>
918
  <th scope="row"><?php esc_html_e( 'Continue shopping link', 'woo-smart-wishlist' ); ?></th>
919
  <td>
920
  <input type="url" name="woosw_continue_url"
921
+ value="<?php echo esc_attr( get_option( 'woosw_continue_url' ) ); ?>"
922
  class="regular-text code"/>
923
  <span class="description"><?php esc_html_e( 'By default, the wishlist popup will only be closed when customers click on the "Continue Shopping" button.', 'woo-smart-wishlist' ); ?></span>
924
  </td>
1030
  $saved_menus = get_option( 'woosw_menus', array() );
1031
 
1032
  foreach ( $nav_menus as $nav_id => $nav_name ) {
1033
+ echo '<input type="checkbox" name="woosw_menus[]" value="' . esc_attr( $nav_id ) . '" ' . ( is_array( $saved_menus ) && in_array( $nav_id, $saved_menus, false ) ? 'checked' : '' ) . '/><label>' . esc_html( $nav_name ) . '</label><br/>';
1034
  }
1035
  ?>
1036
  <span class="description"><?php esc_html_e( 'Choose the menu(s) you want to add the "wishlist menu" at the end.', 'woo-smart-wishlist' ); ?></span>
1510
  </div>
1511
 
1512
  <div class="woosw-item--add">
1513
+ <?php echo do_shortcode( '[add_to_cart style="" show_price="false" id="' . esc_attr( $product_id ) . '"]' ); ?>
1514
  </div>
1515
 
1516
  <?php do_action( 'woosw_wishlist_item_actions', $product, $product_id, $key ); ?>
1566
  }
1567
 
1568
  if ( $selected ) {
1569
+ $menu_item = '<li class="' . esc_attr( apply_filters( 'woosw_menu_item_class', 'menu-item woosw-menu-item menu-item-type-woosw' ) ) . '"><a href="' . esc_url( self::get_url() ) . '"><span class="woosw-menu-item-inner" data-count="' . esc_attr( self::get_count() ) . '">' . esc_html( apply_filters( 'woosw_menu_item_label', self::localization( 'menu_label', esc_html__( 'Wishlist', 'woo-smart-wishlist' ) ) ) ) . '</span></a></li>';
1570
  $items .= apply_filters( 'woosw_menu_item', $menu_item );
1571
  }
1572
 
1621
  </div>
1622
  <div class="woosw-popup-content-bot">
1623
  <div class="woosw-popup-content-bot-inner">
1624
+ <a class="woosw-page" href="<?php echo esc_url( self::get_url( $key, true ) ); ?>">
1625
  <?php echo self::localization( 'open_page', esc_html__( 'Open wishlist page', 'woo-smart-wishlist' ) ); ?>
1626
  </a>
1627
  <span class="woosw-continue"
1801
  function posts_custom_column( $column, $postid ) {
1802
  if ( $column == 'woosw' ) {
1803
  if ( ( $count = (int) get_post_meta( $postid, 'woosw_count', true ) ) > 0 ) {
1804
+ echo '<a href="#" class="woosw_action" data-pid="' . esc_attr( $postid ) . '">' . esc_html( $count ) . '</a>';
1805
  }
1806
  }
1807
  }
1892
 
1893
  if ( ! empty( $key ) && ( $products = get_option( 'woosw_list_' . $key, true ) ) ) {
1894
  if ( is_array( $products ) && ( $count = count( $products ) ) ) {
1895
+ $val = '<a href="#" class="woosw_action" data-key="' . esc_attr( $key ) . '">' . esc_html( $count ) . '</a>';
1896
  }
1897
  }
1898
  }
1919
  $user = $wpdb->get_results( $wpdb->prepare( 'SELECT user_id FROM `' . $wpdb->prefix . 'usermeta` WHERE `meta_key` = "woosw_key" AND `meta_value` = "%s" LIMIT 1', $key ) );
1920
 
1921
  echo '<div class="woosw-quickview-item">';
1922
+ echo '<div class="woosw-quickview-item-image"><a href="' . esc_url( self::get_url( $key, true ) ) . '" target="_blank">#' . $key . '</a></div>';
1923
  echo '<div class="woosw-quickview-item-info">';
1924
 
1925
  if ( ! empty( $user ) ) {
1943
  echo '<div class="woosw-quickview-item">';
1944
  echo '<div class="woosw-quickview-item-image">' . $_product->get_image() . '</div>';
1945
  echo '<div class="woosw-quickview-item-info">';
1946
+ echo '<div class="woosw-quickview-item-title"><a href="' . esc_url( $_product->get_permalink() ) . '" target="_blank">' . $_product->get_name() . '</a></div>';
1947
+ echo '<div class="woosw-quickview-item-data">' . date_i18n( get_option( 'date_format' ), $data['time'] ) . ' <span class="woosw-quickview-item-links">| ID: ' . $pid . ' | <a href="' . get_edit_post_link( $pid ) . '" target="_blank">' . esc_html__( 'Edit', 'woo-smart-wishlist' ) . '</a> | <a href="#" class="woosw_action" data-pid="' . esc_attr( $pid ) . '">' . esc_html__( 'See in wishlist', 'woo-smart-wishlist' ) . '</a></span></div>';
1948
  echo '</div><!-- /woosw-quickview-item-info -->';
1949
  echo '</div><!-- /woosw-quickview-item -->';
1950
  }
1972
  echo '<div class="woosw-quickview-item">';
1973
  echo '<div class="woosw-quickview-item-image">' . $_product->get_image() . '</div>';
1974
  echo '<div class="woosw-quickview-item-info">';
1975
+ echo '<div class="woosw-quickview-item-title"><a href="' . esc_url( $_product->get_permalink() ) . '" target="_blank">' . $_product->get_name() . '</a></div>';
1976
  echo '<div class="woosw-quickview-item-data">ID: ' . $pid . ' | ' . sprintf( _n( '%s wishlist', '%s wishlists', $count, 'woosw' ), number_format_i18n( $count ) ) . ' <span class="woosw-quickview-item-links">| <a href="' . get_edit_post_link( $pid ) . '" target="_blank">' . esc_html__( 'Edit', 'woo-smart-wishlist' ) . '</a></span></div>';
1977
  echo '</div><!-- /woosw-quickview-item-info -->';
1978
  echo '</div><!-- /woosw-quickview-item -->';
1985
  $user = $wpdb->get_results( $wpdb->prepare( 'SELECT user_id FROM `' . $wpdb->prefix . 'usermeta` WHERE `meta_key` = "woosw_key" AND `meta_value` = "%s" LIMIT 1', $key ) );
1986
 
1987
  echo '<div class="woosw-quickview-item">';
1988
+ echo '<div class="woosw-quickview-item-image"><a href="' . esc_url( self::get_url( $key, true ) ) . '" target="_blank">#' . $key . '</a></div>';
1989
  echo '<div class="woosw-quickview-item-info">';
1990
 
1991
  if ( ! empty( $user ) ) {
1994
 
1995
 
1996
  echo '<div class="woosw-quickview-item-title"><a href="' . get_edit_user_link( $user_id ) . '" target="_blank">' . $user_data->user_login . '</a></div>';
1997
+ echo '<div class="woosw-quickview-item-data">' . $user_data->user_email . ' | <a href="#" class="woosw_action" data-key="' . esc_attr( $key ) . '">' . sprintf( _n( '%s product', '%s products', $count, 'woo-smart-wishlist' ), number_format_i18n( $count ) ) . '</a></div>';
1998
  } else {
1999
  echo '<div class="woosw-quickview-item-title">' . esc_html__( 'Guest', 'woo-smart-wishlist' ) . '</div>';
2000
+ echo '<div class="woosw-quickview-item-data"><a href="#" class="woosw_action" data-key="' . esc_attr( $key ) . '">' . sprintf( _n( '%s product', '%s products', $count, 'woo-smart-wishlist' ), number_format_i18n( $count ) ) . '</a></div>';
2001
  }
2002
 
2003
  echo '</div><!-- /woosw-quickview-item-info -->';