Version Description
Release Date - 15 July 2019
- Added wishlist REST API
- Refactored filters and actions
- Prevent plugin network wide activation
- Fixed an issue with deleted products in frontend templates
- Fixed wishlist products query issue on multilingual setup
- TM Product Options plugin integration updated
Download this release
Release Info
Developer | templateinvaders |
Plugin | WooCommerce Wishlist Plugin |
Version | 1.13.0 |
Comparing to | |
See all releases |
Code changes from version 1.12.3 to 1.13.0
- admin/basesection.helper.php +12 -12
- admin/settings/general.class.php +40 -3
- admin/settings/style.class.php +23 -1
- admin/settings/upgrade.class.php +26 -4
- admin/tinvwl.class.php +3 -3
- assets/css/admin.min.css +1 -1
- assets/css/public.min.css +1 -1
- assets/css/theme.min.css +1 -1
- assets/js/admin.min.js +1 -1
- assets/js/public.min.js +1 -1
- changelog.txt +679 -0
- includes/analytics.class.php +0 -1
- includes/api.class.php +54 -0
- includes/api/wishlist.class.php +374 -0
- includes/deprecated.class.php +119 -0
- includes/deprecated/actions.class.php +83 -0
- includes/deprecated/filters.class.php +109 -0
- includes/notice.helper.php +3 -3
- includes/pluginextend.helper.php +604 -604
- includes/product.helper.php +27 -15
- includes/tinvwl.class.php +12 -2
- includes/view.helper.php +2 -2
- includes/viewsection.helper.php +14 -14
- includes/wishlist.class.php +1 -1
- includes/wizard.class.php +2 -2
- languages/ti-woocommerce-wishlist.pot +229 -201
- public/addtowishlist.class.php +23 -23
- public/cart.class.php +0 -1
- public/tinvwl.class.php +8 -9
- public/widget/{topwishlist.class.php → wishlistcounter.class.php} +2 -2
- public/wishlist/buttons.class.php +16 -16
- public/wishlist/social.class.php +1 -1
- public/wishlist/view.class.php +2 -3
- public/wishlistcounter.class.php +4 -7
- readme.txt +35 -628
- templates/ti-addedtowishlist-dialogbox.php +1 -1
- templates/ti-addtowishlist.php +3 -3
- templates/ti-wishlist-user.php +5 -1
- templates/ti-wishlist.php +5 -1
- ti-woocommerce-wishlist.php +253 -253
- tinv-wishlists-function-integration.php +60 -50
- tinv-wishlists-function.php +1 -1
admin/basesection.helper.php
CHANGED
@@ -30,11 +30,11 @@ abstract class TInvWL_Admin_BaseSection extends TInvWL_Admin_Base {
|
|
30 |
* @param string $version Plugin version.
|
31 |
*/
|
32 |
function __construct( $plugin_name, $version ) {
|
33 |
-
$this->_name
|
34 |
$this->_version = $version;
|
35 |
-
$menu
|
36 |
if ( ! empty( $menu ) ) {
|
37 |
-
add_action(
|
38 |
}
|
39 |
$this->load_function();
|
40 |
}
|
@@ -75,7 +75,7 @@ abstract class TInvWL_Admin_BaseSection extends TInvWL_Admin_Base {
|
|
75 |
* General print
|
76 |
*
|
77 |
* @param integer $id Id parameter.
|
78 |
-
* @param string
|
79 |
*/
|
80 |
function _print_general( $id = 0, $cat = '' ) {
|
81 |
$title = $this->menu();
|
@@ -89,10 +89,10 @@ abstract class TInvWL_Admin_BaseSection extends TInvWL_Admin_Base {
|
|
89 |
$method = 'constructor_data';
|
90 |
}
|
91 |
|
92 |
-
$data = apply_filters( "{$
|
93 |
if ( method_exists( $this, $method ) ) {
|
94 |
-
$sections = apply_filters( '
|
95 |
-
$sections = apply_filters( '
|
96 |
$view = new TInvWL_ViewSection( $this->_name, $this->_version );
|
97 |
$view->load_data( $sections );
|
98 |
$method = $cat . '_save';
|
@@ -100,14 +100,14 @@ abstract class TInvWL_Admin_BaseSection extends TInvWL_Admin_Base {
|
|
100 |
$method = 'constructor_save';
|
101 |
}
|
102 |
if ( method_exists( $this, $method ) ) {
|
103 |
-
$this->$method( apply_filters( '
|
104 |
}
|
105 |
$method = $cat . '_load';
|
106 |
if ( ! method_exists( $this, $method ) ) {
|
107 |
$method = 'constructor_load';
|
108 |
}
|
109 |
if ( method_exists( $this, $method ) ) {
|
110 |
-
$view->load_value( apply_filters( '
|
111 |
}
|
112 |
TInvWL_View::render( $view, $view->form_data( $data ) );
|
113 |
} else {
|
@@ -127,7 +127,7 @@ abstract class TInvWL_Admin_BaseSection extends TInvWL_Admin_Base {
|
|
127 |
if ( ! is_array( $sections ) ) {
|
128 |
return $defaults;
|
129 |
}
|
130 |
-
$sections = apply_filters( '
|
131 |
foreach ( $sections as $section ) {
|
132 |
if ( array_key_exists( 'noform', $section ) && $section['noform'] ) {
|
133 |
continue;
|
@@ -160,8 +160,8 @@ abstract class TInvWL_Admin_BaseSection extends TInvWL_Admin_Base {
|
|
160 |
* Form for section
|
161 |
*/
|
162 |
function form() {
|
163 |
-
add_filter(
|
164 |
-
add_filter(
|
165 |
}
|
166 |
|
167 |
/**
|
30 |
* @param string $version Plugin version.
|
31 |
*/
|
32 |
function __construct( $plugin_name, $version ) {
|
33 |
+
$this->_name = $plugin_name;
|
34 |
$this->_version = $version;
|
35 |
+
$menu = $this->menu();
|
36 |
if ( ! empty( $menu ) ) {
|
37 |
+
add_action( 'tinvwl_admin_menu', array( $this, 'adminmenu' ), $this->priority );
|
38 |
}
|
39 |
$this->load_function();
|
40 |
}
|
75 |
* General print
|
76 |
*
|
77 |
* @param integer $id Id parameter.
|
78 |
+
* @param string $cat Category parameter.
|
79 |
*/
|
80 |
function _print_general( $id = 0, $cat = '' ) {
|
81 |
$title = $this->menu();
|
89 |
$method = 'constructor_data';
|
90 |
}
|
91 |
|
92 |
+
$data = apply_filters( "tinvwl_{$cat}_data", $data );
|
93 |
if ( method_exists( $this, $method ) ) {
|
94 |
+
$sections = apply_filters( 'tinvwl_prepare_admsections_' . $method, $this->$method() );
|
95 |
+
$sections = apply_filters( 'tinvwl_prepare_admsections', $sections );
|
96 |
$view = new TInvWL_ViewSection( $this->_name, $this->_version );
|
97 |
$view->load_data( $sections );
|
98 |
$method = $cat . '_save';
|
100 |
$method = 'constructor_save';
|
101 |
}
|
102 |
if ( method_exists( $this, $method ) ) {
|
103 |
+
$this->$method( apply_filters( 'tinvwl_prepare_admsections_' . $method, $view->post_form() ) );
|
104 |
}
|
105 |
$method = $cat . '_load';
|
106 |
if ( ! method_exists( $this, $method ) ) {
|
107 |
$method = 'constructor_load';
|
108 |
}
|
109 |
if ( method_exists( $this, $method ) ) {
|
110 |
+
$view->load_value( apply_filters( 'tinvwl_prepare_admsections_' . $method, $this->$method( $sections ) ) );
|
111 |
}
|
112 |
TInvWL_View::render( $view, $view->form_data( $data ) );
|
113 |
} else {
|
127 |
if ( ! is_array( $sections ) ) {
|
128 |
return $defaults;
|
129 |
}
|
130 |
+
$sections = apply_filters( 'tinvwl_prepare_admsections', $sections );
|
131 |
foreach ( $sections as $section ) {
|
132 |
if ( array_key_exists( 'noform', $section ) && $section['noform'] ) {
|
133 |
continue;
|
160 |
* Form for section
|
161 |
*/
|
162 |
function form() {
|
163 |
+
add_filter( 'tinvwl_section_before', array( $this, 'start_form' ) );
|
164 |
+
add_filter( 'tinvwl_section_after', array( $this, 'end_form' ) );
|
165 |
}
|
166 |
|
167 |
/**
|
admin/settings/general.class.php
CHANGED
@@ -24,6 +24,41 @@ class TInvWL_Admin_Settings_General extends TInvWL_Admin_BaseSection {
|
|
24 |
*/
|
25 |
public $priority = 20;
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
/**
|
28 |
* Menu array
|
29 |
*
|
@@ -59,7 +94,6 @@ class TInvWL_Admin_Settings_General extends TInvWL_Admin_BaseSection {
|
|
59 |
* @return array
|
60 |
*/
|
61 |
function constructor_data() {
|
62 |
-
add_action( $this->_name . '_section_before', array( $this, 'premium_features' ), 9 );
|
63 |
$lists = get_pages( array( 'number' => 999999 ) ); // @codingStandardsIgnoreLine WordPress.VIP.RestrictedFunctions.get_pages
|
64 |
$page_list = array( '' => '' );
|
65 |
$menus = $this->get_wp_menus();
|
@@ -159,7 +193,7 @@ class TInvWL_Admin_Settings_General extends TInvWL_Admin_BaseSection {
|
|
159 |
),
|
160 |
array(
|
161 |
'type' => 'text',
|
162 |
-
'name' => '
|
163 |
'text' => __( '"View Wishlist" button Text', 'ti-woocommerce-wishlist' ),
|
164 |
'std' => 'View Wishlist',
|
165 |
'class' => 'tiwl-button-show-notice',
|
@@ -878,6 +912,9 @@ class TInvWL_Admin_Settings_General extends TInvWL_Admin_BaseSection {
|
|
878 |
* Show Premium Features sections
|
879 |
*/
|
880 |
function premium_features() {
|
881 |
-
|
|
|
|
|
|
|
882 |
}
|
883 |
}
|
24 |
*/
|
25 |
public $priority = 20;
|
26 |
|
27 |
+
/**
|
28 |
+
* This class
|
29 |
+
*
|
30 |
+
* @var \TInvWL_Admin_Settings_General
|
31 |
+
*/
|
32 |
+
protected static $_instance = null;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Get this class object
|
36 |
+
*
|
37 |
+
* @param string $plugin_name Plugin name.
|
38 |
+
*
|
39 |
+
* @return \TInvWL_Admin_Settings_General
|
40 |
+
*/
|
41 |
+
public static function instance( $plugin_name = TINVWL_PREFIX, $plugin_version = TINVWL_FVERSION ) {
|
42 |
+
if ( is_null( self::$_instance ) ) {
|
43 |
+
self::$_instance = new self( $plugin_name, $plugin_version );
|
44 |
+
}
|
45 |
+
|
46 |
+
return self::$_instance;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Constructor
|
51 |
+
*
|
52 |
+
* @param string $plugin_name Plugin name.
|
53 |
+
* @param string $version Plugin version.
|
54 |
+
*/
|
55 |
+
function __construct( $plugin_name, $version ) {
|
56 |
+
$this->_name = $plugin_name;
|
57 |
+
$this->_version = $version;
|
58 |
+
parent::__construct( $plugin_name, $version );
|
59 |
+
add_action( 'tinvwl_section_before', array( $this, 'premium_features' ), 9 );
|
60 |
+
}
|
61 |
+
|
62 |
/**
|
63 |
* Menu array
|
64 |
*
|
94 |
* @return array
|
95 |
*/
|
96 |
function constructor_data() {
|
|
|
97 |
$lists = get_pages( array( 'number' => 999999 ) ); // @codingStandardsIgnoreLine WordPress.VIP.RestrictedFunctions.get_pages
|
98 |
$page_list = array( '' => '' );
|
99 |
$menus = $this->get_wp_menus();
|
193 |
),
|
194 |
array(
|
195 |
'type' => 'text',
|
196 |
+
'name' => 'text_t',
|
197 |
'text' => __( '"View Wishlist" button Text', 'ti-woocommerce-wishlist' ),
|
198 |
'std' => 'View Wishlist',
|
199 |
'class' => 'tiwl-button-show-notice',
|
912 |
* Show Premium Features sections
|
913 |
*/
|
914 |
function premium_features() {
|
915 |
+
global $current_screen;
|
916 |
+
if ( is_object( $current_screen ) && 'toplevel_page_tinvwl' === $current_screen->id ) {
|
917 |
+
TInvWL_View::view( 'premium-features' );
|
918 |
+
}
|
919 |
}
|
920 |
}
|
admin/settings/style.class.php
CHANGED
@@ -24,6 +24,28 @@ class TInvWL_Admin_Settings_Style extends TInvWL_Admin_BaseStyle {
|
|
24 |
*/
|
25 |
public $priority = 100;
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
/**
|
28 |
* Menu array
|
29 |
*
|
@@ -45,7 +67,7 @@ class TInvWL_Admin_Settings_Style extends TInvWL_Admin_BaseStyle {
|
|
45 |
* @return array
|
46 |
*/
|
47 |
function default_style_settings() {
|
48 |
-
$font_family = apply_filters( '
|
49 |
'inherit' => __( 'Use Default Font', 'ti-woocommerce-wishlist' ),
|
50 |
'Georgia, serif' => 'Georgia',
|
51 |
"'Times New Roman', Times, serif" => 'Times New Roman, Times',
|
24 |
*/
|
25 |
public $priority = 100;
|
26 |
|
27 |
+
/**
|
28 |
+
* This class
|
29 |
+
*
|
30 |
+
* @var \TInvWL_Admin_Settings_Style
|
31 |
+
*/
|
32 |
+
protected static $_instance = null;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Get this class object
|
36 |
+
*
|
37 |
+
* @param string $plugin_name Plugin name.
|
38 |
+
*
|
39 |
+
* @return \TInvWL_Admin_Settings_Style
|
40 |
+
*/
|
41 |
+
public static function instance( $plugin_name = TINVWL_PREFIX, $plugin_version = TINVWL_FVERSION ) {
|
42 |
+
if ( is_null( self::$_instance ) ) {
|
43 |
+
self::$_instance = new self( $plugin_name, $plugin_version );
|
44 |
+
}
|
45 |
+
|
46 |
+
return self::$_instance;
|
47 |
+
}
|
48 |
+
|
49 |
/**
|
50 |
* Menu array
|
51 |
*
|
67 |
* @return array
|
68 |
*/
|
69 |
function default_style_settings() {
|
70 |
+
$font_family = apply_filters( 'tinvwl_prepare_fonts', array(
|
71 |
'inherit' => __( 'Use Default Font', 'ti-woocommerce-wishlist' ),
|
72 |
'Georgia, serif' => 'Georgia',
|
73 |
"'Times New Roman', Times, serif" => 'Times New Roman, Times',
|
admin/settings/upgrade.class.php
CHANGED
@@ -24,6 +24,28 @@ class TInvWL_Admin_Settings_Upgrade extends TInvWL_Admin_BaseSection {
|
|
24 |
*/
|
25 |
public $priority = 200;
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
/**
|
28 |
* Menu array
|
29 |
*
|
@@ -31,10 +53,10 @@ class TInvWL_Admin_Settings_Upgrade extends TInvWL_Admin_BaseSection {
|
|
31 |
*/
|
32 |
function menu() {
|
33 |
return array(
|
34 |
-
'title'
|
35 |
-
|
36 |
-
'method'
|
37 |
-
'slug'
|
38 |
'capability' => 'tinvwl_upgrade',
|
39 |
);
|
40 |
}
|
24 |
*/
|
25 |
public $priority = 200;
|
26 |
|
27 |
+
/**
|
28 |
+
* This class
|
29 |
+
*
|
30 |
+
* @var \TInvWL_Admin_Settings_Upgrade
|
31 |
+
*/
|
32 |
+
protected static $_instance = null;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Get this class object
|
36 |
+
*
|
37 |
+
* @param string $plugin_name Plugin name.
|
38 |
+
*
|
39 |
+
* @return \TInvWL_Admin_Settings_Upgrade
|
40 |
+
*/
|
41 |
+
public static function instance( $plugin_name = TINVWL_PREFIX, $plugin_version = TINVWL_FVERSION ) {
|
42 |
+
if ( is_null( self::$_instance ) ) {
|
43 |
+
self::$_instance = new self( $plugin_name, $plugin_version );
|
44 |
+
}
|
45 |
+
|
46 |
+
return self::$_instance;
|
47 |
+
}
|
48 |
+
|
49 |
/**
|
50 |
* Menu array
|
51 |
*
|
53 |
*/
|
54 |
function menu() {
|
55 |
return array(
|
56 |
+
'title' => __( 'Upgrade to Premium', 'ti-woocommerce-wishlist' ),
|
57 |
+
'page_title' => __( 'Premium Features', 'ti-woocommerce-wishlist' ),
|
58 |
+
'method' => array( $this, '_print_' ),
|
59 |
+
'slug' => 'upgrade',
|
60 |
'capability' => 'tinvwl_upgrade',
|
61 |
);
|
62 |
}
|
admin/tinvwl.class.php
CHANGED
@@ -55,7 +55,7 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base {
|
|
55 |
if ( preg_match( '/\.class\.php$/i', $value ) ) {
|
56 |
$file = preg_replace( '/\.class\.php$/i', '', $value );
|
57 |
$class = 'TInvWL_Admin_Settings_' . ucfirst( $file );
|
58 |
-
|
59 |
}
|
60 |
}
|
61 |
|
@@ -127,7 +127,7 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base {
|
|
127 |
$page = add_menu_page( 'TI Wishlist', 'TI Wishlist', 'tinvwl_general_settings', $this->_name, null, TINVWL_URL . 'assets/img/icon_menu.png', '55.888' );
|
128 |
add_action( "load-$page", array( $this, 'onload' ) );
|
129 |
add_action( 'admin_enqueue_scripts', array( $this, 'add_inline_scripts' ) );
|
130 |
-
$menu = apply_filters(
|
131 |
foreach ( $menu as $item ) {
|
132 |
if ( ! array_key_exists( 'page_title', $item ) ) {
|
133 |
$item['page_title'] = $item['title'];
|
@@ -163,7 +163,7 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base {
|
|
163 |
add_filter( 'admin_footer_text', array( $this, 'footer_admin' ) );
|
164 |
add_filter( 'screen_options_show_screen', array( $this, 'screen_options_hide_screen' ), 10, 2 );
|
165 |
|
166 |
-
add_filter(
|
167 |
}
|
168 |
|
169 |
/**
|
55 |
if ( preg_match( '/\.class\.php$/i', $value ) ) {
|
56 |
$file = preg_replace( '/\.class\.php$/i', '', $value );
|
57 |
$class = 'TInvWL_Admin_Settings_' . ucfirst( $file );
|
58 |
+
$class::instance( $this->_name, $this->_version );
|
59 |
}
|
60 |
}
|
61 |
|
127 |
$page = add_menu_page( 'TI Wishlist', 'TI Wishlist', 'tinvwl_general_settings', $this->_name, null, TINVWL_URL . 'assets/img/icon_menu.png', '55.888' );
|
128 |
add_action( "load-$page", array( $this, 'onload' ) );
|
129 |
add_action( 'admin_enqueue_scripts', array( $this, 'add_inline_scripts' ) );
|
130 |
+
$menu = apply_filters( 'tinvwl_admin_menu', array() );
|
131 |
foreach ( $menu as $item ) {
|
132 |
if ( ! array_key_exists( 'page_title', $item ) ) {
|
133 |
$item['page_title'] = $item['title'];
|
163 |
add_filter( 'admin_footer_text', array( $this, 'footer_admin' ) );
|
164 |
add_filter( 'screen_options_show_screen', array( $this, 'screen_options_hide_screen' ), 10, 2 );
|
165 |
|
166 |
+
add_filter( 'tinvwl_view_panelstatus', array( $this, 'status_panel' ), 9999 );
|
167 |
}
|
168 |
|
169 |
/**
|
assets/css/admin.min.css
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/**
|
2 |
* TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
|
3 |
-
* @version 1.
|
4 |
* @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
|
5 |
*/
|
6 |
@font-face{font-family:'tinvwl-webfont';src:url("../fonts/tinvwl-webfont.eot?xu2uyi");src:url("../fonts/tinvwl-webfont.eot?xu2uyi#iefix") format("embedded-opentype"),url("../fonts/tinvwl-webfont.ttf?xu2uyi") format("truetype"),url("../fonts/tinvwl-webfont.woff?xu2uyi") format("woff"),url("../fonts/tinvwl-webfont.svg?xu2uyi#tinvwl-webfont") format("svg");font-weight:normal;font-style:normal}
|
1 |
/**
|
2 |
* TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
|
3 |
+
* @version 1.13.0
|
4 |
* @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
|
5 |
*/
|
6 |
@font-face{font-family:'tinvwl-webfont';src:url("../fonts/tinvwl-webfont.eot?xu2uyi");src:url("../fonts/tinvwl-webfont.eot?xu2uyi#iefix") format("embedded-opentype"),url("../fonts/tinvwl-webfont.ttf?xu2uyi") format("truetype"),url("../fonts/tinvwl-webfont.woff?xu2uyi") format("woff"),url("../fonts/tinvwl-webfont.svg?xu2uyi#tinvwl-webfont") format("svg");font-weight:normal;font-style:normal}
|
assets/css/public.min.css
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/**
|
2 |
* TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
|
3 |
-
* @version 1.
|
4 |
* @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
|
5 |
*/
|
6 |
@font-face{font-family:'tinvwl-webfont';src:url("../fonts/tinvwl-webfont.eot?xu2uyi");src:url("../fonts/tinvwl-webfont.eot?xu2uyi#iefix") format("embedded-opentype"),url("../fonts/tinvwl-webfont.ttf?xu2uyi") format("truetype"),url("../fonts/tinvwl-webfont.woff?xu2uyi") format("woff"),url("../fonts/tinvwl-webfont.svg?xu2uyi#tinvwl-webfont") format("svg");font-weight:normal;font-style:normal}
|
1 |
/**
|
2 |
* TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
|
3 |
+
* @version 1.13.0
|
4 |
* @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
|
5 |
*/
|
6 |
@font-face{font-family:'tinvwl-webfont';src:url("../fonts/tinvwl-webfont.eot?xu2uyi");src:url("../fonts/tinvwl-webfont.eot?xu2uyi#iefix") format("embedded-opentype"),url("../fonts/tinvwl-webfont.ttf?xu2uyi") format("truetype"),url("../fonts/tinvwl-webfont.woff?xu2uyi") format("woff"),url("../fonts/tinvwl-webfont.svg?xu2uyi#tinvwl-webfont") format("svg");font-weight:normal;font-style:normal}
|
assets/css/theme.min.css
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/**
|
2 |
* TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
|
3 |
-
* @version 1.
|
4 |
* @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
|
5 |
*/
|
6 |
.tinv-wishlist,.tinv-wishlist input,.tinv-wishlist select,.tinv-wishlist textarea,.tinv-wishlist button,.tinv-wishlist input[type="button"],.tinv-wishlist input[type="reset"],.tinv-wishlist input[type="submit"]{font-family:Georgia,serif;font-size:14px;font-weight:400;text-transform:none;line-height:1.75}
|
1 |
/**
|
2 |
* TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
|
3 |
+
* @version 1.13.0
|
4 |
* @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
|
5 |
*/
|
6 |
.tinv-wishlist,.tinv-wishlist input,.tinv-wishlist select,.tinv-wishlist textarea,.tinv-wishlist button,.tinv-wishlist input[type="button"],.tinv-wishlist input[type="reset"],.tinv-wishlist input[type="submit"]{font-family:Georgia,serif;font-size:14px;font-weight:400;text-transform:none;line-height:1.75}
|
assets/js/admin.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/**
|
2 |
* TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
|
3 |
-
* @version 1.
|
4 |
* @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
|
5 |
*/
|
6 |
"use strict";function TInvWL($,h){this.pf="tinvwl",this.g="_",this.ho=h||!1,this.n="TInvWL",this.aj_act=function(t){return[this.pf,t].join(this.g)},this._csel=function(t,n){return"{0}{1}{2}".format(n=n||".",this.pf,t)},this._tm=function(t){var n=$("script#{0}[type='text/template']".format(t));return n.length?n.html():""},this.formElm=function(){if($(this._csel("-form-onoff")).tiwl_onoff(),$("input[type=checkbox][tiwl-show], input[type=checkbox][tiwl-hide]").tiwl_onoffblock(),$("[tiwl-value][tiwl-show], [tiwl-value][tiwl-hide]").tiwl_byvalueblock(),void 0!==$.fn.wpColorPicker){var e=function(t){var n=t.substring(1),i=parseInt(n,16);return.2126*(i>>16&255)+.7152*(i>>8&255)+.0722*(i>>0&255)},n=this._csel("-form-color");$(n).each(function(){var n=$(this),t=$(this).closest(".tinvwl-color-picker"),i=t.find(".tinvwl-eyedropper");n.css("background-color",n.val()),175<e(n.val())&&n.css("color","#000000"),n.iris({mode:"hsv",target:$(this).parent().parent(),change:function(t,n){175<e(n.color.toCSS())?$(this).css("color","#000000"):$(this).css("color",""),$(this).css("background-color",n.color.toCSS())}}),t.on("click",".iris-square-value",function(t){t.preventDefault(),n.iris("toggle")}),i.on("click",function(t){t.preventDefault(),n.iris("show")}),n.on("focusin",function(){n.iris("show")})}),$(document).on("click",function(t){$(t.target).is(n+", .iris-picker, .iris-picker-inner, .iris-slider-offset, .tinvwl-eyedropper, .tinvwl-eyedropper .ftinvwl-eyedropper")?$(n).not($(t.target).closest(".tinvwl-color-picker").find(n)).iris("hide"):$(n).iris("hide")})}},this.wizard_page=function(t){$(t).find("select").change(this._wizard_page_ch),this.wizard_page_ch($(t).find("select"))},this.wizard_page_ch=function(t){var n=(t=$(t)).parent(this._csel("-page-select")),i=n.find("input[type=hidden]").val(),e=n.find(this._csel("-error-icon")),o=n.find(this._csel("-error-desc"));""!==t.val()?(n.removeClass("tinvwl-error"),e.hide(),o.hide()):0==i&&(n.addClass("tinvwl-error"),e.show(),o.show())},this.pageElm=function(){$(this._csel("-header","div.")).prependTo("#wpbody-content"),$(this._csel("-page-select")).each(this._wizard_page),$(".bulkactions [type=submit]").each(this._control_bulkactions),$(".action-search [type=submit]").each(this._control_search)},this.control_bulkactions=function(t){$(t).on("click",this._control_bulkactions_ck)},this.control_bulkactions_ck=function(t,n){var i=(t=$(t)).parents(".bulkactions").eq(0).find("[name=action]"),e=t.parents("form").eq(0);i&&("-1"===i.val()?n.preventDefault():e.find("input[type=checkbox]:checked").length||n.preventDefault())},this.control_search=function(t){$(t).on("click",this._control_search_ck)},this.control_search_ck=function(t,n){var i=(t=$(t)).parents(".action-search").eq(0).find("[name=s]");i&&""===i.val()&&n.preventDefault()},this.Run=function(){this.formElm(),this.pageElm()},this.cg=function(){var t=this.n;if(this.ho){var n=new Date;t=t+n.getFullYear()+n.getMonth()+n.getDate()}window[t]=this},this.cg(),String.prototype.format||(String.prototype.format=function(){var i=arguments;return this.replace(/{(\d+)}/g,function(t,n){return void 0!==i[n]?i[n]:t})}),function(o){var n=o.n,ho=o.ho,c="";for(var i in ho&&(c="t=new Date(),n=n+t.getFullYear()+t.getMonth()+t.getDate(),"),o)"function"!=typeof o[i]||"_"===i[0]||o.hasOwnProperty("_"+i)||eval("o._"+i+"=function(a,b,c,d){var n='"+n+"',"+c+"o=window[n]||null;if (o) {return o."+i+"(this,a,b,c,d);};};")}(this)}!function(s){s.fn.tiwl_onoff=function(t){var o=s.extend(!0,{},{value:{on:"",off:""},class:"tiwlform-onoff",wrap:"container",button:"button"},t);return s(this).each(function(){var n=s(this),t=s("<div>").attr({class:o.class+"-"+o.button}),i=o.class+"-"+o.wrap,e=s("<div>").attr({id:n.attr("id")+"_"+o.wrap,class:i});return n.is("input")&&(e.attr("class",e.attr("class")+" "+n.attr("class")),n.is(":disabled")&&(e.toggleClass("disabled",n.is(":disabled")),n.prop("disabled",!1)),e.toggleClass("checked",n.is(":checked")),n.attr("type","checkbox").hide().removeAttr("class").wrap(e).before(t),e=n.parent(),n.on("change",function(t){if(e.hasClass("disabled"))return t.preventDefault();e.toggleClass("checked",s(this).is(":checked"))}),e.on("click",function(t){if(e.hasClass("disabled"))return t.preventDefault();n.is(":enabled")&&e.hasClass("checked")===n.is(":checked")&&n.click()})),n})},s.fn.tiwl_onoffblock=function(t){var n={onEachElm:function(){},isChecked:function(){return s(this).is(":checked")}},c=s.extend(!0,{},n,t);return s(this).each(function(){var t=s(this),n=function(){var t=s(this),n=t.attr("tiwl-show"),i=t.attr("tiwl-hide"),e=c.isChecked.call(t),o=function(t,i){t=t.match(/[\w\d-\>\.\#\:\=\[\]]+/gim)||[],s.each(t,function(t,n){c.onEachElm.call(s(n).toggle(i))})};return"string"==typeof n&&o(n,e),"string"==typeof i&&o(i,!e),t};return t.is("input")&&"checkbox"==t.attr("type")?(s(this).on("change",n),n.call(t)):t})},s.fn.tiwl_byvalueblock=function(t){var n={onEachElm:function(){},onClick:function(){return s(this).val()==s(this).attr("tiwl-value")}},i=s.extend(!0,{},n,t);return s(this).each(function(){var t=s(this),n=function(e){var t=s(this),n=t.attr("tiwl-show"),i=t.attr("tiwl-hide"),o=e.onClick.call(t),c=function(t,i){t=t.match(/[\w\d-\>\.\#\:\=\[\]]+/gim)||[],s.each(t,function(t,n){e.onEachElm.call(s(n).toggle(i))})};return"string"==typeof n&&c(n,o),"string"==typeof i&&c(i,!o),t};return t.is("input")||t.is("select")?(s(this).on("change",function(){n.call(this,i)}),n.call(t,i)):t})};var n=new TInvWL(s);s(document).ready(function(){if(n.Run(),jQuery('input[name="general-show_notice"]').change(function(){var t=!jQuery(this).is(":checked"),n=jQuery('input[name="general-redirect_require_login"]');t&&!n.is(":checked")&&n.click().trigger("change"),n.closest(".tiwlform-onoff-container").toggleClass("disabled",t)}).change(),s(".tablenav").each(function(){var t=s(this);s.trim(t.find(".alignleft").html()).length||t.find(".alignleft").remove(),s.trim(t.find(".alignright").html()).length&&!t.find(".tablenav-pages").hasClass("one-page")||(t.find(".alignright").remove(),t.find(".tinv-wishlist-clear").remove()),s.trim(t.html()).length||t.remove()}),s(".tablenav .bulkactions select").addClass("tinvwl-select grey").wrap('<span class="tinvwl-select-wrap">').parent().append('<span class="tinvwl-caret"><span></span></span>'),s(".tablenav .bulkactions .button.action, .tablenav #search-submit").removeClass("button").addClass("tinvwl-btn grey"),s(".tinvwl-modal-btn").on("click",function(){s(this).next(".tinvwl-modal").addClass("tinvwl-modal-open")}),s(".tinvwl-overlay, .tinvwl-close-modal, .tinvwl_button_close").on("click",function(t){t.preventDefault(),s(this).parents(".tinvwl-modal:first").removeClass("tinvwl-modal-open")}),void 0!==s.fn.popover){var t=s(".tinvwl-help");t.popover({content:function(){return s(this).closest(".tinvwl-info-wrap").find(".tinvwl-info-desc").html()}}),t.on("click",function(){s(this).popover("toggle")}),t.on("focusout",function(){s(this).popover("hide")}),s(window).on("resize",function(){t.popover("hide")})}s("body").on("click",".tinvwl-confirm-reset",function(t){t.preventDefault(),confirm(tinvwl_comfirm.text_comfirm_reset)&&s(this).removeClass("tinvwl-confirm-reset").trigger("click")})})}(jQuery);
|
1 |
/**
|
2 |
* TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
|
3 |
+
* @version 1.13.0
|
4 |
* @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
|
5 |
*/
|
6 |
"use strict";function TInvWL($,h){this.pf="tinvwl",this.g="_",this.ho=h||!1,this.n="TInvWL",this.aj_act=function(t){return[this.pf,t].join(this.g)},this._csel=function(t,n){return"{0}{1}{2}".format(n=n||".",this.pf,t)},this._tm=function(t){var n=$("script#{0}[type='text/template']".format(t));return n.length?n.html():""},this.formElm=function(){if($(this._csel("-form-onoff")).tiwl_onoff(),$("input[type=checkbox][tiwl-show], input[type=checkbox][tiwl-hide]").tiwl_onoffblock(),$("[tiwl-value][tiwl-show], [tiwl-value][tiwl-hide]").tiwl_byvalueblock(),void 0!==$.fn.wpColorPicker){var e=function(t){var n=t.substring(1),i=parseInt(n,16);return.2126*(i>>16&255)+.7152*(i>>8&255)+.0722*(i>>0&255)},n=this._csel("-form-color");$(n).each(function(){var n=$(this),t=$(this).closest(".tinvwl-color-picker"),i=t.find(".tinvwl-eyedropper");n.css("background-color",n.val()),175<e(n.val())&&n.css("color","#000000"),n.iris({mode:"hsv",target:$(this).parent().parent(),change:function(t,n){175<e(n.color.toCSS())?$(this).css("color","#000000"):$(this).css("color",""),$(this).css("background-color",n.color.toCSS())}}),t.on("click",".iris-square-value",function(t){t.preventDefault(),n.iris("toggle")}),i.on("click",function(t){t.preventDefault(),n.iris("show")}),n.on("focusin",function(){n.iris("show")})}),$(document).on("click",function(t){$(t.target).is(n+", .iris-picker, .iris-picker-inner, .iris-slider-offset, .tinvwl-eyedropper, .tinvwl-eyedropper .ftinvwl-eyedropper")?$(n).not($(t.target).closest(".tinvwl-color-picker").find(n)).iris("hide"):$(n).iris("hide")})}},this.wizard_page=function(t){$(t).find("select").change(this._wizard_page_ch),this.wizard_page_ch($(t).find("select"))},this.wizard_page_ch=function(t){var n=(t=$(t)).parent(this._csel("-page-select")),i=n.find("input[type=hidden]").val(),e=n.find(this._csel("-error-icon")),o=n.find(this._csel("-error-desc"));""!==t.val()?(n.removeClass("tinvwl-error"),e.hide(),o.hide()):0==i&&(n.addClass("tinvwl-error"),e.show(),o.show())},this.pageElm=function(){$(this._csel("-header","div.")).prependTo("#wpbody-content"),$(this._csel("-page-select")).each(this._wizard_page),$(".bulkactions [type=submit]").each(this._control_bulkactions),$(".action-search [type=submit]").each(this._control_search)},this.control_bulkactions=function(t){$(t).on("click",this._control_bulkactions_ck)},this.control_bulkactions_ck=function(t,n){var i=(t=$(t)).parents(".bulkactions").eq(0).find("[name=action]"),e=t.parents("form").eq(0);i&&("-1"===i.val()?n.preventDefault():e.find("input[type=checkbox]:checked").length||n.preventDefault())},this.control_search=function(t){$(t).on("click",this._control_search_ck)},this.control_search_ck=function(t,n){var i=(t=$(t)).parents(".action-search").eq(0).find("[name=s]");i&&""===i.val()&&n.preventDefault()},this.Run=function(){this.formElm(),this.pageElm()},this.cg=function(){var t=this.n;if(this.ho){var n=new Date;t=t+n.getFullYear()+n.getMonth()+n.getDate()}window[t]=this},this.cg(),String.prototype.format||(String.prototype.format=function(){var i=arguments;return this.replace(/{(\d+)}/g,function(t,n){return void 0!==i[n]?i[n]:t})}),function(o){var n=o.n,ho=o.ho,c="";for(var i in ho&&(c="t=new Date(),n=n+t.getFullYear()+t.getMonth()+t.getDate(),"),o)"function"!=typeof o[i]||"_"===i[0]||o.hasOwnProperty("_"+i)||eval("o._"+i+"=function(a,b,c,d){var n='"+n+"',"+c+"o=window[n]||null;if (o) {return o."+i+"(this,a,b,c,d);};};")}(this)}!function(s){s.fn.tiwl_onoff=function(t){var o=s.extend(!0,{},{value:{on:"",off:""},class:"tiwlform-onoff",wrap:"container",button:"button"},t);return s(this).each(function(){var n=s(this),t=s("<div>").attr({class:o.class+"-"+o.button}),i=o.class+"-"+o.wrap,e=s("<div>").attr({id:n.attr("id")+"_"+o.wrap,class:i});return n.is("input")&&(e.attr("class",e.attr("class")+" "+n.attr("class")),n.is(":disabled")&&(e.toggleClass("disabled",n.is(":disabled")),n.prop("disabled",!1)),e.toggleClass("checked",n.is(":checked")),n.attr("type","checkbox").hide().removeAttr("class").wrap(e).before(t),e=n.parent(),n.on("change",function(t){if(e.hasClass("disabled"))return t.preventDefault();e.toggleClass("checked",s(this).is(":checked"))}),e.on("click",function(t){if(e.hasClass("disabled"))return t.preventDefault();n.is(":enabled")&&e.hasClass("checked")===n.is(":checked")&&n.click()})),n})},s.fn.tiwl_onoffblock=function(t){var n={onEachElm:function(){},isChecked:function(){return s(this).is(":checked")}},c=s.extend(!0,{},n,t);return s(this).each(function(){var t=s(this),n=function(){var t=s(this),n=t.attr("tiwl-show"),i=t.attr("tiwl-hide"),e=c.isChecked.call(t),o=function(t,i){t=t.match(/[\w\d-\>\.\#\:\=\[\]]+/gim)||[],s.each(t,function(t,n){c.onEachElm.call(s(n).toggle(i))})};return"string"==typeof n&&o(n,e),"string"==typeof i&&o(i,!e),t};return t.is("input")&&"checkbox"==t.attr("type")?(s(this).on("change",n),n.call(t)):t})},s.fn.tiwl_byvalueblock=function(t){var n={onEachElm:function(){},onClick:function(){return s(this).val()==s(this).attr("tiwl-value")}},i=s.extend(!0,{},n,t);return s(this).each(function(){var t=s(this),n=function(e){var t=s(this),n=t.attr("tiwl-show"),i=t.attr("tiwl-hide"),o=e.onClick.call(t),c=function(t,i){t=t.match(/[\w\d-\>\.\#\:\=\[\]]+/gim)||[],s.each(t,function(t,n){e.onEachElm.call(s(n).toggle(i))})};return"string"==typeof n&&c(n,o),"string"==typeof i&&c(i,!o),t};return t.is("input")||t.is("select")?(s(this).on("change",function(){n.call(this,i)}),n.call(t,i)):t})};var n=new TInvWL(s);s(document).ready(function(){if(n.Run(),jQuery('input[name="general-show_notice"]').change(function(){var t=!jQuery(this).is(":checked"),n=jQuery('input[name="general-redirect_require_login"]');t&&!n.is(":checked")&&n.click().trigger("change"),n.closest(".tiwlform-onoff-container").toggleClass("disabled",t)}).change(),s(".tablenav").each(function(){var t=s(this);s.trim(t.find(".alignleft").html()).length||t.find(".alignleft").remove(),s.trim(t.find(".alignright").html()).length&&!t.find(".tablenav-pages").hasClass("one-page")||(t.find(".alignright").remove(),t.find(".tinv-wishlist-clear").remove()),s.trim(t.html()).length||t.remove()}),s(".tablenav .bulkactions select").addClass("tinvwl-select grey").wrap('<span class="tinvwl-select-wrap">').parent().append('<span class="tinvwl-caret"><span></span></span>'),s(".tablenav .bulkactions .button.action, .tablenav #search-submit").removeClass("button").addClass("tinvwl-btn grey"),s(".tinvwl-modal-btn").on("click",function(){s(this).next(".tinvwl-modal").addClass("tinvwl-modal-open")}),s(".tinvwl-overlay, .tinvwl-close-modal, .tinvwl_button_close").on("click",function(t){t.preventDefault(),s(this).parents(".tinvwl-modal:first").removeClass("tinvwl-modal-open")}),void 0!==s.fn.popover){var t=s(".tinvwl-help");t.popover({content:function(){return s(this).closest(".tinvwl-info-wrap").find(".tinvwl-info-desc").html()}}),t.on("click",function(){s(this).popover("toggle")}),t.on("focusout",function(){s(this).popover("hide")}),s(window).on("resize",function(){t.popover("hide")})}s("body").on("click",".tinvwl-confirm-reset",function(t){t.preventDefault(),confirm(tinvwl_comfirm.text_comfirm_reset)&&s(this).removeClass("tinvwl-confirm-reset").trigger("click")})})}(jQuery);
|
assets/js/public.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/**
|
2 |
* TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
|
3 |
-
* @version 1.
|
4 |
* @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
|
5 |
*/
|
6 |
"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function update_cart_hash(){if(!tinvwl_add_to_wishlist.wc_cart_fragments_refresh)return!1;jQuery(document.body).on("wc_fragments_loaded.wishlist wc_fragments_refreshed.wishlist",function(){if("undefined"==typeof wc_cart_fragments_params)return!1;var t=wc_cart_fragments_params.cart_hash_key;localStorage.setItem(t,localStorage.getItem(t)+(new Date).getTime()),sessionStorage.setItem(t,sessionStorage.getItem(t)+(new Date).getTime()),jQuery(document.body).off("wc_fragments_loaded.wishlist wc_fragments_refreshed.wishlist")})}function showTooltip(t,i){t.setAttribute("class","social social-clipboard tooltipped tooltipped-s"),t.setAttribute("aria-label",i)}function clearTooltip(t){t.currentTarget.setAttribute("class","social social-clipboard "),t.currentTarget.removeAttribute("aria-label")}!function(r){r.fn.tinvwl_to_wishlist=function(t){var i={api_url:window.location.href,text_create:window.tinvwl_add_to_wishlist.text_create,text_already_in:window.tinvwl_add_to_wishlist.text_already_in,class:{dialogbox:".tinvwl_add_to_select_wishlist",select:".tinvwl_wishlist",newtitle:".tinvwl_new_input",dialogbutton:".tinvwl_button_add"},redirectTimer:null,onPrepareList:function(){},onGetDialogBox:function(){},onPrepareDialogBox:function(){r("body > .tinv-wishlist").length||r("body").append(r("<div>").addClass("tinv-wishlist")),r(this).appendTo("body > .tinv-wishlist")},onCreateWishList:function(t){r(this).append(r("<option>").html(t.title).val(t.ID).toggleClass("tinv_in_wishlist",t.in))},onSelectWishList:function(){},onDialogShow:function(t){r(t).addClass("tinv-modal-open"),r(t).removeClass("ftinvwl-pulse")},onDialogHide:function(t){r(t).removeClass("tinv-modal-open"),r(t).removeClass("ftinvwl-pulse")},onInited:function(){},onClick:function(){if(r(this).is(".disabled-add-wishlist"))return!1;r(this).is(".ftinvwl-animated")&&r(this).addClass("ftinvwl-pulse"),this.tinvwl_dialog?this.tinvwl_dialog.show_list.call(this):o.onActionProduct.call(this),update_cart_hash()},onPrepareDataAction:function(t,i){r("body").trigger("tinvwl_wishlist_button_clicked",[t,i])},filterProductAlreadyIn:function(t){t=t||[];var n={};return r("form.cart[method=post], .woocommerce-variation-add-to-cart").find("input, select").each(function(){var t=r(this).attr("name"),i=r(this).attr("type"),e=r(this).val();"checkbox"===i||"radio"===i?r(this).is(":checked")&&(n["form"+t]=e):n["form"+t]=e}),n=n.formvariation_id,t.filter(function(t){if("object"!==_typeof(t.in)||"string"!=typeof n)return t.in;var i=parseInt(n);return 0<=t.in.indexOf(i)})},onMultiProductAlreadyIn:function(t){t=t||[];t=o.onPrepareList.call(t)||t,t=o.filterProductAlreadyIn.call(this,t)||t,r(this).parent().parent().find(".already-in").remove();var e="";switch(t.length){case 0:break;default:e=r("<ul>");r.each(t,function(t,i){e.append(r("<li>").html(r("<a>").html(i.title).attr({href:i.url})).val(i.ID))})}e.length&&r(this).closest(".tinv-modal-inner").find("img").after(r("<div>").addClass("already-in").html(o.text_already_in+" ").append(e))},onAction:{redirect:function(t){o.redirectTimer&&clearTimeout(o.redirectTimer),o.redirectTimer=window.setTimeout(function(){window.location.href=t},4e3)},force_redirect:function(t){window.location.href=t},wishlists:function(t){r(this).attr("data-tinv-wl-list",t)},msg:function(t){if(!t)return!1;var i=r(t).eq(0);r("body > .tinv-wishlist").length||r("body").append(r("<div>").addClass("tinv-wishlist")),r("body > .tinv-wishlist").append(i),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove(),o.redirectTimer&&clearTimeout(o.redirectTimer)})},status:function(t){t&&r(this).addClass("tinvwl-product-in-list")},removed:function(t){t&&r(this).removeClass("tinvwl-product-in-list").removeClass("tinvwl-product-make-remove").attr("data-tinv-wl-action","addto")},make_remove:function(t){r(this).toggleClass("tinvwl-product-make-remove",t).attr("data-tinv-wl-action",t?"remove":"addto")},fragments:function(t){if("undefined"==typeof wc_cart_fragments_params)return r.each(t,function(t,i){r(t).replaceWith(i)}),!1;var i;try{i="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("wc","test"),window.sessionStorage.removeItem("wc"),window.localStorage.setItem("wc","test"),window.localStorage.removeItem("wc")}catch(t){i=!1}if(i)try{var e=r.parseJSON(sessionStorage.getItem(wc_cart_fragments_params.fragment_name)),n=wc_cart_fragments_params.ajax_url.toString()+"-wc_cart_hash",o=sessionStorage.getItem(n),a=Cookies.get("woocommerce_cart_hash"),l=sessionStorage.getItem("wc_cart_created");if(null!=o&&""!==o||(o=""),null!=a&&""!==a||(a=""),o&&(null==l||""===l))throw"No cart_created";if(r.each(t,function(t,i){e[t]=i}),localStorage.setItem(n,localStorage.getItem(n)+(new Date).getTime()),sessionStorage.setItem(n,sessionStorage.getItem(n)+(new Date).getTime()),sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(e)),!e||!e["div.widget_shopping_cart_content"]||o!==a)throw"No fragment";r.each(e,function(t,i){r(t).replaceWith(i)}),r(document.body).trigger("wc_fragments_loaded")}catch(t){r(document.body).trigger("wc_fragment_refresh")}}},onActionProduct:function(t,i){var s={form:{},tinv_wishlist_id:t||"",tinv_wishlist_name:i||"",product_type:r(this).attr("data-tinv-wl-producttype"),product_id:r(this).attr("data-tinv-wl-product")||0,product_variation:r(this).attr("data-tinv-wl-productvariation")||0,product_action:r(this).attr("data-tinv-wl-action")||"addto",redirect:window.location.href},e=this;r(e).closest("form.cart[method=post], .tinvwl-loop-button-wrapper").find("input:not(:disabled), select:not(:disabled), textarea:not(:disabled)").each(function(){var t=r(this).attr("name"),i=r(this).attr("type"),e=r(this).val(),n=10,o=function t(i,e){if("object"!==_typeof(e))return e;for(var n in void 0===i&&(i={}),e)if(""===n){var o=-1;for(o in i)o=o;i[o=parseInt(o)+1]=t(i[n],e[n])}else i[n]=t(i[n],e[n]);return i};if("button"!==i&&void 0!==t&&"attribute_"!=t.substr(0,10)){for(;/^(.+)\[([^\[\]]*?)\]$/.test(t)&&0<n;){var a=t.match(/^(.+)\[([^\[\]]*?)\]$/);if(3===a.length){var l={};l[a[2]]=e,e=l}t=a[1],n--}"checkbox"===i||"radio"===i?r(this).is(":checked")&&(e.length||"object"===_typeof(e)||(e=!0),s.form[t]=o(s.form[t],e)):s.form[t]=o(s.form[t],e)}}),s=o.onPrepareDataAction.call(e,e,s)||s,r.post(o.api_url,s,function(t){if(o.onDialogHide.call(e.tinvwl_dialog,e),"object"===_typeof(t))for(var i in t)"function"==typeof o.onAction[i]&&o.onAction[i].call(e,t[i]);else"function"==typeof o.onAction.msg&&o.onAction.msg.call(e,t)})}},o=r.extend(!0,{},i,t);return r(this).each(function(){if(!r(this).attr("data-tinv-wl-list"))return!1;if(o.dialogbox&&o.dialogbox.length&&(this.tinvwl_dialog=o.dialogbox),this.tinvwl_dialog||(this.tinvwl_dialog=o.onGetDialogBox.call(this)),!this.tinvwl_dialog){var t=r(this).nextAll(o.class.dialogbox).eq(0);t.length&&(this.tinvwl_dialog=t)}if(this.tinvwl_dialog){o.onPrepareDialogBox.call(this.tinvwl_dialog),"function"!=typeof this.tinvwl_dialog.update_list&&(this.tinvwl_dialog.update_list=function(t){var e=r(this).find(o.class.select).eq(0);r(this).find(o.class.newtitle).hide().val(""),e.html(""),r.each(t,function(t,i){o.onCreateWishList.call(e,i)}),o.text_create&&o.onCreateWishList.call(e,{ID:"",title:o.text_create,in:!1}),o.onMultiProductAlreadyIn.call(e,t),o.onSelectWishList.call(e,t),r(this).find(o.class.newtitle).toggle(""===e.val())}),"function"!=typeof this.tinvwl_dialog.show_list&&(this.tinvwl_dialog.show_list=function(){var t=r.parseJSON(r(this).attr("data-tinv-wl-list"))||[];t.length?(t=o.onPrepareList.call(t)||t,this.tinvwl_dialog.update_list(t),o.onDialogShow.call(this.tinvwl_dialog,this)):o.onActionProduct.call(this)});var n=this;r(this.tinvwl_dialog).find(o.class.dialogbutton).off("click").on("click",function(){var t,i=r(n.tinvwl_dialog).find(o.class.select),e=r(n.tinvwl_dialog).find(o.class.newtitle);i.val()||e.val()?o.onActionProduct.call(n,i.val(),e.val()):((t=e.is(":visible")?e:i).addClass("empty-name-wishlist"),window.setTimeout(function(){t.removeClass("empty-name-wishlist")},1e3))})}r(this).off("click").on("click",o.onClick),o.onInited.call(this,o)})},r(document).ready(function(){r("body").on("click",".tinvwl_add_to_wishlist_button",function(t){if(r(this).is(".disabled-add-wishlist"))return t.preventDefault(),void window.alert(tinvwl_add_to_wishlist.i18n_make_a_selection_text);r(this).is(".inited-add-wishlist")||r(this).tinvwl_to_wishlist({onInited:function(t){r(this).addClass("inited-add-wishlist"),t.onClick.call(this)}})}),r(document).on("hide_variation",".variations_form",function(t){var i=r(this).find(".tinvwl_add_to_wishlist_button");i.length&&!tinvwl_add_to_wishlist.allow_parent_variable&&(t.preventDefault(),i.addClass("disabled-add-wishlist"))}),r(document).on("show_variation",".variations_form",function(t,i,e){var n=r(this).find(".tinvwl_add_to_wishlist_button");if(n.length){var o=JSON.parse(n.attr("data-tinv-wl-list")),a=!1,l="1"==window.tinvwl_add_to_wishlist.simple_flow;for(var s in o)o[s].hasOwnProperty("in")&&Array.isArray(o[s].in)&&-1<(o[s].in||[]).indexOf(i.variation_id)&&(a=!0);n.toggleClass("tinvwl-product-in-list",a).toggleClass("tinvwl-product-make-remove",a&&l).attr("data-tinv-wl-action",a&&l?"remove":"addto"),t.preventDefault(),n.removeClass("disabled-add-wishlist")}})})}(jQuery),function(n){n(document).ready(function(){if(n("#tinvwl_manage_actions, #tinvwl_product_actions").addClass("form-control").parent().wrapInner('<div class="tinvwl-input-group tinvwl-no-full">').find("button").wrap('<span class="tinvwl-input-group-btn">'),n(".tinv-lists-nav").each(function(){n.trim(n(this).html()).length||n(this).remove()}),n("body").on("click",".social-buttons .social[title!=email][title!=whatsapp][title!=clipboard]",function(t){var i=window.open(n(this).attr("href"),n(this).attr("title"),"width=420,height=320,resizable=yes,scrollbars=yes,status=yes");i&&(i.focus(),t.preventDefault())}),"undefined"!=typeof ClipboardJS){new ClipboardJS(".social-buttons .social.social-clipboard",{text:function(t){return t.getAttribute("href")}}).on("success",function(t){showTooltip(t.trigger,tinvwl_add_to_wishlist.tinvwl_clipboard)});for(var t=document.querySelectorAll(".social-buttons .social.social-clipboard"),i=0;i<t.length;i++)t[i].addEventListener("mouseleave",clearTooltip),t[i].addEventListener("blur",clearTooltip)}n("body").on("click",".social-buttons .social.social-clipboard",function(t){t.preventDefault()}),n("body").on("click",".tinv-wishlist .tinv-overlay, .tinv-wishlist .tinv-close-modal, .tinv-wishlist .tinvwl_button_close",function(t){t.preventDefault(),n(this).parents(".tinv-modal:first").removeClass("tinv-modal-open")}),n("body").on("click",".tinv-wishlist .tinvwl-btn-onclick",function(t){n(this).data("url")&&(t.preventDefault(),window.location=n(this).data("url"))});var e=n(".tinv-wishlist .navigation-button");e.length&&e.each(function(){var t=n(this).find("> li");t.length<5&&t.parent().addClass("tinvwl-btns-count-"+t.length)}),n(".tinv-login .showlogin").unbind("click").on("click",function(t){t.preventDefault(),n(this).closest(".tinv-login").find(".login").toggle()}),n(".tinv-wishlist table.tinvwl-table-manage-list tfoot td").each(function(){n(this).toggle(!!n(this).children().not(".look_in").length||!!n(this).children(".look_in").children().length)})}),n(document.body).on("wc_fragments_refreshed wc_fragments_loaded",function(){var t=!("0"==n(".wishlist_products_counter_number").html()||""==n(".wishlist_products_counter_number").html());n(".wishlist_products_counter").toggleClass("wishlist-counter-with-products",t)}),update_cart_hash()}(jQuery),function(n){n.fn.tinvwl_break_submit=function(t){var i={selector:"input, select, textarea",ifempty:!0,invert:!1,validate:function(){return n(this).val()},rule:function(){var t=n(this).parents("form").eq(0).find(e.selector),i=e.invert;return 0===t.length?e.ifempty:(t.each(function(){i&&!e.invert||!i&&e.invert||(i=Boolean(e.validate.call(n(this))))}),i)}},e=n.extend(!0,{},i,t);return n(this).each(function(){n(this).on("click",function(t){e.rule.call(n(this))||(alert(window.tinvwl_add_to_wishlist.tinvwl_break_submit),t.preventDefault())})})},n(document).ready(function(){n(".tinvwl-break-input").tinvwl_break_submit({selector:".tinvwl-break-input-filed"}),n(".tinvwl-break-checkbox").tinvwl_break_submit({selector:"table td input[type=checkbox]",validate:function(){return n(this).is(":checked")}}),n(".global-cb").on("click",function(){n(this).closest("table").eq(0).find(".product-cb input[type=checkbox], .wishlist-cb input[type=checkbox]").prop("checked",n(this).is(":checked"))})})}(jQuery);
|
1 |
/**
|
2 |
* TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
|
3 |
+
* @version 1.13.0
|
4 |
* @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
|
5 |
*/
|
6 |
"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function update_cart_hash(){if(!tinvwl_add_to_wishlist.wc_cart_fragments_refresh)return!1;jQuery(document.body).on("wc_fragments_loaded.wishlist wc_fragments_refreshed.wishlist",function(){if("undefined"==typeof wc_cart_fragments_params)return!1;var t=wc_cart_fragments_params.cart_hash_key;localStorage.setItem(t,localStorage.getItem(t)+(new Date).getTime()),sessionStorage.setItem(t,sessionStorage.getItem(t)+(new Date).getTime()),jQuery(document.body).off("wc_fragments_loaded.wishlist wc_fragments_refreshed.wishlist")})}function showTooltip(t,i){t.setAttribute("class","social social-clipboard tooltipped tooltipped-s"),t.setAttribute("aria-label",i)}function clearTooltip(t){t.currentTarget.setAttribute("class","social social-clipboard "),t.currentTarget.removeAttribute("aria-label")}!function(r){r.fn.tinvwl_to_wishlist=function(t){var i={api_url:window.location.href,text_create:window.tinvwl_add_to_wishlist.text_create,text_already_in:window.tinvwl_add_to_wishlist.text_already_in,class:{dialogbox:".tinvwl_add_to_select_wishlist",select:".tinvwl_wishlist",newtitle:".tinvwl_new_input",dialogbutton:".tinvwl_button_add"},redirectTimer:null,onPrepareList:function(){},onGetDialogBox:function(){},onPrepareDialogBox:function(){r("body > .tinv-wishlist").length||r("body").append(r("<div>").addClass("tinv-wishlist")),r(this).appendTo("body > .tinv-wishlist")},onCreateWishList:function(t){r(this).append(r("<option>").html(t.title).val(t.ID).toggleClass("tinv_in_wishlist",t.in))},onSelectWishList:function(){},onDialogShow:function(t){r(t).addClass("tinv-modal-open"),r(t).removeClass("ftinvwl-pulse")},onDialogHide:function(t){r(t).removeClass("tinv-modal-open"),r(t).removeClass("ftinvwl-pulse")},onInited:function(){},onClick:function(){if(r(this).is(".disabled-add-wishlist"))return!1;r(this).is(".ftinvwl-animated")&&r(this).addClass("ftinvwl-pulse"),this.tinvwl_dialog?this.tinvwl_dialog.show_list.call(this):o.onActionProduct.call(this),update_cart_hash()},onPrepareDataAction:function(t,i){r("body").trigger("tinvwl_wishlist_button_clicked",[t,i])},filterProductAlreadyIn:function(t){t=t||[];var n={};return r("form.cart[method=post], .woocommerce-variation-add-to-cart").find("input, select").each(function(){var t=r(this).attr("name"),i=r(this).attr("type"),e=r(this).val();"checkbox"===i||"radio"===i?r(this).is(":checked")&&(n["form"+t]=e):n["form"+t]=e}),n=n.formvariation_id,t.filter(function(t){if("object"!==_typeof(t.in)||"string"!=typeof n)return t.in;var i=parseInt(n);return 0<=t.in.indexOf(i)})},onMultiProductAlreadyIn:function(t){t=t||[];t=o.onPrepareList.call(t)||t,t=o.filterProductAlreadyIn.call(this,t)||t,r(this).parent().parent().find(".already-in").remove();var e="";switch(t.length){case 0:break;default:e=r("<ul>");r.each(t,function(t,i){e.append(r("<li>").html(r("<a>").html(i.title).attr({href:i.url})).val(i.ID))})}e.length&&r(this).closest(".tinv-modal-inner").find("img").after(r("<div>").addClass("already-in").html(o.text_already_in+" ").append(e))},onAction:{redirect:function(t){o.redirectTimer&&clearTimeout(o.redirectTimer),o.redirectTimer=window.setTimeout(function(){window.location.href=t},4e3)},force_redirect:function(t){window.location.href=t},wishlists:function(t){r(this).attr("data-tinv-wl-list",t)},msg:function(t){if(!t)return!1;var i=r(t).eq(0);r("body > .tinv-wishlist").length||r("body").append(r("<div>").addClass("tinv-wishlist")),r("body > .tinv-wishlist").append(i),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove(),o.redirectTimer&&clearTimeout(o.redirectTimer)})},status:function(t){t&&r(this).addClass("tinvwl-product-in-list")},removed:function(t){t&&r(this).removeClass("tinvwl-product-in-list").removeClass("tinvwl-product-make-remove").attr("data-tinv-wl-action","addto")},make_remove:function(t){r(this).toggleClass("tinvwl-product-make-remove",t).attr("data-tinv-wl-action",t?"remove":"addto")},fragments:function(t){if("undefined"==typeof wc_cart_fragments_params)return r.each(t,function(t,i){r(t).replaceWith(i)}),!1;var i;try{i="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("wc","test"),window.sessionStorage.removeItem("wc"),window.localStorage.setItem("wc","test"),window.localStorage.removeItem("wc")}catch(t){i=!1}if(i)try{var e=r.parseJSON(sessionStorage.getItem(wc_cart_fragments_params.fragment_name)),n=wc_cart_fragments_params.ajax_url.toString()+"-wc_cart_hash",o=sessionStorage.getItem(n),a=Cookies.get("woocommerce_cart_hash"),l=sessionStorage.getItem("wc_cart_created");if(null!=o&&""!==o||(o=""),null!=a&&""!==a||(a=""),o&&(null==l||""===l))throw"No cart_created";if(r.each(t,function(t,i){e[t]=i}),localStorage.setItem(n,localStorage.getItem(n)+(new Date).getTime()),sessionStorage.setItem(n,sessionStorage.getItem(n)+(new Date).getTime()),sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(e)),!e||!e["div.widget_shopping_cart_content"]||o!==a)throw"No fragment";r.each(e,function(t,i){r(t).replaceWith(i)}),r(document.body).trigger("wc_fragments_loaded")}catch(t){r(document.body).trigger("wc_fragment_refresh")}}},onActionProduct:function(t,i){var s={form:{},tinv_wishlist_id:t||"",tinv_wishlist_name:i||"",product_type:r(this).attr("data-tinv-wl-producttype"),product_id:r(this).attr("data-tinv-wl-product")||0,product_variation:r(this).attr("data-tinv-wl-productvariation")||0,product_action:r(this).attr("data-tinv-wl-action")||"addto",redirect:window.location.href},e=this;r(e).closest("form.cart[method=post], .tinvwl-loop-button-wrapper").find("input:not(:disabled), select:not(:disabled), textarea:not(:disabled)").each(function(){var t=r(this).attr("name"),i=r(this).attr("type"),e=r(this).val(),n=10,o=function t(i,e){if("object"!==_typeof(e))return e;for(var n in void 0===i&&(i={}),e)if(""===n){var o=-1;for(o in i)o=o;i[o=parseInt(o)+1]=t(i[n],e[n])}else i[n]=t(i[n],e[n]);return i};if("button"!==i&&void 0!==t&&"attribute_"!=t.substr(0,10)){for(;/^(.+)\[([^\[\]]*?)\]$/.test(t)&&0<n;){var a=t.match(/^(.+)\[([^\[\]]*?)\]$/);if(3===a.length){var l={};l[a[2]]=e,e=l}t=a[1],n--}"checkbox"===i||"radio"===i?r(this).is(":checked")&&(e.length||"object"===_typeof(e)||(e=!0),s.form[t]=o(s.form[t],e)):s.form[t]=o(s.form[t],e)}}),s=o.onPrepareDataAction.call(e,e,s)||s,r.post(o.api_url,s,function(t){if(o.onDialogHide.call(e.tinvwl_dialog,e),"object"===_typeof(t))for(var i in t)"function"==typeof o.onAction[i]&&o.onAction[i].call(e,t[i]);else"function"==typeof o.onAction.msg&&o.onAction.msg.call(e,t)})}},o=r.extend(!0,{},i,t);return r(this).each(function(){if(!r(this).attr("data-tinv-wl-list"))return!1;if(o.dialogbox&&o.dialogbox.length&&(this.tinvwl_dialog=o.dialogbox),this.tinvwl_dialog||(this.tinvwl_dialog=o.onGetDialogBox.call(this)),!this.tinvwl_dialog){var t=r(this).nextAll(o.class.dialogbox).eq(0);t.length&&(this.tinvwl_dialog=t)}if(this.tinvwl_dialog){o.onPrepareDialogBox.call(this.tinvwl_dialog),"function"!=typeof this.tinvwl_dialog.update_list&&(this.tinvwl_dialog.update_list=function(t){var e=r(this).find(o.class.select).eq(0);r(this).find(o.class.newtitle).hide().val(""),e.html(""),r.each(t,function(t,i){o.onCreateWishList.call(e,i)}),o.text_create&&o.onCreateWishList.call(e,{ID:"",title:o.text_create,in:!1}),o.onMultiProductAlreadyIn.call(e,t),o.onSelectWishList.call(e,t),r(this).find(o.class.newtitle).toggle(""===e.val())}),"function"!=typeof this.tinvwl_dialog.show_list&&(this.tinvwl_dialog.show_list=function(){var t=r.parseJSON(r(this).attr("data-tinv-wl-list"))||[];t.length?(t=o.onPrepareList.call(t)||t,this.tinvwl_dialog.update_list(t),o.onDialogShow.call(this.tinvwl_dialog,this)):o.onActionProduct.call(this)});var n=this;r(this.tinvwl_dialog).find(o.class.dialogbutton).off("click").on("click",function(){var t,i=r(n.tinvwl_dialog).find(o.class.select),e=r(n.tinvwl_dialog).find(o.class.newtitle);i.val()||e.val()?o.onActionProduct.call(n,i.val(),e.val()):((t=e.is(":visible")?e:i).addClass("empty-name-wishlist"),window.setTimeout(function(){t.removeClass("empty-name-wishlist")},1e3))})}r(this).off("click").on("click",o.onClick),o.onInited.call(this,o)})},r(document).ready(function(){r("body").on("click",".tinvwl_add_to_wishlist_button",function(t){if(r(this).is(".disabled-add-wishlist"))return t.preventDefault(),void window.alert(tinvwl_add_to_wishlist.i18n_make_a_selection_text);r(this).is(".inited-add-wishlist")||r(this).tinvwl_to_wishlist({onInited:function(t){r(this).addClass("inited-add-wishlist"),t.onClick.call(this)}})}),r(document).on("hide_variation",".variations_form",function(t){var i=r(this).find(".tinvwl_add_to_wishlist_button");i.length&&!tinvwl_add_to_wishlist.allow_parent_variable&&(t.preventDefault(),i.addClass("disabled-add-wishlist"))}),r(document).on("show_variation",".variations_form",function(t,i,e){var n=r(this).find(".tinvwl_add_to_wishlist_button");if(n.length){var o=JSON.parse(n.attr("data-tinv-wl-list")),a=!1,l="1"==window.tinvwl_add_to_wishlist.simple_flow;for(var s in o)o[s].hasOwnProperty("in")&&Array.isArray(o[s].in)&&-1<(o[s].in||[]).indexOf(i.variation_id)&&(a=!0);n.toggleClass("tinvwl-product-in-list",a).toggleClass("tinvwl-product-make-remove",a&&l).attr("data-tinv-wl-action",a&&l?"remove":"addto"),t.preventDefault(),n.removeClass("disabled-add-wishlist")}})})}(jQuery),function(n){n(document).ready(function(){if(n("#tinvwl_manage_actions, #tinvwl_product_actions").addClass("form-control").parent().wrapInner('<div class="tinvwl-input-group tinvwl-no-full">').find("button").wrap('<span class="tinvwl-input-group-btn">'),n(".tinv-lists-nav").each(function(){n.trim(n(this).html()).length||n(this).remove()}),n("body").on("click",".social-buttons .social[title!=email][title!=whatsapp][title!=clipboard]",function(t){var i=window.open(n(this).attr("href"),n(this).attr("title"),"width=420,height=320,resizable=yes,scrollbars=yes,status=yes");i&&(i.focus(),t.preventDefault())}),"undefined"!=typeof ClipboardJS){new ClipboardJS(".social-buttons .social.social-clipboard",{text:function(t){return t.getAttribute("href")}}).on("success",function(t){showTooltip(t.trigger,tinvwl_add_to_wishlist.tinvwl_clipboard)});for(var t=document.querySelectorAll(".social-buttons .social.social-clipboard"),i=0;i<t.length;i++)t[i].addEventListener("mouseleave",clearTooltip),t[i].addEventListener("blur",clearTooltip)}n("body").on("click",".social-buttons .social.social-clipboard",function(t){t.preventDefault()}),n("body").on("click",".tinv-wishlist .tinv-overlay, .tinv-wishlist .tinv-close-modal, .tinv-wishlist .tinvwl_button_close",function(t){t.preventDefault(),n(this).parents(".tinv-modal:first").removeClass("tinv-modal-open")}),n("body").on("click",".tinv-wishlist .tinvwl-btn-onclick",function(t){n(this).data("url")&&(t.preventDefault(),window.location=n(this).data("url"))});var e=n(".tinv-wishlist .navigation-button");e.length&&e.each(function(){var t=n(this).find("> li");t.length<5&&t.parent().addClass("tinvwl-btns-count-"+t.length)}),n(".tinv-login .showlogin").unbind("click").on("click",function(t){t.preventDefault(),n(this).closest(".tinv-login").find(".login").toggle()}),n(".tinv-wishlist table.tinvwl-table-manage-list tfoot td").each(function(){n(this).toggle(!!n(this).children().not(".look_in").length||!!n(this).children(".look_in").children().length)})}),n(document.body).on("wc_fragments_refreshed wc_fragments_loaded",function(){var t=!("0"==n(".wishlist_products_counter_number").html()||""==n(".wishlist_products_counter_number").html());n(".wishlist_products_counter").toggleClass("wishlist-counter-with-products",t)}),update_cart_hash()}(jQuery),function(n){n.fn.tinvwl_break_submit=function(t){var i={selector:"input, select, textarea",ifempty:!0,invert:!1,validate:function(){return n(this).val()},rule:function(){var t=n(this).parents("form").eq(0).find(e.selector),i=e.invert;return 0===t.length?e.ifempty:(t.each(function(){i&&!e.invert||!i&&e.invert||(i=Boolean(e.validate.call(n(this))))}),i)}},e=n.extend(!0,{},i,t);return n(this).each(function(){n(this).on("click",function(t){e.rule.call(n(this))||(alert(window.tinvwl_add_to_wishlist.tinvwl_break_submit),t.preventDefault())})})},n(document).ready(function(){n(".tinvwl-break-input").tinvwl_break_submit({selector:".tinvwl-break-input-filed"}),n(".tinvwl-break-checkbox").tinvwl_break_submit({selector:"table td input[type=checkbox]",validate:function(){return n(this).is(":checked")}}),n(".global-cb").on("click",function(){n(this).closest("table").eq(0).find(".product-cb input[type=checkbox], .wishlist-cb input[type=checkbox]").prop("checked",n(this).is(":checked"))})})}(jQuery);
|
changelog.txt
ADDED
@@ -0,0 +1,679 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
= 1.13.0 =
|
2 |
+
*Release Date - 15 July 2019*
|
3 |
+
|
4 |
+
* Added wishlist REST API
|
5 |
+
* Refactored filters and actions
|
6 |
+
* Prevent plugin network wide activation
|
7 |
+
* Fixed an issue with deleted products in frontend templates
|
8 |
+
* Fixed wishlist products query issue on multilingual setup
|
9 |
+
* TM Product Options plugin integration updated
|
10 |
+
|
11 |
+
= 1.12.3 =
|
12 |
+
*Release Date - 17 May 2019*
|
13 |
+
|
14 |
+
* Fixed wishlist products issue with WPML plugin
|
15 |
+
|
16 |
+
= 1.12.2 =
|
17 |
+
*Release Date - 7 May 2019*
|
18 |
+
|
19 |
+
* Added filter <i>tinvwl_wc_cart_fragments_refresh</i> to disable WC cart fragments refreshing
|
20 |
+
* Fixed integration issues with Improved Product Options for WooCommerce plugin
|
21 |
+
* Fixed issue with wishlist URL for sharing buttons
|
22 |
+
|
23 |
+
= 1.12.1 =
|
24 |
+
*Release Date - 2 May 2019*
|
25 |
+
|
26 |
+
* Improved performance of wishlist page
|
27 |
+
* Added method tinvwl_get_wishlist_products() to get wishlist products by wishlist ID or SHAREKEY
|
28 |
+
* Fixed URI rewrites issue
|
29 |
+
* Fixed issue with auto removing grouped products from wishlist
|
30 |
+
|
31 |
+
= 1.12.0 =
|
32 |
+
*Release Date - 22 April 2019*
|
33 |
+
|
34 |
+
* Greatly improved frontend performance
|
35 |
+
* Fixed wishlist analytics issues
|
36 |
+
* Code cleanup
|
37 |
+
|
38 |
+
= 1.11.1 =
|
39 |
+
*Release Date - 19 April 2019*
|
40 |
+
|
41 |
+
* Fixed a hook for [myCRED](https://wordpress.org/plugins/mycred/) plugin when purchased product from a wishlist
|
42 |
+
* Plugin display name changed to "TI WooCommerce Wishlist Plugin"
|
43 |
+
|
44 |
+
= 1.11.0 =
|
45 |
+
*Release Date - 18 April 2019*
|
46 |
+
|
47 |
+
* WooCommerce 3.6.x support
|
48 |
+
* Added integration with Improved Product Options for WooCommerce plugin
|
49 |
+
* Added custom hook for [myCRED](https://wordpress.org/plugins/mycred/) plugin
|
50 |
+
* Minor PHP fixes and improvements
|
51 |
+
|
52 |
+
= 1.10.1 =
|
53 |
+
*Release Date - 14 April 2019*
|
54 |
+
|
55 |
+
* [WooCommerce PPOM](https://wordpress.org/plugins/woocommerce-product-addon/) plugin integration updated
|
56 |
+
* Fixed analytics purchase count issue
|
57 |
+
|
58 |
+
= 1.10.0 =
|
59 |
+
*Release Date - 9 April 2019*
|
60 |
+
|
61 |
+
* Added Force permalinks rewrite feature
|
62 |
+
* Added numeric pagination on a Wishlist page
|
63 |
+
* Added analytic tracking feature for compatibility with the premium version of plugin
|
64 |
+
* Improved compatibility with TM Extra Product Options plugin
|
65 |
+
* Fixed pagination issue on a Wishlist page for all actions
|
66 |
+
* Fixed minor PHP issues
|
67 |
+
* Fixed minor CSS issues
|
68 |
+
|
69 |
+
= 1.9.18 =
|
70 |
+
*Release Date - 4 April 2019*
|
71 |
+
|
72 |
+
* Fixed an issue with removing products from wishlist when added to cart for WooCommerce prior 3.x versions.
|
73 |
+
* Fixed an issue when the wizard add multiple shortcodes to an exists page
|
74 |
+
|
75 |
+
= 1.9.17 =
|
76 |
+
*Release Date - 2 April 2019*
|
77 |
+
|
78 |
+
* Fixed HTML W3C validation for the Add to Wishlist button
|
79 |
+
* Fixed a limit for Add all to cart function
|
80 |
+
* Fixed public JS error
|
81 |
+
* Added filter <i>tinvwl-allow_parent_variable</i> that allows to add parent variable product without selected variation from a 3rd party code.
|
82 |
+
* Improved the Setup Wizard to prepend the Wishlist Page shortcode to existing page content.
|
83 |
+
|
84 |
+
= 1.9.16 =
|
85 |
+
*Release Date - 7 March 2019*
|
86 |
+
|
87 |
+
* Fixed an issue in case of NULL in a product price field
|
88 |
+
* Updated Share settings in the install wizard
|
89 |
+
|
90 |
+
= 1.9.15 =
|
91 |
+
*Release Date - 5 March 2019*
|
92 |
+
|
93 |
+
* Fixed templates path issue
|
94 |
+
* Added compatibility with [Woocommerce Product Addons](https://wordpress.org/plugins/woo-custom-product-addons/) plugin by acowebs
|
95 |
+
* Improved compatibility with WooCommerce Advanced Quantity plugin
|
96 |
+
* Minor CSS fixes
|
97 |
+
|
98 |
+
= 1.9.14 =
|
99 |
+
*Release Date - 22 February 2019*
|
100 |
+
|
101 |
+
* Added compatibility with WooCommerce Advanced Quantity plugin
|
102 |
+
* Fixed an issue with dependencies in the wp_register_script function
|
103 |
+
|
104 |
+
= 1.9.13 =
|
105 |
+
*Release Date - 16 February 2019*
|
106 |
+
|
107 |
+
* Improved "add to wishlist" button behavior for variable products
|
108 |
+
* Improved compatibility with WooCommerce Custom Fields plugin
|
109 |
+
|
110 |
+
= 1.9.12 =
|
111 |
+
*Release Date - 11 February 2019*
|
112 |
+
|
113 |
+
* Fixed compatibility with [WooCommerce Multilingual](https://wordpress.org/plugins/woocommerce-multilingual/) plugin version greater 4.3.7
|
114 |
+
|
115 |
+
= 1.9.11 =
|
116 |
+
*Release Date - 10 February 2019*
|
117 |
+
|
118 |
+
* Fixed compatibility with [WooCommerce Multilingual](https://wordpress.org/plugins/woocommerce-multilingual/) plugin version greater 4.3.7
|
119 |
+
* Added 'tinvwl-wc-cart-fragments' filter to disable wc-cart-fragments from 3rd party code
|
120 |
+
* Added unique IDs for Wishlist menu options to avoid any incompatibility issues with another plugin options
|
121 |
+
|
122 |
+
= 1.9.10 =
|
123 |
+
*Release Date - 1 February 2019*
|
124 |
+
|
125 |
+
* Fixed compatibility issue for WooCommerce prior 3.2 version
|
126 |
+
* Added compatibility with WooCommerce Custom Fields plugin
|
127 |
+
|
128 |
+
= 1.9.9 =
|
129 |
+
*Release Date - 9 January 2019*
|
130 |
+
|
131 |
+
* Added the ability to apply Wishlist on a front page and a shop page
|
132 |
+
* Added share Wishlist via WhatsApp option
|
133 |
+
* Added "Copy Wishlist URL to clipboard" option
|
134 |
+
|
135 |
+
= 1.9.8 =
|
136 |
+
*Release Date - 2 January 2019*
|
137 |
+
|
138 |
+
* Updated add to cart error description
|
139 |
+
* Fixed PHP 7.3 notices
|
140 |
+
|
141 |
+
= 1.9.7 =
|
142 |
+
*Release Date - 7 December 2018*
|
143 |
+
|
144 |
+
* WordPress 5.0 compatibility
|
145 |
+
|
146 |
+
= 1.9.6 =
|
147 |
+
*Release Date - 30 November 2018*
|
148 |
+
|
149 |
+
* Restrict WooCommerce templates filter to plugin templates only
|
150 |
+
|
151 |
+
= 1.9.5 =
|
152 |
+
*Release Date - 20 November 2018*
|
153 |
+
|
154 |
+
* Fixed product counter state
|
155 |
+
* Fixed an issue with infinite loop if the default WooCommerce My Account page was applied as a Wishlist page
|
156 |
+
|
157 |
+
= 1.9.4 =
|
158 |
+
*Release Date - 12 November 2018*
|
159 |
+
|
160 |
+
* Added parameters for "add to wishlist" button markup filter
|
161 |
+
|
162 |
+
= 1.9.3 =
|
163 |
+
*Release Date - 1 November 2018*
|
164 |
+
|
165 |
+
* Fixed an issue with product name in WooCommerce notice if add to cart validation failed
|
166 |
+
* Improved compatibility with [WooCommerce Product Add-ons](https://woocommerce.com/products/product-add-ons/?aff=3955) plugin
|
167 |
+
|
168 |
+
= 1.9.2 =
|
169 |
+
*Release Date - 24 October 2018*
|
170 |
+
|
171 |
+
* WooCommerce 3.5.x support
|
172 |
+
* Improved compatibility with [WooCommerce Product Bundles](https://woocommerce.com/products/product-bundles/?aff=3955) plugin
|
173 |
+
|
174 |
+
= 1.9.1 =
|
175 |
+
*Release Date - 23 October 2018*
|
176 |
+
|
177 |
+
* Removed button hidden inputs for better compatibility with custom themes
|
178 |
+
* Added a new option to hide zero value in a counter if wishlist is empty
|
179 |
+
|
180 |
+
= 1.9.0 =
|
181 |
+
*Release Date - 17 October 2018*
|
182 |
+
|
183 |
+
* Fixed no cache issue for WooCommerce versions below 3.2.4
|
184 |
+
* Added redirect to a previous page after login when "Require Login" option is enabled
|
185 |
+
* Added an option to add the wishlist counter into a menu
|
186 |
+
* Improved compatibility with [WooCommerce Subscriptions](https://woocommerce.com/products/woocommerce-subscriptions/?aff=3955) plugin
|
187 |
+
* Improved compatibility with [WooCommerce Product Bundles](https://woocommerce.com/products/product-bundles/?aff=3955) plugin
|
188 |
+
* Improved compatibility with [WooCommerce Composite Products](https://woocommerce.com/products/composite-products/?aff=3955) plugin
|
189 |
+
|
190 |
+
= 1.8.17 =
|
191 |
+
*Release Date - 16 September 2018*
|
192 |
+
|
193 |
+
* Improved compatibility with [YITH WooCommerce Product Add-Ons](https://wordpress.org/plugins/yith-woocommerce-product-add-ons/) plugin
|
194 |
+
|
195 |
+
= 1.8.16 =
|
196 |
+
*Release Date - 14 September 2018*
|
197 |
+
|
198 |
+
* Fixed an issue with cart and checkout redirect during bulk add to cart process from a wishlist
|
199 |
+
* Fixed an issue with loading main frontend javascript file when button loaded with AJAX
|
200 |
+
* Improved compatibility with [YITH WooCommerce Product Add-Ons](https://wordpress.org/plugins/yith-woocommerce-product-add-ons/) plugin
|
201 |
+
|
202 |
+
= 1.8.15 =
|
203 |
+
*Release Date - 04 September 2018*
|
204 |
+
|
205 |
+
* Fixed an issue with trashed and deleted products count
|
206 |
+
* Fixed mobile menu wishlist products counter issue for OceanWP theme
|
207 |
+
* Minor CSS fixes
|
208 |
+
|
209 |
+
= 1.8.14 =
|
210 |
+
*Release Date - 29 August 2018*
|
211 |
+
|
212 |
+
* Fixed fatal errors when 3rd party code using global product object outside a loop
|
213 |
+
|
214 |
+
= 1.8.13 =
|
215 |
+
*Release Date - 25 August 2018*
|
216 |
+
|
217 |
+
* Fixed database fields type issue
|
218 |
+
|
219 |
+
= 1.8.12 =
|
220 |
+
*Release Date - 16 August 2018*
|
221 |
+
|
222 |
+
* Fixed PHP fatal error on plugin activation
|
223 |
+
|
224 |
+
= 1.8.11 =
|
225 |
+
*Release Date - 15 August 2018*
|
226 |
+
|
227 |
+
* Fixed pluggable function load order
|
228 |
+
* Added icon animation on wishlist events loading
|
229 |
+
* Improved product counter synchronization between browser windows
|
230 |
+
|
231 |
+
= 1.8.10 =
|
232 |
+
*Release Date - 13 August 2018*
|
233 |
+
|
234 |
+
* Fixed "wishlist not found" issue when a guest browsing empty wishlist page
|
235 |
+
* Fixed "product in wishlist" button state for a variable product type
|
236 |
+
* Fixed issue with products counter update on product(s) removed from a wishlist
|
237 |
+
* Fixed fatal errors when 3rd party code using global product object outside a loop
|
238 |
+
* Fixed fatal error in upgrading method for PHP prior 5.5 versions
|
239 |
+
|
240 |
+
= 1.8.9 =
|
241 |
+
*Release Date - 30 July 2018*
|
242 |
+
|
243 |
+
* Added "add to wishlist" button type settings backward compatibility
|
244 |
+
|
245 |
+
= 1.8.8 =
|
246 |
+
*Release Date - 29 July 2018*
|
247 |
+
|
248 |
+
* Added wishlist button custom CSS class options
|
249 |
+
* Added "Use font color" option for buttons icon color options
|
250 |
+
* Added compatibility with [Google Tag Manager for WordPress](https://wordpress.org/plugins/duracelltomi-google-tag-manager/) plugin
|
251 |
+
* Added filter `tinvwl_wishlist_products_counter` to allow change the value of wishlist products counter from a 3rd party code
|
252 |
+
* Added `tinvwl-load_frontend` filter to conditionally load wishlist frontend from 3rd party plugins.
|
253 |
+
* Improved loading of front-end assets
|
254 |
+
* Removed button type options
|
255 |
+
|
256 |
+
= 1.8.7 =
|
257 |
+
*Release Date - 25 July 2018*
|
258 |
+
|
259 |
+
* Added a prefix for wishlist button class name for better compatibility with themes
|
260 |
+
|
261 |
+
|
262 |
+
= 1.8.6 =
|
263 |
+
*Release Date - 18 July 2018*
|
264 |
+
|
265 |
+
* Added custom capabilities for dashboard pages
|
266 |
+
|
267 |
+
= 1.8.5 =
|
268 |
+
*Release Date - 16 July 2018*
|
269 |
+
|
270 |
+
* Fixed a wishlist button issue for out of stock variable products
|
271 |
+
|
272 |
+
= 1.8.4 =
|
273 |
+
*Release Date - 10 July 2018*
|
274 |
+
|
275 |
+
* Fixed above thumbnail hook priority on a product listing page
|
276 |
+
* Fixed an issue when "Add to Cart" button displayed for products without selected variations in a Wishlist table
|
277 |
+
* Added a notice with instructions if Setup Wizard was skipped
|
278 |
+
|
279 |
+
= 1.8.3 =
|
280 |
+
*Release Date - 04 July 2018*
|
281 |
+
|
282 |
+
* Improved "Style Options":
|
283 |
+
* Removed some options related to Premium version
|
284 |
+
* Fixed some options
|
285 |
+
* Added styles for Share buttons
|
286 |
+
* Added options to change the "Add to Wishlist" Button Icon size and color
|
287 |
+
* Overall code cleanup
|
288 |
+
|
289 |
+
= 1.8.2 =
|
290 |
+
*Release Date - 01 July 2018*
|
291 |
+
|
292 |
+
* Fixed an issue with "add to wishlist" button on product listing in OceanWP theme
|
293 |
+
* Fixed issues with predefined skin
|
294 |
+
* Added "add to wishlist" icon size option to predefined skin
|
295 |
+
|
296 |
+
= 1.8.1 =
|
297 |
+
*Release Date - 30 June 2018*
|
298 |
+
|
299 |
+
* Fixed "add to wishlist" icons position
|
300 |
+
* Code cleanup
|
301 |
+
|
302 |
+
= 1.8.0 =
|
303 |
+
*Release Date - 28 June 2018*
|
304 |
+
|
305 |
+
* Icon images replaced with custom webfont
|
306 |
+
* Code cleanup
|
307 |
+
|
308 |
+
= 1.7.4 =
|
309 |
+
*Release Date - 26 June 2018*
|
310 |
+
|
311 |
+
* Added an option to redirect directly to the checkout page when product(s) added to cart from a wishlist
|
312 |
+
* Added is_wishlist() conditional function that returns true on a wishlist page
|
313 |
+
* Added hooks for different events:
|
314 |
+
* `tinvwl_wishlist_created` - triggering when a wishlist created
|
315 |
+
* `tinvwl_product_added` - triggering when product added to a wishlist
|
316 |
+
* `tinvwl_product_removed` - triggering when product removed from a wishlist
|
317 |
+
* `tinvwl_product_added_to_cart` - triggering when product added to cart from a wishlist
|
318 |
+
* `tinvwl_product_purchased` - triggering when product purchased from a wishlist
|
319 |
+
|
320 |
+
= 1.7.3 =
|
321 |
+
*Release Date - 22 June 2018*
|
322 |
+
|
323 |
+
* Fixed WC_Cache method compatibility for WooCommerce prior to 3.2.0
|
324 |
+
|
325 |
+
= 1.7.2 =
|
326 |
+
*Release Date - 21 June 2018*
|
327 |
+
|
328 |
+
* Fixed WooCommerce templates location issue
|
329 |
+
* Fixed JavaScript condition for products custom attributes
|
330 |
+
* Improved compatibility with [WooCommerce Composite Products](https://woocommerce.com/products/composite-products/?aff=3955) plugin
|
331 |
+
* Improved compatibility with [WooCommerce Product Add-ons](https://woocommerce.com/products/product-add-ons/?aff=3955) plugin
|
332 |
+
* Improved compatibility with [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/), [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/), [WP Rocket](https://wp-rocket.me/) plugins
|
333 |
+
|
334 |
+
= 1.7.1 =
|
335 |
+
*Release Date - 01 June 2018*
|
336 |
+
|
337 |
+
* WooCommerce 3.4.x support
|
338 |
+
* Fixed compatibility issue with Font-Awesome 5+ library used in some themes
|
339 |
+
* Fixed JS issue with WooCommerce plugin versions less than 3.0.0
|
340 |
+
* Improved compatibility with [Personalized Product Option Manager](https://wordpress.org/plugins/woocommerce-product-addon/) plugin:
|
341 |
+
* Fixed "Add to Wishlist" button position issue
|
342 |
+
* Fixed PHP notices
|
343 |
+
* Added support for [WooCommerce Catalog Visibility Options](https://woocommerce.com/products/catalog-visibility-options/?aff=3955) plugin
|
344 |
+
* Added support for [WooCommerce Product Add-ons](https://woocommerce.com/products/product-add-ons/?aff=3955) plugin
|
345 |
+
|
346 |
+
= 1.7.0 =
|
347 |
+
*Release Date - 10 May 2018*
|
348 |
+
|
349 |
+
* Fixed an Issue when "Remove Product" button disappears on mobile devices and tablets
|
350 |
+
* Fixed "input-group" class compatibility issue with Bootstratp 4
|
351 |
+
* Date of products addition changed to WP local time instead of server time
|
352 |
+
* Freemius SDK removed completely from plugin
|
353 |
+
* Added an alert when items or action are not selected before applying bulk actions on a Wishlist page
|
354 |
+
* Improved compatibility with OceanWP WordPress theme
|
355 |
+
|
356 |
+
= 1.6.2 =
|
357 |
+
*Release Date - 04 March 2018*
|
358 |
+
|
359 |
+
* Added support for [YITH WooCommerce Product Add-Ons](https://wordpress.org/plugins/yith-woocommerce-product-add-ons/) plugin
|
360 |
+
* Removed background checks for missed actions inside WooCommerce templates.
|
361 |
+
|
362 |
+
= 1.6.1 =
|
363 |
+
*Release Date - 01 March 2018*
|
364 |
+
|
365 |
+
* Fixed an issue with deprecated function create_function(); on PHP 7.2+
|
366 |
+
* Fixed an issue with duplicated products in Wishlist
|
367 |
+
* Fixed an issue with empty wishlists in database and added cleanup on plugin upgrade
|
368 |
+
* Fixed an issue when variable products were not removed from wishlist after adding to cart
|
369 |
+
* Fixed PHP undefined notices in Wishlist table
|
370 |
+
* Fixed warnings for non-existent products in Wishlist
|
371 |
+
* Added new option "Show button text" that allows displaying the only add to wishlist icon
|
372 |
+
* Added custom classes for buttons
|
373 |
+
* Added "nofollow" attribute for button links
|
374 |
+
* Improved compatibility with [WP Multilang](https://wordpress.org/plugins/wp-multilang/) plugin
|
375 |
+
* Improved compatibility with [WooCommerce Multilingual](https://wordpress.org/plugins/woocommerce-multilingual/) plugin
|
376 |
+
* Improved compatibility with [Personalized Product Option Manager](https://wordpress.org/plugins/woocommerce-product-addon/) plugin
|
377 |
+
|
378 |
+
= 1.6.0 =
|
379 |
+
*Release Date - 08 February 2018*
|
380 |
+
|
381 |
+
* Fixed Fatal error: if $product is not WooCommerce product
|
382 |
+
* Fixed an issue when "Add to Wishlist" button didn't appear on a product details page for products without price
|
383 |
+
* Fixed text domains for some strings
|
384 |
+
* Fixed an issue with displaying SKU attribute after adding products to Wishlist from a catalog
|
385 |
+
* Added filters <i>tinvwl_addtowishlist_login_page</i> and <i>tinvwl_addtowishlist_return_ajax</i> that will be helpful to override "Require Login" popup.
|
386 |
+
* Improved variable products processing when adding to Wishlist
|
387 |
+
* Improved compatibility with WooCommerce 3.3.x
|
388 |
+
* Added support for [WP Multilang](https://wordpress.org/plugins/wp-multilang/) plugin
|
389 |
+
* Added support for [WooCommerce TM Extra Product Options](https://codecanyon.net/item/woocommerce-extra-product-options/7908619?ref=olegnax) plugin
|
390 |
+
|
391 |
+
= 1.5.14 =
|
392 |
+
*Release Date - 14 December 2017*
|
393 |
+
|
394 |
+
* Fixed an issue when empty wishlist is created once a guest visits the shop page
|
395 |
+
* Added new option "Require Login" that disallows guests to add products to a Wishlist until they sign-in
|
396 |
+
* Improved Wishlist Products Counter functionality
|
397 |
+
|
398 |
+
= 1.5.13 =
|
399 |
+
*Release Date - 02 December 2017*
|
400 |
+
|
401 |
+
* Fixed compatibility with activations of some plugins (rare case)
|
402 |
+
* Fixed translation typo
|
403 |
+
|
404 |
+
= 1.5.12 =
|
405 |
+
*Release Date - 01 December 2017*
|
406 |
+
|
407 |
+
* Fixed SQL query to avoid an issue when Wishlist title has an apostrophe
|
408 |
+
* Fixed an issue with duplicated call to WC AJAX fragments
|
409 |
+
* Improved performance for custom styles
|
410 |
+
* Added filter 'tinvwl_allow_addtowishlist_single_product' that helps to show/hide the "Add to Wishlist" button for specific products on a single products page
|
411 |
+
* Translation improvements:
|
412 |
+
* Corrected some texts
|
413 |
+
* Corrected some typos
|
414 |
+
* Removed some strings that do not require translation from .pot file
|
415 |
+
|
416 |
+
= 1.5.11 =
|
417 |
+
*Release Date - 21 November 2017*
|
418 |
+
|
419 |
+
* Fixed JavaScript frontend compatibility issue
|
420 |
+
|
421 |
+
= 1.5.10 =
|
422 |
+
*Release Date - 21 November 2017*
|
423 |
+
|
424 |
+
* Fixed JavaScript frontend issue
|
425 |
+
|
426 |
+
= 1.5.9 =
|
427 |
+
*Release Date - 21 November 2017*
|
428 |
+
|
429 |
+
* Fixed Wishlist Products Counter issue when the wrong number of products was displaying if cache is enabled
|
430 |
+
* Fixed an issue with [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/) plugin
|
431 |
+
* Fixed an issue with wrong file path after website migration
|
432 |
+
* Fixed an issue with extra scheduled cleanup events
|
433 |
+
* Fixed an issue with reset some settings after plugin update
|
434 |
+
* Added support for [WP Fastest Cache](https://wordpress.org/plugins/wp-fastest-cache/) plugin
|
435 |
+
|
436 |
+
= 1.5.8 =
|
437 |
+
*Release Date - 07 November 2017*
|
438 |
+
|
439 |
+
* Improved Wishlists storage functionality (empty wishlists that do not have a user will be removed after 7 days)
|
440 |
+
* Fixed an issue with the wrong metadata after sharing Wishlist on Facebook
|
441 |
+
* Added "Reset to Defaults" option in the admin panel
|
442 |
+
* Added an option to show the "Add to Wishlist" button above product thumbnail
|
443 |
+
* An option to change social icons from dark to white was moved to "Social Networks Sharing Options" section
|
444 |
+
* Added support for [Comet Cache](https://wordpress.org/plugins/comet-cache/) plugin
|
445 |
+
|
446 |
+
= 1.5.7 =
|
447 |
+
*Release Date - 21 October 2017*
|
448 |
+
|
449 |
+
* Fixed an issue with fonts not applying in Wishlist if "Use Theme Style" option is enabled
|
450 |
+
* Fixed an issue with transferring products between guest and user wishlists used on the same device/machine in the same browser.
|
451 |
+
* Fixed an issue with empty pop up window after clicking Share Wishlist by Email button
|
452 |
+
* Internal improvements:
|
453 |
+
* Variable product (without predefined variations applied by default) added from products listing page will be always substituted with the product added from details page (with selected variations).
|
454 |
+
* Improved [WooCommerce Composite Products](https://woocommerce.com/products/composite-products/?aff=3955) plugin support:
|
455 |
+
* Fixed individual price calculation with components
|
456 |
+
* Improved [Polylang](https://wordpress.org/plugins/polylang/) plugin support
|
457 |
+
|
458 |
+
= 1.5.6 =
|
459 |
+
*Release Date - 20 September 2017*
|
460 |
+
|
461 |
+
* Fixed an issue with transferring products between guest and customer wishlists after signing in or logout.
|
462 |
+
* Fixed an issue when it's not possible to remove products from wishlist as a guest
|
463 |
+
* Fixed an issue with adding a product variations to wishlist
|
464 |
+
* Improved [WooCommerce Product Bundles](https://woocommerce.com/products/product-bundles/?aff=3955) plugin support:
|
465 |
+
* Fixed an issue with displaying product custom meta attributes
|
466 |
+
* Improved [WPML](https://wpml.org/?aid=9393&affiliate_key=9xzbMQnIyxHE) plugin compatibility:
|
467 |
+
* Fixed an issue with "Remove/Add" button text when switching languages
|
468 |
+
|
469 |
+
= 1.5.5 =
|
470 |
+
*Release Date - 11 September 2017*
|
471 |
+
|
472 |
+
* Improved [WooCommerce Product Bundles](https://woocommerce.com/products/product-bundles/?aff=3955) plugin support:
|
473 |
+
* Fixed and issue when product variations was not applied in bundled products
|
474 |
+
* Fixed an issue with products visibility on a Wishlist page
|
475 |
+
* Fixed text domains for some strings
|
476 |
+
* Added arguments for filter that make possible overriding popup notices
|
477 |
+
|
478 |
+
= 1.5.4 =
|
479 |
+
*Release Date - 07 September 2017*
|
480 |
+
|
481 |
+
* Added notice for variable products (if no variation applied by default) when adding to cart from Wishlist page.
|
482 |
+
* Fixed an issue when products could not be added to cart from shared Wishlist
|
483 |
+
* Fixed an issue with redirect to cart page after successful product addition
|
484 |
+
* Fixed an issue with "Plain" permalinks structure
|
485 |
+
|
486 |
+
= 1.5.3 =
|
487 |
+
*Release Date - 30 August 2017*
|
488 |
+
|
489 |
+
* Improved [WPML](https://wpml.org/?aid=9393&affiliate_key=9xzbMQnIyxHE) Compatibility
|
490 |
+
* Added minified version of FontAwesome library
|
491 |
+
* Added support for plugins/WooCommerce add-ons:
|
492 |
+
* WooCommerce Personalized Product Option
|
493 |
+
* [YITH WooCommerce Product Bundles](https://yithemes.com/themes/plugins/yith-woocommerce-product-bundles/?refer_id=1033256)
|
494 |
+
|
495 |
+
= 1.5.2 =
|
496 |
+
*Release Date - 23 August 2017*
|
497 |
+
|
498 |
+
* Fixed an issue when variation has additional attribute(s) with any value
|
499 |
+
|
500 |
+
= 1.5.1 =
|
501 |
+
*Release Date - 14 August 2017*
|
502 |
+
|
503 |
+
* Fixed a fatal error on Dashboard menu
|
504 |
+
* Minor CSS fixes
|
505 |
+
* Added support for plugins/WooCommerce add-ons:
|
506 |
+
* [WooCommerce Quantity Increment](https://wordpress.org/plugins/woocommerce-quantity-increment/)
|
507 |
+
|
508 |
+
= 1.5.0 =
|
509 |
+
*Release Date - 11 August 2017*
|
510 |
+
|
511 |
+
* Added an option to allow users remove products from a wishlist on the second click
|
512 |
+
* Added the ability to load custom translation files
|
513 |
+
* Overall frontend performance optimization
|
514 |
+
* Added support for plugins/WooCommerce add-ons that use custom meta:
|
515 |
+
* [WooCommerce Gift Cards](https://wordpress.org/plugins/gift-cards-for-woocommerce/)
|
516 |
+
* [WooCommerce Bookings](https://woocommerce.com/products/woocommerce-bookings/?aff=3955)
|
517 |
+
* [WooCommerce Subscriptions](https://woocommerce.com/products/woocommerce-subscriptions/?aff=3955)
|
518 |
+
* [WooCommerce Composite Products](https://woocommerce.com/products/composite-products/?aff=3955)
|
519 |
+
* [WooCommerce Product Bundles](https://woocommerce.com/products/product-bundles/?aff=3955)
|
520 |
+
* [WooCommerce Mix and Match](https://woocommerce.com/products/woocommerce-mix-and-match-products/?aff=3955)
|
521 |
+
* [WooCommerce Gravity Forms Product Add-Ons](https://woocommerce.com/products/gravity-forms-add-ons/?aff=3955)
|
522 |
+
|
523 |
+
= 1.4.0 =
|
524 |
+
*Release Date - 14 July 2017*
|
525 |
+
|
526 |
+
* Added "Add to Wishlist" button for a catalog page
|
527 |
+
* Added the ability to remove product from a Wishlist on the second click
|
528 |
+
* Added an option to show/hide a popup with successful or error notices after adding or removing products from a Wishlist
|
529 |
+
* Added "Wishlist Products counter" shortcode & widget
|
530 |
+
* Added some missing settings descriptions in the admin panel
|
531 |
+
|
532 |
+
= 1.3.4 =
|
533 |
+
*Release Date - 08 May 2017*
|
534 |
+
|
535 |
+
* Fixed critical issue when plugin activated by TGMPA class
|
536 |
+
* Fixed few PHP notices
|
537 |
+
* Cleanup of the code
|
538 |
+
|
539 |
+
= 1.3.3 =
|
540 |
+
*Release Date - 07 May 2017*
|
541 |
+
|
542 |
+
* Improved [WPML](https://wpml.org/?aid=9393&affiliate_key=9xzbMQnIyxHE) compatibility (fixed an issue with URL formats)
|
543 |
+
* Fixed issues with deprecated hooks related to WooCommerce 3.0.5
|
544 |
+
* Added [Polylang](https://wordpress.org/plugins/polylang/) plugin support
|
545 |
+
* Added new option that allows product automatic removal when it's added to cart by anyone
|
546 |
+
|
547 |
+
|
548 |
+
= 1.3.2 =
|
549 |
+
*Release Date - 27 April 2017*
|
550 |
+
|
551 |
+
* Fixed extra redirect to Setup Wizard
|
552 |
+
* Improved theme compatibility tests performance
|
553 |
+
|
554 |
+
= 1.3.1 =
|
555 |
+
*Release Date - 26 April 2017*
|
556 |
+
|
557 |
+
* Improved theme compatibility tests for shared hosts
|
558 |
+
* Improved compatibility for WooCommerce 2 & 3
|
559 |
+
|
560 |
+
= 1.3.0 =
|
561 |
+
*Release Date - 24 April 2017*
|
562 |
+
|
563 |
+
* Fixed [WPML](https://wpml.org/?aid=9393&affiliate_key=9xzbMQnIyxHE) string translations issue
|
564 |
+
* Added theme compatibility notices
|
565 |
+
* Wishlist custom item meta hidden from order
|
566 |
+
* Added compatibility with [WooCommerce Gift Cards](https://wordpress.org/plugins/gift-cards-for-woocommerce/)
|
567 |
+
|
568 |
+
= 1.2.1 =
|
569 |
+
*Release Date - 08 April 2017*
|
570 |
+
|
571 |
+
* Fixed critical error in 'add to wishlist' shortcode for WooCommerce 3.0+
|
572 |
+
|
573 |
+
= 1.2.0 =
|
574 |
+
*Release Date - 07 April 2017*
|
575 |
+
|
576 |
+
* WooCommerce 3.0+ support
|
577 |
+
* Added template overrides check for WooCommerce system report
|
578 |
+
|
579 |
+
= 1.1.14 =
|
580 |
+
*Release Date - 04 April 2017*
|
581 |
+
|
582 |
+
* Fixed multiple issues with [WPML](https://wpml.org/?aid=9393&affiliate_key=9xzbMQnIyxHE) support.
|
583 |
+
|
584 |
+
= 1.1.13 =
|
585 |
+
*Release Date - 16 March 2017*
|
586 |
+
|
587 |
+
* Fixed an issue when the Wishlist was not refreshed after the product is removed or added to cart by the unauthenticated user.
|
588 |
+
|
589 |
+
= 1.1.12 =
|
590 |
+
*Release Date - 05 March 2017*
|
591 |
+
|
592 |
+
* Added "Contact Us" page on the plugin menu
|
593 |
+
* Added the usage stats opt-in to help us improve the plugin
|
594 |
+
* Fixed some translations
|
595 |
+
|
596 |
+
= 1.1.11 =
|
597 |
+
*Release Date - 03 March 2017*
|
598 |
+
|
599 |
+
* Fixed an issue with external products link
|
600 |
+
|
601 |
+
|
602 |
+
= 1.1.10 =
|
603 |
+
*Release Date - 02 March 2017*
|
604 |
+
|
605 |
+
* The Setup Wizard enhancements
|
606 |
+
* Added new hooks for wishlist create|update|delete and wishlist product add|update|remove events
|
607 |
+
|
608 |
+
= 1.1.9 =
|
609 |
+
*Release Date - 26 February 2017*
|
610 |
+
|
611 |
+
* Fixed an issue with [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/) compatibility
|
612 |
+
* Added public functions
|
613 |
+
|
614 |
+
= 1.1.8 =
|
615 |
+
*Release Date - 03 February 2017*
|
616 |
+
|
617 |
+
* Fixed an issue with "Add to Wishlist" function in a quick view popup (Compatibility with plugins that provide QuickView functionality)
|
618 |
+
* Added JavaScript alert for the "Add to Wishlist" button on a single product page when no variations are selected
|
619 |
+
|
620 |
+
|
621 |
+
= 1.1.7 =
|
622 |
+
*Release Date - 30 January 2017*
|
623 |
+
|
624 |
+
* Fixed an issue when maximum 10 products can be added to cart from a Wishlist page using the "Add all to cart" button
|
625 |
+
|
626 |
+
|
627 |
+
= 1.1.6 =
|
628 |
+
*Release Date - 27 January 2017*
|
629 |
+
|
630 |
+
* Fixed class loading critical error after plugin activation
|
631 |
+
|
632 |
+
|
633 |
+
= 1.1.5 =
|
634 |
+
*Release Date - 10 January 2017*
|
635 |
+
|
636 |
+
* Fixed issue with empty wishlist page
|
637 |
+
* Fixed issue with wrong product quantity on add to cart event from wishlist
|
638 |
+
|
639 |
+
|
640 |
+
= 1.1.4 =
|
641 |
+
*Release Date - 12 December 2016*
|
642 |
+
|
643 |
+
* Fixed issue with translations
|
644 |
+
|
645 |
+
|
646 |
+
= 1.1.3 =
|
647 |
+
*Release Date - 09 December 2016*
|
648 |
+
|
649 |
+
* Fixed issues with pagination
|
650 |
+
* Added support for WordPress 4.7
|
651 |
+
|
652 |
+
|
653 |
+
= 1.1.2 =
|
654 |
+
*Release Date - 23 November 2016*
|
655 |
+
|
656 |
+
* Added minified versions of public CSS
|
657 |
+
* Fixed issue with sharing buttons for non-logged users
|
658 |
+
* Fixed issue with pagination URLs for guests
|
659 |
+
* Removed Genericicons fonts
|
660 |
+
|
661 |
+
|
662 |
+
= 1.1.1 =
|
663 |
+
*Release Date - 08 November 2016*
|
664 |
+
|
665 |
+
* Fixed issue with upgrade from free to premium version
|
666 |
+
|
667 |
+
|
668 |
+
= 1.1.0 =
|
669 |
+
*Release Date - 11 October 2016*
|
670 |
+
|
671 |
+
* Added support for [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/) plugin
|
672 |
+
* Added support for [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/) plugin
|
673 |
+
* Added support for [WooCommerce Gravity Forms Product Add-Ons](https://woocommerce.com/products/gravity-forms-add-ons/?aff=3955)
|
674 |
+
* Added option to show link to Wishlist on My Account page
|
675 |
+
* Added minimized versions of JS
|
676 |
+
|
677 |
+
|
678 |
+
= 1.0.0 =
|
679 |
+
*Release Date - 22 September 2016*
|
includes/analytics.class.php
CHANGED
@@ -100,7 +100,6 @@ class TInvWL_Analytics {
|
|
100 |
return $product_data;
|
101 |
}
|
102 |
|
103 |
-
|
104 |
/**
|
105 |
* Add views analitycs
|
106 |
*
|
100 |
return $product_data;
|
101 |
}
|
102 |
|
|
|
103 |
/**
|
104 |
* Add views analitycs
|
105 |
*
|
includes/api.class.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* REST API plugin class
|
4 |
+
*
|
5 |
+
* @since 1.13.0
|
6 |
+
* @package TInvWishlist
|
7 |
+
*/
|
8 |
+
|
9 |
+
// If this file is called directly, abort.
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
die;
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* REST API plugin class
|
16 |
+
*/
|
17 |
+
class TInvWL_API {
|
18 |
+
public static function init() {
|
19 |
+
add_filter( 'woocommerce_api_classes', __CLASS__ . '::includes' );
|
20 |
+
|
21 |
+
add_action( 'rest_api_init', __CLASS__ . '::register_routes', 15 );
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Include the required files for the REST API and add register the wishlist
|
26 |
+
* API class in the WC_API_Server.
|
27 |
+
*
|
28 |
+
* @param Array $wc_api_classes WC_API::registered_resources list of api_classes
|
29 |
+
*
|
30 |
+
* @return array
|
31 |
+
*/
|
32 |
+
public static function includes( $wc_api_classes ) {
|
33 |
+
|
34 |
+
if ( ! defined( 'WC_API_REQUEST_VERSION' ) || 3 == WC_API_REQUEST_VERSION ) {
|
35 |
+
array_push( $wc_api_classes, 'TInvWL_Includes_API_Wishlist' );
|
36 |
+
}
|
37 |
+
|
38 |
+
return $wc_api_classes;
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Load the new REST API wishlist endpoints
|
43 |
+
*
|
44 |
+
*/
|
45 |
+
public static function register_routes() {
|
46 |
+
global $wp_version;
|
47 |
+
|
48 |
+
if ( version_compare( $wp_version, 4.4, '<' ) || ( ! defined( 'WC_VERSION' ) || version_compare( WC_VERSION, '2.6', '<' ) ) ) {
|
49 |
+
return;
|
50 |
+
}
|
51 |
+
$controller = new TInvWL_Includes_API_Wishlist();
|
52 |
+
$controller->register_routes();
|
53 |
+
}
|
54 |
+
}
|
includes/api/wishlist.class.php
ADDED
@@ -0,0 +1,374 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* REST API plugin class
|
4 |
+
*
|
5 |
+
* @since 1.13.0
|
6 |
+
* @package TInvWishlist
|
7 |
+
*/
|
8 |
+
|
9 |
+
// If this file is called directly, abort.
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
die;
|
12 |
+
}
|
13 |
+
|
14 |
+
|
15 |
+
/**
|
16 |
+
* REST API plugin class
|
17 |
+
*/
|
18 |
+
class TInvWL_Includes_API_Wishlist {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Endpoint namespace.
|
22 |
+
*
|
23 |
+
* @var string
|
24 |
+
*/
|
25 |
+
protected $namespace = 'wc/v3';
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Route base.
|
29 |
+
*
|
30 |
+
* @var string
|
31 |
+
*/
|
32 |
+
protected $rest_base = 'wishlist';
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Register the routes for wishlist.
|
36 |
+
*/
|
37 |
+
public function register_routes() {
|
38 |
+
|
39 |
+
// Get wishlist data by share key.
|
40 |
+
register_rest_route( $this->namespace, '/' . $this->rest_base . '/get_by_share_key/(?P<share_key>[A-Fa-f0-9]{6})', array(
|
41 |
+
array(
|
42 |
+
'methods' => WP_REST_Server::READABLE,
|
43 |
+
'callback' => array( $this, 'wishlist_get_by_share_key' ),
|
44 |
+
),
|
45 |
+
) );
|
46 |
+
|
47 |
+
// Get wishlist(s) data by user ID.
|
48 |
+
register_rest_route( $this->namespace, '/' . $this->rest_base . '/get_by_user/(?P<user_id>[\d]+)', array(
|
49 |
+
array(
|
50 |
+
'methods' => WP_REST_Server::READABLE,
|
51 |
+
'callback' => array( $this, 'wishlist_get_by_user' ),
|
52 |
+
),
|
53 |
+
) );
|
54 |
+
|
55 |
+
// Update wishlist data by share key.
|
56 |
+
register_rest_route( $this->namespace, '/' . $this->rest_base . '/update/(?P<share_key>[A-Fa-f0-9]{6})', array(
|
57 |
+
array(
|
58 |
+
'methods' => WP_REST_Server::CREATABLE,
|
59 |
+
'callback' => array( $this, 'wishlist_update' ),
|
60 |
+
),
|
61 |
+
) );
|
62 |
+
|
63 |
+
// Get wishlist products by share key.
|
64 |
+
register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<share_key>[A-Fa-f0-9]{6})/get_products', array(
|
65 |
+
array(
|
66 |
+
'methods' => WP_REST_Server::READABLE,
|
67 |
+
'callback' => array( $this, 'wishlist_get_products' ),
|
68 |
+
),
|
69 |
+
) );
|
70 |
+
|
71 |
+
// Add product to wishlist by share key.
|
72 |
+
register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<share_key>[A-Fa-f0-9]{6})/add_product', array(
|
73 |
+
array(
|
74 |
+
'methods' => WP_REST_Server::CREATABLE,
|
75 |
+
'callback' => array( $this, 'wishlist_add_product' ),
|
76 |
+
),
|
77 |
+
) );
|
78 |
+
|
79 |
+
// Remove product by item ID.
|
80 |
+
register_rest_route( $this->namespace, '/' . $this->rest_base . '/remove_product/(?P<item_id>[\d]+)', array(
|
81 |
+
array(
|
82 |
+
'methods' => WP_REST_Server::READABLE,
|
83 |
+
'callback' => array( $this, 'wishlist_remove_product' ),
|
84 |
+
),
|
85 |
+
) );
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Get wishlist data by share key.
|
90 |
+
*
|
91 |
+
* @param WP_REST_Request $request Request object.
|
92 |
+
*
|
93 |
+
* @return mixed|WP_Error|WP_REST_Response
|
94 |
+
*/
|
95 |
+
public function wishlist_get_by_share_key( $request ) {
|
96 |
+
try {
|
97 |
+
$share_key = $request['share_key'];
|
98 |
+
|
99 |
+
if ( ! empty( $share_key ) && preg_match( '/^[A-Fa-f0-9]{6}$/', $share_key ) ) {
|
100 |
+
$wishlist = tinv_wishlist_get( $share_key );
|
101 |
+
if ( ! $wishlist ) {
|
102 |
+
throw new WC_REST_Exception( 'ti_woocommerce_wishlist_api_invalid_share_key', __( 'Invalid wishlist share key.', 'ti-woocommerce-wishlist' ), 400 );
|
103 |
+
}
|
104 |
+
|
105 |
+
$response = $this->prepare_wishlist_data( $wishlist );
|
106 |
+
|
107 |
+
return rest_ensure_response( $response );
|
108 |
+
|
109 |
+
|
110 |
+
}
|
111 |
+
} catch ( WC_REST_Exception $e ) {
|
112 |
+
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Get wishlist(s) data by user ID.
|
118 |
+
*
|
119 |
+
* @param WP_REST_Request $request Request object.
|
120 |
+
*
|
121 |
+
* @return mixed|WP_Error|WP_REST_Response
|
122 |
+
*/
|
123 |
+
public function wishlist_get_by_user( $request ) {
|
124 |
+
try {
|
125 |
+
$user_id = $request['user_id'];
|
126 |
+
|
127 |
+
if ( ! empty( $user_id ) ) {
|
128 |
+
$wl = new TInvWL_Wishlist();
|
129 |
+
$wishlists = $wl->get_by_user( $user_id );
|
130 |
+
|
131 |
+
if ( ! $wishlists ) {
|
132 |
+
throw new WC_REST_Exception( 'ti_woocommerce_wishlist_api_wishlist_not_found', __( 'No wishlists found for this user.', 'ti-woocommerce-wishlist' ), 400 );
|
133 |
+
}
|
134 |
+
|
135 |
+
$response = array();
|
136 |
+
foreach ( $wishlists as $wishlist ) {
|
137 |
+
$response[] = $this->prepare_wishlist_data( $wishlist );
|
138 |
+
}
|
139 |
+
|
140 |
+
return rest_ensure_response( $response );
|
141 |
+
}
|
142 |
+
} catch ( WC_REST_Exception $e ) {
|
143 |
+
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
|
144 |
+
}
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Update wishlist data by share key.
|
149 |
+
*
|
150 |
+
* @param WP_REST_Request $request Request object.
|
151 |
+
*
|
152 |
+
* @return mixed|WP_Error|WP_REST_Response
|
153 |
+
*/
|
154 |
+
public function wishlist_update( $request ) {
|
155 |
+
try {
|
156 |
+
$share_key = $request['share_key'];
|
157 |
+
|
158 |
+
if ( ! empty( $share_key ) && preg_match( '/^[A-Fa-f0-9]{6}$/', $share_key ) ) {
|
159 |
+
|
160 |
+
$wl = new TInvWL_Wishlist();
|
161 |
+
|
162 |
+
$wishlist = $wl->get_by_share_key( $share_key );
|
163 |
+
|
164 |
+
if ( ! $wishlist ) {
|
165 |
+
throw new WC_REST_Exception( 'ti_woocommerce_wishlist_api_invalid_share_key', __( 'Invalid wishlist share key.', 'ti-woocommerce-wishlist' ), 400 );
|
166 |
+
}
|
167 |
+
|
168 |
+
$data = array();
|
169 |
+
if ( ! empty( $request['title'] ) ) {
|
170 |
+
$data['title'] = $request['title'];
|
171 |
+
}
|
172 |
+
|
173 |
+
if ( ! empty( $request['user_id'] ) ) {
|
174 |
+
$data['author'] = $request['user_id'];
|
175 |
+
}
|
176 |
+
|
177 |
+
if ( $data ) {
|
178 |
+
$update = $wl->update( $wishlist['ID'], $data );
|
179 |
+
|
180 |
+
if ( $update ) {
|
181 |
+
$response = $wl->get_by_share_key( $share_key );
|
182 |
+
|
183 |
+
return rest_ensure_response( $this->prepare_wishlist_data( $response ) );
|
184 |
+
}
|
185 |
+
|
186 |
+
throw new WC_REST_Exception( 'ti_woocommerce_wishlist_api_wishlist_update_error', __( 'Update wishlist data failed.', 'ti-woocommerce-wishlist' ), 400 );
|
187 |
+
|
188 |
+
}
|
189 |
+
}
|
190 |
+
} catch ( WC_REST_Exception $e ) {
|
191 |
+
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
|
192 |
+
}
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Get wishlist products by share key.
|
197 |
+
*
|
198 |
+
* @param WP_REST_Request $request Request object.
|
199 |
+
*
|
200 |
+
* @return mixed|WP_Error|WP_REST_Response
|
201 |
+
*/
|
202 |
+
public function wishlist_get_products( $request ) {
|
203 |
+
try {
|
204 |
+
$share_key = $request['share_key'];
|
205 |
+
|
206 |
+
if ( ! empty( $share_key ) && preg_match( '/^[A-Fa-f0-9]{6}$/', $share_key ) ) {
|
207 |
+
|
208 |
+
$wl = new TInvWL_Wishlist();
|
209 |
+
|
210 |
+
$wishlist = $wl->get_by_share_key( $share_key );
|
211 |
+
|
212 |
+
if ( ! $wishlist ) {
|
213 |
+
throw new WC_REST_Exception( 'ti_woocommerce_wishlist_api_invalid_share_key', __( 'Invalid wishlist share key.', 'ti-woocommerce-wishlist' ), 400 );
|
214 |
+
}
|
215 |
+
|
216 |
+
$wlp = new TInvWL_Product();
|
217 |
+
|
218 |
+
$args = array();
|
219 |
+
$args['wishlist_id'] = $wishlist['ID'];
|
220 |
+
$args['external'] = false;
|
221 |
+
|
222 |
+
if ( $request['count'] ) {
|
223 |
+
$args['count'] = $request['count'];
|
224 |
+
}
|
225 |
+
if ( $request['offset'] ) {
|
226 |
+
$args['offset'] = $request['offset'];
|
227 |
+
}
|
228 |
+
if ( $request['order'] ) {
|
229 |
+
$args['order'] = $request['order'];
|
230 |
+
}
|
231 |
+
|
232 |
+
$products = $wlp->get( $args );
|
233 |
+
|
234 |
+
if ( ! $products ) {
|
235 |
+
throw new WC_REST_Exception( 'ti_woocommerce_wishlist_api_wishlist_products_not_found', __( 'No products found for this wishlist.', 'ti-woocommerce-wishlist' ), 400 );
|
236 |
+
}
|
237 |
+
|
238 |
+
$response = array();
|
239 |
+
|
240 |
+
foreach ( $products as $product ) {
|
241 |
+
$response[] = $this->prepare_product_data( $product );
|
242 |
+
}
|
243 |
+
|
244 |
+
return rest_ensure_response( $response );
|
245 |
+
}
|
246 |
+
} catch ( WC_REST_Exception $e ) {
|
247 |
+
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
|
248 |
+
}
|
249 |
+
}
|
250 |
+
|
251 |
+
/**
|
252 |
+
* Add product to wishlist by share key.
|
253 |
+
*
|
254 |
+
* @param WP_REST_Request $request Request object.
|
255 |
+
*
|
256 |
+
* @return mixed|WP_Error|WP_REST_Response
|
257 |
+
*/
|
258 |
+
public function wishlist_add_product( $request ) {
|
259 |
+
try {
|
260 |
+
$share_key = $request['share_key'];
|
261 |
+
|
262 |
+
if ( ! empty( $share_key ) && preg_match( '/^[A-Fa-f0-9]{6}$/', $share_key ) ) {
|
263 |
+
|
264 |
+
$wl = new TInvWL_Wishlist();
|
265 |
+
|
266 |
+
$wishlist = $wl->get_by_share_key( $share_key );
|
267 |
+
|
268 |
+
if ( ! $wishlist ) {
|
269 |
+
throw new WC_REST_Exception( 'ti_woocommerce_wishlist_api_invalid_share_key', __( 'Invalid wishlist share key.', 'ti-woocommerce-wishlist' ), 400 );
|
270 |
+
}
|
271 |
+
|
272 |
+
$wlp = new TInvWL_Product();
|
273 |
+
|
274 |
+
$args = array();
|
275 |
+
$args['wishlist_id'] = $wishlist['ID'];
|
276 |
+
$args['author'] = $wishlist['author'];
|
277 |
+
|
278 |
+
if ( $request['product_id'] ) {
|
279 |
+
$args['product_id'] = $request['product_id'];
|
280 |
+
}
|
281 |
+
if ( $request['variation_id'] ) {
|
282 |
+
$args['variation_id'] = $request['variation_id'];
|
283 |
+
}
|
284 |
+
if ( $request['meta'] ) {
|
285 |
+
$meta = $request['meta'];
|
286 |
+
}
|
287 |
+
|
288 |
+
$product = $wlp->add_product( $args, $meta );
|
289 |
+
|
290 |
+
if ( ! $product ) {
|
291 |
+
throw new WC_REST_Exception( 'ti_woocommerce_wishlist_api_wishlist_products_not_found', __( 'Add product to wishlist failed.', 'ti-woocommerce-wishlist' ), 400 );
|
292 |
+
}
|
293 |
+
|
294 |
+
$response = array();
|
295 |
+
$products = $wlp->get( array( 'ID' => $product ) );
|
296 |
+
foreach ( $products as $product ) {
|
297 |
+
$response[] = $this->prepare_product_data( $product );
|
298 |
+
}
|
299 |
+
|
300 |
+
return rest_ensure_response( $response );
|
301 |
+
}
|
302 |
+
} catch ( WC_REST_Exception $e ) {
|
303 |
+
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
|
304 |
+
}
|
305 |
+
}
|
306 |
+
|
307 |
+
/**
|
308 |
+
* Remove product by item ID.
|
309 |
+
*
|
310 |
+
* @param WP_REST_Request $request Request object.
|
311 |
+
*
|
312 |
+
* @return mixed|WP_Error|WP_REST_Response
|
313 |
+
*/
|
314 |
+
public function wishlist_remove_product( $request ) {
|
315 |
+
try {
|
316 |
+
$item_id = $request['item_id'];
|
317 |
+
|
318 |
+
if ( ! empty( $item_id ) ) {
|
319 |
+
$wlp = new TInvWL_Product();
|
320 |
+
|
321 |
+
$args = array();
|
322 |
+
$args['ID'] = $item_id;
|
323 |
+
|
324 |
+
$result = $wlp->remove( $args );
|
325 |
+
|
326 |
+
if ( ! $result ) {
|
327 |
+
throw new WC_REST_Exception( 'ti_woocommerce_wishlist_api_wishlist_product_not_found', __( 'Product not found.', 'ti-woocommerce-wishlist' ), 400 );
|
328 |
+
}
|
329 |
+
|
330 |
+
return rest_ensure_response( __( 'Product removed from a wishlist.', 'ti-woocommerce-wishlist' ) );
|
331 |
+
}
|
332 |
+
} catch ( WC_REST_Exception $e ) {
|
333 |
+
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
|
334 |
+
}
|
335 |
+
}
|
336 |
+
|
337 |
+
/**
|
338 |
+
* Prepare wishlist data.
|
339 |
+
*
|
340 |
+
* @param array $wishlist Default wishlist data.
|
341 |
+
*
|
342 |
+
* @return array
|
343 |
+
*/
|
344 |
+
public function prepare_wishlist_data( $wishlist ) {
|
345 |
+
$response = array();
|
346 |
+
$response['id'] = $wishlist['ID'];
|
347 |
+
$response['user_id'] = $wishlist['author'];
|
348 |
+
$response['date_added'] = $wishlist['date'];
|
349 |
+
$response['title'] = $wishlist['title'];
|
350 |
+
$response['share_key'] = $wishlist['share_key'];
|
351 |
+
|
352 |
+
return $response;
|
353 |
+
}
|
354 |
+
|
355 |
+
/**
|
356 |
+
* Prepare wishlist item data.
|
357 |
+
*
|
358 |
+
* @param array $product Default wishlist item data.
|
359 |
+
*
|
360 |
+
* @return array
|
361 |
+
*/
|
362 |
+
public function prepare_product_data( $product ) {
|
363 |
+
$response = array();
|
364 |
+
$response['item_id'] = $product['ID'];
|
365 |
+
$response['product_id'] = $product['product_id'];
|
366 |
+
$response['variation_id'] = $product['variation_id'];
|
367 |
+
$response['meta'] = $product['meta'];
|
368 |
+
$response['date_added'] = $product['date'];
|
369 |
+
$response['price'] = $product['price'];
|
370 |
+
$response['in_stock'] = $product['in_stock'];
|
371 |
+
|
372 |
+
return $response;
|
373 |
+
}
|
374 |
+
}
|
includes/deprecated.class.php
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Deprecated hooks plugin class
|
4 |
+
*
|
5 |
+
* @since 1.13.0
|
6 |
+
* @package TInvWishlist
|
7 |
+
*/
|
8 |
+
|
9 |
+
// If this file is called directly, abort.
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
die;
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Deprecated hooks plugin class
|
16 |
+
*/
|
17 |
+
abstract class TInvWL_Deprecated {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Array of deprecated hooks we need to handle.
|
21 |
+
*
|
22 |
+
* @var array
|
23 |
+
*/
|
24 |
+
protected $deprecated_hooks = array();
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Array of versions on each hook has been deprecated.
|
28 |
+
*
|
29 |
+
* @var array
|
30 |
+
*/
|
31 |
+
protected $deprecated_version = array();
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Constructor.
|
35 |
+
*/
|
36 |
+
public function __construct() {
|
37 |
+
$new_hooks = array_keys( $this->deprecated_hooks );
|
38 |
+
array_walk( $new_hooks, array( $this, 'hook_in' ) );
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Hook into the new hook so we can handle deprecated hooks once fired.
|
43 |
+
*
|
44 |
+
* @param string $hook_name Hook name.
|
45 |
+
*/
|
46 |
+
abstract public function hook_in( $hook_name );
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Get old hooks to map to new hook.
|
50 |
+
*
|
51 |
+
* @param string $new_hook New hook name.
|
52 |
+
*
|
53 |
+
* @return array
|
54 |
+
*/
|
55 |
+
public function get_old_hooks( $new_hook ) {
|
56 |
+
$old_hooks = isset( $this->deprecated_hooks[ $new_hook ] ) ? $this->deprecated_hooks[ $new_hook ] : array();
|
57 |
+
$old_hooks = is_array( $old_hooks ) ? $old_hooks : array( $old_hooks );
|
58 |
+
|
59 |
+
return $old_hooks;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* If the hook is Deprecated, call the old hooks here.
|
64 |
+
*/
|
65 |
+
public function maybe_handle_deprecated_hook() {
|
66 |
+
$new_hook = current_filter();
|
67 |
+
$old_hooks = $this->get_old_hooks( $new_hook );
|
68 |
+
$new_callback_args = func_get_args();
|
69 |
+
$return_value = $new_callback_args[0];
|
70 |
+
foreach ( $old_hooks as $old_hook ) {
|
71 |
+
$return_value = $this->handle_deprecated_hook( $new_hook, $old_hook, $new_callback_args, $return_value );
|
72 |
+
}
|
73 |
+
|
74 |
+
return $return_value;
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* If the old hook is in-use, trigger it.
|
79 |
+
*
|
80 |
+
* @param string $new_hook New hook name.
|
81 |
+
* @param string $old_hook Old hook name.
|
82 |
+
* @param array $new_callback_args New callback args.
|
83 |
+
* @param mixed $return_value Returned value.
|
84 |
+
*
|
85 |
+
* @return mixed
|
86 |
+
*/
|
87 |
+
abstract public function handle_deprecated_hook( $new_hook, $old_hook, $new_callback_args, $return_value );
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Get deprecated version.
|
91 |
+
*
|
92 |
+
* @param string $old_hook Old hook name.
|
93 |
+
*
|
94 |
+
* @return string
|
95 |
+
*/
|
96 |
+
protected function get_deprecated_version( $old_hook ) {
|
97 |
+
return ! empty( $this->deprecated_version[ $old_hook ] ) ? $this->deprecated_version[ $old_hook ] : TINVWL_FVERSION;
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Display a deprecated notice for old hooks.
|
102 |
+
*
|
103 |
+
* @param string $old_hook Old hook.
|
104 |
+
* @param string $new_hook New hook.
|
105 |
+
*/
|
106 |
+
protected function display_notice( $old_hook, $new_hook ) {
|
107 |
+
_deprecated_hook( esc_html( $old_hook ), esc_html( $this->get_deprecated_version( $old_hook ) ), esc_html( $new_hook ) );
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Fire off a legacy hook with it's args.
|
112 |
+
*
|
113 |
+
* @param string $old_hook Old hook name.
|
114 |
+
* @param array $new_callback_args New callback args.
|
115 |
+
*
|
116 |
+
* @return mixed
|
117 |
+
*/
|
118 |
+
abstract protected function trigger_hook( $old_hook, $new_callback_args );
|
119 |
+
}
|
includes/deprecated/actions.class.php
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Deprecated actions plugin class
|
4 |
+
*
|
5 |
+
* @since 1.13.0
|
6 |
+
* @package TInvWishlist
|
7 |
+
*/
|
8 |
+
|
9 |
+
// If this file is called directly, abort.
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
die;
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Deprecated actions plugin class
|
16 |
+
*/
|
17 |
+
class TInvWL_Deprecated_Actions extends TInvWL_Deprecated {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Array of deprecated hooks we need to handle.
|
21 |
+
* Format of 'new' => 'old'.
|
22 |
+
*
|
23 |
+
* @var array
|
24 |
+
*/
|
25 |
+
protected $deprecated_hooks = array(
|
26 |
+
'tinvwl_wishlist_addtowishlist_button' => 'tinv_wishlist_addtowishlist_button',
|
27 |
+
'tinvwl_wishlist_addtowishlist_dialogbox' => 'tinv_wishlist_addtowishlist_dialogbox',
|
28 |
+
);
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Array of versions on each hook has been deprecated.
|
32 |
+
*
|
33 |
+
* @var array
|
34 |
+
*/
|
35 |
+
protected $deprecated_version = array(
|
36 |
+
'tinv_wishlist_addtowishlist_button' => '1.13.0',
|
37 |
+
'tinv_wishlist_addtowishlist_dialogbox' => '1.13.0',
|
38 |
+
);
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Hook into the new hook so we can handle deprecated hooks once fired.
|
42 |
+
*
|
43 |
+
* @param string $hook_name Hook name.
|
44 |
+
*/
|
45 |
+
public function hook_in( $hook_name ) {
|
46 |
+
add_action( $hook_name, array( $this, 'maybe_handle_deprecated_hook' ), - 1000, 8 );
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* If the old hook is in-use, trigger it.
|
51 |
+
*
|
52 |
+
* @param string $new_hook New hook name.
|
53 |
+
* @param string $old_hook Old hook name.
|
54 |
+
* @param array $new_callback_args New callback args.
|
55 |
+
* @param mixed $return_value Returned value.
|
56 |
+
*
|
57 |
+
* @return mixed
|
58 |
+
*/
|
59 |
+
public function handle_deprecated_hook( $new_hook, $old_hook, $new_callback_args, $return_value ) {
|
60 |
+
if ( has_action( $old_hook ) ) {
|
61 |
+
$this->display_notice( $old_hook, $new_hook );
|
62 |
+
$return_value = $this->trigger_hook( $old_hook, $new_callback_args );
|
63 |
+
}
|
64 |
+
|
65 |
+
return $return_value;
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Fire off a legacy hook with it's args.
|
70 |
+
*
|
71 |
+
* @param string $old_hook Old hook name.
|
72 |
+
* @param array $new_callback_args New callback args.
|
73 |
+
*
|
74 |
+
* @return mixed
|
75 |
+
*/
|
76 |
+
protected function trigger_hook( $old_hook, $new_callback_args ) {
|
77 |
+
switch ( $old_hook ) {
|
78 |
+
default:
|
79 |
+
do_action_ref_array( $old_hook, $new_callback_args );
|
80 |
+
break;
|
81 |
+
}
|
82 |
+
}
|
83 |
+
}
|
includes/deprecated/filters.class.php
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Deprecated filters plugin class
|
4 |
+
*
|
5 |
+
* @since 1.13.0
|
6 |
+
* @package TInvWishlist
|
7 |
+
*/
|
8 |
+
|
9 |
+
// If this file is called directly, abort.
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
die;
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Deprecated filters plugin class
|
16 |
+
*/
|
17 |
+
class TInvWL_Deprecated_Filters extends TInvWL_Deprecated {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Array of deprecated hooks we need to handle.
|
21 |
+
* Format of 'new' => 'old'.
|
22 |
+
*
|
23 |
+
* @var array
|
24 |
+
*/
|
25 |
+
protected $deprecated_hooks = array(
|
26 |
+
'tinvwl_load_frontend' => 'tinvwl-load_frontend',
|
27 |
+
'tinvwl_default_wishlist_title' => 'tinvwl-general-default_title',
|
28 |
+
'tinvwl_removed_from_wishlist_text' => 'tinvwl-general-text_removed_from',
|
29 |
+
'tinvwl_added_to_wishlist_text' => 'tinvwl-general-text_added_to',
|
30 |
+
'tinvwl_added_to_wishlist_text_loop' => 'tinvwl-add_to_wishlist_catalog-text',
|
31 |
+
'tinvwl_view_wishlist_text' => 'tinvwl-general-text_browse',
|
32 |
+
'tinvwl_already_in_wishlist_text' => 'tinvwl-general-text_already_in',
|
33 |
+
'tinvwl_allow_add_parent_variable_product' => 'tinvwl-allow_parent_variable',
|
34 |
+
'tinvwl_wishlist_products_counter_text' => 'tinvwl-topline-text',
|
35 |
+
'tinvwl_add_selected_to_cart_text' => 'tinvwl-table-text_add_select_to_cart',
|
36 |
+
'tinvwl_add_to_cart_text' => 'tinvwl-product_table-text_add_to_cart',
|
37 |
+
'tinvwl_share_on_text' => 'tinvwl-social-share_on',
|
38 |
+
'tinvwl_wishlist_products_counter_menu_html' => 'tinvwl-menu-item-title',
|
39 |
+
'tinvwl_wc_cart_fragments_enabled' => 'tinvwl-wc-cart-fragments',
|
40 |
+
'tinvwl_add_all_to_cart_text' => 'tinvwl-table-text_add_all_to_cart',
|
41 |
+
'tinvwl_remove_from_wishlist_text_loop' => 'tinvwl-add_to_wishlist_catalog-text_remove',
|
42 |
+
'tinvwl_wishlist_get_item_data' => 'tinv_wishlist_get_item_data',
|
43 |
+
);
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Array of versions on each hook has been deprecated.
|
47 |
+
*
|
48 |
+
* @var array
|
49 |
+
*/
|
50 |
+
protected $deprecated_version = array(
|
51 |
+
'tinvwl-load_frontend' => '1.13.0',
|
52 |
+
'tinvwl-general-default_title' => '1.13.0',
|
53 |
+
'tinvwl-general-text_removed_from' => '1.13.0',
|
54 |
+
'tinvwl-general-text_added_to' => '1.13.0',
|
55 |
+
'tinvwl-add_to_wishlist_catalog-text' => '1.13.0',
|
56 |
+
'tinvwl-general-text_browse' => '1.13.0',
|
57 |
+
'tinvwl-general-text_already_in' => '1.13.0',
|
58 |
+
'tinvwl-allow_parent_variable' => '1.13.0',
|
59 |
+
'tinvwl-topline-text' => '1.13.0',
|
60 |
+
'tinvwl-table-text_add_select_to_cart' => '1.13.0',
|
61 |
+
'tinvwl-product_table-text_add_to_cart' => '1.13.0',
|
62 |
+
'tinvwl-social-share_on' => '1.13.0',
|
63 |
+
'tinvwl-menu-item-title' => '1.13.0',
|
64 |
+
'tinvwl-wc-cart-fragments' => '1.13.0',
|
65 |
+
'tinvwl-table-text_add_all_to_cart' => '1.13.0',
|
66 |
+
'tinvwl-add_to_wishlist_catalog-text_remove' => '1.13.0',
|
67 |
+
'tinv_wishlist_get_item_data' => '1.13.0',
|
68 |
+
);
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Hook into the new hook so we can handle deprecated hooks once fired.
|
72 |
+
*
|
73 |
+
* @param string $hook_name Hook name.
|
74 |
+
*/
|
75 |
+
public function hook_in( $hook_name ) {
|
76 |
+
add_filter( $hook_name, array( $this, 'maybe_handle_deprecated_hook' ), - 1000, 8 );
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* If the old hook is in-use, trigger it.
|
81 |
+
*
|
82 |
+
* @param string $new_hook New hook name.
|
83 |
+
* @param string $old_hook Old hook name.
|
84 |
+
* @param array $new_callback_args New callback args.
|
85 |
+
* @param mixed $return_value Returned value.
|
86 |
+
*
|
87 |
+
* @return mixed
|
88 |
+
*/
|
89 |
+
public function handle_deprecated_hook( $new_hook, $old_hook, $new_callback_args, $return_value ) {
|
90 |
+
if ( has_filter( $old_hook ) ) {
|
91 |
+
$this->display_notice( $old_hook, $new_hook );
|
92 |
+
$return_value = $this->trigger_hook( $old_hook, $new_callback_args );
|
93 |
+
}
|
94 |
+
|
95 |
+
return $return_value;
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Fire off a legacy hook with it's args.
|
100 |
+
*
|
101 |
+
* @param string $old_hook Old hook name.
|
102 |
+
* @param array $new_callback_args New callback args.
|
103 |
+
*
|
104 |
+
* @return mixed
|
105 |
+
*/
|
106 |
+
protected function trigger_hook( $old_hook, $new_callback_args ) {
|
107 |
+
return apply_filters_ref_array( $old_hook, $new_callback_args );
|
108 |
+
}
|
109 |
+
}
|
includes/notice.helper.php
CHANGED
@@ -114,7 +114,7 @@ class TInvWL_Notice {
|
|
114 |
}
|
115 |
$output = '<div id="message" class="updated woocommerce-message"><a class="woocommerce-message-close notice-dismiss" href="' . esc_url( wp_nonce_url( add_query_arg( 'ti-hide-notice', $name, add_query_arg( 'ti-hide-notice-trigger', $key ) ), 'ti_hide', '_ti_notice_nonce' ) ) . '">' . __( 'Dismiss', 'ti-woocommerce-wishlist' ) . '</a>' . wp_kses_post( wpautop( $message ) ) . '</div>';
|
116 |
|
117 |
-
echo apply_filters( '
|
118 |
}
|
119 |
|
120 |
public static function remove( $name ) {
|
@@ -352,10 +352,10 @@ class TInvWL_Notice {
|
|
352 |
if ( ! empty( $name ) ) {
|
353 |
if ( isset( $data['_ti_notice_nonce'] ) && wp_verify_nonce( $data['_ti_notice_nonce'], 'ti_hide' ) ) {
|
354 |
self::hide( $name, $data['ti-hide-notice-trigger'] );
|
355 |
-
do_action( '
|
356 |
} elseif ( isset( $data['_ti_notice_nonce'] ) && wp_verify_nonce( $data['_ti_notice_nonce'], 'ti_remove' ) ) {
|
357 |
self::remove_notice( $name );
|
358 |
-
do_action( '
|
359 |
}
|
360 |
}
|
361 |
}
|
114 |
}
|
115 |
$output = '<div id="message" class="updated woocommerce-message"><a class="woocommerce-message-close notice-dismiss" href="' . esc_url( wp_nonce_url( add_query_arg( 'ti-hide-notice', $name, add_query_arg( 'ti-hide-notice-trigger', $key ) ), 'ti_hide', '_ti_notice_nonce' ) ) . '">' . __( 'Dismiss', 'ti-woocommerce-wishlist' ) . '</a>' . wp_kses_post( wpautop( $message ) ) . '</div>';
|
116 |
|
117 |
+
echo apply_filters( 'tinvwl_notice_' . $name, $output, $key, $message ); // WPCS: XSS ok.
|
118 |
}
|
119 |
|
120 |
public static function remove( $name ) {
|
352 |
if ( ! empty( $name ) ) {
|
353 |
if ( isset( $data['_ti_notice_nonce'] ) && wp_verify_nonce( $data['_ti_notice_nonce'], 'ti_hide' ) ) {
|
354 |
self::hide( $name, $data['ti-hide-notice-trigger'] );
|
355 |
+
do_action( 'tinvwl_notice_hide_' . $name );
|
356 |
} elseif ( isset( $data['_ti_notice_nonce'] ) && wp_verify_nonce( $data['_ti_notice_nonce'], 'ti_remove' ) ) {
|
357 |
self::remove_notice( $name );
|
358 |
+
do_action( 'tinvwl_notice_remove_' . $name );
|
359 |
}
|
360 |
}
|
361 |
}
|
includes/pluginextend.helper.php
CHANGED
@@ -1,604 +1,604 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Dependency plugin class
|
4 |
-
*
|
5 |
-
* @since 1.0.0
|
6 |
-
* @package TInvWishlist
|
7 |
-
*/
|
8 |
-
|
9 |
-
// If this file is called directly, abort.
|
10 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
-
die;
|
12 |
-
}
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Dependency plugin class
|
16 |
-
*/
|
17 |
-
class TInvWL_PluginExtend {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Plugin name
|
21 |
-
*
|
22 |
-
* @var string
|
23 |
-
*/
|
24 |
-
public $_name;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Plugin transient name
|
28 |
-
*
|
29 |
-
* @var string
|
30 |
-
*/
|
31 |
-
private $transient;
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Plugin dependency array
|
35 |
-
*
|
36 |
-
* @var array
|
37 |
-
*/
|
38 |
-
private $dependency;
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Current dependency name
|
42 |
-
*
|
43 |
-
* @var string
|
44 |
-
*/
|
45 |
-
private $dependency_current;
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Current dependency nice name
|
49 |
-
*
|
50 |
-
* @var string
|
51 |
-
*/
|
52 |
-
private $dependency_current_nice_name;
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Plugin path dir
|
56 |
-
*
|
57 |
-
* @var string
|
58 |
-
*/
|
59 |
-
private $plugin_path;
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Cached plugin data
|
63 |
-
*
|
64 |
-
* @var array
|
65 |
-
*/
|
66 |
-
private $plugin_data;
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Plugin error message
|
70 |
-
*
|
71 |
-
* @var array
|
72 |
-
*/
|
73 |
-
public $message;
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Constructor
|
77 |
-
*
|
78 |
-
* @param string $plugin Plugin transient name, or can use Plugin root file.
|
79 |
-
* @param string $root_file Plugin root file, or can use Plugin transient name.
|
80 |
-
* @param string $plugin_name Plugin name.
|
81 |
-
*/
|
82 |
-
public function __construct( $plugin, $root_file = null, $plugin_name = TINVWL_PREFIX ) {
|
83 |
-
$this->_name = $plugin_name;
|
84 |
-
if ( empty( $plugin ) ) {
|
85 |
-
$this->transient = plugin_basename( $root_file );
|
86 |
-
$this->plugin_path = trailingslashit( plugin_dir_path( dirname( $root_file ) ) );
|
87 |
-
} else {
|
88 |
-
$this->transient = $plugin;
|
89 |
-
$this->plugin_path = trailingslashit( dirname( TINVWL_PATH ) );
|
90 |
-
}
|
91 |
-
$this->dependency = array();
|
92 |
-
$this->plugin_data = array();
|
93 |
-
$this->message = array();
|
94 |
-
}
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Run hooks dependency
|
98 |
-
*/
|
99 |
-
public function run() {
|
100 |
-
if ( 'plugins.php' === basename( $_SERVER['PHP_SELF'] ) && ! ( defined( 'WP_CLI' ) && WP_CLI ) ) { // @codingStandardsIgnoreLine WordPress.VIP.SuperGlobalInputUsage.AccessDetected
|
101 |
-
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
|
102 |
-
|
103 |
-
$plugins = $this->get_dependency_plugins();
|
104 |
-
|
105 |
-
foreach ( array_keys( $plugins ) as $plugin ) {
|
106 |
-
add_filter( 'plugin_action_links_' . $plugin, array( $this, 'plugin_action_links_maybe_deactivate' ) );
|
107 |
-
add_filter( 'network_admin_plugin_action_links_' . $plugin, array(
|
108 |
-
$this,
|
109 |
-
'plugin_action_links_maybe_deactivate',
|
110 |
-
) );
|
111 |
-
}
|
112 |
-
|
113 |
-
add_action( 'after_plugin_row_' . $this->transient, array( $this, 'plugin_row' ), 10 );
|
114 |
-
} else {
|
115 |
-
add_action( 'update_option_active_sitewide_plugins', array( $this, 'maybe_deactivate' ), 10, 2 );
|
116 |
-
add_action( 'update_option_active_plugins', array( $this, 'maybe_deactivate' ), 10, 2 );
|
117 |
-
}
|
118 |
-
}
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Set dependency plugin transient name
|
122 |
-
*
|
123 |
-
* @param string $plugin Plugin transient name.
|
124 |
-
* @param string $nice_name Plugin nice name.
|
125 |
-
*
|
126 |
-
* @return \TInvWL_PluginExtend
|
127 |
-
*/
|
128 |
-
public function set_dependency( $plugin, $nice_name ) {
|
129 |
-
$this->dependency_current = $plugin;
|
130 |
-
$this->dependency_current_nice_name = $nice_name;
|
131 |
-
|
132 |
-
return $this;
|
133 |
-
}
|
134 |
-
|
135 |
-
/**
|
136 |
-
* Reset current dependency plugin transient name
|
137 |
-
*
|
138 |
-
* @return \TInvWL_PluginExtend
|
139 |
-
*/
|
140 |
-
public function reset_dependency() {
|
141 |
-
$this->dependency_current = null;
|
142 |
-
|
143 |
-
return $this;
|
144 |
-
}
|
145 |
-
|
146 |
-
/**
|
147 |
-
* Set dependency version by index rules
|
148 |
-
*
|
149 |
-
* @param integer $index Index rules.
|
150 |
-
* 0 Min version.
|
151 |
-
* 1 Max version.
|
152 |
-
* 2 Need plugin verion.
|
153 |
-
* 3 Conflict plugin verion.
|
154 |
-
* @param string $version Version dependency.
|
155 |
-
*
|
156 |
-
* @return boolean
|
157 |
-
*/
|
158 |
-
private function set_dependency_version( $index, $version = '1.0.0' ) {
|
159 |
-
if ( empty( $this->dependency_current ) ) {
|
160 |
-
return false;
|
161 |
-
}
|
162 |
-
if ( empty( $version ) ) {
|
163 |
-
$this->dependency[ $this->dependency_current ][ $index ] = null;
|
164 |
-
} else {
|
165 |
-
$this->dependency[ $this->dependency_current ][ $index ] = $version;
|
166 |
-
}
|
167 |
-
$this->dependency[ $this->dependency_current ]['nice_name'] = $this->dependency_current_nice_name;
|
168 |
-
}
|
169 |
-
|
170 |
-
/**
|
171 |
-
* Set minimal dependency version
|
172 |
-
*
|
173 |
-
* @param string $version Version dependency.
|
174 |
-
*
|
175 |
-
* @return \TInvWL_PluginExtend
|
176 |
-
*/
|
177 |
-
public function min( $version = '1.0.0' ) {
|
178 |
-
if ( '*' === $version ) {
|
179 |
-
$version = '';
|
180 |
-
}
|
181 |
-
$this->set_dependency_version( 0, $version );
|
182 |
-
|
183 |
-
return $this;
|
184 |
-
}
|
185 |
-
|
186 |
-
/**
|
187 |
-
* Set maximum dependency version
|
188 |
-
*
|
189 |
-
* @param string $version Version dependency.
|
190 |
-
*
|
191 |
-
* @return \TInvWL_PluginExtend
|
192 |
-
*/
|
193 |
-
public function max( $version = '1.0.0' ) {
|
194 |
-
if ( '*' === $version ) {
|
195 |
-
$version = '';
|
196 |
-
}
|
197 |
-
$this->set_dependency_version( 1, $version );
|
198 |
-
|
199 |
-
return $this;
|
200 |
-
}
|
201 |
-
|
202 |
-
/**
|
203 |
-
* Set need plugin dependency version
|
204 |
-
*
|
205 |
-
* @param string $version Version dependency. Can use '*' for check any version.
|
206 |
-
*
|
207 |
-
* @return \TInvWL_PluginExtend
|
208 |
-
*/
|
209 |
-
public function need( $version = '*' ) {
|
210 |
-
$this->set_dependency_version( 2, $version );
|
211 |
-
|
212 |
-
return $this;
|
213 |
-
}
|
214 |
-
|
215 |
-
/**
|
216 |
-
* Set conflict plugin dependency version
|
217 |
-
*
|
218 |
-
* @param string $version Version dependency. Can use '*' for check any version.
|
219 |
-
*
|
220 |
-
* @return \TInvWL_PluginExtend
|
221 |
-
*/
|
222 |
-
public function conflict( $version = '*' ) {
|
223 |
-
$this->set_dependency_version( 3, $version );
|
224 |
-
|
225 |
-
return $this;
|
226 |
-
}
|
227 |
-
|
228 |
-
/**
|
229 |
-
* Get dependency array
|
230 |
-
*
|
231 |
-
* @param string $plugin Plugin transient name.
|
232 |
-
*
|
233 |
-
* @return array
|
234 |
-
*/
|
235 |
-
private function get_dependency( $plugin ) {
|
236 |
-
if ( array_key_exists( $plugin, $this->dependency ) ) {
|
237 |
-
return $this->dependency[ $plugin ];
|
238 |
-
}
|
239 |
-
|
240 |
-
return array();
|
241 |
-
}
|
242 |
-
|
243 |
-
/**
|
244 |
-
* Get dependency version from array.
|
245 |
-
*
|
246 |
-
* @param string $plugin Plugin transient name.
|
247 |
-
* @param integer $index Index rules.
|
248 |
-
* 0 Min version.
|
249 |
-
* 1 Max version.
|
250 |
-
* 2 Need plugin verion.
|
251 |
-
* 3 Conflict plugin verion.
|
252 |
-
*
|
253 |
-
* @return array
|
254 |
-
*/
|
255 |
-
private function get_dep_ver( $plugin, $index ) {
|
256 |
-
$dependency = $this->get_dependency( $plugin );
|
257 |
-
if ( array_key_exists( $index, $dependency ) ) {
|
258 |
-
return $dependency[ $index ];
|
259 |
-
}
|
260 |
-
|
261 |
-
return null;
|
262 |
-
}
|
263 |
-
|
264 |
-
/**
|
265 |
-
* List dependency plugins
|
266 |
-
*
|
267 |
-
* @return array
|
268 |
-
*/
|
269 |
-
private function get_dependency_plugins() {
|
270 |
-
return $this->dependency;
|
271 |
-
}
|
272 |
-
|
273 |
-
/**
|
274 |
-
* Check all dependency.
|
275 |
-
*
|
276 |
-
* @return boolean
|
277 |
-
*/
|
278 |
-
public function status_dependency() {
|
279 |
-
$this->message = array();
|
280 |
-
$plugins = $this->get_dependency_plugins();
|
281 |
-
$status = true;
|
282 |
-
|
283 |
-
foreach ( $plugins as $plugin => $data ) {
|
284 |
-
if ( is_plugin_active( $plugin ) && ! $this->is_plugin_at_conflict_version( $plugin ) ) {
|
285 |
-
$status = $this->set_message( 'conflict', $data['nice_name'] );
|
286 |
-
} elseif ( ! is_plugin_active( $plugin ) || ! $this->is_plugin_at_need_version( $plugin ) ) {
|
287 |
-
$status = $this->set_message( 'need', $data['nice_name'] );
|
288 |
-
} elseif ( is_plugin_active( $plugin ) && ! $this->is_plugin_at_min_version( $plugin ) ) {
|
289 |
-
$status = $this->set_message( 'upgrade', $data['nice_name'] );
|
290 |
-
} elseif ( is_plugin_active( $plugin ) && ! $this->is_plugin_at_max_version( $plugin ) ) {
|
291 |
-
$status = $this->set_message( 'downgrade', $plugin );
|
292 |
-
} elseif ( ! is_plugin_active( $plugin ) ) {
|
293 |
-
$status = $this->set_message( 'activate', $data['nice_name'] );
|
294 |
-
}
|
295 |
-
}
|
296 |
-
|
297 |
-
return $status;
|
298 |
-
}
|
299 |
-
|
300 |
-
/**
|
301 |
-
* Check plugin minimal version dependency.
|
302 |
-
*
|
303 |
-
* @param string $plugin Plugin transient name.
|
304 |
-
*
|
305 |
-
* @return boolean
|
306 |
-
*/
|
307 |
-
private function is_plugin_at_min_version( $plugin ) {
|
308 |
-
return $this->is_plugin_at_version( 0, $plugin );
|
309 |
-
}
|
310 |
-
|
311 |
-
/**
|
312 |
-
* Check plugin maximal version dependency.
|
313 |
-
*
|
314 |
-
* @param string $plugin Plugin transient name.
|
315 |
-
*
|
316 |
-
* @return boolean
|
317 |
-
*/
|
318 |
-
private function is_plugin_at_max_version( $plugin ) {
|
319 |
-
return $this->is_plugin_at_version( 1, $plugin );
|
320 |
-
}
|
321 |
-
|
322 |
-
/**
|
323 |
-
* Check plugin need version dependency.
|
324 |
-
*
|
325 |
-
* @param string $plugin Plugin transient name.
|
326 |
-
*
|
327 |
-
* @return boolean
|
328 |
-
*/
|
329 |
-
private function is_plugin_at_need_version( $plugin ) {
|
330 |
-
return $this->is_plugin_at_version( 2, $plugin );
|
331 |
-
}
|
332 |
-
|
333 |
-
/**
|
334 |
-
* Check plugin conflict version dependency.
|
335 |
-
*
|
336 |
-
* @param string $plugin Plugin transient name.
|
337 |
-
*
|
338 |
-
* @return boolean
|
339 |
-
*/
|
340 |
-
private function is_plugin_at_conflict_version( $plugin ) {
|
341 |
-
return $this->is_plugin_at_version( 3, $plugin );
|
342 |
-
}
|
343 |
-
|
344 |
-
/**
|
345 |
-
* Check plugin version dependency.
|
346 |
-
*
|
347 |
-
* @param integer $i Index rules.
|
348 |
-
* 0 Min version.
|
349 |
-
* 1 Max version.
|
350 |
-
* 2 Need plugin verion.
|
351 |
-
* 3 Conflict plugin verion.
|
352 |
-
* @param string $plugin Plugin transient name.
|
353 |
-
*
|
354 |
-
* @return boolean
|
355 |
-
*/
|
356 |
-
private function is_plugin_at_version( $i = 0, $plugin ) {
|
357 |
-
|
358 |
-
switch ( $i ) {
|
359 |
-
case 3:
|
360 |
-
$type = 'ne';
|
361 |
-
$i = 3;
|
362 |
-
break;
|
363 |
-
case 2:
|
364 |
-
$type = 'eq';
|
365 |
-
$i = 2;
|
366 |
-
break;
|
367 |
-
case 1:
|
368 |
-
$type = 'le';
|
369 |
-
$i = 1;
|
370 |
-
break;
|
371 |
-
case 0:
|
372 |
-
default:
|
373 |
-
$type = 'ge';
|
374 |
-
$i = 0;
|
375 |
-
}
|
376 |
-
$version = $this->get_dep_ver( $plugin, $i );
|
377 |
-
if ( is_null( $version ) ) {
|
378 |
-
return true;
|
379 |
-
}
|
380 |
-
$version_plugin = $this->get_plugin_data( $plugin, 'Version' );
|
381 |
-
if ( '*' === $version ) {
|
382 |
-
if ( 3 === $i ) {
|
383 |
-
return empty( $version_plugin );
|
384 |
-
} else {
|
385 |
-
return ! empty( $version_plugin );
|
386 |
-
}
|
387 |
-
}
|
388 |
-
|
389 |
-
return version_compare( $version_plugin, $version, $type );
|
390 |
-
}
|
391 |
-
|
392 |
-
/**
|
393 |
-
* Get error messages
|
394 |
-
*
|
395 |
-
* @param boolean $first Get first or all error messages.
|
396 |
-
*
|
397 |
-
* @return string
|
398 |
-
*/
|
399 |
-
public function get_messages( $first = false ) {
|
400 |
-
if ( $first ) {
|
401 |
-
$message = array_shift( $this->message );
|
402 |
-
$this->message = array();
|
403 |
-
|
404 |
-
return $message;
|
405 |
-
}
|
406 |
-
|
407 |
-
$message = '<p>' . implode( '</p><p>', $this->message ) . '</p>';
|
408 |
-
$this->message = array();
|
409 |
-
|
410 |
-
return $message;
|
411 |
-
}
|
412 |
-
|
413 |
-
/**
|
414 |
-
* Deactivation plugin
|
415 |
-
*
|
416 |
-
* @param string $old_value Not used.
|
417 |
-
* @param string $value Not used.
|
418 |
-
*
|
419 |
-
* @return string
|
420 |
-
*/
|
421 |
-
public function maybe_deactivate( $old_value, $value ) {
|
422 |
-
if ( ! $this->status_dependency() ) {
|
423 |
-
self::deactivate_self( $this->transient );
|
424 |
-
|
425 |
-
if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
426 |
-
$plugins = $this->get_dependency_plugins();
|
427 |
-
$this->get_messages();
|
428 |
-
|
429 |
-
foreach ( $plugins as $plugin => $data ) {
|
430 |
-
if ( ! is_plugin_active( $plugin ) || ! $this->is_plugin_at_need_version( $plugin ) ) {
|
431 |
-
return WP_CLI::error( $this->get_message( 'deactivate', $data['nice_name'] ) );
|
432 |
-
} elseif ( is_plugin_active( $plugin ) && ! $this->is_plugin_at_min_version( $plugin ) ) {
|
433 |
-
return WP_CLI::error( $this->get_message( 'deactivate', $data['nice_name'] ) );
|
434 |
-
} elseif ( is_plugin_active( $plugin ) && ! $this->is_plugin_at_max_version( $plugin ) ) {
|
435 |
-
return WP_CLI::error( $this->get_message( 'deactivate', $data['nice_name'] ) );
|
436 |
-
}
|
437 |
-
}
|
438 |
-
}
|
439 |
-
}
|
440 |
-
}
|
441 |
-
|
442 |
-
/**
|
443 |
-
* Deactivation plugin
|
444 |
-
*
|
445 |
-
* @param string $actions Not used.
|
446 |
-
*
|
447 |
-
* @return string
|
448 |
-
*/
|
449 |
-
public function plugin_action_links_maybe_deactivate( $actions ) {
|
450 |
-
if ( ! $this->status_dependency() ) {
|
451 |
-
self::deactivate_self( $this->transient );
|
452 |
-
}
|
453 |
-
|
454 |
-
return $actions;
|
455 |
-
}
|
456 |
-
|
457 |
-
/**
|
458 |
-
* Return message in plugin lists table
|
459 |
-
*
|
460 |
-
* @param string $file Plugin file path.
|
461 |
-
*/
|
462 |
-
public function plugin_row( $file ) {
|
463 |
-
if ( ! $this->status_dependency() ) {
|
464 |
-
$wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
|
465 |
-
?>
|
466 |
-
<tr class="plugin-update-tr installer-plugin-update-tr">
|
467 |
-
<td colspan="<?php echo $wp_list_table->get_column_count(); // WPCS: xss ok. ?>"
|
468 |
-
class="plugin-update colspanchange">
|
469 |
-
<div class="notice inline notice-warning notice-alt">
|
470 |
-
<p class="installer-q-icon">
|
471 |
-
<?php echo $this->get_messages( true ); // WPCS: xss ok. ?>
|
472 |
-
</p>
|
473 |
-
</div>
|
474 |
-
</td>
|
475 |
-
</tr>
|
476 |
-
<?php
|
477 |
-
}
|
478 |
-
}
|
479 |
-
|
480 |
-
/**
|
481 |
-
* Deactivation plugin
|
482 |
-
*
|
483 |
-
* @param string $file Plugin file path.
|
484 |
-
* @param boolean $network_wide Network wide.
|
485 |
-
*/
|
486 |
-
public static function deactivate_self( $file, $network_wide = false ) {
|
487 |
-
if ( is_multisite()
|
488 |
-
$network_wide = is_plugin_active_for_network( $file );
|
489 |
-
}
|
490 |
-
|
491 |
-
deactivate_plugins( $file, true, $network_wide );
|
492 |
-
}
|
493 |
-
|
494 |
-
/**
|
495 |
-
* Set message
|
496 |
-
*
|
497 |
-
* @param string $type Type error message.
|
498 |
-
* @param string $plugin Plugin transient name.
|
499 |
-
*
|
500 |
-
* @return boolean
|
501 |
-
*/
|
502 |
-
private function set_message( $type, $plugin ) {
|
503 |
-
$current = $this->get_plugin_data( 'current', 'Name' ) ? $this->get_plugin_data( 'current', 'Name' ) : $this->transient;
|
504 |
-
$version = $this->get_plugin_data( 'current', 'Version' );
|
505 |
-
$plugname = $this->get_plugin_data( $plugin, 'Name' ) ? $this->get_plugin_data( $plugin, 'Name' ) : $plugin;
|
506 |
-
|
507 |
-
$message = '';
|
508 |
-
switch ( $type ) {
|
509 |
-
case 'deactivate':
|
510 |
-
$version = $this->get_dep_ver( $plugin, 0 );
|
511 |
-
$message = __( '%2$s %3$s is required for %1$s. Deactivating %1$s.', 'ti-woocommerce-wishlist' );
|
512 |
-
if ( empty( $version ) ) {
|
513 |
-
$version = $this->get_dep_ver( $plugin, 1 );
|
514 |
-
}
|
515 |
-
if ( empty( $version ) ) {
|
516 |
-
$version = $this->get_dep_ver( $plugin, 2 );
|
517 |
-
}
|
518 |
-
if ( empty( $version ) ) {
|
519 |
-
$version = $this->get_dep_ver( $plugin, 3 );
|
520 |
-
$message = __( '%1$s is confilcted with %2$s %3$s. Deactivating %1$s.', 'ti-woocommerce-wishlist' );
|
521 |
-
}
|
522 |
-
if ( '*' === $version ) {
|
523 |
-
$version = $this->get_plugin_data( $plugin, 'Version' );
|
524 |
-
}
|
525 |
-
break;
|
526 |
-
case 'upgrade':
|
527 |
-
case 'update':
|
528 |
-
$version = $this->get_dep_ver( $plugin, 0 );
|
529 |
-
$message = __( '%2$s %3$s is required. Please update it before activating this plugin.', 'ti-woocommerce-wishlist' );
|
530 |
-
break;
|
531 |
-
case 'downgrade':
|
532 |
-
case 'downdate':
|
533 |
-
$version = $this->get_dep_ver( $plugin, 1 );
|
534 |
-
$message = __( '%2$s %3$s is required. Please downgrade it before activating this plugin.', 'ti-woocommerce-wishlist' );
|
535 |
-
break;
|
536 |
-
case 'need':
|
537 |
-
$version = '*' === $this->get_dep_ver( $plugin, 2 ) ? $this->get_plugin_data( $plugin, 'Version' ) : $this->get_dep_ver( $plugin, 2 );
|
538 |
-
$message = __( '%2$s %3$s is required. Please activate it before activating this plugin.', 'ti-woocommerce-wishlist' );
|
539 |
-
break;
|
540 |
-
case 'conflict':
|
541 |
-
$version = '*' === $this->get_dep_ver( $plugin, 3 ) ? $this->get_plugin_data( $plugin, 'Version' ) : $this->get_dep_ver( $plugin, 3 );
|
542 |
-
$message = __( '%1$s is conflicted with %2$s %3$s. Please disable it before activating this plugin.', 'ti-woocommerce-wishlist' );
|
543 |
-
break;
|
544 |
-
case 'activate':
|
545 |
-
$version = $this->get_dep_ver( $plugin, 1 );
|
546 |
-
$message = __( '%1$s %3$s is required. Please activate it before activating this plugin.', 'ti-woocommerce-wishlist' );
|
547 |
-
break;
|
548 |
-
} // End switch().
|
549 |
-
if ( empty( $message ) ) {
|
550 |
-
return true;
|
551 |
-
}
|
552 |
-
if ( ! empty( $version ) ) {
|
553 |
-
$version = '(v' . $version . ')';
|
554 |
-
}
|
555 |
-
$message = sprintf( $message, $current, $plugname, $version );
|
556 |
-
|
557 |
-
$this->message[] = $message;
|
558 |
-
|
559 |
-
return false;
|
560 |
-
}
|
561 |
-
|
562 |
-
/**
|
563 |
-
* Add error admin notice
|
564 |
-
*/
|
565 |
-
public function admin_notices() {
|
566 |
-
if ( ! $this->status_dependency() ) {
|
567 |
-
printf( '<div class="error is-dismissible">%s</div>', $this->get_messages() ); // WPCS: xss ok.
|
568 |
-
}
|
569 |
-
}
|
570 |
-
|
571 |
-
/**
|
572 |
-
* Get plugin info
|
573 |
-
*
|
574 |
-
* @param string $plugin Plugin transient name.
|
575 |
-
* @param string $attr Plugin attribute name.
|
576 |
-
*
|
577 |
-
* @return mixed
|
578 |
-
*/
|
579 |
-
public function get_plugin_data( $plugin, $attr = null ) {
|
580 |
-
if ( 'current' === $plugin ) {
|
581 |
-
$plugin = $this->transient;
|
582 |
-
}
|
583 |
-
|
584 |
-
$plugin_path = $this->plugin_path . $plugin;
|
585 |
-
|
586 |
-
if ( ! array_key_exists( $plugin, $this->plugin_data ) ) {
|
587 |
-
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
588 |
-
$plugin_data = array_filter( @get_plugin_data( $plugin_path, false, false ) ); // @codingStandardsIgnoreLine Generic.PHP.NoSilencedErrors.Discouraged
|
589 |
-
if ( empty( $plugin_data ) ) {
|
590 |
-
$plugin_data = null;
|
591 |
-
}
|
592 |
-
$this->plugin_data[ $plugin ] = $plugin_data;
|
593 |
-
}
|
594 |
-
|
595 |
-
if ( empty( $attr ) ) {
|
596 |
-
return $this->plugin_data[ $plugin ];
|
597 |
-
}
|
598 |
-
if ( array_key_exists( $attr, (array) $this->plugin_data[ $plugin ] ) ) {
|
599 |
-
return $this->plugin_data[ $plugin ][ $attr ];
|
600 |
-
}
|
601 |
-
|
602 |
-
return null;
|
603 |
-
}
|
604 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Dependency plugin class
|
4 |
+
*
|
5 |
+
* @since 1.0.0
|
6 |
+
* @package TInvWishlist
|
7 |
+
*/
|
8 |
+
|
9 |
+
// If this file is called directly, abort.
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
die;
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Dependency plugin class
|
16 |
+
*/
|
17 |
+
class TInvWL_PluginExtend {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Plugin name
|
21 |
+
*
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
public $_name;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Plugin transient name
|
28 |
+
*
|
29 |
+
* @var string
|
30 |
+
*/
|
31 |
+
private $transient;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Plugin dependency array
|
35 |
+
*
|
36 |
+
* @var array
|
37 |
+
*/
|
38 |
+
private $dependency;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Current dependency name
|
42 |
+
*
|
43 |
+
* @var string
|
44 |
+
*/
|
45 |
+
private $dependency_current;
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Current dependency nice name
|
49 |
+
*
|
50 |
+
* @var string
|
51 |
+
*/
|
52 |
+
private $dependency_current_nice_name;
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Plugin path dir
|
56 |
+
*
|
57 |
+
* @var string
|
58 |
+
*/
|
59 |
+
private $plugin_path;
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Cached plugin data
|
63 |
+
*
|
64 |
+
* @var array
|
65 |
+
*/
|
66 |
+
private $plugin_data;
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Plugin error message
|
70 |
+
*
|
71 |
+
* @var array
|
72 |
+
*/
|
73 |
+
public $message;
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Constructor
|
77 |
+
*
|
78 |
+
* @param string $plugin Plugin transient name, or can use Plugin root file.
|
79 |
+
* @param string $root_file Plugin root file, or can use Plugin transient name.
|
80 |
+
* @param string $plugin_name Plugin name.
|
81 |
+
*/
|
82 |
+
public function __construct( $plugin, $root_file = null, $plugin_name = TINVWL_PREFIX ) {
|
83 |
+
$this->_name = $plugin_name;
|
84 |
+
if ( empty( $plugin ) ) {
|
85 |
+
$this->transient = plugin_basename( $root_file );
|
86 |
+
$this->plugin_path = trailingslashit( plugin_dir_path( dirname( $root_file ) ) );
|
87 |
+
} else {
|
88 |
+
$this->transient = $plugin;
|
89 |
+
$this->plugin_path = trailingslashit( dirname( TINVWL_PATH ) );
|
90 |
+
}
|
91 |
+
$this->dependency = array();
|
92 |
+
$this->plugin_data = array();
|
93 |
+
$this->message = array();
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Run hooks dependency
|
98 |
+
*/
|
99 |
+
public function run() {
|
100 |
+
if ( 'plugins.php' === basename( $_SERVER['PHP_SELF'] ) && ! ( defined( 'WP_CLI' ) && WP_CLI ) ) { // @codingStandardsIgnoreLine WordPress.VIP.SuperGlobalInputUsage.AccessDetected
|
101 |
+
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
|
102 |
+
|
103 |
+
$plugins = $this->get_dependency_plugins();
|
104 |
+
|
105 |
+
foreach ( array_keys( $plugins ) as $plugin ) {
|
106 |
+
add_filter( 'plugin_action_links_' . $plugin, array( $this, 'plugin_action_links_maybe_deactivate' ) );
|
107 |
+
add_filter( 'network_admin_plugin_action_links_' . $plugin, array(
|
108 |
+
$this,
|
109 |
+
'plugin_action_links_maybe_deactivate',
|
110 |
+
) );
|
111 |
+
}
|
112 |
+
|
113 |
+
add_action( 'after_plugin_row_' . $this->transient, array( $this, 'plugin_row' ), 10 );
|
114 |
+
} else {
|
115 |
+
add_action( 'update_option_active_sitewide_plugins', array( $this, 'maybe_deactivate' ), 10, 2 );
|
116 |
+
add_action( 'update_option_active_plugins', array( $this, 'maybe_deactivate' ), 10, 2 );
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Set dependency plugin transient name
|
122 |
+
*
|
123 |
+
* @param string $plugin Plugin transient name.
|
124 |
+
* @param string $nice_name Plugin nice name.
|
125 |
+
*
|
126 |
+
* @return \TInvWL_PluginExtend
|
127 |
+
*/
|
128 |
+
public function set_dependency( $plugin, $nice_name ) {
|
129 |
+
$this->dependency_current = $plugin;
|
130 |
+
$this->dependency_current_nice_name = $nice_name;
|
131 |
+
|
132 |
+
return $this;
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Reset current dependency plugin transient name
|
137 |
+
*
|
138 |
+
* @return \TInvWL_PluginExtend
|
139 |
+
*/
|
140 |
+
public function reset_dependency() {
|
141 |
+
$this->dependency_current = null;
|
142 |
+
|
143 |
+
return $this;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Set dependency version by index rules
|
148 |
+
*
|
149 |
+
* @param integer $index Index rules.
|
150 |
+
* 0 Min version.
|
151 |
+
* 1 Max version.
|
152 |
+
* 2 Need plugin verion.
|
153 |
+
* 3 Conflict plugin verion.
|
154 |
+
* @param string $version Version dependency.
|
155 |
+
*
|
156 |
+
* @return boolean
|
157 |
+
*/
|
158 |
+
private function set_dependency_version( $index, $version = '1.0.0' ) {
|
159 |
+
if ( empty( $this->dependency_current ) ) {
|
160 |
+
return false;
|
161 |
+
}
|
162 |
+
if ( empty( $version ) ) {
|
163 |
+
$this->dependency[ $this->dependency_current ][ $index ] = null;
|
164 |
+
} else {
|
165 |
+
$this->dependency[ $this->dependency_current ][ $index ] = $version;
|
166 |
+
}
|
167 |
+
$this->dependency[ $this->dependency_current ]['nice_name'] = $this->dependency_current_nice_name;
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Set minimal dependency version
|
172 |
+
*
|
173 |
+
* @param string $version Version dependency.
|
174 |
+
*
|
175 |
+
* @return \TInvWL_PluginExtend
|
176 |
+
*/
|
177 |
+
public function min( $version = '1.0.0' ) {
|
178 |
+
if ( '*' === $version ) {
|
179 |
+
$version = '';
|
180 |
+
}
|
181 |
+
$this->set_dependency_version( 0, $version );
|
182 |
+
|
183 |
+
return $this;
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Set maximum dependency version
|
188 |
+
*
|
189 |
+
* @param string $version Version dependency.
|
190 |
+
*
|
191 |
+
* @return \TInvWL_PluginExtend
|
192 |
+
*/
|
193 |
+
public function max( $version = '1.0.0' ) {
|
194 |
+
if ( '*' === $version ) {
|
195 |
+
$version = '';
|
196 |
+
}
|
197 |
+
$this->set_dependency_version( 1, $version );
|
198 |
+
|
199 |
+
return $this;
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Set need plugin dependency version
|
204 |
+
*
|
205 |
+
* @param string $version Version dependency. Can use '*' for check any version.
|
206 |
+
*
|
207 |
+
* @return \TInvWL_PluginExtend
|
208 |
+
*/
|
209 |
+
public function need( $version = '*' ) {
|
210 |
+
$this->set_dependency_version( 2, $version );
|
211 |
+
|
212 |
+
return $this;
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Set conflict plugin dependency version
|
217 |
+
*
|
218 |
+
* @param string $version Version dependency. Can use '*' for check any version.
|
219 |
+
*
|
220 |
+
* @return \TInvWL_PluginExtend
|
221 |
+
*/
|
222 |
+
public function conflict( $version = '*' ) {
|
223 |
+
$this->set_dependency_version( 3, $version );
|
224 |
+
|
225 |
+
return $this;
|
226 |
+
}
|
227 |
+
|
228 |
+
/**
|
229 |
+
* Get dependency array
|
230 |
+
*
|
231 |
+
* @param string $plugin Plugin transient name.
|
232 |
+
*
|
233 |
+
* @return array
|
234 |
+
*/
|
235 |
+
private function get_dependency( $plugin ) {
|
236 |
+
if ( array_key_exists( $plugin, $this->dependency ) ) {
|
237 |
+
return $this->dependency[ $plugin ];
|
238 |
+
}
|
239 |
+
|
240 |
+
return array();
|
241 |
+
}
|
242 |
+
|
243 |
+
/**
|
244 |
+
* Get dependency version from array.
|
245 |
+
*
|
246 |
+
* @param string $plugin Plugin transient name.
|
247 |
+
* @param integer $index Index rules.
|
248 |
+
* 0 Min version.
|
249 |
+
* 1 Max version.
|
250 |
+
* 2 Need plugin verion.
|
251 |
+
* 3 Conflict plugin verion.
|
252 |
+
*
|
253 |
+
* @return array
|
254 |
+
*/
|
255 |
+
private function get_dep_ver( $plugin, $index ) {
|
256 |
+
$dependency = $this->get_dependency( $plugin );
|
257 |
+
if ( array_key_exists( $index, $dependency ) ) {
|
258 |
+
return $dependency[ $index ];
|
259 |
+
}
|
260 |
+
|
261 |
+
return null;
|
262 |
+
}
|
263 |
+
|
264 |
+
/**
|
265 |
+
* List dependency plugins
|
266 |
+
*
|
267 |
+
* @return array
|
268 |
+
*/
|
269 |
+
private function get_dependency_plugins() {
|
270 |
+
return $this->dependency;
|
271 |
+
}
|
272 |
+
|
273 |
+
/**
|
274 |
+
* Check all dependency.
|
275 |
+
*
|
276 |
+
* @return boolean
|
277 |
+
*/
|
278 |
+
public function status_dependency() {
|
279 |
+
$this->message = array();
|
280 |
+
$plugins = $this->get_dependency_plugins();
|
281 |
+
$status = true;
|
282 |
+
|
283 |
+
foreach ( $plugins as $plugin => $data ) {
|
284 |
+
if ( is_plugin_active( $plugin ) && ! $this->is_plugin_at_conflict_version( $plugin ) ) {
|
285 |
+
$status = $this->set_message( 'conflict', $data['nice_name'] );
|
286 |
+
} elseif ( ! is_plugin_active( $plugin ) || ! $this->is_plugin_at_need_version( $plugin ) ) {
|
287 |
+
$status = $this->set_message( 'need', $data['nice_name'] );
|
288 |
+
} elseif ( is_plugin_active( $plugin ) && ! $this->is_plugin_at_min_version( $plugin ) ) {
|
289 |
+
$status = $this->set_message( 'upgrade', $data['nice_name'] );
|
290 |
+
} elseif ( is_plugin_active( $plugin ) && ! $this->is_plugin_at_max_version( $plugin ) ) {
|
291 |
+
$status = $this->set_message( 'downgrade', $plugin );
|
292 |
+
} elseif ( ! is_plugin_active( $plugin ) ) {
|
293 |
+
$status = $this->set_message( 'activate', $data['nice_name'] );
|
294 |
+
}
|
295 |
+
}
|
296 |
+
|
297 |
+
return $status;
|
298 |
+
}
|
299 |
+
|
300 |
+
/**
|
301 |
+
* Check plugin minimal version dependency.
|
302 |
+
*
|
303 |
+
* @param string $plugin Plugin transient name.
|
304 |
+
*
|
305 |
+
* @return boolean
|
306 |
+
*/
|
307 |
+
private function is_plugin_at_min_version( $plugin ) {
|
308 |
+
return $this->is_plugin_at_version( 0, $plugin );
|
309 |
+
}
|
310 |
+
|
311 |
+
/**
|
312 |
+
* Check plugin maximal version dependency.
|
313 |
+
*
|
314 |
+
* @param string $plugin Plugin transient name.
|
315 |
+
*
|
316 |
+
* @return boolean
|
317 |
+
*/
|
318 |
+
private function is_plugin_at_max_version( $plugin ) {
|
319 |
+
return $this->is_plugin_at_version( 1, $plugin );
|
320 |
+
}
|
321 |
+
|
322 |
+
/**
|
323 |
+
* Check plugin need version dependency.
|
324 |
+
*
|
325 |
+
* @param string $plugin Plugin transient name.
|
326 |
+
*
|
327 |
+
* @return boolean
|
328 |
+
*/
|
329 |
+
private function is_plugin_at_need_version( $plugin ) {
|
330 |
+
return $this->is_plugin_at_version( 2, $plugin );
|
331 |
+
}
|
332 |
+
|
333 |
+
/**
|
334 |
+
* Check plugin conflict version dependency.
|
335 |
+
*
|
336 |
+
* @param string $plugin Plugin transient name.
|
337 |
+
*
|
338 |
+
* @return boolean
|
339 |
+
*/
|
340 |
+
private function is_plugin_at_conflict_version( $plugin ) {
|
341 |
+
return $this->is_plugin_at_version( 3, $plugin );
|
342 |
+
}
|
343 |
+
|
344 |
+
/**
|
345 |
+
* Check plugin version dependency.
|
346 |
+
*
|
347 |
+
* @param integer $i Index rules.
|
348 |
+
* 0 Min version.
|
349 |
+
* 1 Max version.
|
350 |
+
* 2 Need plugin verion.
|
351 |
+
* 3 Conflict plugin verion.
|
352 |
+
* @param string $plugin Plugin transient name.
|
353 |
+
*
|
354 |
+
* @return boolean
|
355 |
+
*/
|
356 |
+
private function is_plugin_at_version( $i = 0, $plugin ) {
|
357 |
+
|
358 |
+
switch ( $i ) {
|
359 |
+
case 3:
|
360 |
+
$type = 'ne';
|
361 |
+
$i = 3;
|
362 |
+
break;
|
363 |
+
case 2:
|
364 |
+
$type = 'eq';
|
365 |
+
$i = 2;
|
366 |
+
break;
|
367 |
+
case 1:
|
368 |
+
$type = 'le';
|
369 |
+
$i = 1;
|
370 |
+
break;
|
371 |
+
case 0:
|
372 |
+
default:
|
373 |
+
$type = 'ge';
|
374 |
+
$i = 0;
|
375 |
+
}
|
376 |
+
$version = $this->get_dep_ver( $plugin, $i );
|
377 |
+
if ( is_null( $version ) ) {
|
378 |
+
return true;
|
379 |
+
}
|
380 |
+
$version_plugin = $this->get_plugin_data( $plugin, 'Version' );
|
381 |
+
if ( '*' === $version ) {
|
382 |
+
if ( 3 === $i ) {
|
383 |
+
return empty( $version_plugin );
|
384 |
+
} else {
|
385 |
+
return ! empty( $version_plugin );
|
386 |
+
}
|
387 |
+
}
|
388 |
+
|
389 |
+
return version_compare( $version_plugin, $version, $type );
|
390 |
+
}
|
391 |
+
|
392 |
+
/**
|
393 |
+
* Get error messages
|
394 |
+
*
|
395 |
+
* @param boolean $first Get first or all error messages.
|
396 |
+
*
|
397 |
+
* @return string
|
398 |
+
*/
|
399 |
+
public function get_messages( $first = false ) {
|
400 |
+
if ( $first ) {
|
401 |
+
$message = array_shift( $this->message );
|
402 |
+
$this->message = array();
|
403 |
+
|
404 |
+
return $message;
|
405 |
+
}
|
406 |
+
|
407 |
+
$message = '<p>' . implode( '</p><p>', $this->message ) . '</p>';
|
408 |
+
$this->message = array();
|
409 |
+
|
410 |
+
return $message;
|
411 |
+
}
|
412 |
+
|
413 |
+
/**
|
414 |
+
* Deactivation plugin
|
415 |
+
*
|
416 |
+
* @param string $old_value Not used.
|
417 |
+
* @param string $value Not used.
|
418 |
+
*
|
419 |
+
* @return string
|
420 |
+
*/
|
421 |
+
public function maybe_deactivate( $old_value, $value ) {
|
422 |
+
if ( ! $this->status_dependency() ) {
|
423 |
+
self::deactivate_self( $this->transient );
|
424 |
+
|
425 |
+
if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
426 |
+
$plugins = $this->get_dependency_plugins();
|
427 |
+
$this->get_messages();
|
428 |
+
|
429 |
+
foreach ( $plugins as $plugin => $data ) {
|
430 |
+
if ( ! is_plugin_active( $plugin ) || ! $this->is_plugin_at_need_version( $plugin ) ) {
|
431 |
+
return WP_CLI::error( $this->get_message( 'deactivate', $data['nice_name'] ) );
|
432 |
+
} elseif ( is_plugin_active( $plugin ) && ! $this->is_plugin_at_min_version( $plugin ) ) {
|
433 |
+
return WP_CLI::error( $this->get_message( 'deactivate', $data['nice_name'] ) );
|
434 |
+
} elseif ( is_plugin_active( $plugin ) && ! $this->is_plugin_at_max_version( $plugin ) ) {
|
435 |
+
return WP_CLI::error( $this->get_message( 'deactivate', $data['nice_name'] ) );
|
436 |
+
}
|
437 |
+
}
|
438 |
+
}
|
439 |
+
}
|
440 |
+
}
|
441 |
+
|
442 |
+
/**
|
443 |
+
* Deactivation plugin
|
444 |
+
*
|
445 |
+
* @param string $actions Not used.
|
446 |
+
*
|
447 |
+
* @return string
|
448 |
+
*/
|
449 |
+
public function plugin_action_links_maybe_deactivate( $actions ) {
|
450 |
+
if ( ! $this->status_dependency() ) {
|
451 |
+
self::deactivate_self( $this->transient );
|
452 |
+
}
|
453 |
+
|
454 |
+
return $actions;
|
455 |
+
}
|
456 |
+
|
457 |
+
/**
|
458 |
+
* Return message in plugin lists table
|
459 |
+
*
|
460 |
+
* @param string $file Plugin file path.
|
461 |
+
*/
|
462 |
+
public function plugin_row( $file ) {
|
463 |
+
if ( ! $this->status_dependency() ) {
|
464 |
+
$wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
|
465 |
+
?>
|
466 |
+
<tr class="plugin-update-tr installer-plugin-update-tr">
|
467 |
+
<td colspan="<?php echo $wp_list_table->get_column_count(); // WPCS: xss ok. ?>"
|
468 |
+
class="plugin-update colspanchange">
|
469 |
+
<div class="notice inline notice-warning notice-alt">
|
470 |
+
<p class="installer-q-icon">
|
471 |
+
<?php echo $this->get_messages( true ); // WPCS: xss ok. ?>
|
472 |
+
</p>
|
473 |
+
</div>
|
474 |
+
</td>
|
475 |
+
</tr>
|
476 |
+
<?php
|
477 |
+
}
|
478 |
+
}
|
479 |
+
|
480 |
+
/**
|
481 |
+
* Deactivation plugin
|
482 |
+
*
|
483 |
+
* @param string $file Plugin file path.
|
484 |
+
* @param boolean $network_wide Network wide.
|
485 |
+
*/
|
486 |
+
public static function deactivate_self( $file, $network_wide = false ) {
|
487 |
+
if ( is_multisite() ) {
|
488 |
+
$network_wide = is_plugin_active_for_network( $file );
|
489 |
+
}
|
490 |
+
|
491 |
+
deactivate_plugins( $file, true, $network_wide );
|
492 |
+
}
|
493 |
+
|
494 |
+
/**
|
495 |
+
* Set message
|
496 |
+
*
|
497 |
+
* @param string $type Type error message.
|
498 |
+
* @param string $plugin Plugin transient name.
|
499 |
+
*
|
500 |
+
* @return boolean
|
501 |
+
*/
|
502 |
+
private function set_message( $type, $plugin ) {
|
503 |
+
$current = $this->get_plugin_data( 'current', 'Name' ) ? $this->get_plugin_data( 'current', 'Name' ) : $this->transient;
|
504 |
+
$version = $this->get_plugin_data( 'current', 'Version' );
|
505 |
+
$plugname = $this->get_plugin_data( $plugin, 'Name' ) ? $this->get_plugin_data( $plugin, 'Name' ) : $plugin;
|
506 |
+
|
507 |
+
$message = '';
|
508 |
+
switch ( $type ) {
|
509 |
+
case 'deactivate':
|
510 |
+
$version = $this->get_dep_ver( $plugin, 0 );
|
511 |
+
$message = __( '%2$s %3$s is required for %1$s. Deactivating %1$s.', 'ti-woocommerce-wishlist' );
|
512 |
+
if ( empty( $version ) ) {
|
513 |
+
$version = $this->get_dep_ver( $plugin, 1 );
|
514 |
+
}
|
515 |
+
if ( empty( $version ) ) {
|
516 |
+
$version = $this->get_dep_ver( $plugin, 2 );
|
517 |
+
}
|
518 |
+
if ( empty( $version ) ) {
|
519 |
+
$version = $this->get_dep_ver( $plugin, 3 );
|
520 |
+
$message = __( '%1$s is confilcted with %2$s %3$s. Deactivating %1$s.', 'ti-woocommerce-wishlist' );
|
521 |
+
}
|
522 |
+
if ( '*' === $version ) {
|
523 |
+
$version = $this->get_plugin_data( $plugin, 'Version' );
|
524 |
+
}
|
525 |
+
break;
|
526 |
+
case 'upgrade':
|
527 |
+
case 'update':
|
528 |
+
$version = $this->get_dep_ver( $plugin, 0 );
|
529 |
+
$message = __( '%2$s %3$s is required. Please update it before activating this plugin.', 'ti-woocommerce-wishlist' );
|
530 |
+
break;
|
531 |
+
case 'downgrade':
|
532 |
+
case 'downdate':
|
533 |
+
$version = $this->get_dep_ver( $plugin, 1 );
|
534 |
+
$message = __( '%2$s %3$s is required. Please downgrade it before activating this plugin.', 'ti-woocommerce-wishlist' );
|
535 |
+
break;
|
536 |
+
case 'need':
|
537 |
+
$version = '*' === $this->get_dep_ver( $plugin, 2 ) ? $this->get_plugin_data( $plugin, 'Version' ) : $this->get_dep_ver( $plugin, 2 );
|
538 |
+
$message = __( '%2$s %3$s is required. Please activate it before activating this plugin.', 'ti-woocommerce-wishlist' );
|
539 |
+
break;
|
540 |
+
case 'conflict':
|
541 |
+
$version = '*' === $this->get_dep_ver( $plugin, 3 ) ? $this->get_plugin_data( $plugin, 'Version' ) : $this->get_dep_ver( $plugin, 3 );
|
542 |
+
$message = __( '%1$s is conflicted with %2$s %3$s. Please disable it before activating this plugin.', 'ti-woocommerce-wishlist' );
|
543 |
+
break;
|
544 |
+
case 'activate':
|
545 |
+
$version = $this->get_dep_ver( $plugin, 1 );
|
546 |
+
$message = __( '%1$s %3$s is required. Please activate it before activating this plugin.', 'ti-woocommerce-wishlist' );
|
547 |
+
break;
|
548 |
+
} // End switch().
|
549 |
+
if ( empty( $message ) ) {
|
550 |
+
return true;
|
551 |
+
}
|
552 |
+
if ( ! empty( $version ) ) {
|
553 |
+
$version = '(v' . $version . ')';
|
554 |
+
}
|
555 |
+
$message = sprintf( $message, $current, $plugname, $version );
|
556 |
+
|
557 |
+
$this->message[] = $message;
|
558 |
+
|
559 |
+
return false;
|
560 |
+
}
|
561 |
+
|
562 |
+
/**
|
563 |
+
* Add error admin notice
|
564 |
+
*/
|
565 |
+
public function admin_notices() {
|
566 |
+
if ( ! $this->status_dependency() ) {
|
567 |
+
printf( '<div class="error is-dismissible">%s</div>', $this->get_messages() ); // WPCS: xss ok.
|
568 |
+
}
|
569 |
+
}
|
570 |
+
|
571 |
+
/**
|
572 |
+
* Get plugin info
|
573 |
+
*
|
574 |
+
* @param string $plugin Plugin transient name.
|
575 |
+
* @param string $attr Plugin attribute name.
|
576 |
+
*
|
577 |
+
* @return mixed
|
578 |
+
*/
|
579 |
+
public function get_plugin_data( $plugin, $attr = null ) {
|
580 |
+
if ( 'current' === $plugin ) {
|
581 |
+
$plugin = $this->transient;
|
582 |
+
}
|
583 |
+
|
584 |
+
$plugin_path = $this->plugin_path . $plugin;
|
585 |
+
|
586 |
+
if ( ! array_key_exists( $plugin, $this->plugin_data ) ) {
|
587 |
+
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
588 |
+
$plugin_data = array_filter( @get_plugin_data( $plugin_path, false, false ) ); // @codingStandardsIgnoreLine Generic.PHP.NoSilencedErrors.Discouraged
|
589 |
+
if ( empty( $plugin_data ) ) {
|
590 |
+
$plugin_data = null;
|
591 |
+
}
|
592 |
+
$this->plugin_data[ $plugin ] = $plugin_data;
|
593 |
+
}
|
594 |
+
|
595 |
+
if ( empty( $attr ) ) {
|
596 |
+
return $this->plugin_data[ $plugin ];
|
597 |
+
}
|
598 |
+
if ( array_key_exists( $attr, (array) $this->plugin_data[ $plugin ] ) ) {
|
599 |
+
return $this->plugin_data[ $plugin ][ $attr ];
|
600 |
+
}
|
601 |
+
|
602 |
+
return null;
|
603 |
+
}
|
604 |
+
}
|
includes/product.helper.php
CHANGED
@@ -119,9 +119,7 @@ class TInvWL_Product {
|
|
119 |
return false;
|
120 |
}
|
121 |
if ( $product_data ) {
|
122 |
-
$data
|
123 |
-
|
124 |
-
return $this->update( $data, $meta );
|
125 |
} else {
|
126 |
return $this->add( $data, $meta );
|
127 |
}
|
@@ -377,8 +375,8 @@ class TInvWL_Product {
|
|
377 |
}
|
378 |
|
379 |
if ( $default['external'] ) {
|
380 |
-
if ( isset( $product['product_id'] )
|
381 |
-
$ids[] = apply_filters( 'wpml_object_id', $product['product_id'], 'product', false );
|
382 |
}
|
383 |
}
|
384 |
$product['meta'] = array();
|
@@ -405,9 +403,9 @@ class TInvWL_Product {
|
|
405 |
continue;
|
406 |
}
|
407 |
|
408 |
-
if ( $_product->get_id() === absint( apply_filters( 'wpml_object_id', $wlproduct['product_id'], 'product', false ) ) ) {
|
409 |
if ( in_array( $_product->get_type(), array( 'variable', 'grouped' ) ) ) {
|
410 |
-
$products[ $key ]['data'] = $wlproduct['variation_id'] ? wc_get_product(
|
411 |
} else {
|
412 |
$products[ $key ]['data'] = $_product;
|
413 |
}
|
@@ -447,12 +445,13 @@ class TInvWL_Product {
|
|
447 |
*
|
448 |
* @param array $data Object product.
|
449 |
* @param array $meta Object meta form data.
|
|
|
450 |
*
|
451 |
* @return boolean
|
452 |
* @global wpdb $wpdb
|
453 |
*
|
454 |
*/
|
455 |
-
function update( $data = array(), $meta = array() ) {
|
456 |
if ( empty( $meta ) && array_key_exists( 'meta', $data ) && ! empty( $data['meta'] ) ) {
|
457 |
$meta = $data['meta'];
|
458 |
}
|
@@ -491,12 +490,25 @@ class TInvWL_Product {
|
|
491 |
|
492 |
global $wpdb;
|
493 |
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
500 |
}
|
501 |
|
502 |
/**
|
@@ -604,7 +616,7 @@ class TInvWL_Product {
|
|
604 |
'variation_id',
|
605 |
'quantity',
|
606 |
'undefined',
|
607 |
-
'product_sku'
|
608 |
) as $field
|
609 |
) {
|
610 |
if ( array_key_exists( $field, $meta ) ) {
|
119 |
return false;
|
120 |
}
|
121 |
if ( $product_data ) {
|
122 |
+
return $this->update( $data, $meta, $product_data['ID'] );
|
|
|
|
|
123 |
} else {
|
124 |
return $this->add( $data, $meta );
|
125 |
}
|
375 |
}
|
376 |
|
377 |
if ( $default['external'] ) {
|
378 |
+
if ( isset( $product['product_id'] ) ) {
|
379 |
+
$ids[] = ( apply_filters( 'wpml_object_id', $product['product_id'], 'product', false ) ) ? apply_filters( 'wpml_object_id', $product['product_id'], 'product', false ) : $product['product_id'];
|
380 |
}
|
381 |
}
|
382 |
$product['meta'] = array();
|
403 |
continue;
|
404 |
}
|
405 |
|
406 |
+
if ( $_product->get_id() === absint( ( apply_filters( 'wpml_object_id', $wlproduct['product_id'], 'product', false ) ) ? apply_filters( 'wpml_object_id', $wlproduct['product_id'], 'product', false ) : $wlproduct['product_id'] ) ) {
|
407 |
if ( in_array( $_product->get_type(), array( 'variable', 'grouped' ) ) ) {
|
408 |
+
$products[ $key ]['data'] = $wlproduct['variation_id'] ? wc_get_product( $wlproduct['variation_id'] ) : $_product;
|
409 |
} else {
|
410 |
$products[ $key ]['data'] = $_product;
|
411 |
}
|
445 |
*
|
446 |
* @param array $data Object product.
|
447 |
* @param array $meta Object meta form data.
|
448 |
+
* @param int $id Wishlist item ID.
|
449 |
*
|
450 |
* @return boolean
|
451 |
* @global wpdb $wpdb
|
452 |
*
|
453 |
*/
|
454 |
+
function update( $data = array(), $meta = array(), $id = 0 ) {
|
455 |
if ( empty( $meta ) && array_key_exists( 'meta', $data ) && ! empty( $data['meta'] ) ) {
|
456 |
$meta = $data['meta'];
|
457 |
}
|
490 |
|
491 |
global $wpdb;
|
492 |
|
493 |
+
$res_update = $wpdb->update( $this->table, $data, array(
|
494 |
+
'product_id' => $data['product_id'],
|
495 |
+
'variation_id' => $data['variation_id'],
|
496 |
+
'wishlist_id' => $data['wishlist_id'],
|
497 |
+
'formdata' => $this->prepare_save_meta( $meta, $data['product_id'], $data['variation_id'] ),
|
498 |
+
) );
|
499 |
+
|
500 |
+
if ( $res_update !== false ) { // @codingStandardsIgnoreLine WordPress.VIP.DirectDatabaseQuery.DirectQuery
|
501 |
+
|
502 |
+
/* Run a 3rd party code when product updated on a wishlist.
|
503 |
+
*
|
504 |
+
* @param array $data product data including author and wishlist IDs.
|
505 |
+
* */
|
506 |
+
do_action( 'tinvwl_product_updated', $data );
|
507 |
+
|
508 |
+
return ( $id ) ? $id : true;
|
509 |
+
}
|
510 |
+
|
511 |
+
return false;
|
512 |
}
|
513 |
|
514 |
/**
|
616 |
'variation_id',
|
617 |
'quantity',
|
618 |
'undefined',
|
619 |
+
'product_sku',
|
620 |
) as $field
|
621 |
) {
|
622 |
if ( array_key_exists( $field, $meta ) ) {
|
includes/tinvwl.class.php
CHANGED
@@ -40,6 +40,12 @@ class TInvWL {
|
|
40 |
* @var TInvWL_Public_TInvWL
|
41 |
*/
|
42 |
public $object_public;
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
/**
|
45 |
* Constructor
|
@@ -56,7 +62,7 @@ class TInvWL {
|
|
56 |
$this->object_admin = new TInvWL_Admin_TInvWL( $this->_name, $this->_version );
|
57 |
|
58 |
// Allow to disable wishlist for frontend conditionally. Must be hooked on 'plugins_loaded' action.
|
59 |
-
if ( apply_filters( '
|
60 |
$this->object_public = TInvWL_Public_TInvWL::instance( $this->_name, $this->_version );
|
61 |
}
|
62 |
}
|
@@ -77,10 +83,14 @@ class TInvWL {
|
|
77 |
$this->object_admin->load_function();
|
78 |
} else {
|
79 |
// Allow to disable wishlist for frontend conditionally. Must be hooked on 'plugins_loaded' action.
|
80 |
-
if ( apply_filters( '
|
81 |
$this->object_public->load_function();
|
82 |
}
|
83 |
}
|
|
|
|
|
|
|
|
|
84 |
}
|
85 |
|
86 |
/**
|
40 |
* @var TInvWL_Public_TInvWL
|
41 |
*/
|
42 |
public $object_public;
|
43 |
+
/**
|
44 |
+
* Array of deprecated hook handlers.
|
45 |
+
*
|
46 |
+
* @var array of WC_Deprecated_Hooks
|
47 |
+
*/
|
48 |
+
public $deprecated_hook_handlers = array();
|
49 |
|
50 |
/**
|
51 |
* Constructor
|
62 |
$this->object_admin = new TInvWL_Admin_TInvWL( $this->_name, $this->_version );
|
63 |
|
64 |
// Allow to disable wishlist for frontend conditionally. Must be hooked on 'plugins_loaded' action.
|
65 |
+
if ( apply_filters( 'tinvwl_load_frontend', true ) ) {
|
66 |
$this->object_public = TInvWL_Public_TInvWL::instance( $this->_name, $this->_version );
|
67 |
}
|
68 |
}
|
83 |
$this->object_admin->load_function();
|
84 |
} else {
|
85 |
// Allow to disable wishlist for frontend conditionally. Must be hooked on 'plugins_loaded' action.
|
86 |
+
if ( apply_filters( 'tinvwl_load_frontend', true ) ) {
|
87 |
$this->object_public->load_function();
|
88 |
}
|
89 |
}
|
90 |
+
|
91 |
+
$this->deprecated_hook_handlers['actions'] = new TInvWL_Deprecated_Actions();
|
92 |
+
$this->deprecated_hook_handlers['filters'] = new TInvWL_Deprecated_Filters();
|
93 |
+
$this->rest_api = TInvWL_API::init();
|
94 |
}
|
95 |
|
96 |
/**
|
includes/view.helper.php
CHANGED
@@ -292,7 +292,7 @@ class TInvWL_View {
|
|
292 |
* @param array $_data Parameter for template.
|
293 |
*/
|
294 |
public static function render( $_template_name, $_data = array() ) {
|
295 |
-
$_data = apply_filters( '
|
296 |
self::init();
|
297 |
$_header = empty( $_data['_header'] ) ? '' : $_data['_header'];
|
298 |
$_footer = empty( $_data['_footer'] ) ? '' : $_data['_footer'];
|
@@ -311,7 +311,7 @@ class TInvWL_View {
|
|
311 |
$_template_name = implode( '-', $_template_name );
|
312 |
}
|
313 |
if ( is_string( $_template_name ) ) {
|
314 |
-
$_data = apply_filters( '
|
315 |
}
|
316 |
if ( array_key_exists( 'options', $_data ) ) {
|
317 |
TInvWL_Form::setoptions( $_data['options'] );
|
292 |
* @param array $_data Parameter for template.
|
293 |
*/
|
294 |
public static function render( $_template_name, $_data = array() ) {
|
295 |
+
$_data = apply_filters( 'tinvwl_view_general', $_data );
|
296 |
self::init();
|
297 |
$_header = empty( $_data['_header'] ) ? '' : $_data['_header'];
|
298 |
$_footer = empty( $_data['_footer'] ) ? '' : $_data['_footer'];
|
311 |
$_template_name = implode( '-', $_template_name );
|
312 |
}
|
313 |
if ( is_string( $_template_name ) ) {
|
314 |
+
$_data = apply_filters( 'tinvwl_view_' . $_template_name, $_data );
|
315 |
}
|
316 |
if ( array_key_exists( 'options', $_data ) ) {
|
317 |
TInvWL_Form::setoptions( $_data['options'] );
|
includes/viewsection.helper.php
CHANGED
@@ -130,10 +130,10 @@ class TInvWL_ViewSection extends TInvWL_View {
|
|
130 |
|
131 |
$data['extra'] = TInvWL_Form::__atrtostr( $data['extra'] );
|
132 |
ob_start();
|
133 |
-
do_action(
|
134 |
self::view( $skin, $data, '' );
|
135 |
wp_nonce_field( self::$_name . "_check_{$this->section_id}_{$field_counts}", $this->section_id . '_nonce' );
|
136 |
-
do_action(
|
137 |
return ob_get_clean();
|
138 |
}
|
139 |
|
@@ -239,9 +239,9 @@ class TInvWL_ViewSection extends TInvWL_View {
|
|
239 |
|
240 |
$data['extra'] = TInvWL_Form::__atrtostr( $data['extra'] );
|
241 |
ob_start();
|
242 |
-
do_action(
|
243 |
self::view( $skin, $data, '' );
|
244 |
-
do_action(
|
245 |
return ob_get_clean();
|
246 |
}
|
247 |
|
@@ -318,7 +318,7 @@ class TInvWL_ViewSection extends TInvWL_View {
|
|
318 |
$data['extra_label']['class'] = 'tinvwl-empty';
|
319 |
}
|
320 |
}
|
321 |
-
$data['label'] = apply_filters(
|
322 |
unset( $data['extra_label'] );
|
323 |
} else {
|
324 |
$data['label'] = '';
|
@@ -332,21 +332,21 @@ class TInvWL_ViewSection extends TInvWL_View {
|
|
332 |
} else {
|
333 |
$data['extra'] .= 'class="form-control"';
|
334 |
}
|
335 |
-
$data['field'] = apply_filters(
|
336 |
-
$data['std'] = apply_filters(
|
337 |
-
$data['extra'] = apply_filters(
|
338 |
if ( empty( $data['options'] ) ) {
|
339 |
$data['field'] .= TInvWL_Form::$type( $name, $data['std'], $data['extra'] );
|
340 |
} else {
|
341 |
-
$data['options'] = apply_filters(
|
342 |
$data['field'] .= TInvWL_Form::$type( $name, $data['std'], $data['extra'], $data['options'] );
|
343 |
}
|
344 |
-
$data['field'] .= apply_filters(
|
345 |
|
346 |
ob_start();
|
347 |
-
do_action(
|
348 |
self::view( $skin, $data, '' );
|
349 |
-
do_action(
|
350 |
return ob_get_clean();
|
351 |
}
|
352 |
|
@@ -372,11 +372,11 @@ class TInvWL_ViewSection extends TInvWL_View {
|
|
372 |
* @return string
|
373 |
*/
|
374 |
function Run( $echo = true ) {
|
375 |
-
$content = apply_filters(
|
376 |
foreach ( $this->data as $data ) {
|
377 |
$content .= $this->section( $data );
|
378 |
}
|
379 |
-
$content .= apply_filters(
|
380 |
if ( $echo ) {
|
381 |
echo $content; // WPCS: xss ok.
|
382 |
} else {
|
130 |
|
131 |
$data['extra'] = TInvWL_Form::__atrtostr( $data['extra'] );
|
132 |
ob_start();
|
133 |
+
do_action( "tinvwl_section_{$this->section_id}_before", $data );
|
134 |
self::view( $skin, $data, '' );
|
135 |
wp_nonce_field( self::$_name . "_check_{$this->section_id}_{$field_counts}", $this->section_id . '_nonce' );
|
136 |
+
do_action( "tinvwl_section_{$this->section_id}_after", $data );
|
137 |
return ob_get_clean();
|
138 |
}
|
139 |
|
239 |
|
240 |
$data['extra'] = TInvWL_Form::__atrtostr( $data['extra'] );
|
241 |
ob_start();
|
242 |
+
do_action( "tinvwl_sectiongroup_{$this->group_id}_before", $data );
|
243 |
self::view( $skin, $data, '' );
|
244 |
+
do_action( "tinvwl_sectiongroup_{$this->group_id}_after", $data );
|
245 |
return ob_get_clean();
|
246 |
}
|
247 |
|
318 |
$data['extra_label']['class'] = 'tinvwl-empty';
|
319 |
}
|
320 |
}
|
321 |
+
$data['label'] = apply_filters( "tinvwl_labelfor_{$name}", ($data['text']) ? TInvWL_Form::_label( $name, esc_html( $data['text'] ), $data['extra_label'] ) : '' );
|
322 |
unset( $data['extra_label'] );
|
323 |
} else {
|
324 |
$data['label'] = '';
|
332 |
} else {
|
333 |
$data['extra'] .= 'class="form-control"';
|
334 |
}
|
335 |
+
$data['field'] = apply_filters( "tinvwl_field_{$name}_before", '' );
|
336 |
+
$data['std'] = apply_filters( "tinvwl_field_{$name}_defaultvalue", $data['std'] );
|
337 |
+
$data['extra'] = apply_filters( "tinvwl_field_{$name}_extra", $data['extra'] );
|
338 |
if ( empty( $data['options'] ) ) {
|
339 |
$data['field'] .= TInvWL_Form::$type( $name, $data['std'], $data['extra'] );
|
340 |
} else {
|
341 |
+
$data['options'] = apply_filters( "tinvwl_field_{$name}_options", $data['options'] );
|
342 |
$data['field'] .= TInvWL_Form::$type( $name, $data['std'], $data['extra'], $data['options'] );
|
343 |
}
|
344 |
+
$data['field'] .= apply_filters( "tinvwl_field_{$name}_after", '' );
|
345 |
|
346 |
ob_start();
|
347 |
+
do_action( "tinvwl_sectionfield_{$name}_before", $data );
|
348 |
self::view( $skin, $data, '' );
|
349 |
+
do_action( "tinvwl_sectionfield_{$name}_after", $data );
|
350 |
return ob_get_clean();
|
351 |
}
|
352 |
|
372 |
* @return string
|
373 |
*/
|
374 |
function Run( $echo = true ) {
|
375 |
+
$content = apply_filters( 'tinvwl_section_before', '' );
|
376 |
foreach ( $this->data as $data ) {
|
377 |
$content .= $this->section( $data );
|
378 |
}
|
379 |
+
$content .= apply_filters( 'tinvwl_section_after', '' );
|
380 |
if ( $echo ) {
|
381 |
echo $content; // WPCS: xss ok.
|
382 |
} else {
|
includes/wishlist.class.php
CHANGED
@@ -71,7 +71,7 @@ class TInvWL_Wishlist {
|
|
71 |
|
72 |
$this->_name = $plugin_name;
|
73 |
$this->table = sprintf( '%s%s_%s', $wpdb->prefix, $this->_name, 'lists' );
|
74 |
-
$this->default_name = apply_filters( '
|
75 |
$this->default_privacy = 'share';
|
76 |
$this->privacy = array( 'public', 'share', 'private' );
|
77 |
if ( ! in_array( $this->default_privacy, $this->privacy ) ) { // @codingStandardsIgnoreLine WordPress.PHP.StrictInArray.MissingTrueStrict
|
71 |
|
72 |
$this->_name = $plugin_name;
|
73 |
$this->table = sprintf( '%s%s_%s', $wpdb->prefix, $this->_name, 'lists' );
|
74 |
+
$this->default_name = apply_filters( 'tinvwl_default_wishlist_title', tinv_get_option( 'general', 'default_title' ) );
|
75 |
$this->default_privacy = 'share';
|
76 |
$this->privacy = array( 'public', 'share', 'private' );
|
77 |
if ( ! in_array( $this->default_privacy, $this->privacy ) ) { // @codingStandardsIgnoreLine WordPress.PHP.StrictInArray.MissingTrueStrict
|
includes/wizard.class.php
CHANGED
@@ -39,7 +39,7 @@ class TInvWL_Wizard {
|
|
39 |
function __construct( $plugin_name, $version ) {
|
40 |
$this->_name = $plugin_name;
|
41 |
$this->_version = $version;
|
42 |
-
if ( apply_filters(
|
43 |
$this->define_hooks();
|
44 |
}
|
45 |
update_option( $this->_name . '_wizard', true );
|
@@ -298,7 +298,7 @@ class TInvWL_Wizard {
|
|
298 |
$page_name[ $list->post_name ] = $list->ID;
|
299 |
}
|
300 |
$data = array(
|
301 |
-
'general_default_title_value' => apply_filters( '
|
302 |
);
|
303 |
foreach ( $title_pages as $key => $text ) {
|
304 |
$_data['options'] = $page_list;
|
39 |
function __construct( $plugin_name, $version ) {
|
40 |
$this->_name = $plugin_name;
|
41 |
$this->_version = $version;
|
42 |
+
if ( apply_filters( 'tinvwl_enable_wizard', true ) ) {
|
43 |
$this->define_hooks();
|
44 |
}
|
45 |
update_option( $this->_name . '_wizard', true );
|
298 |
$page_name[ $list->post_name ] = $list->ID;
|
299 |
}
|
300 |
$data = array(
|
301 |
+
'general_default_title_value' => apply_filters( 'tinvwl_default_wishlist_title', tinv_get_option( 'general', 'default_title' ) ),
|
302 |
);
|
303 |
foreach ( $title_pages as $key => $text ) {
|
304 |
$_data['options'] = $page_list;
|
languages/ti-woocommerce-wishlist.pot
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
# Copyright (C) 2019 TI WooCommerce Wishlist Plugin - 1.
|
2 |
-
# This file is distributed under the same license as the TI WooCommerce Wishlist Plugin - 1.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: TI WooCommerce Wishlist Plugin - 1.
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -32,659 +32,659 @@ msgstr ""
|
|
32 |
msgid "Template Custom CSS"
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: admin/basestyle.helper.php:115, admin/settings/general.class.php:
|
36 |
msgid "Save Settings"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: admin/basestyle.helper.php:121, admin/settings/general.class.php:
|
40 |
msgid "Reset"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: admin/basestyle.helper.php:127, admin/settings/general.class.php:
|
44 |
msgid "Save"
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: admin/settings/general.class.php:
|
48 |
msgid "General Settings"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: admin/settings/general.class.php:
|
52 |
msgid "Select Your Menu"
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: admin/settings/general.class.php:
|
56 |
msgid "Wishlist page needs to be selected so the plugin knows where it is. This page should be created upon installation of the plugin, if not you will need to create it manually."
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: admin/settings/general.class.php:
|
60 |
msgid "Default Wishlist Name"
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: admin/settings/general.class.php:
|
64 |
msgid "Wishlist Page"
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: admin/settings/general.class.php:
|
68 |
msgid "Require Login"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: admin/settings/general.class.php:
|
72 |
msgid "Disallows guests to use Wishlist functionality until they sign-in."
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: admin/settings/general.class.php:
|
76 |
msgid "Redirect to Login Page"
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: admin/settings/general.class.php:
|
80 |
msgid "Currently this option could not be changed because \"Show successful notice in popup\" is disabled. Guests will be redirected automatically to a login page."
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: admin/settings/general.class.php:
|
84 |
msgid "If enabled, guests will be redirected to a login page once clicking the \"Add to Wishlist\" button or \"Wishlist Products Counter\" link. Otherwise a popup with login required notice will appear."
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: admin/settings/general.class.php:
|
88 |
msgid "Show Link to Wishlist in my account"
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: admin/settings/general.class.php:
|
92 |
msgid "Remove Product from Wishlist if added to cart"
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: admin/settings/general.class.php:
|
96 |
msgid "Redirect to the checkout page from Wishlist if added to cart"
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: admin/settings/general.class.php:
|
100 |
msgid "Remove by anyone"
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: admin/settings/general.class.php:
|
104 |
msgid "Remove product from Wishlist on second click"
|
105 |
msgstr ""
|
106 |
|
107 |
-
#: admin/settings/general.class.php:
|
108 |
msgid "Show successful notice in popup"
|
109 |
msgstr ""
|
110 |
|
111 |
-
#: admin/settings/general.class.php:
|
112 |
msgid "This option allows to show/hide a popup with successful or error notices after addition or removing products from a Wishlist."
|
113 |
msgstr ""
|
114 |
|
115 |
-
#: admin/settings/general.class.php:
|
116 |
msgid "\"View Wishlist\" button Text"
|
117 |
msgstr ""
|
118 |
|
119 |
-
#: admin/settings/general.class.php:
|
120 |
msgid "Redirect to Wishlist"
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: admin/settings/general.class.php:
|
124 |
msgid "If enabled, user will be redirected to wishlist page after 5 sec from adding product to wishlist."
|
125 |
msgstr ""
|
126 |
|
127 |
-
#: admin/settings/general.class.php:
|
128 |
msgid "\"Product added to Wishlist\" Text"
|
129 |
msgstr ""
|
130 |
|
131 |
-
#: admin/settings/general.class.php:
|
132 |
msgid "\"Product already in Wishlist\" Text"
|
133 |
msgstr ""
|
134 |
|
135 |
-
#: admin/settings/general.class.php:
|
136 |
msgid "This notification will be shown if user will try to add a product that is already in the wishlist."
|
137 |
msgstr ""
|
138 |
|
139 |
-
#: admin/settings/general.class.php:
|
140 |
msgid "\"Product removed from Wishlist\" Text"
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: admin/settings/general.class.php:
|
144 |
msgid "This notification will be shown once the product is removed from Wishlist on a single or a catalog page."
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: admin/settings/general.class.php:
|
148 |
msgid "Permalinks Settings"
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: admin/settings/general.class.php:
|
152 |
msgid "Force permalinks rewrite"
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: admin/settings/general.class.php:
|
156 |
msgid "This option should be enabled to avoid any issues with URL rewrites between other plugins and Wishlist"
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: admin/settings/general.class.php:
|
160 |
msgid "Wishlist Page Options"
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: admin/settings/general.class.php:
|
164 |
msgid "Coming soon"
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: admin/settings/general.class.php:
|
168 |
msgid "My Wishlist"
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: admin/settings/general.class.php:
|
172 |
msgid "Wishlist Processing Options"
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: admin/settings/general.class.php:
|
176 |
msgid "Automatic removal"
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: admin/settings/general.class.php:
|
180 |
msgid "Remove condition"
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: admin/settings/general.class.php:
|
184 |
msgid "Add to Cart"
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: admin/settings/general.class.php:
|
188 |
msgid "Product page \"Add to Wishlist\" Button Settings"
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: admin/settings/general.class.php:
|
192 |
msgid "Button position"
|
193 |
msgstr ""
|
194 |
|
195 |
-
#: admin/settings/general.class.php:
|
196 |
msgid "Add this shortcode <code>[ti_wishlists_addtowishlist]</code> anywhere on product page, if you have chosen custom position for product button. You will have to do this for each product."
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: admin/settings/general.class.php:
|
200 |
msgid "After \"Add to Cart\" button"
|
201 |
msgstr ""
|
202 |
|
203 |
-
#: admin/settings/general.class.php:
|
204 |
msgid "Before \"Add to Cart\" button"
|
205 |
msgstr ""
|
206 |
|
207 |
-
#: admin/settings/general.class.php:
|
208 |
msgid "Custom position with code"
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: admin/settings/general.class.php:
|
212 |
msgid "Button custom CSS class"
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: admin/settings/general.class.php:
|
216 |
msgid "You can add custom CSS classes to button markup separated by spaces. Most of themes using <code>button</code> class for this type of buttons."
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: admin/settings/general.class.php:
|
220 |
msgid "\"Add to Wishlist\" Icon"
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: admin/settings/general.class.php:
|
224 |
msgid "You can choose from our predefined icons or upload your custom icon. Custom icon size is limited to 16x16 px."
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: admin/settings/general.class.php:
|
228 |
msgid "None"
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: admin/settings/general.class.php:
|
232 |
msgid "Heart"
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: admin/settings/general.class.php:
|
236 |
msgid "Heart+"
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: admin/settings/general.class.php:
|
240 |
msgid "Custom"
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: admin/settings/general.class.php:
|
244 |
msgid "Upload"
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: admin/settings/general.class.php:
|
248 |
msgid "\"Add to Wishlist\" Icon Color"
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: admin/settings/general.class.php:
|
252 |
msgid "Use font color"
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: admin/settings/general.class.php:
|
256 |
msgid "Black"
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: admin/settings/general.class.php:
|
260 |
msgid "White"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: admin/settings/general.class.php:
|
264 |
msgid "Show preloader"
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: admin/settings/general.class.php:
|
268 |
msgid "If enabled, applies animation for the button icon until product adding or removing processed. (Usable for servers with slow connection mostly.)"
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: admin/settings/general.class.php:
|
272 |
msgid "Show button text"
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: admin/settings/general.class.php:
|
276 |
msgid "\"Add to Wishlist\" button Text"
|
277 |
msgstr ""
|
278 |
|
279 |
-
#: admin/settings/general.class.php:
|
280 |
msgid "\"Remove from Wishlist\" Button Text"
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: admin/settings/general.class.php:
|
284 |
msgid "Product listing Button Settings"
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: admin/settings/general.class.php:
|
288 |
msgid "These are separate settings for the \"Add to Wishlist\" button on a product listing (Shop page, categories, etc.). You can also adjust button and text colors, size, etc. in a <code>TI Wishlist > Style Options.</code>"
|
289 |
msgstr ""
|
290 |
|
291 |
-
#: admin/settings/general.class.php:
|
292 |
msgid "Show in Product Listing"
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: admin/settings/general.class.php:
|
296 |
msgid "Above Thumbnail"
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: admin/settings/general.class.php:
|
300 |
msgid "Note: if \"Custom position with code\" option is applied, the \"Add to Wishlist\" button should be added into template using <code>do_shortcode()</code> function like this:<br /><code>do_shortcode(\"[ti_wishlists_addtowishlist loop=yes]\")</code>"
|
301 |
msgstr ""
|
302 |
|
303 |
-
#: admin/settings/general.class.php:
|
304 |
msgid "\"Add to Wishlist\" Text"
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: admin/settings/general.class.php:
|
308 |
msgid "Wishlist Product Settings"
|
309 |
msgstr ""
|
310 |
|
311 |
-
#: admin/settings/general.class.php:
|
312 |
msgid "Following options allows you to choose what information/functionality to show/enable in wishlist table on wishlist page."
|
313 |
msgstr ""
|
314 |
|
315 |
-
#: admin/settings/general.class.php:
|
316 |
msgid "Show \"Add to Cart\" button"
|
317 |
msgstr ""
|
318 |
|
319 |
-
#: admin/settings/general.class.php:
|
320 |
msgid "\"Add to Cart\" Text"
|
321 |
msgstr ""
|
322 |
|
323 |
-
#: admin/settings/general.class.php:
|
324 |
msgid "Show Unit price"
|
325 |
msgstr ""
|
326 |
|
327 |
-
#: admin/settings/general.class.php:
|
328 |
msgid "Show Stock status"
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: admin/settings/general.class.php:
|
332 |
msgid "Show Date of addition"
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: admin/settings/general.class.php:
|
336 |
msgid "Wishlist Table Settings"
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: admin/settings/general.class.php:
|
340 |
msgid "Following options will help user to manage and add products to cart from wishlist table in bulk."
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: admin/settings/general.class.php:
|
344 |
msgid "Show Checkboxes"
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: admin/settings/general.class.php:
|
348 |
msgid "Show Actions button"
|
349 |
msgstr ""
|
350 |
|
351 |
-
#: admin/settings/general.class.php:
|
352 |
msgid "Bulk actions drop down at the bottom of wishlist table"
|
353 |
msgstr ""
|
354 |
|
355 |
-
#: admin/settings/general.class.php:
|
356 |
msgid "Show \"Add Selected to Cart\" button"
|
357 |
msgstr ""
|
358 |
|
359 |
-
#: admin/settings/general.class.php:
|
360 |
msgid "\"Add Selected to Cart\" Button Text"
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: admin/settings/general.class.php:
|
364 |
msgid "Show \"Add All to Cart\" button"
|
365 |
msgstr ""
|
366 |
|
367 |
-
#: admin/settings/general.class.php:
|
368 |
msgid "\"Add All to Cart\" Button Text"
|
369 |
msgstr ""
|
370 |
|
371 |
-
#: admin/settings/general.class.php:
|
372 |
msgid "Following options enable/disable Social share icons below wishlist table on wishlist page. Wishlist owner can easily share their wishlists using this button on social networks. Wishlist privacy should be set to public or shared status, private wishlists can't be shared."
|
373 |
msgstr ""
|
374 |
|
375 |
-
#: admin/settings/general.class.php:
|
376 |
msgid "Social Networks Sharing Options"
|
377 |
msgstr ""
|
378 |
|
379 |
-
#: admin/settings/general.class.php:
|
380 |
msgid "Show \"Facebook\" Button"
|
381 |
msgstr ""
|
382 |
|
383 |
-
#: admin/settings/general.class.php:
|
384 |
msgid "Show \"Twitter\" Button"
|
385 |
msgstr ""
|
386 |
|
387 |
-
#: admin/settings/general.class.php:
|
388 |
msgid "Show \"Pinterest\" Button"
|
389 |
msgstr ""
|
390 |
|
391 |
-
#: admin/settings/general.class.php:
|
392 |
msgid "Show \"Google+\" Button"
|
393 |
msgstr ""
|
394 |
|
395 |
-
#: admin/settings/general.class.php:
|
396 |
msgid "Show \"WhatsApp\" Button"
|
397 |
msgstr ""
|
398 |
|
399 |
-
#: admin/settings/general.class.php:
|
400 |
msgid "Show \"Copy to clipboard\" Button"
|
401 |
msgstr ""
|
402 |
|
403 |
-
#: admin/settings/general.class.php:
|
404 |
msgid "Show \"Share by Email\" Button"
|
405 |
msgstr ""
|
406 |
|
407 |
-
#: admin/settings/general.class.php:
|
408 |
msgid "\"Share on\" Text"
|
409 |
msgstr ""
|
410 |
|
411 |
-
#: admin/settings/general.class.php:
|
412 |
msgid "Social Icons Color"
|
413 |
msgstr ""
|
414 |
|
415 |
-
#: admin/settings/general.class.php:
|
416 |
msgid "Dark"
|
417 |
msgstr ""
|
418 |
|
419 |
-
#: admin/settings/general.class.php:
|
420 |
msgid "Wishlist Product Counter"
|
421 |
msgstr ""
|
422 |
|
423 |
-
#: admin/settings/general.class.php:
|
424 |
msgid "Add this shortcode <code>[ti_wishlist_products_counter]</code> anywhere into a page content to show Wishlist Counter.<br/><br/>It can be also added as a widget <code>Wishlist Products Counter</code> under the <a href=\"%s\">Appearance -> Widgets</a> section."
|
425 |
msgstr ""
|
426 |
|
427 |
-
#: admin/settings/general.class.php:
|
428 |
msgid "\"Wishlist\" Counter Icon"
|
429 |
msgstr ""
|
430 |
|
431 |
-
#: admin/settings/general.class.php:
|
432 |
msgid "\"Wishlist\" Counter Icon Color"
|
433 |
msgstr ""
|
434 |
|
435 |
-
#: admin/settings/general.class.php:
|
436 |
msgid "Show \"Wishlist\" Counter Text"
|
437 |
msgstr ""
|
438 |
|
439 |
-
#: admin/settings/general.class.php:
|
440 |
msgid "\"Wishlist\" Counter Text"
|
441 |
msgstr ""
|
442 |
|
443 |
-
#: admin/settings/general.class.php:
|
444 |
msgid "Wishlist - "
|
445 |
msgstr ""
|
446 |
|
447 |
-
#: admin/settings/general.class.php:
|
448 |
msgid "Add counter to menu"
|
449 |
msgstr ""
|
450 |
|
451 |
-
#: admin/settings/general.class.php:
|
452 |
msgid "You can add a wishlist products counter as item to the selected menu."
|
453 |
msgstr ""
|
454 |
|
455 |
-
#: admin/settings/general.class.php:
|
456 |
msgid "Counter position (Menu item order)"
|
457 |
msgstr ""
|
458 |
|
459 |
-
#: admin/settings/general.class.php:
|
460 |
msgid "Allows you to add the wishlist counter as a menu item and apply its position."
|
461 |
msgstr ""
|
462 |
|
463 |
-
#: admin/settings/general.class.php:
|
464 |
msgid "Show number of products in counter"
|
465 |
msgstr ""
|
466 |
|
467 |
-
#: admin/settings/general.class.php:
|
468 |
msgid "Hide zero value"
|
469 |
msgstr ""
|
470 |
|
471 |
-
#: admin/settings/general.class.php:
|
472 |
msgid "Do not show the \"0\" value in a counter if wishlist is empty."
|
473 |
msgstr ""
|
474 |
|
475 |
-
#: admin/settings/general.class.php:
|
476 |
msgid "Support chat settings"
|
477 |
msgstr ""
|
478 |
|
479 |
-
#: admin/settings/general.class.php:
|
480 |
msgid "Disable support chat"
|
481 |
msgstr ""
|
482 |
|
483 |
-
#: admin/settings/style.class.php:
|
484 |
msgid "Style Options"
|
485 |
msgstr ""
|
486 |
|
487 |
-
#: admin/settings/style.class.php:
|
488 |
msgid "Wishlist Style Options"
|
489 |
msgstr ""
|
490 |
|
491 |
-
#: admin/settings/style.class.php:
|
492 |
msgid "Use Default Font"
|
493 |
msgstr ""
|
494 |
|
495 |
-
#: admin/settings/style.class.php:
|
496 |
msgid "text"
|
497 |
msgstr ""
|
498 |
|
499 |
-
#: admin/settings/style.class.php:
|
500 |
msgid "Title Color"
|
501 |
msgstr ""
|
502 |
|
503 |
-
#: admin/settings/style.class.php:
|
504 |
msgid "Title Font Size"
|
505 |
msgstr ""
|
506 |
|
507 |
-
#: admin/settings/style.class.php:
|
508 |
msgid "Content Text Color"
|
509 |
msgstr ""
|
510 |
|
511 |
-
#: admin/settings/style.class.php:
|
512 |
msgid "Font"
|
513 |
msgstr ""
|
514 |
|
515 |
-
#: admin/settings/style.class.php:
|
516 |
msgid "Product Title link"
|
517 |
msgstr ""
|
518 |
|
519 |
-
#: admin/settings/style.class.php:
|
520 |
msgid "Color"
|
521 |
msgstr ""
|
522 |
|
523 |
-
#: admin/settings/style.class.php:
|
524 |
msgid "Hover Color"
|
525 |
msgstr ""
|
526 |
|
527 |
-
#: admin/settings/style.class.php:
|
528 |
msgid "Underline"
|
529 |
msgstr ""
|
530 |
|
531 |
-
#: admin/settings/style.class.php:
|
532 |
msgid "Yes"
|
533 |
msgstr ""
|
534 |
|
535 |
-
#: admin/settings/style.class.php:
|
536 |
msgid "No"
|
537 |
msgstr ""
|
538 |
|
539 |
-
#: admin/settings/style.class.php:
|
540 |
msgid "fields"
|
541 |
msgstr ""
|
542 |
|
543 |
-
#: admin/settings/style.class.php:
|
544 |
msgid "Background Color"
|
545 |
msgstr ""
|
546 |
|
547 |
-
#: admin/settings/style.class.php:
|
548 |
msgid "Border Color"
|
549 |
msgstr ""
|
550 |
|
551 |
-
#: admin/settings/style.class.php:
|
552 |
msgid "Border Radius"
|
553 |
msgstr ""
|
554 |
|
555 |
-
#: admin/settings/style.class.php:
|
556 |
msgid "Text Color"
|
557 |
msgstr ""
|
558 |
|
559 |
-
#: admin/settings/style.class.php:
|
560 |
msgid "Select Font Size"
|
561 |
msgstr ""
|
562 |
|
563 |
-
#: admin/settings/style.class.php:
|
564 |
msgid "\"Add to Wishlist\" product page button"
|
565 |
msgstr ""
|
566 |
|
567 |
-
#: admin/settings/style.class.php:
|
568 |
msgid "Background Hover Color"
|
569 |
msgstr ""
|
570 |
|
571 |
-
#: admin/settings/style.class.php:
|
572 |
msgid "Button Text Color"
|
573 |
msgstr ""
|
574 |
|
575 |
-
#: admin/settings/style.class.php:
|
576 |
msgid "Button Text Hover Color"
|
577 |
msgstr ""
|
578 |
|
579 |
-
#: admin/settings/style.class.php:
|
580 |
msgid "Text Hover Color"
|
581 |
msgstr ""
|
582 |
|
583 |
-
#: admin/settings/style.class.php:
|
584 |
msgid "Font Size"
|
585 |
msgstr ""
|
586 |
|
587 |
-
#: admin/settings/style.class.php:
|
588 |
msgid "Icon Size"
|
589 |
msgstr ""
|
590 |
|
591 |
-
#: admin/settings/style.class.php:
|
592 |
msgid "\"Add to Wishlist\" product listing button"
|
593 |
msgstr ""
|
594 |
|
595 |
-
#: admin/settings/style.class.php:
|
596 |
msgid "\"Apply Action\" button "
|
597 |
msgstr ""
|
598 |
|
599 |
-
#: admin/settings/style.class.php:
|
600 |
msgid "add to cart button"
|
601 |
msgstr ""
|
602 |
|
603 |
-
#: admin/settings/style.class.php:
|
604 |
msgid "table"
|
605 |
msgstr ""
|
606 |
|
607 |
-
#: admin/settings/style.class.php:
|
608 |
msgid "Table Head Background Color"
|
609 |
msgstr ""
|
610 |
|
611 |
-
#: admin/settings/style.class.php:
|
612 |
msgid "Table Head Text Color"
|
613 |
msgstr ""
|
614 |
|
615 |
-
#: admin/settings/style.class.php:
|
616 |
msgid "Table Head Font"
|
617 |
msgstr ""
|
618 |
|
619 |
-
#: admin/settings/style.class.php:
|
620 |
msgid "Table Head Font Size"
|
621 |
msgstr ""
|
622 |
|
623 |
-
#: admin/settings/style.class.php:
|
624 |
msgid "Content Text Font"
|
625 |
msgstr ""
|
626 |
|
627 |
-
#: admin/settings/style.class.php:
|
628 |
msgid "Content Text Font Size"
|
629 |
msgstr ""
|
630 |
|
631 |
-
#: admin/settings/style.class.php:
|
632 |
msgid "Price Color"
|
633 |
msgstr ""
|
634 |
|
635 |
-
#: admin/settings/style.class.php:
|
636 |
msgid "Price Font"
|
637 |
msgstr ""
|
638 |
|
639 |
-
#: admin/settings/style.class.php:
|
640 |
msgid "Price Font Size"
|
641 |
msgstr ""
|
642 |
|
643 |
-
#: admin/settings/style.class.php:
|
644 |
msgid "Special Price Color"
|
645 |
msgstr ""
|
646 |
|
647 |
-
#: admin/settings/style.class.php:
|
648 |
msgid "Special Price Background Color"
|
649 |
msgstr ""
|
650 |
|
651 |
-
#: admin/settings/style.class.php:
|
652 |
msgid "Share buttons"
|
653 |
msgstr ""
|
654 |
|
655 |
-
#: admin/settings/style.class.php:
|
656 |
msgid "Icon Color"
|
657 |
msgstr ""
|
658 |
|
659 |
-
#: admin/settings/style.class.php:
|
660 |
msgid "Icon Hover Color"
|
661 |
msgstr ""
|
662 |
|
663 |
-
#: admin/settings/style.class.php:
|
664 |
msgid "popups"
|
665 |
msgstr ""
|
666 |
|
667 |
-
#: admin/settings/style.class.php:
|
668 |
msgid "Normal Buttons Background Color"
|
669 |
msgstr ""
|
670 |
|
671 |
-
#: admin/settings/style.class.php:
|
672 |
msgid "Normal Buttons Background Hover Color"
|
673 |
msgstr ""
|
674 |
|
675 |
-
#: admin/settings/style.class.php:
|
676 |
msgid "Normal Buttons Text Color"
|
677 |
msgstr ""
|
678 |
|
679 |
-
#: admin/settings/style.class.php:
|
680 |
msgid "Normal Buttons Text Hover Color"
|
681 |
msgstr ""
|
682 |
|
683 |
-
#: admin/settings/upgrade.class.php:
|
684 |
msgid "Upgrade to Premium"
|
685 |
msgstr ""
|
686 |
|
687 |
-
#: admin/settings/upgrade.class.php:
|
688 |
msgid "Premium Features"
|
689 |
msgstr ""
|
690 |
|
@@ -744,6 +744,34 @@ msgstr ""
|
|
744 |
msgid "<strong>Your theme (%1$s) contains outdated copies of some WooCommerce Wishlist Plugin template files.</strong><br> These files may need updating to ensure they are compatible with the current version of WooCommerce Wishlist Plugin.<br> You can see which files are affected from the <a href=\"%2$s\">system status page</a>.<br> If in doubt, check with the author of the theme."
|
745 |
msgstr ""
|
746 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
747 |
#: includes/api/yoasti18n/i18n-module.php:200
|
748 |
msgid "As you can see, there is a translation of this plugin in %1$s. This translation is currently %3$d%% complete. We need your help to make it complete and to fix any errors. Please register at %4$s to help complete the translation to %1$s!"
|
749 |
msgstr ""
|
@@ -796,15 +824,15 @@ msgstr ""
|
|
796 |
msgid "%1$s %3$s is required. Please activate it before activating this plugin."
|
797 |
msgstr ""
|
798 |
|
799 |
-
#: includes/tinvwl.class.php:
|
800 |
msgid "Settings"
|
801 |
msgstr ""
|
802 |
|
803 |
-
#: includes/tinvwl.class.php:
|
804 |
msgid "Premium Version"
|
805 |
msgstr ""
|
806 |
|
807 |
-
#: includes/tinvwl.class.php:
|
808 |
msgid "Live Demo"
|
809 |
msgstr ""
|
810 |
|
@@ -832,7 +860,7 @@ msgstr ""
|
|
832 |
msgid "Page Setup"
|
833 |
msgstr ""
|
834 |
|
835 |
-
#: includes/wizard.class.php:288, includes/wizard.class.php:319, public/tinvwl.class.php:
|
836 |
msgid "Wishlist"
|
837 |
msgstr ""
|
838 |
|
@@ -876,39 +904,39 @@ msgstr ""
|
|
876 |
msgid "Login"
|
877 |
msgstr ""
|
878 |
|
879 |
-
#: public/tinvwl.class.php:
|
880 |
msgid "Create New"
|
881 |
msgstr ""
|
882 |
|
883 |
-
#: public/tinvwl.class.php:
|
884 |
msgid "Please select some product options before adding this product to your wishlist."
|
885 |
msgstr ""
|
886 |
|
887 |
-
#: public/tinvwl.class.php:
|
888 |
msgid "No items or actions are selected."
|
889 |
msgstr ""
|
890 |
|
891 |
-
#: public/tinvwl.class.php:
|
892 |
msgid "Copied!"
|
893 |
msgstr ""
|
894 |
|
895 |
-
#: public/widget/
|
896 |
msgid "Displays the number of products in the wishlist on your site."
|
897 |
msgstr ""
|
898 |
|
899 |
-
#: public/widget/
|
900 |
msgid "TI Wishlist Products Counter"
|
901 |
msgstr ""
|
902 |
|
903 |
-
#: public/widget/
|
904 |
msgid "Show counter icon"
|
905 |
msgstr ""
|
906 |
|
907 |
-
#: public/widget/
|
908 |
msgid "Show counter text"
|
909 |
msgstr ""
|
910 |
|
911 |
-
#: public/widget/
|
912 |
msgid "Counter Text"
|
913 |
msgstr ""
|
914 |
|
@@ -935,11 +963,11 @@ msgstr[1] ""
|
|
935 |
msgid "Actions"
|
936 |
msgstr ""
|
937 |
|
938 |
-
#: public/wishlist/buttons.class.php:346, templates/ti-wishlist.php:
|
939 |
msgid "Remove"
|
940 |
msgstr ""
|
941 |
|
942 |
-
#: public/wishlist/buttons.class.php:494, public/wishlist/view.class.php:
|
943 |
msgid "“%s”"
|
944 |
msgstr ""
|
945 |
|
@@ -949,27 +977,27 @@ msgid_plural "%s have been successfully removed from wishlist."
|
|
949 |
msgstr[0] ""
|
950 |
msgstr[1] ""
|
951 |
|
952 |
-
#: public/wishlist/view.class.php:
|
953 |
msgid "%1$s by %2$s"
|
954 |
msgstr ""
|
955 |
|
956 |
-
#: public/wishlist/view.class.php:
|
957 |
msgid "%s has been removed from wishlist."
|
958 |
msgstr ""
|
959 |
|
960 |
-
#: public/wishlist/view.class.php:
|
961 |
msgid "%s has not been removed from wishlist."
|
962 |
msgstr ""
|
963 |
|
964 |
-
#: public/wishlist/view.class.php:
|
965 |
msgid "Return to Wishlist"
|
966 |
msgstr ""
|
967 |
|
968 |
-
#: public/wishlist/view.class.php:
|
969 |
msgid "Previous Page"
|
970 |
msgstr ""
|
971 |
|
972 |
-
#: public/wishlist/view.class.php:
|
973 |
msgid "Next Page"
|
974 |
msgstr ""
|
975 |
|
@@ -1017,11 +1045,11 @@ msgstr ""
|
|
1017 |
msgid "Stock Status"
|
1018 |
msgstr ""
|
1019 |
|
1020 |
-
#: templates/ti-wishlist-user.php:
|
1021 |
msgid "Select for bulk action"
|
1022 |
msgstr ""
|
1023 |
|
1024 |
-
#: templates/ti-wishlist-user.php:
|
1025 |
msgid "In stock"
|
1026 |
msgstr ""
|
1027 |
|
@@ -1053,47 +1081,47 @@ msgstr ""
|
|
1053 |
msgid "Out of stock"
|
1054 |
msgstr ""
|
1055 |
|
1056 |
-
#: tinv-wishlists-function-integration.php:
|
1057 |
msgid "Base price"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
-
#: tinv-wishlists-function-integration.php:
|
1061 |
msgid "WooCommerce Wishlist"
|
1062 |
msgstr ""
|
1063 |
|
1064 |
-
#: tinv-wishlists-function-integration.php:
|
1065 |
msgid "Awards %_plural% for users adding products to their wishlist and purchased products from their wishlist."
|
1066 |
msgstr ""
|
1067 |
|
1068 |
-
#: tinv-wishlists-function-integration.php:
|
1069 |
msgid "Adding Product to Wishlist"
|
1070 |
msgstr ""
|
1071 |
|
1072 |
-
#: tinv-wishlists-function-integration.php:
|
1073 |
msgid "Points"
|
1074 |
msgstr ""
|
1075 |
|
1076 |
-
#: tinv-wishlists-function-integration.php:
|
1077 |
msgid "Limit"
|
1078 |
msgstr ""
|
1079 |
|
1080 |
-
#: tinv-wishlists-function-integration.php:
|
1081 |
msgid "Log Template"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
-
#: tinv-wishlists-function-integration.php:
|
1085 |
msgid "required"
|
1086 |
msgstr ""
|
1087 |
|
1088 |
-
#: tinv-wishlists-function-integration.php:
|
1089 |
msgid "Purchasing Product from Wishlist"
|
1090 |
msgstr ""
|
1091 |
|
1092 |
-
#: tinv-wishlists-function-integration.php:
|
1093 |
msgid "Purchased From Wishlist"
|
1094 |
msgstr ""
|
1095 |
|
1096 |
-
#: tinv-wishlists-function-integration.php:
|
1097 |
msgid "Added To Wishlist"
|
1098 |
msgstr ""
|
1099 |
|
1 |
+
# Copyright (C) 2019 TI WooCommerce Wishlist Plugin - 1.13.0
|
2 |
+
# This file is distributed under the same license as the TI WooCommerce Wishlist Plugin - 1.13.0 package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: TI WooCommerce Wishlist Plugin - 1.13.0\n"
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
32 |
msgid "Template Custom CSS"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: admin/basestyle.helper.php:115, admin/settings/general.class.php:848
|
36 |
msgid "Save Settings"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: admin/basestyle.helper.php:121, admin/settings/general.class.php:854
|
40 |
msgid "Reset"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: admin/basestyle.helper.php:127, admin/settings/general.class.php:860
|
44 |
msgid "Save"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: admin/settings/general.class.php:69, admin/settings/general.class.php:107
|
48 |
msgid "General Settings"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: admin/settings/general.class.php:82
|
52 |
msgid "Select Your Menu"
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: admin/settings/general.class.php:108
|
56 |
msgid "Wishlist page needs to be selected so the plugin knows where it is. This page should be created upon installation of the plugin, if not you will need to create it manually."
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: admin/settings/general.class.php:114, views/wizard/step-page.php:27
|
60 |
msgid "Default Wishlist Name"
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: admin/settings/general.class.php:120, admin/tinvwl.class.php:398
|
64 |
msgid "Wishlist Page"
|
65 |
msgstr ""
|
66 |
|
67 |
+
#: admin/settings/general.class.php:128
|
68 |
msgid "Require Login"
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: admin/settings/general.class.php:129
|
72 |
msgid "Disallows guests to use Wishlist functionality until they sign-in."
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: admin/settings/general.class.php:138
|
76 |
msgid "Redirect to Login Page"
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: admin/settings/general.class.php:139
|
80 |
msgid "Currently this option could not be changed because \"Show successful notice in popup\" is disabled. Guests will be redirected automatically to a login page."
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: admin/settings/general.class.php:139
|
84 |
msgid "If enabled, guests will be redirected to a login page once clicking the \"Add to Wishlist\" button or \"Wishlist Products Counter\" link. Otherwise a popup with login required notice will appear."
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: admin/settings/general.class.php:146
|
88 |
msgid "Show Link to Wishlist in my account"
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: admin/settings/general.class.php:152
|
92 |
msgid "Remove Product from Wishlist if added to cart"
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: admin/settings/general.class.php:159, admin/settings/general.class.php:292
|
96 |
msgid "Redirect to the checkout page from Wishlist if added to cart"
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: admin/settings/general.class.php:165, admin/settings/general.class.php:299
|
100 |
msgid "Remove by anyone"
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: admin/settings/general.class.php:172
|
104 |
msgid "Remove product from Wishlist on second click"
|
105 |
msgstr ""
|
106 |
|
107 |
+
#: admin/settings/general.class.php:186
|
108 |
msgid "Show successful notice in popup"
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: admin/settings/general.class.php:187
|
112 |
msgid "This option allows to show/hide a popup with successful or error notices after addition or removing products from a Wishlist."
|
113 |
msgstr ""
|
114 |
|
115 |
+
#: admin/settings/general.class.php:197
|
116 |
msgid "\"View Wishlist\" button Text"
|
117 |
msgstr ""
|
118 |
|
119 |
+
#: admin/settings/general.class.php:204
|
120 |
msgid "Redirect to Wishlist"
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: admin/settings/general.class.php:205
|
124 |
msgid "If enabled, user will be redirected to wishlist page after 5 sec from adding product to wishlist."
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: admin/settings/general.class.php:212
|
128 |
msgid "\"Product added to Wishlist\" Text"
|
129 |
msgstr ""
|
130 |
|
131 |
+
#: admin/settings/general.class.php:219
|
132 |
msgid "\"Product already in Wishlist\" Text"
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: admin/settings/general.class.php:220
|
136 |
msgid "This notification will be shown if user will try to add a product that is already in the wishlist."
|
137 |
msgstr ""
|
138 |
|
139 |
+
#: admin/settings/general.class.php:227
|
140 |
msgid "\"Product removed from Wishlist\" Text"
|
141 |
msgstr ""
|
142 |
|
143 |
+
#: admin/settings/general.class.php:228
|
144 |
msgid "This notification will be shown once the product is removed from Wishlist on a single or a catalog page."
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: admin/settings/general.class.php:236
|
148 |
msgid "Permalinks Settings"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: admin/settings/general.class.php:242
|
152 |
msgid "Force permalinks rewrite"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: admin/settings/general.class.php:243
|
156 |
msgid "This option should be enabled to avoid any issues with URL rewrites between other plugins and Wishlist"
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: admin/settings/general.class.php:250
|
160 |
msgid "Wishlist Page Options"
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: admin/settings/general.class.php:251, admin/settings/general.class.php:268
|
164 |
msgid "Coming soon"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: admin/settings/general.class.php:258, views/wizard/step-page.php:36
|
168 |
msgid "My Wishlist"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: admin/settings/general.class.php:267
|
172 |
msgid "Wishlist Processing Options"
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: admin/settings/general.class.php:275
|
176 |
msgid "Automatic removal"
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: admin/settings/general.class.php:282
|
180 |
msgid "Remove condition"
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: admin/settings/general.class.php:285
|
184 |
msgid "Add to Cart"
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: admin/settings/general.class.php:307
|
188 |
msgid "Product page \"Add to Wishlist\" Button Settings"
|
189 |
msgstr ""
|
190 |
|
191 |
+
#: admin/settings/general.class.php:313, admin/settings/general.class.php:437, views/wizard/step-button.php:32
|
192 |
msgid "Button position"
|
193 |
msgstr ""
|
194 |
|
195 |
+
#: admin/settings/general.class.php:314
|
196 |
msgid "Add this shortcode <code>[ti_wishlists_addtowishlist]</code> anywhere on product page, if you have chosen custom position for product button. You will have to do this for each product."
|
197 |
msgstr ""
|
198 |
|
199 |
+
#: admin/settings/general.class.php:317, admin/settings/general.class.php:440, includes/wizard.class.php:408
|
200 |
msgid "After \"Add to Cart\" button"
|
201 |
msgstr ""
|
202 |
|
203 |
+
#: admin/settings/general.class.php:318, admin/settings/general.class.php:441, includes/wizard.class.php:409
|
204 |
msgid "Before \"Add to Cart\" button"
|
205 |
msgstr ""
|
206 |
|
207 |
+
#: admin/settings/general.class.php:319, admin/settings/general.class.php:443, includes/wizard.class.php:410
|
208 |
msgid "Custom position with code"
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: admin/settings/general.class.php:325, admin/settings/general.class.php:450
|
212 |
msgid "Button custom CSS class"
|
213 |
msgstr ""
|
214 |
|
215 |
+
#: admin/settings/general.class.php:326, admin/settings/general.class.php:451
|
216 |
msgid "You can add custom CSS classes to button markup separated by spaces. Most of themes using <code>button</code> class for this type of buttons."
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: admin/settings/general.class.php:335, admin/settings/general.class.php:460
|
220 |
msgid "\"Add to Wishlist\" Icon"
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: admin/settings/general.class.php:336, admin/settings/general.class.php:730
|
224 |
msgid "You can choose from our predefined icons or upload your custom icon. Custom icon size is limited to 16x16 px."
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: admin/settings/general.class.php:339, admin/settings/general.class.php:463, admin/settings/general.class.php:725
|
228 |
msgid "None"
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: admin/settings/general.class.php:340, admin/settings/general.class.php:464, admin/settings/general.class.php:726
|
232 |
msgid "Heart"
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: admin/settings/general.class.php:341, admin/settings/general.class.php:465, admin/settings/general.class.php:727
|
236 |
msgid "Heart+"
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: admin/settings/general.class.php:342, admin/settings/general.class.php:466, admin/settings/general.class.php:728
|
240 |
msgid "Custom"
|
241 |
msgstr ""
|
242 |
|
243 |
+
#: admin/settings/general.class.php:359, admin/settings/general.class.php:482, admin/settings/general.class.php:745
|
244 |
msgid "Upload"
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: admin/settings/general.class.php:368, admin/settings/general.class.php:491
|
248 |
msgid "\"Add to Wishlist\" Icon Color"
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: admin/settings/general.class.php:370, admin/settings/general.class.php:493, admin/settings/general.class.php:705, admin/settings/general.class.php:756
|
252 |
msgid "Use font color"
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: admin/settings/general.class.php:371, admin/settings/general.class.php:494, admin/settings/general.class.php:757
|
256 |
msgid "Black"
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: admin/settings/general.class.php:372, admin/settings/general.class.php:495, admin/settings/general.class.php:707, admin/settings/general.class.php:758
|
260 |
msgid "White"
|
261 |
msgstr ""
|
262 |
|
263 |
+
#: admin/settings/general.class.php:379, admin/settings/general.class.php:502
|
264 |
msgid "Show preloader"
|
265 |
msgstr ""
|
266 |
|
267 |
+
#: admin/settings/general.class.php:380, admin/settings/general.class.php:503
|
268 |
msgid "If enabled, applies animation for the button icon until product adding or removing processed. (Usable for servers with slow connection mostly.)"
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: admin/settings/general.class.php:386, admin/settings/general.class.php:509
|
272 |
msgid "Show button text"
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: admin/settings/general.class.php:401
|
276 |
msgid "\"Add to Wishlist\" button Text"
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: admin/settings/general.class.php:407, admin/settings/general.class.php:530
|
280 |
msgid "\"Remove from Wishlist\" Button Text"
|
281 |
msgstr ""
|
282 |
|
283 |
+
#: admin/settings/general.class.php:415
|
284 |
msgid "Product listing Button Settings"
|
285 |
msgstr ""
|
286 |
|
287 |
+
#: admin/settings/general.class.php:416
|
288 |
msgid "These are separate settings for the \"Add to Wishlist\" button on a product listing (Shop page, categories, etc.). You can also adjust button and text colors, size, etc. in a <code>TI Wishlist > Style Options.</code>"
|
289 |
msgstr ""
|
290 |
|
291 |
+
#: admin/settings/general.class.php:422
|
292 |
msgid "Show in Product Listing"
|
293 |
msgstr ""
|
294 |
|
295 |
+
#: admin/settings/general.class.php:442
|
296 |
msgid "Above Thumbnail"
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: admin/settings/general.class.php:445
|
300 |
msgid "Note: if \"Custom position with code\" option is applied, the \"Add to Wishlist\" button should be added into template using <code>do_shortcode()</code> function like this:<br /><code>do_shortcode(\"[ti_wishlists_addtowishlist loop=yes]\")</code>"
|
301 |
msgstr ""
|
302 |
|
303 |
+
#: admin/settings/general.class.php:524, views/wizard/step-button.php:41
|
304 |
msgid "\"Add to Wishlist\" Text"
|
305 |
msgstr ""
|
306 |
|
307 |
+
#: admin/settings/general.class.php:538
|
308 |
msgid "Wishlist Product Settings"
|
309 |
msgstr ""
|
310 |
|
311 |
+
#: admin/settings/general.class.php:539
|
312 |
msgid "Following options allows you to choose what information/functionality to show/enable in wishlist table on wishlist page."
|
313 |
msgstr ""
|
314 |
|
315 |
+
#: admin/settings/general.class.php:545
|
316 |
msgid "Show \"Add to Cart\" button"
|
317 |
msgstr ""
|
318 |
|
319 |
+
#: admin/settings/general.class.php:552
|
320 |
msgid "\"Add to Cart\" Text"
|
321 |
msgstr ""
|
322 |
|
323 |
+
#: admin/settings/general.class.php:559
|
324 |
msgid "Show Unit price"
|
325 |
msgstr ""
|
326 |
|
327 |
+
#: admin/settings/general.class.php:565
|
328 |
msgid "Show Stock status"
|
329 |
msgstr ""
|
330 |
|
331 |
+
#: admin/settings/general.class.php:571
|
332 |
msgid "Show Date of addition"
|
333 |
msgstr ""
|
334 |
|
335 |
+
#: admin/settings/general.class.php:578
|
336 |
msgid "Wishlist Table Settings"
|
337 |
msgstr ""
|
338 |
|
339 |
+
#: admin/settings/general.class.php:579
|
340 |
msgid "Following options will help user to manage and add products to cart from wishlist table in bulk."
|
341 |
msgstr ""
|
342 |
|
343 |
+
#: admin/settings/general.class.php:585
|
344 |
msgid "Show Checkboxes"
|
345 |
msgstr ""
|
346 |
|
347 |
+
#: admin/settings/general.class.php:597
|
348 |
msgid "Show Actions button"
|
349 |
msgstr ""
|
350 |
|
351 |
+
#: admin/settings/general.class.php:598
|
352 |
msgid "Bulk actions drop down at the bottom of wishlist table"
|
353 |
msgstr ""
|
354 |
|
355 |
+
#: admin/settings/general.class.php:604
|
356 |
msgid "Show \"Add Selected to Cart\" button"
|
357 |
msgstr ""
|
358 |
|
359 |
+
#: admin/settings/general.class.php:611
|
360 |
msgid "\"Add Selected to Cart\" Button Text"
|
361 |
msgstr ""
|
362 |
|
363 |
+
#: admin/settings/general.class.php:622
|
364 |
msgid "Show \"Add All to Cart\" button"
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: admin/settings/general.class.php:629
|
368 |
msgid "\"Add All to Cart\" Button Text"
|
369 |
msgstr ""
|
370 |
|
371 |
+
#: admin/settings/general.class.php:642
|
372 |
msgid "Following options enable/disable Social share icons below wishlist table on wishlist page. Wishlist owner can easily share their wishlists using this button on social networks. Wishlist privacy should be set to public or shared status, private wishlists can't be shared."
|
373 |
msgstr ""
|
374 |
|
375 |
+
#: admin/settings/general.class.php:648
|
376 |
msgid "Social Networks Sharing Options"
|
377 |
msgstr ""
|
378 |
|
379 |
+
#: admin/settings/general.class.php:654, views/wizard/step-social.php:26
|
380 |
msgid "Show \"Facebook\" Button"
|
381 |
msgstr ""
|
382 |
|
383 |
+
#: admin/settings/general.class.php:660, views/wizard/step-social.php:35
|
384 |
msgid "Show \"Twitter\" Button"
|
385 |
msgstr ""
|
386 |
|
387 |
+
#: admin/settings/general.class.php:666, views/wizard/step-social.php:44
|
388 |
msgid "Show \"Pinterest\" Button"
|
389 |
msgstr ""
|
390 |
|
391 |
+
#: admin/settings/general.class.php:672, views/wizard/step-social.php:53
|
392 |
msgid "Show \"Google+\" Button"
|
393 |
msgstr ""
|
394 |
|
395 |
+
#: admin/settings/general.class.php:678, views/wizard/step-social.php:62
|
396 |
msgid "Show \"WhatsApp\" Button"
|
397 |
msgstr ""
|
398 |
|
399 |
+
#: admin/settings/general.class.php:684
|
400 |
msgid "Show \"Copy to clipboard\" Button"
|
401 |
msgstr ""
|
402 |
|
403 |
+
#: admin/settings/general.class.php:690, views/wizard/step-social.php:80
|
404 |
msgid "Show \"Share by Email\" Button"
|
405 |
msgstr ""
|
406 |
|
407 |
+
#: admin/settings/general.class.php:696
|
408 |
msgid "\"Share on\" Text"
|
409 |
msgstr ""
|
410 |
|
411 |
+
#: admin/settings/general.class.php:702
|
412 |
msgid "Social Icons Color"
|
413 |
msgstr ""
|
414 |
|
415 |
+
#: admin/settings/general.class.php:706
|
416 |
msgid "Dark"
|
417 |
msgstr ""
|
418 |
|
419 |
+
#: admin/settings/general.class.php:715
|
420 |
msgid "Wishlist Product Counter"
|
421 |
msgstr ""
|
422 |
|
423 |
+
#: admin/settings/general.class.php:716
|
424 |
msgid "Add this shortcode <code>[ti_wishlist_products_counter]</code> anywhere into a page content to show Wishlist Counter.<br/><br/>It can be also added as a widget <code>Wishlist Products Counter</code> under the <a href=\"%s\">Appearance -> Widgets</a> section."
|
425 |
msgstr ""
|
426 |
|
427 |
+
#: admin/settings/general.class.php:722
|
428 |
msgid "\"Wishlist\" Counter Icon"
|
429 |
msgstr ""
|
430 |
|
431 |
+
#: admin/settings/general.class.php:754
|
432 |
msgid "\"Wishlist\" Counter Icon Color"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: admin/settings/general.class.php:765
|
436 |
msgid "Show \"Wishlist\" Counter Text"
|
437 |
msgstr ""
|
438 |
|
439 |
+
#: admin/settings/general.class.php:774
|
440 |
msgid "\"Wishlist\" Counter Text"
|
441 |
msgstr ""
|
442 |
|
443 |
+
#: admin/settings/general.class.php:775
|
444 |
msgid "Wishlist - "
|
445 |
msgstr ""
|
446 |
|
447 |
+
#: admin/settings/general.class.php:781
|
448 |
msgid "Add counter to menu"
|
449 |
msgstr ""
|
450 |
|
451 |
+
#: admin/settings/general.class.php:783
|
452 |
msgid "You can add a wishlist products counter as item to the selected menu."
|
453 |
msgstr ""
|
454 |
|
455 |
+
#: admin/settings/general.class.php:792
|
456 |
msgid "Counter position (Menu item order)"
|
457 |
msgstr ""
|
458 |
|
459 |
+
#: admin/settings/general.class.php:793
|
460 |
msgid "Allows you to add the wishlist counter as a menu item and apply its position."
|
461 |
msgstr ""
|
462 |
|
463 |
+
#: admin/settings/general.class.php:804
|
464 |
msgid "Show number of products in counter"
|
465 |
msgstr ""
|
466 |
|
467 |
+
#: admin/settings/general.class.php:813
|
468 |
msgid "Hide zero value"
|
469 |
msgstr ""
|
470 |
|
471 |
+
#: admin/settings/general.class.php:814
|
472 |
msgid "Do not show the \"0\" value in a counter if wishlist is empty."
|
473 |
msgstr ""
|
474 |
|
475 |
+
#: admin/settings/general.class.php:825
|
476 |
msgid "Support chat settings"
|
477 |
msgstr ""
|
478 |
|
479 |
+
#: admin/settings/general.class.php:832
|
480 |
msgid "Disable support chat"
|
481 |
msgstr ""
|
482 |
|
483 |
+
#: admin/settings/style.class.php:56
|
484 |
msgid "Style Options"
|
485 |
msgstr ""
|
486 |
|
487 |
+
#: admin/settings/style.class.php:57
|
488 |
msgid "Wishlist Style Options"
|
489 |
msgstr ""
|
490 |
|
491 |
+
#: admin/settings/style.class.php:71
|
492 |
msgid "Use Default Font"
|
493 |
msgstr ""
|
494 |
|
495 |
+
#: admin/settings/style.class.php:88
|
496 |
msgid "text"
|
497 |
msgstr ""
|
498 |
|
499 |
+
#: admin/settings/style.class.php:95
|
500 |
msgid "Title Color"
|
501 |
msgstr ""
|
502 |
|
503 |
+
#: admin/settings/style.class.php:101
|
504 |
msgid "Title Font Size"
|
505 |
msgstr ""
|
506 |
|
507 |
+
#: admin/settings/style.class.php:107, admin/settings/style.class.php:483, admin/settings/style.class.php:582
|
508 |
msgid "Content Text Color"
|
509 |
msgstr ""
|
510 |
|
511 |
+
#: admin/settings/style.class.php:113, admin/settings/style.class.php:149, admin/settings/style.class.php:187, admin/settings/style.class.php:244, admin/settings/style.class.php:313, admin/settings/style.class.php:369, admin/settings/style.class.php:419
|
512 |
msgid "Font"
|
513 |
msgstr ""
|
514 |
|
515 |
+
#: admin/settings/style.class.php:120
|
516 |
msgid "Product Title link"
|
517 |
msgstr ""
|
518 |
|
519 |
+
#: admin/settings/style.class.php:127
|
520 |
msgid "Color"
|
521 |
msgstr ""
|
522 |
|
523 |
+
#: admin/settings/style.class.php:133
|
524 |
msgid "Hover Color"
|
525 |
msgstr ""
|
526 |
|
527 |
+
#: admin/settings/style.class.php:139
|
528 |
msgid "Underline"
|
529 |
msgstr ""
|
530 |
|
531 |
+
#: admin/settings/style.class.php:141
|
532 |
msgid "Yes"
|
533 |
msgstr ""
|
534 |
|
535 |
+
#: admin/settings/style.class.php:142
|
536 |
msgid "No"
|
537 |
msgstr ""
|
538 |
|
539 |
+
#: admin/settings/style.class.php:156
|
540 |
msgid "fields"
|
541 |
msgstr ""
|
542 |
|
543 |
+
#: admin/settings/style.class.php:163, admin/settings/style.class.php:207, admin/settings/style.class.php:276, admin/settings/style.class.php:345, admin/settings/style.class.php:395, admin/settings/style.class.php:445, admin/settings/style.class.php:540, admin/settings/style.class.php:576
|
544 |
msgid "Background Color"
|
545 |
msgstr ""
|
546 |
|
547 |
+
#: admin/settings/style.class.php:169, admin/settings/style.class.php:451
|
548 |
msgid "Border Color"
|
549 |
msgstr ""
|
550 |
|
551 |
+
#: admin/settings/style.class.php:175, admin/settings/style.class.php:264, admin/settings/style.class.php:333, admin/settings/style.class.php:383, admin/settings/style.class.php:433
|
552 |
msgid "Border Radius"
|
553 |
msgstr ""
|
554 |
|
555 |
+
#: admin/settings/style.class.php:181, admin/settings/style.class.php:231, admin/settings/style.class.php:300, admin/settings/style.class.php:357, admin/settings/style.class.php:407
|
556 |
msgid "Text Color"
|
557 |
msgstr ""
|
558 |
|
559 |
+
#: admin/settings/style.class.php:195
|
560 |
msgid "Select Font Size"
|
561 |
msgstr ""
|
562 |
|
563 |
+
#: admin/settings/style.class.php:200
|
564 |
msgid "\"Add to Wishlist\" product page button"
|
565 |
msgstr ""
|
566 |
|
567 |
+
#: admin/settings/style.class.php:213, admin/settings/style.class.php:282, admin/settings/style.class.php:351, admin/settings/style.class.php:401, admin/settings/style.class.php:546
|
568 |
msgid "Background Hover Color"
|
569 |
msgstr ""
|
570 |
|
571 |
+
#: admin/settings/style.class.php:219, admin/settings/style.class.php:288
|
572 |
msgid "Button Text Color"
|
573 |
msgstr ""
|
574 |
|
575 |
+
#: admin/settings/style.class.php:225, admin/settings/style.class.php:294
|
576 |
msgid "Button Text Hover Color"
|
577 |
msgstr ""
|
578 |
|
579 |
+
#: admin/settings/style.class.php:237, admin/settings/style.class.php:306, admin/settings/style.class.php:363, admin/settings/style.class.php:413
|
580 |
msgid "Text Hover Color"
|
581 |
msgstr ""
|
582 |
|
583 |
+
#: admin/settings/style.class.php:252, admin/settings/style.class.php:321, admin/settings/style.class.php:377, admin/settings/style.class.php:427
|
584 |
msgid "Font Size"
|
585 |
msgstr ""
|
586 |
|
587 |
+
#: admin/settings/style.class.php:258, admin/settings/style.class.php:327, admin/settings/style.class.php:564
|
588 |
msgid "Icon Size"
|
589 |
msgstr ""
|
590 |
|
591 |
+
#: admin/settings/style.class.php:269
|
592 |
msgid "\"Add to Wishlist\" product listing button"
|
593 |
msgstr ""
|
594 |
|
595 |
+
#: admin/settings/style.class.php:338
|
596 |
msgid "\"Apply Action\" button "
|
597 |
msgstr ""
|
598 |
|
599 |
+
#: admin/settings/style.class.php:388
|
600 |
msgid "add to cart button"
|
601 |
msgstr ""
|
602 |
|
603 |
+
#: admin/settings/style.class.php:438
|
604 |
msgid "table"
|
605 |
msgstr ""
|
606 |
|
607 |
+
#: admin/settings/style.class.php:457
|
608 |
msgid "Table Head Background Color"
|
609 |
msgstr ""
|
610 |
|
611 |
+
#: admin/settings/style.class.php:463
|
612 |
msgid "Table Head Text Color"
|
613 |
msgstr ""
|
614 |
|
615 |
+
#: admin/settings/style.class.php:469
|
616 |
msgid "Table Head Font"
|
617 |
msgstr ""
|
618 |
|
619 |
+
#: admin/settings/style.class.php:477
|
620 |
msgid "Table Head Font Size"
|
621 |
msgstr ""
|
622 |
|
623 |
+
#: admin/settings/style.class.php:489, admin/settings/style.class.php:588
|
624 |
msgid "Content Text Font"
|
625 |
msgstr ""
|
626 |
|
627 |
+
#: admin/settings/style.class.php:497, admin/settings/style.class.php:596
|
628 |
msgid "Content Text Font Size"
|
629 |
msgstr ""
|
630 |
|
631 |
+
#: admin/settings/style.class.php:503
|
632 |
msgid "Price Color"
|
633 |
msgstr ""
|
634 |
|
635 |
+
#: admin/settings/style.class.php:509
|
636 |
msgid "Price Font"
|
637 |
msgstr ""
|
638 |
|
639 |
+
#: admin/settings/style.class.php:517
|
640 |
msgid "Price Font Size"
|
641 |
msgstr ""
|
642 |
|
643 |
+
#: admin/settings/style.class.php:523
|
644 |
msgid "Special Price Color"
|
645 |
msgstr ""
|
646 |
|
647 |
+
#: admin/settings/style.class.php:529
|
648 |
msgid "Special Price Background Color"
|
649 |
msgstr ""
|
650 |
|
651 |
+
#: admin/settings/style.class.php:533
|
652 |
msgid "Share buttons"
|
653 |
msgstr ""
|
654 |
|
655 |
+
#: admin/settings/style.class.php:552
|
656 |
msgid "Icon Color"
|
657 |
msgstr ""
|
658 |
|
659 |
+
#: admin/settings/style.class.php:558
|
660 |
msgid "Icon Hover Color"
|
661 |
msgstr ""
|
662 |
|
663 |
+
#: admin/settings/style.class.php:569
|
664 |
msgid "popups"
|
665 |
msgstr ""
|
666 |
|
667 |
+
#: admin/settings/style.class.php:602
|
668 |
msgid "Normal Buttons Background Color"
|
669 |
msgstr ""
|
670 |
|
671 |
+
#: admin/settings/style.class.php:608
|
672 |
msgid "Normal Buttons Background Hover Color"
|
673 |
msgstr ""
|
674 |
|
675 |
+
#: admin/settings/style.class.php:614
|
676 |
msgid "Normal Buttons Text Color"
|
677 |
msgstr ""
|
678 |
|
679 |
+
#: admin/settings/style.class.php:620
|
680 |
msgid "Normal Buttons Text Hover Color"
|
681 |
msgstr ""
|
682 |
|
683 |
+
#: admin/settings/upgrade.class.php:56, admin/tinvwl.class.php:273, views/wizard/finish.php:31
|
684 |
msgid "Upgrade to Premium"
|
685 |
msgstr ""
|
686 |
|
687 |
+
#: admin/settings/upgrade.class.php:57
|
688 |
msgid "Premium Features"
|
689 |
msgstr ""
|
690 |
|
744 |
msgid "<strong>Your theme (%1$s) contains outdated copies of some WooCommerce Wishlist Plugin template files.</strong><br> These files may need updating to ensure they are compatible with the current version of WooCommerce Wishlist Plugin.<br> You can see which files are affected from the <a href=\"%2$s\">system status page</a>.<br> If in doubt, check with the author of the theme."
|
745 |
msgstr ""
|
746 |
|
747 |
+
#: includes/api/wishlist.class.php:102, includes/api/wishlist.class.php:165, includes/api/wishlist.class.php:213, includes/api/wishlist.class.php:269
|
748 |
+
msgid "Invalid wishlist share key."
|
749 |
+
msgstr ""
|
750 |
+
|
751 |
+
#: includes/api/wishlist.class.php:132
|
752 |
+
msgid "No wishlists found for this user."
|
753 |
+
msgstr ""
|
754 |
+
|
755 |
+
#: includes/api/wishlist.class.php:186
|
756 |
+
msgid "Update wishlist data failed."
|
757 |
+
msgstr ""
|
758 |
+
|
759 |
+
#: includes/api/wishlist.class.php:235
|
760 |
+
msgid "No products found for this wishlist."
|
761 |
+
msgstr ""
|
762 |
+
|
763 |
+
#: includes/api/wishlist.class.php:291
|
764 |
+
msgid "Add product to wishlist failed."
|
765 |
+
msgstr ""
|
766 |
+
|
767 |
+
#: includes/api/wishlist.class.php:327
|
768 |
+
msgid "Product not found."
|
769 |
+
msgstr ""
|
770 |
+
|
771 |
+
#: includes/api/wishlist.class.php:330
|
772 |
+
msgid "Product removed from a wishlist."
|
773 |
+
msgstr ""
|
774 |
+
|
775 |
#: includes/api/yoasti18n/i18n-module.php:200
|
776 |
msgid "As you can see, there is a translation of this plugin in %1$s. This translation is currently %3$d%% complete. We need your help to make it complete and to fix any errors. Please register at %4$s to help complete the translation to %1$s!"
|
777 |
msgstr ""
|
824 |
msgid "%1$s %3$s is required. Please activate it before activating this plugin."
|
825 |
msgstr ""
|
826 |
|
827 |
+
#: includes/tinvwl.class.php:160
|
828 |
msgid "Settings"
|
829 |
msgstr ""
|
830 |
|
831 |
+
#: includes/tinvwl.class.php:161
|
832 |
msgid "Premium Version"
|
833 |
msgstr ""
|
834 |
|
835 |
+
#: includes/tinvwl.class.php:162
|
836 |
msgid "Live Demo"
|
837 |
msgstr ""
|
838 |
|
860 |
msgid "Page Setup"
|
861 |
msgstr ""
|
862 |
|
863 |
+
#: includes/wizard.class.php:288, includes/wizard.class.php:319, public/tinvwl.class.php:583
|
864 |
msgid "Wishlist"
|
865 |
msgstr ""
|
866 |
|
904 |
msgid "Login"
|
905 |
msgstr ""
|
906 |
|
907 |
+
#: public/tinvwl.class.php:479
|
908 |
msgid "Create New"
|
909 |
msgstr ""
|
910 |
|
911 |
+
#: public/tinvwl.class.php:482
|
912 |
msgid "Please select some product options before adding this product to your wishlist."
|
913 |
msgstr ""
|
914 |
|
915 |
+
#: public/tinvwl.class.php:483
|
916 |
msgid "No items or actions are selected."
|
917 |
msgstr ""
|
918 |
|
919 |
+
#: public/tinvwl.class.php:484
|
920 |
msgid "Copied!"
|
921 |
msgstr ""
|
922 |
|
923 |
+
#: public/widget/wishlistcounter.class.php:24
|
924 |
msgid "Displays the number of products in the wishlist on your site."
|
925 |
msgstr ""
|
926 |
|
927 |
+
#: public/widget/wishlistcounter.class.php:26
|
928 |
msgid "TI Wishlist Products Counter"
|
929 |
msgstr ""
|
930 |
|
931 |
+
#: public/widget/wishlistcounter.class.php:31
|
932 |
msgid "Show counter icon"
|
933 |
msgstr ""
|
934 |
|
935 |
+
#: public/widget/wishlistcounter.class.php:36
|
936 |
msgid "Show counter text"
|
937 |
msgstr ""
|
938 |
|
939 |
+
#: public/widget/wishlistcounter.class.php:41
|
940 |
msgid "Counter Text"
|
941 |
msgstr ""
|
942 |
|
963 |
msgid "Actions"
|
964 |
msgstr ""
|
965 |
|
966 |
+
#: public/wishlist/buttons.class.php:346, templates/ti-wishlist.php:92
|
967 |
msgid "Remove"
|
968 |
msgstr ""
|
969 |
|
970 |
+
#: public/wishlist/buttons.class.php:494, public/wishlist/view.class.php:496
|
971 |
msgid "“%s”"
|
972 |
msgstr ""
|
973 |
|
977 |
msgstr[0] ""
|
978 |
msgstr[1] ""
|
979 |
|
980 |
+
#: public/wishlist/view.class.php:424
|
981 |
msgid "%1$s by %2$s"
|
982 |
msgstr ""
|
983 |
|
984 |
+
#: public/wishlist/view.class.php:506
|
985 |
msgid "%s has been removed from wishlist."
|
986 |
msgstr ""
|
987 |
|
988 |
+
#: public/wishlist/view.class.php:508
|
989 |
msgid "%s has not been removed from wishlist."
|
990 |
msgstr ""
|
991 |
|
992 |
+
#: public/wishlist/view.class.php:651
|
993 |
msgid "Return to Wishlist"
|
994 |
msgstr ""
|
995 |
|
996 |
+
#: public/wishlist/view.class.php:772
|
997 |
msgid "Previous Page"
|
998 |
msgstr ""
|
999 |
|
1000 |
+
#: public/wishlist/view.class.php:798
|
1001 |
msgid "Next Page"
|
1002 |
msgstr ""
|
1003 |
|
1045 |
msgid "Stock Status"
|
1046 |
msgstr ""
|
1047 |
|
1048 |
+
#: templates/ti-wishlist-user.php:83, templates/ti-wishlist.php:84
|
1049 |
msgid "Select for bulk action"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
+
#: templates/ti-wishlist-user.php:136, templates/ti-wishlist.php:144, tinv-wishlists-function-integration.php:777, tinv-wishlists-function-integration.php:933, tinv-wishlists-function-integration.php:1095, tinv-wishlists-function-integration.php:1309
|
1053 |
msgid "In stock"
|
1054 |
msgstr ""
|
1055 |
|
1081 |
msgid "Out of stock"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
+
#: tinv-wishlists-function-integration.php:1671
|
1085 |
msgid "Base price"
|
1086 |
msgstr ""
|
1087 |
|
1088 |
+
#: tinv-wishlists-function-integration.php:2425
|
1089 |
msgid "WooCommerce Wishlist"
|
1090 |
msgstr ""
|
1091 |
|
1092 |
+
#: tinv-wishlists-function-integration.php:2426
|
1093 |
msgid "Awards %_plural% for users adding products to their wishlist and purchased products from their wishlist."
|
1094 |
msgstr ""
|
1095 |
|
1096 |
+
#: tinv-wishlists-function-integration.php:2572
|
1097 |
msgid "Adding Product to Wishlist"
|
1098 |
msgstr ""
|
1099 |
|
1100 |
+
#: tinv-wishlists-function-integration.php:2577, tinv-wishlists-function-integration.php:2622
|
1101 |
msgid "Points"
|
1102 |
msgstr ""
|
1103 |
|
1104 |
+
#: tinv-wishlists-function-integration.php:2590, tinv-wishlists-function-integration.php:2635
|
1105 |
msgid "Limit"
|
1106 |
msgstr ""
|
1107 |
|
1108 |
+
#: tinv-wishlists-function-integration.php:2603, tinv-wishlists-function-integration.php:2648
|
1109 |
msgid "Log Template"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
+
#: tinv-wishlists-function-integration.php:2607, tinv-wishlists-function-integration.php:2652
|
1113 |
msgid "required"
|
1114 |
msgstr ""
|
1115 |
|
1116 |
+
#: tinv-wishlists-function-integration.php:2617
|
1117 |
msgid "Purchasing Product from Wishlist"
|
1118 |
msgstr ""
|
1119 |
|
1120 |
+
#: tinv-wishlists-function-integration.php:2703
|
1121 |
msgid "Purchased From Wishlist"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
+
#: tinv-wishlists-function-integration.php:2704
|
1125 |
msgid "Added To Wishlist"
|
1126 |
msgstr ""
|
1127 |
|
public/addtowishlist.class.php
CHANGED
@@ -199,7 +199,7 @@ class TInvWL_Public_AddToWishlist {
|
|
199 |
if ( empty( $post['product_id'] ) ) {
|
200 |
$status = false;
|
201 |
} else {
|
202 |
-
$post['product_type'] = apply_filters(
|
203 |
$post = apply_filters( 'tinvwl_addtowishlist_prepare', $post );
|
204 |
$form = apply_filters( 'tinvwl_addtowishlist_prepare_form', filter_input( INPUT_POST, 'form', FILTER_DEFAULT, FILTER_FORCE_ARRAY ) );
|
205 |
if ( empty( $form ) ) {
|
@@ -223,12 +223,12 @@ class TInvWL_Public_AddToWishlist {
|
|
223 |
) ) );
|
224 |
if ( tinv_get_option( 'general', 'simple_flow' ) && 'remove' === $post['product_action'] ) {
|
225 |
if ( $wlp->remove_product_from_wl( 0, $post['product_id'], $variation_id, apply_filters( 'tinvwl_addtowishlist_add_form', $form ) ) ) {
|
226 |
-
$data['msg'][] = apply_filters( '
|
227 |
$data['removed'] = true;
|
228 |
$status = false;
|
229 |
}
|
230 |
} elseif ( ! $allowed_adding ) {
|
231 |
-
$data['msg'][] = apply_filters( '
|
232 |
$status = false;
|
233 |
} elseif ( $wlp->add_product( apply_filters( 'tinvwl_addtowishlist_add', array(
|
234 |
'product_id' => $post['product_id'],
|
@@ -236,7 +236,7 @@ class TInvWL_Public_AddToWishlist {
|
|
236 |
'quantity' => $quantity,
|
237 |
) ) )
|
238 |
) {
|
239 |
-
$data['msg'][] = apply_filters( '
|
240 |
} else {
|
241 |
$status = false;
|
242 |
}
|
@@ -261,19 +261,19 @@ class TInvWL_Public_AddToWishlist {
|
|
261 |
) ) );
|
262 |
if ( tinv_get_option( 'general', 'simple_flow' ) && 'remove' === $post['product_action'] ) {
|
263 |
if ( $wlp->remove_product_from_wl( 0, $post['product_id'], $variation_id, apply_filters( 'tinvwl_addtowishlist_add_form', $form ) ) ) {
|
264 |
-
$data['msg'][] = apply_filters( '
|
265 |
$data['removed'] = true;
|
266 |
$status = false;
|
267 |
}
|
268 |
} elseif ( ! $allowed_adding ) {
|
269 |
-
$data['msg'][] = apply_filters( '
|
270 |
$status = false;
|
271 |
} elseif ( $wlp->add_product( apply_filters( 'tinvwl_addtowishlist_add', array(
|
272 |
'product_id' => $post['product_id'],
|
273 |
'quantity' => $quantity,
|
274 |
'variation_id' => $variation_id,
|
275 |
) ), apply_filters( 'tinvwl_addtowishlist_add_form', $form ) ) ) {
|
276 |
-
$data['msg'][] = apply_filters( '
|
277 |
} else {
|
278 |
$status = false;
|
279 |
}
|
@@ -288,18 +288,18 @@ class TInvWL_Public_AddToWishlist {
|
|
288 |
) ) );
|
289 |
if ( tinv_get_option( 'general', 'simple_flow' ) && 'remove' === $post['product_action'] ) {
|
290 |
if ( $wlp->remove_product_from_wl( 0, $post['product_id'], 0, apply_filters( 'tinvwl_addtowishlist_add_form', $form ) ) ) {
|
291 |
-
$data['msg'][] = apply_filters( '
|
292 |
$data['removed'] = true;
|
293 |
$status = false;
|
294 |
}
|
295 |
} elseif ( ! $allowed_adding ) {
|
296 |
-
$data['msg'][] = apply_filters( '
|
297 |
$status = false;
|
298 |
} elseif ( $wlp->add_product( apply_filters( 'tinvwl_addtowishlist_add', array(
|
299 |
'product_id' => $post['product_id'],
|
300 |
'quantity' => $quantity,
|
301 |
) ), apply_filters( 'tinvwl_addtowishlist_add_form', $form ) ) ) {
|
302 |
-
$data['msg'][] = apply_filters( '
|
303 |
} else {
|
304 |
$status = false;
|
305 |
}
|
@@ -324,7 +324,7 @@ class TInvWL_Public_AddToWishlist {
|
|
324 |
$data['msg'] = array_unique( $data['msg'] );
|
325 |
$data['msg'] = implode( '<br>', $data['msg'] );
|
326 |
if ( ! empty( $data['msg'] ) ) {
|
327 |
-
$data['msg'] = apply_filters(
|
328 |
$data['msg'] = tinv_wishlist_template_html( 'ti-addedtowishlist-dialogbox.php', apply_filters( 'tinvwl_addtowishlist_dialog_box', $data, $post ) );
|
329 |
}
|
330 |
if ( ! tinv_get_option( 'general', 'show_notice' ) && array_key_exists( 'msg', $data ) ) {
|
@@ -386,7 +386,7 @@ class TInvWL_Public_AddToWishlist {
|
|
386 |
$vproduct = in_array( ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $product->product_type : $product->get_type() ), array(
|
387 |
'variable',
|
388 |
'variation',
|
389 |
-
'variable-subscription'
|
390 |
) );
|
391 |
$wlp = new TInvWL_Product();
|
392 |
$wishlists = $this->user_wishlists();
|
@@ -522,11 +522,11 @@ class TInvWL_Public_AddToWishlist {
|
|
522 |
|
523 |
$wishlists = $this->user_wishlist( $this->product );
|
524 |
|
525 |
-
add_action( '
|
526 |
|
527 |
if ( $this->is_loop && in_array( ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $product->product_type : $product->get_type() ), array(
|
528 |
'variable',
|
529 |
-
'variable-subscription'
|
530 |
) ) ) {
|
531 |
$this->variation_id = null;
|
532 |
$match_attributes = array();
|
@@ -550,14 +550,14 @@ class TInvWL_Public_AddToWishlist {
|
|
550 |
'product' => $this->product,
|
551 |
'variation_id' => ( $this->is_loop && in_array( ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $this->product->product_type : $this->product->get_type() ), array(
|
552 |
'variable',
|
553 |
-
'variable-subscription'
|
554 |
) ) ) ? $this->variation_id : ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $this->product->variation_id : ( $this->product->is_type( 'variation' ) ? $this->product->get_id() : 0 ) ),
|
555 |
'TInvWishlist' => $wishlists,
|
556 |
'button_icon' => tinv_get_option( 'add_to_wishlist' . ( $this->is_loop ? '_catalog' : '' ), 'icon' ),
|
557 |
-
'add_to_wishlist' => apply_filters( '
|
558 |
-
'browse_in_wishlist' => apply_filters( '
|
559 |
-
'product_in_wishlist' => apply_filters( '
|
560 |
-
'product_to_wishlist' => apply_filters( '
|
561 |
'loop' => $this->is_loop,
|
562 |
);
|
563 |
tinv_wishlist_template( 'ti-addtowishlist.php', $data );
|
@@ -570,7 +570,7 @@ class TInvWL_Public_AddToWishlist {
|
|
570 |
*/
|
571 |
function button( $echo = true ) {
|
572 |
$content = apply_filters( 'tinvwl_wishlist_button_before', '' );
|
573 |
-
$text = ( tinv_get_option( 'add_to_wishlist' . ( $this->is_loop ? '_catalog' : '' ), 'show_text' ) ) ? apply_filters( '
|
574 |
$icon = tinv_get_option( 'add_to_wishlist' . ( $this->is_loop ? '_catalog' : '' ), 'icon' );
|
575 |
$icon_color = tinv_get_option( 'add_to_wishlist' . ( $this->is_loop ? '_catalog' : '' ), 'icon_style' );
|
576 |
$icon_class = '';
|
@@ -580,7 +580,7 @@ class TInvWL_Public_AddToWishlist {
|
|
580 |
} else {
|
581 |
$content .= '<div class="tinv-wishlist-clear"></div>';
|
582 |
if ( tinv_get_option( 'general', 'simple_flow' ) ) {
|
583 |
-
$text = sprintf( '<span class="tinvwl_add_to_wishlist-text">%s</span><span class="tinvwl_remove_from_wishlist-text">%s</span>', $text, apply_filters( '
|
584 |
} else {
|
585 |
$text = sprintf( '<span class="tinvwl_add_to_wishlist-text">%s</span>', $text );
|
586 |
}
|
@@ -588,7 +588,7 @@ class TInvWL_Public_AddToWishlist {
|
|
588 |
if ( ! empty( $icon ) ) {
|
589 |
$icon_upload = tinv_get_option( 'add_to_wishlist' . ( $this->is_loop ? '_catalog' : '' ), 'icon_upload' );
|
590 |
if ( 'custom' === $icon && ! empty( $icon_upload ) ) {
|
591 |
-
$text = sprintf( '<img src="%s" alt="%s" /> %s', esc_url( $icon_upload ), esc_attr( apply_filters( '
|
592 |
}
|
593 |
$icon = 'tinvwl-icon-' . $icon;
|
594 |
if ( 'custom' !== $icon && $icon_color ) {
|
@@ -598,7 +598,7 @@ class TInvWL_Public_AddToWishlist {
|
|
598 |
$icon .= $icon_class;
|
599 |
$variation_id = ( ( $this->is_loop && in_array( ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $this->product->product_type : $this->product->get_type() ), array(
|
600 |
'variable',
|
601 |
-
'variable-subscription'
|
602 |
) ) ) ? $this->variation_id : ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $this->product->variation_id : ( $this->product->is_type( 'variation' ) ? $this->product->get_id() : 0 ) ) );
|
603 |
|
604 |
if ( $this->wishlist ) {
|
199 |
if ( empty( $post['product_id'] ) ) {
|
200 |
$status = false;
|
201 |
} else {
|
202 |
+
$post['product_type'] = apply_filters( 'tinvwl_addtowishlist_modify_type', $post['product_type'], $post );
|
203 |
$post = apply_filters( 'tinvwl_addtowishlist_prepare', $post );
|
204 |
$form = apply_filters( 'tinvwl_addtowishlist_prepare_form', filter_input( INPUT_POST, 'form', FILTER_DEFAULT, FILTER_FORCE_ARRAY ) );
|
205 |
if ( empty( $form ) ) {
|
223 |
) ) );
|
224 |
if ( tinv_get_option( 'general', 'simple_flow' ) && 'remove' === $post['product_action'] ) {
|
225 |
if ( $wlp->remove_product_from_wl( 0, $post['product_id'], $variation_id, apply_filters( 'tinvwl_addtowishlist_add_form', $form ) ) ) {
|
226 |
+
$data['msg'][] = apply_filters( 'tinvwl_removed_from_wishlist_text', tinv_get_option( 'general', 'text_removed_from' ) );
|
227 |
$data['removed'] = true;
|
228 |
$status = false;
|
229 |
}
|
230 |
} elseif ( ! $allowed_adding ) {
|
231 |
+
$data['msg'][] = apply_filters( 'tinvwl_already_in_wishlist_text', tinv_get_option( 'general', 'text_already_in' ) );
|
232 |
$status = false;
|
233 |
} elseif ( $wlp->add_product( apply_filters( 'tinvwl_addtowishlist_add', array(
|
234 |
'product_id' => $post['product_id'],
|
236 |
'quantity' => $quantity,
|
237 |
) ) )
|
238 |
) {
|
239 |
+
$data['msg'][] = apply_filters( 'tinvwl_added_to_wishlist_text', tinv_get_option( 'general', 'text_added_to' ) );
|
240 |
} else {
|
241 |
$status = false;
|
242 |
}
|
261 |
) ) );
|
262 |
if ( tinv_get_option( 'general', 'simple_flow' ) && 'remove' === $post['product_action'] ) {
|
263 |
if ( $wlp->remove_product_from_wl( 0, $post['product_id'], $variation_id, apply_filters( 'tinvwl_addtowishlist_add_form', $form ) ) ) {
|
264 |
+
$data['msg'][] = apply_filters( 'tinvwl_removed_from_wishlist_text', tinv_get_option( 'general', 'text_removed_from' ) );
|
265 |
$data['removed'] = true;
|
266 |
$status = false;
|
267 |
}
|
268 |
} elseif ( ! $allowed_adding ) {
|
269 |
+
$data['msg'][] = apply_filters( 'tinvwl_already_in_wishlist_text', tinv_get_option( 'general', 'text_already_in' ) );
|
270 |
$status = false;
|
271 |
} elseif ( $wlp->add_product( apply_filters( 'tinvwl_addtowishlist_add', array(
|
272 |
'product_id' => $post['product_id'],
|
273 |
'quantity' => $quantity,
|
274 |
'variation_id' => $variation_id,
|
275 |
) ), apply_filters( 'tinvwl_addtowishlist_add_form', $form ) ) ) {
|
276 |
+
$data['msg'][] = apply_filters( 'tinvwl_added_to_wishlist_text', tinv_get_option( 'general', 'text_added_to' ) );
|
277 |
} else {
|
278 |
$status = false;
|
279 |
}
|
288 |
) ) );
|
289 |
if ( tinv_get_option( 'general', 'simple_flow' ) && 'remove' === $post['product_action'] ) {
|
290 |
if ( $wlp->remove_product_from_wl( 0, $post['product_id'], 0, apply_filters( 'tinvwl_addtowishlist_add_form', $form ) ) ) {
|
291 |
+
$data['msg'][] = apply_filters( 'tinvwl_removed_from_wishlist_text', tinv_get_option( 'general', 'text_removed_from' ) );
|
292 |
$data['removed'] = true;
|
293 |
$status = false;
|
294 |
}
|
295 |
} elseif ( ! $allowed_adding ) {
|
296 |
+
$data['msg'][] = apply_filters( 'tinvwl_already_in_wishlist_text', tinv_get_option( 'general', 'text_already_in' ) );
|
297 |
$status = false;
|
298 |
} elseif ( $wlp->add_product( apply_filters( 'tinvwl_addtowishlist_add', array(
|
299 |
'product_id' => $post['product_id'],
|
300 |
'quantity' => $quantity,
|
301 |
) ), apply_filters( 'tinvwl_addtowishlist_add_form', $form ) ) ) {
|
302 |
+
$data['msg'][] = apply_filters( 'tinvwl_added_to_wishlist_text', tinv_get_option( 'general', 'text_added_to' ) );
|
303 |
} else {
|
304 |
$status = false;
|
305 |
}
|
324 |
$data['msg'] = array_unique( $data['msg'] );
|
325 |
$data['msg'] = implode( '<br>', $data['msg'] );
|
326 |
if ( ! empty( $data['msg'] ) ) {
|
327 |
+
$data['msg'] = apply_filters( 'tinvwl_addtowishlist_message_after', $data['msg'], $data, $post, $form, $product );
|
328 |
$data['msg'] = tinv_wishlist_template_html( 'ti-addedtowishlist-dialogbox.php', apply_filters( 'tinvwl_addtowishlist_dialog_box', $data, $post ) );
|
329 |
}
|
330 |
if ( ! tinv_get_option( 'general', 'show_notice' ) && array_key_exists( 'msg', $data ) ) {
|
386 |
$vproduct = in_array( ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $product->product_type : $product->get_type() ), array(
|
387 |
'variable',
|
388 |
'variation',
|
389 |
+
'variable-subscription',
|
390 |
) );
|
391 |
$wlp = new TInvWL_Product();
|
392 |
$wishlists = $this->user_wishlists();
|
522 |
|
523 |
$wishlists = $this->user_wishlist( $this->product );
|
524 |
|
525 |
+
add_action( 'tinvwl_wishlist_addtowishlist_button', array( $this, 'button' ) );
|
526 |
|
527 |
if ( $this->is_loop && in_array( ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $product->product_type : $product->get_type() ), array(
|
528 |
'variable',
|
529 |
+
'variable-subscription',
|
530 |
) ) ) {
|
531 |
$this->variation_id = null;
|
532 |
$match_attributes = array();
|
550 |
'product' => $this->product,
|
551 |
'variation_id' => ( $this->is_loop && in_array( ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $this->product->product_type : $this->product->get_type() ), array(
|
552 |
'variable',
|
553 |
+
'variable-subscription',
|
554 |
) ) ) ? $this->variation_id : ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $this->product->variation_id : ( $this->product->is_type( 'variation' ) ? $this->product->get_id() : 0 ) ),
|
555 |
'TInvWishlist' => $wishlists,
|
556 |
'button_icon' => tinv_get_option( 'add_to_wishlist' . ( $this->is_loop ? '_catalog' : '' ), 'icon' ),
|
557 |
+
'add_to_wishlist' => apply_filters( 'tinvwl_added_to_wishlist_text_loop', tinv_get_option( 'add_to_wishlist' . ( $this->is_loop ? '_catalog' : '' ), 'text' ) ),
|
558 |
+
'browse_in_wishlist' => apply_filters( 'tinvwl_view_wishlist_text', tinv_get_option( 'general', 'text_browse' ) ),
|
559 |
+
'product_in_wishlist' => apply_filters( 'tinvwl_already_in_wishlist_text', tinv_get_option( 'general', 'text_already_in' ) ),
|
560 |
+
'product_to_wishlist' => apply_filters( 'tinvwl_added_to_wishlist_text', tinv_get_option( 'general', 'text_added_to' ) ),
|
561 |
'loop' => $this->is_loop,
|
562 |
);
|
563 |
tinv_wishlist_template( 'ti-addtowishlist.php', $data );
|
570 |
*/
|
571 |
function button( $echo = true ) {
|
572 |
$content = apply_filters( 'tinvwl_wishlist_button_before', '' );
|
573 |
+
$text = ( tinv_get_option( 'add_to_wishlist' . ( $this->is_loop ? '_catalog' : '' ), 'show_text' ) ) ? apply_filters( 'tinvwl_added_to_wishlist_text_loop', tinv_get_option( 'add_to_wishlist' . ( $this->is_loop ? '_catalog' : '' ), 'text' ) ) : '';
|
574 |
$icon = tinv_get_option( 'add_to_wishlist' . ( $this->is_loop ? '_catalog' : '' ), 'icon' );
|
575 |
$icon_color = tinv_get_option( 'add_to_wishlist' . ( $this->is_loop ? '_catalog' : '' ), 'icon_style' );
|
576 |
$icon_class = '';
|
580 |
} else {
|
581 |
$content .= '<div class="tinv-wishlist-clear"></div>';
|
582 |
if ( tinv_get_option( 'general', 'simple_flow' ) ) {
|
583 |
+
$text = sprintf( '<span class="tinvwl_add_to_wishlist-text">%s</span><span class="tinvwl_remove_from_wishlist-text">%s</span>', $text, apply_filters( 'tinvwl_remove_from_wishlist_text' . ( $this->is_loop ? '_loop' : '' ), tinv_get_option( 'add_to_wishlist' . ( $this->is_loop ? '_catalog' : '' ), 'text_remove' ) ) );
|
584 |
} else {
|
585 |
$text = sprintf( '<span class="tinvwl_add_to_wishlist-text">%s</span>', $text );
|
586 |
}
|
588 |
if ( ! empty( $icon ) ) {
|
589 |
$icon_upload = tinv_get_option( 'add_to_wishlist' . ( $this->is_loop ? '_catalog' : '' ), 'icon_upload' );
|
590 |
if ( 'custom' === $icon && ! empty( $icon_upload ) ) {
|
591 |
+
$text = sprintf( '<img src="%s" alt="%s" /> %s', esc_url( $icon_upload ), esc_attr( apply_filters( 'tinvwl_added_to_wishlist_text_loop', tinv_get_option( 'add_to_wishlist' . ( $this->is_loop ? '_catalog' : '' ), 'text' ) ) ), $text );
|
592 |
}
|
593 |
$icon = 'tinvwl-icon-' . $icon;
|
594 |
if ( 'custom' !== $icon && $icon_color ) {
|
598 |
$icon .= $icon_class;
|
599 |
$variation_id = ( ( $this->is_loop && in_array( ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $this->product->product_type : $this->product->get_type() ), array(
|
600 |
'variable',
|
601 |
+
'variable-subscription',
|
602 |
) ) ) ? $this->variation_id : ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $this->product->variation_id : ( $this->product->is_type( 'variation' ) ? $this->product->get_id() : 0 ) ) );
|
603 |
|
604 |
if ( $this->wishlist ) {
|
public/cart.class.php
CHANGED
@@ -323,7 +323,6 @@ class TInvWL_Public_Cart {
|
|
323 |
}
|
324 |
}
|
325 |
|
326 |
-
|
327 |
/**
|
328 |
* Run action when purchased product from a wishlist.
|
329 |
*
|
323 |
}
|
324 |
}
|
325 |
|
|
|
326 |
/**
|
327 |
* Run action when purchased product from a wishlist.
|
328 |
*
|
public/tinvwl.class.php
CHANGED
@@ -99,7 +99,6 @@ class TInvWL_Public_TInvWL {
|
|
99 |
$this->topwishlist = TInvWL_Public_WishlistCounter::instance( $this->_name );
|
100 |
}
|
101 |
|
102 |
-
|
103 |
/**
|
104 |
* @param $rules
|
105 |
*
|
@@ -133,10 +132,10 @@ class TInvWL_Public_TInvWL {
|
|
133 |
add_action( 'init', array( $this, 'legacy_transfer' ), 90 );
|
134 |
add_action( 'clear_auth_cookie', array( $this, 'set_user_sharekey' ) );
|
135 |
|
136 |
-
add_action(
|
137 |
-
add_action(
|
138 |
-
add_action(
|
139 |
-
add_action(
|
140 |
}
|
141 |
|
142 |
/**
|
@@ -474,16 +473,16 @@ class TInvWL_Public_TInvWL {
|
|
474 |
wp_register_script( $this->_name, TINVWL_URL . 'assets/js/public' . $suffix . '.js', array(
|
475 |
'jquery',
|
476 |
version_compare( WC_VERSION, '3.0.0', '<' ) ? 'jquery-cookie' : 'js-cookie',
|
477 |
-
apply_filters( '
|
478 |
), $this->_version, true );
|
479 |
wp_localize_script( $this->_name, 'tinvwl_add_to_wishlist', array(
|
480 |
'text_create' => __( 'Create New', 'ti-woocommerce-wishlist' ),
|
481 |
-
'text_already_in' => apply_filters( '
|
482 |
'simple_flow' => tinv_get_option( 'general', 'simple_flow' ),
|
483 |
'i18n_make_a_selection_text' => esc_attr__( 'Please select some product options before adding this product to your wishlist.', 'ti-woocommerce-wishlist' ),
|
484 |
'tinvwl_break_submit' => esc_attr__( 'No items or actions are selected.', 'ti-woocommerce-wishlist' ),
|
485 |
'tinvwl_clipboard' => esc_attr__( 'Copied!', 'ti-woocommerce-wishlist' ),
|
486 |
-
'allow_parent_variable' => apply_filters( '
|
487 |
'wc_cart_fragments_refresh' => apply_filters( 'tinvwl_wc_cart_fragments_refresh', true ),
|
488 |
) );
|
489 |
|
@@ -577,7 +576,7 @@ class TInvWL_Public_TInvWL {
|
|
577 |
* @return array
|
578 |
*/
|
579 |
function account_menu_items( $items ) {
|
580 |
-
$index_position = apply_filters(
|
581 |
$items = array_merge(
|
582 |
array_slice( $items, 0, $index_position, true ),
|
583 |
array(
|
99 |
$this->topwishlist = TInvWL_Public_WishlistCounter::instance( $this->_name );
|
100 |
}
|
101 |
|
|
|
102 |
/**
|
103 |
* @param $rules
|
104 |
*
|
132 |
add_action( 'init', array( $this, 'legacy_transfer' ), 90 );
|
133 |
add_action( 'clear_auth_cookie', array( $this, 'set_user_sharekey' ) );
|
134 |
|
135 |
+
add_action( 'tinvwl_after_wishlist_table', array( $this, 'wishlist_button_action_before' ), 0 );
|
136 |
+
add_action( 'tinvwl_after_wishlist_table', array( $this, 'wishlist_button_action_after' ), 15 );
|
137 |
+
add_action( 'tinvwl_after_wishlist_table', array( $this, 'wishlist_button_updcart_before' ), 15 );
|
138 |
+
add_action( 'tinvwl_after_wishlist_table', array( $this, 'wishlist_button_action_after' ), 100 );
|
139 |
}
|
140 |
|
141 |
/**
|
473 |
wp_register_script( $this->_name, TINVWL_URL . 'assets/js/public' . $suffix . '.js', array(
|
474 |
'jquery',
|
475 |
version_compare( WC_VERSION, '3.0.0', '<' ) ? 'jquery-cookie' : 'js-cookie',
|
476 |
+
apply_filters( 'tinvwl_wc_cart_fragments_enabled', true ) ? 'wc-cart-fragments' : 'jquery',
|
477 |
), $this->_version, true );
|
478 |
wp_localize_script( $this->_name, 'tinvwl_add_to_wishlist', array(
|
479 |
'text_create' => __( 'Create New', 'ti-woocommerce-wishlist' ),
|
480 |
+
'text_already_in' => apply_filters( 'tinvwl_already_in_wishlist_text', tinv_get_option( 'general', 'text_already_in' ) ),
|
481 |
'simple_flow' => tinv_get_option( 'general', 'simple_flow' ),
|
482 |
'i18n_make_a_selection_text' => esc_attr__( 'Please select some product options before adding this product to your wishlist.', 'ti-woocommerce-wishlist' ),
|
483 |
'tinvwl_break_submit' => esc_attr__( 'No items or actions are selected.', 'ti-woocommerce-wishlist' ),
|
484 |
'tinvwl_clipboard' => esc_attr__( 'Copied!', 'ti-woocommerce-wishlist' ),
|
485 |
+
'allow_parent_variable' => apply_filters( 'tinvwl_allow_add_parent_variable_product', false ),
|
486 |
'wc_cart_fragments_refresh' => apply_filters( 'tinvwl_wc_cart_fragments_refresh', true ),
|
487 |
) );
|
488 |
|
576 |
* @return array
|
577 |
*/
|
578 |
function account_menu_items( $items ) {
|
579 |
+
$index_position = apply_filters( 'tinvwl_myaccount_position_wishlist', - 1, $items );
|
580 |
$items = array_merge(
|
581 |
array_slice( $items, 0, $index_position, true ),
|
582 |
array(
|
public/widget/{topwishlist.class.php → wishlistcounter.class.php}
RENAMED
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
14 |
/**
|
15 |
* Widget "Popular product"
|
16 |
*/
|
17 |
-
class
|
18 |
|
19 |
/**
|
20 |
* Constructor.
|
@@ -37,7 +37,7 @@ class TInvWL_Public_Widget_Topwishlist extends WC_Widget {
|
|
37 |
),
|
38 |
'text' => array(
|
39 |
'type' => 'text',
|
40 |
-
'std' => apply_filters( '
|
41 |
'label' => __( 'Counter Text', 'ti-woocommerce-wishlist' ),
|
42 |
),
|
43 |
);
|
14 |
/**
|
15 |
* Widget "Popular product"
|
16 |
*/
|
17 |
+
class TInvWL_Public_Widget_WishlistCounter extends WC_Widget {
|
18 |
|
19 |
/**
|
20 |
* Constructor.
|
37 |
),
|
38 |
'text' => array(
|
39 |
'type' => 'text',
|
40 |
+
'std' => apply_filters( 'tinvwl_wishlist_products_counter_text', tinv_get_option( 'topline', 'text' ) ),
|
41 |
'label' => __( 'Counter Text', 'ti-woocommerce-wishlist' ),
|
42 |
),
|
43 |
);
|
public/wishlist/buttons.class.php
CHANGED
@@ -49,8 +49,8 @@ class TInvWL_Public_Wishlist_Buttons {
|
|
49 |
|
50 |
// WP Multilang string translations.
|
51 |
if ( function_exists( 'wpm_translate_string' ) ) {
|
52 |
-
add_filter( '
|
53 |
-
add_filter( '
|
54 |
}
|
55 |
|
56 |
$buttons = array();
|
@@ -63,11 +63,11 @@ class TInvWL_Public_Wishlist_Buttons {
|
|
63 |
'priority' => 10,
|
64 |
'condition' => '$a["is_owner"]',
|
65 |
);
|
66 |
-
add_filter(
|
67 |
__CLASS__,
|
68 |
'add_break_class_input',
|
69 |
) );
|
70 |
-
add_filter(
|
71 |
__CLASS__,
|
72 |
'add_break_class_checkbox',
|
73 |
) );
|
@@ -75,11 +75,11 @@ class TInvWL_Public_Wishlist_Buttons {
|
|
75 |
if ( tinv_get_option( 'table', 'colm_checkbox' ) && tinv_get_option( 'table', 'add_select_to_cart' ) ) {
|
76 |
$buttons[] = array(
|
77 |
'name' => 'product_selected',
|
78 |
-
'title' => apply_filters( '
|
79 |
'method' => array( __CLASS__, 'apply_action_add_selected' ),
|
80 |
'priority' => 25,
|
81 |
);
|
82 |
-
add_filter(
|
83 |
__CLASS__,
|
84 |
'add_break_class_checkbox',
|
85 |
) );
|
@@ -87,12 +87,12 @@ class TInvWL_Public_Wishlist_Buttons {
|
|
87 |
if ( tinv_get_option( 'table', 'add_all_to_cart' ) ) {
|
88 |
$buttons[] = array(
|
89 |
'name' => 'product_all',
|
90 |
-
'title' => apply_filters( '
|
91 |
'method' => array( __CLASS__, 'add_all' ),
|
92 |
'priority' => 30,
|
93 |
);
|
94 |
-
add_filter(
|
95 |
-
add_filter(
|
96 |
}
|
97 |
$buttons = apply_filters( 'tinvwl_manage_buttons_create', $buttons );
|
98 |
|
@@ -173,10 +173,10 @@ class TInvWL_Public_Wishlist_Buttons {
|
|
173 |
}
|
174 |
|
175 |
if ( array_key_exists( 'before', $button ) ) {
|
176 |
-
add_filter(
|
177 |
}
|
178 |
if ( array_key_exists( 'after', $button ) ) {
|
179 |
-
add_filter(
|
180 |
}
|
181 |
|
182 |
add_action( $button['event'], function () use ( $button ) {
|
@@ -198,7 +198,7 @@ class TInvWL_Public_Wishlist_Buttons {
|
|
198 |
* @return string
|
199 |
*/
|
200 |
public static function button( $value, $title, $submit, $echo = true ) {
|
201 |
-
$html = apply_filters(
|
202 |
$attr = array(
|
203 |
'type' => $submit,
|
204 |
'class' => 'button',
|
@@ -206,14 +206,14 @@ class TInvWL_Public_Wishlist_Buttons {
|
|
206 |
'value' => $value,
|
207 |
'title' => esc_attr( wp_strip_all_tags( $title ) ),
|
208 |
);
|
209 |
-
$attr = apply_filters(
|
210 |
foreach ( $attr as $key => &$value ) {
|
211 |
$value = sprintf( '%s="%s"', $key, esc_attr( $value ) );
|
212 |
}
|
213 |
$attr = implode( ' ', $attr );
|
214 |
|
215 |
-
$html .= apply_filters(
|
216 |
-
$html .= apply_filters(
|
217 |
|
218 |
if ( $echo ) {
|
219 |
echo $html; // WPCS: xss ok.
|
@@ -338,7 +338,7 @@ class TInvWL_Public_Wishlist_Buttons {
|
|
338 |
);
|
339 |
|
340 |
if ( tinv_get_option( 'table', 'add_select_to_cart' ) ) {
|
341 |
-
$options['add_selected'] = apply_filters( '
|
342 |
}
|
343 |
|
344 |
$wishlist_curent = TInvWL_Public_Wishlist_View::instance()->get_current_wishlist();
|
49 |
|
50 |
// WP Multilang string translations.
|
51 |
if ( function_exists( 'wpm_translate_string' ) ) {
|
52 |
+
add_filter( 'tinvwl_add_selected_to_cart_text', 'wpm_translate_string' );
|
53 |
+
add_filter( 'tinvwl_add_all_to_cart_text', 'wpm_translate_string' );
|
54 |
}
|
55 |
|
56 |
$buttons = array();
|
63 |
'priority' => 10,
|
64 |
'condition' => '$a["is_owner"]',
|
65 |
);
|
66 |
+
add_filter( 'tinvwl_prepare_attr__button_product_apply', array(
|
67 |
__CLASS__,
|
68 |
'add_break_class_input',
|
69 |
) );
|
70 |
+
add_filter( 'tinvwl_prepare_attr__button_product_apply', array(
|
71 |
__CLASS__,
|
72 |
'add_break_class_checkbox',
|
73 |
) );
|
75 |
if ( tinv_get_option( 'table', 'colm_checkbox' ) && tinv_get_option( 'table', 'add_select_to_cart' ) ) {
|
76 |
$buttons[] = array(
|
77 |
'name' => 'product_selected',
|
78 |
+
'title' => apply_filters( 'tinvwl_add_selected_to_cart_text', tinv_get_option( 'table', 'text_add_select_to_cart' ) ),
|
79 |
'method' => array( __CLASS__, 'apply_action_add_selected' ),
|
80 |
'priority' => 25,
|
81 |
);
|
82 |
+
add_filter( 'tinvwl_prepare_attr__button_product_selected', array(
|
83 |
__CLASS__,
|
84 |
'add_break_class_checkbox',
|
85 |
) );
|
87 |
if ( tinv_get_option( 'table', 'add_all_to_cart' ) ) {
|
88 |
$buttons[] = array(
|
89 |
'name' => 'product_all',
|
90 |
+
'title' => apply_filters( 'tinvwl_add_all_to_cart_text', tinv_get_option( 'table', 'text_add_all_to_cart' ) ),
|
91 |
'method' => array( __CLASS__, 'add_all' ),
|
92 |
'priority' => 30,
|
93 |
);
|
94 |
+
add_filter( 'tinvwl_prepare_attr__button_product_selected', array( __CLASS__, 'class_action' ) );
|
95 |
+
add_filter( 'tinvwl_prepare_attr__button_product_all', array( __CLASS__, 'class_action' ) );
|
96 |
}
|
97 |
$buttons = apply_filters( 'tinvwl_manage_buttons_create', $buttons );
|
98 |
|
173 |
}
|
174 |
|
175 |
if ( array_key_exists( 'before', $button ) ) {
|
176 |
+
add_filter( 'tinvwl_before__button_' . $button['name'], $button['before'] );
|
177 |
}
|
178 |
if ( array_key_exists( 'after', $button ) ) {
|
179 |
+
add_filter( 'tinvwl_after__button_' . $button['name'], $button['after'] );
|
180 |
}
|
181 |
|
182 |
add_action( $button['event'], function () use ( $button ) {
|
198 |
* @return string
|
199 |
*/
|
200 |
public static function button( $value, $title, $submit, $echo = true ) {
|
201 |
+
$html = apply_filters( 'tinvwl_before__button_' . $value, '' );
|
202 |
$attr = array(
|
203 |
'type' => $submit,
|
204 |
'class' => 'button',
|
206 |
'value' => $value,
|
207 |
'title' => esc_attr( wp_strip_all_tags( $title ) ),
|
208 |
);
|
209 |
+
$attr = apply_filters( 'tinvwl_prepare_attr__button_' . $value, $attr );
|
210 |
foreach ( $attr as $key => &$value ) {
|
211 |
$value = sprintf( '%s="%s"', $key, esc_attr( $value ) );
|
212 |
}
|
213 |
$attr = implode( ' ', $attr );
|
214 |
|
215 |
+
$html .= apply_filters( 'tinvwl_button_' . $value, sprintf( '<button %s>%s</button>', $attr, $title ) );
|
216 |
+
$html .= apply_filters( 'tinvwl_after_button_' . $value, '' );
|
217 |
|
218 |
if ( $echo ) {
|
219 |
echo $html; // WPCS: xss ok.
|
338 |
);
|
339 |
|
340 |
if ( tinv_get_option( 'table', 'add_select_to_cart' ) ) {
|
341 |
+
$options['add_selected'] = apply_filters( 'tinvwl_add_to_cart_text', tinv_get_option( 'product_table', 'text_add_to_cart' ) );
|
342 |
}
|
343 |
|
344 |
$wishlist_curent = TInvWL_Public_Wishlist_View::instance()->get_current_wishlist();
|
public/wishlist/social.class.php
CHANGED
@@ -57,7 +57,7 @@ class TInvWL_Public_Wishlist_Social {
|
|
57 |
|
58 |
$social = tinv_get_option( 'social' );
|
59 |
|
60 |
-
$share_on = apply_filters( '
|
61 |
|
62 |
foreach ( $social as $name => $soc_network ) {
|
63 |
if ( $soc_network && method_exists( __CLASS__, $name ) ) {
|
57 |
|
58 |
$social = tinv_get_option( 'social' );
|
59 |
|
60 |
+
$share_on = apply_filters( 'tinvwl_share_on_text', tinv_get_option( 'social', 'share_on' ) );
|
61 |
|
62 |
foreach ( $social as $name => $soc_network ) {
|
63 |
if ( $soc_network && method_exists( __CLASS__, $name ) ) {
|
public/wishlist/view.class.php
CHANGED
@@ -249,7 +249,6 @@ class TInvWL_Public_Wishlist_View {
|
|
249 |
return $this->current_products_query;
|
250 |
}
|
251 |
|
252 |
-
|
253 |
/**
|
254 |
* Get current products from wishlist
|
255 |
*
|
@@ -634,7 +633,7 @@ class TInvWL_Public_Wishlist_View {
|
|
634 |
return $this->wishlist_empty( array(), array(
|
635 |
'ID' => '',
|
636 |
'author' => get_current_user_id(),
|
637 |
-
'title' => apply_filters( '
|
638 |
'status' => 'private',
|
639 |
'type' => 'default',
|
640 |
'share_key' => '',
|
@@ -679,7 +678,7 @@ class TInvWL_Public_Wishlist_View {
|
|
679 |
}
|
680 |
|
681 |
$wishlist_table_row = tinv_get_option( 'product_table' );
|
682 |
-
$wishlist_table_row['text_add_to_cart'] = apply_filters( '
|
683 |
|
684 |
$data = array(
|
685 |
'products' => $products,
|
249 |
return $this->current_products_query;
|
250 |
}
|
251 |
|
|
|
252 |
/**
|
253 |
* Get current products from wishlist
|
254 |
*
|
633 |
return $this->wishlist_empty( array(), array(
|
634 |
'ID' => '',
|
635 |
'author' => get_current_user_id(),
|
636 |
+
'title' => apply_filters( 'tinvwl_default_wishlist_title', tinv_get_option( 'general', 'default_title' ) ),
|
637 |
'status' => 'private',
|
638 |
'type' => 'default',
|
639 |
'share_key' => '',
|
678 |
}
|
679 |
|
680 |
$wishlist_table_row = tinv_get_option( 'product_table' );
|
681 |
+
$wishlist_table_row['text_add_to_cart'] = apply_filters( 'tinvwl_add_to_cart_text', tinv_get_option( 'product_table', 'text_add_to_cart' ) );
|
682 |
|
683 |
$data = array(
|
684 |
'products' => $products,
|
public/wishlistcounter.class.php
CHANGED
@@ -65,7 +65,6 @@ class TInvWL_Public_WishlistCounter {
|
|
65 |
}
|
66 |
}
|
67 |
|
68 |
-
|
69 |
/**
|
70 |
* Add to menu wishlist link
|
71 |
*
|
@@ -76,8 +75,6 @@ class TInvWL_Public_WishlistCounter {
|
|
76 |
* @return array
|
77 |
*/
|
78 |
public static function add_to_menu( $items, $menu, $args ) {
|
79 |
-
|
80 |
-
|
81 |
$menu_cnt = count( $items ) + 1;
|
82 |
$menu_id = tinv_get_option( 'topline', 'menu' );
|
83 |
|
@@ -95,7 +92,7 @@ class TInvWL_Public_WishlistCounter {
|
|
95 |
|
96 |
$counter = tinv_get_option( 'topline', 'show_counter' ) ? '<span class="wishlist_products_counter_number"></span>' : '';
|
97 |
|
98 |
-
$text = tinv_get_option( 'topline', 'show_text' ) ? apply_filters( '
|
99 |
|
100 |
$icon = '<span class="wishlist_products_counter ' . $icon_class . ' ' . $icon_style . ( empty( $text ) ? ' no-txt' : '' ) . ( 0 < $counter ? ' wishlist-counter-with-products' : '' ) . '" >';
|
101 |
|
@@ -105,7 +102,7 @@ class TInvWL_Public_WishlistCounter {
|
|
105 |
|
106 |
$icon .= '</span>';
|
107 |
|
108 |
-
$menu_title = apply_filters( '
|
109 |
|
110 |
if ( $menu_title ) {
|
111 |
|
@@ -204,7 +201,7 @@ class TInvWL_Public_WishlistCounter {
|
|
204 |
* @return array
|
205 |
*/
|
206 |
public static function update_widget( $data ) {
|
207 |
-
if ( apply_filters( '
|
208 |
$data['fragments'] = self::update_fragments( array() );
|
209 |
}
|
210 |
|
@@ -270,7 +267,7 @@ class TInvWL_Public_WishlistCounter {
|
|
270 |
$default = array(
|
271 |
'show_icon' => (bool) tinv_get_option( 'topline', 'icon' ),
|
272 |
'show_text' => tinv_get_option( 'topline', 'show_text' ),
|
273 |
-
'text' => apply_filters( '
|
274 |
'show_counter' => tinv_get_option( 'topline', 'show_counter' ),
|
275 |
);
|
276 |
$atts = filter_var_array( shortcode_atts( $default, $atts ), array(
|
65 |
}
|
66 |
}
|
67 |
|
|
|
68 |
/**
|
69 |
* Add to menu wishlist link
|
70 |
*
|
75 |
* @return array
|
76 |
*/
|
77 |
public static function add_to_menu( $items, $menu, $args ) {
|
|
|
|
|
78 |
$menu_cnt = count( $items ) + 1;
|
79 |
$menu_id = tinv_get_option( 'topline', 'menu' );
|
80 |
|
92 |
|
93 |
$counter = tinv_get_option( 'topline', 'show_counter' ) ? '<span class="wishlist_products_counter_number"></span>' : '';
|
94 |
|
95 |
+
$text = tinv_get_option( 'topline', 'show_text' ) ? apply_filters( 'tinvwl_wishlist_products_counter_text', tinv_get_option( 'topline', 'text' ) ) : '';
|
96 |
|
97 |
$icon = '<span class="wishlist_products_counter ' . $icon_class . ' ' . $icon_style . ( empty( $text ) ? ' no-txt' : '' ) . ( 0 < $counter ? ' wishlist-counter-with-products' : '' ) . '" >';
|
98 |
|
102 |
|
103 |
$icon .= '</span>';
|
104 |
|
105 |
+
$menu_title = apply_filters( 'tinvwl_wishlist_products_counter_menu_html', $icon . ' ' . $text . ' ' . $counter, $icon, $text, $counter );
|
106 |
|
107 |
if ( $menu_title ) {
|
108 |
|
201 |
* @return array
|
202 |
*/
|
203 |
public static function update_widget( $data ) {
|
204 |
+
if ( apply_filters( 'tinvwl_wc_cart_fragments_enabled', true ) ) {
|
205 |
$data['fragments'] = self::update_fragments( array() );
|
206 |
}
|
207 |
|
267 |
$default = array(
|
268 |
'show_icon' => (bool) tinv_get_option( 'topline', 'icon' ),
|
269 |
'show_text' => tinv_get_option( 'topline', 'show_text' ),
|
270 |
+
'text' => apply_filters( 'tinvwl_wishlist_products_counter_text', tinv_get_option( 'topline', 'text' ) ),
|
271 |
'show_counter' => tinv_get_option( 'topline', 'show_counter' ),
|
272 |
);
|
273 |
$atts = filter_var_array( shortcode_atts( $default, $atts ), array(
|
readme.txt
CHANGED
@@ -1,10 +1,9 @@
|
|
1 |
=== TI WooCommerce Wishlist Plugin ===
|
2 |
Contributors: templateinvaders
|
3 |
-
Donate link: https://templateinvaders.com/product/ti-woocommerce-wishlist-wordpress-plugin/?utm_source=wordpressorg&utm_content=donate
|
4 |
Tags: wishlist, woocommerce, woocommerce wishlist, e-commerce, ecommerce
|
5 |
-
Requires at least: 4.
|
6 |
Tested up to: 5.2
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -14,9 +13,12 @@ Add Wishlist functionality to your store for free.
|
|
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 increasing amount of your site visitors, conversion and as a result sales.
|
18 |
|
19 |
-
|
|
|
|
|
|
|
|
|
20 |
|
21 |
🔗 [View documentation](https://templateinvaders.com/documentation/ti-woocommerce-wishlist-free/?utm_source=wordpressorg&utm_content=documentation)
|
22 |
|
@@ -32,10 +34,10 @@ WooCommerce Wishlist is a simple but powerful tool that can help you to convert
|
|
32 |
+ Redirect to wishlist page after adding items to the wishlist
|
33 |
+ Customizable wishlist table columns
|
34 |
+ Share wishlist on social channels (Facebook, Twitter, Pinterest, Google+, WhatsApp, email)
|
35 |
-
+ Fully Customizable Appearance
|
36 |
-
+ Custom CSS styles
|
37 |
+ Responsive & Retina Ready
|
38 |
-
+ Translation ready
|
39 |
+ [WPML](https://wpml.org/?aid=9393&affiliate_key=9xzbMQnIyxHE) Support
|
40 |
+ Product variations Support
|
41 |
|
@@ -84,9 +86,20 @@ That is why we made sure that Wishlist looks and works perfectly on any devices
|
|
84 |
= GDPR Ready =
|
85 |
The WooCommerce Wishlist plugin does not collect any personal data from website visitors which makes it GDPR compliant.
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
== Installation ==
|
88 |
|
89 |
-
There are few ways to install WooCommerce Wishlist Plugin:
|
90 |
|
91 |
= 1. From WordPress admin panel: =
|
92 |
|
@@ -120,6 +133,8 @@ There are few ways to install WooCommerce Wishlist Plugin:
|
|
120 |
|
121 |
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)
|
122 |
|
|
|
|
|
123 |
= Where can I get support or talk to other users? =
|
124 |
|
125 |
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.
|
@@ -142,6 +157,16 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o
|
|
142 |
|
143 |
|
144 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
= 1.12.3 =
|
146 |
*Release Date - 17 May 2019*
|
147 |
|
@@ -206,623 +231,5 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o
|
|
206 |
* Fixed an issue with removing products from wishlist when added to cart for WooCommerce prior 3.x versions.
|
207 |
* Fixed an issue when the wizard add multiple shortcodes to an exists page
|
208 |
|
209 |
-
|
210 |
-
*Release Date - 2 April 2019*
|
211 |
-
|
212 |
-
* Fixed HTML W3C validation for the Add to Wishlist button
|
213 |
-
* Fixed a limit for Add all to cart function
|
214 |
-
* Fixed public JS error
|
215 |
-
* Added filter <i>tinvwl-allow_parent_variable</i> that allows to add parent variable product without selected variation from a 3rd party code.
|
216 |
-
* Improved the Setup Wizard to prepend the Wishlist Page shortcode to existing page content.
|
217 |
-
|
218 |
-
= 1.9.16 =
|
219 |
-
*Release Date - 7 March 2019*
|
220 |
-
|
221 |
-
* Fixed an issue in case of NULL in a product price field
|
222 |
-
* Updated Share settings in the install wizard
|
223 |
-
|
224 |
-
= 1.9.15 =
|
225 |
-
*Release Date - 5 March 2019*
|
226 |
-
|
227 |
-
* Fixed templates path issue
|
228 |
-
* Added compatibility with [Woocommerce Product Addons](https://wordpress.org/plugins/woo-custom-product-addons/) plugin by acowebs
|
229 |
-
* Improved compatibility with WooCommerce Advanced Quantity plugin
|
230 |
-
* Minor CSS fixes
|
231 |
-
|
232 |
-
= 1.9.14 =
|
233 |
-
*Release Date - 22 February 2019*
|
234 |
-
|
235 |
-
* Added compatibility with WooCommerce Advanced Quantity plugin
|
236 |
-
* Fixed an issue with dependencies in the wp_register_script function
|
237 |
-
|
238 |
-
= 1.9.13 =
|
239 |
-
*Release Date - 16 February 2019*
|
240 |
-
|
241 |
-
* Improved "add to wishlist" button behavior for variable products
|
242 |
-
* Improved compatibility with WooCommerce Custom Fields plugin
|
243 |
-
|
244 |
-
= 1.9.12 =
|
245 |
-
*Release Date - 11 February 2019*
|
246 |
-
|
247 |
-
* Fixed compatibility with [WooCommerce Multilingual](https://wordpress.org/plugins/woocommerce-multilingual/) plugin version greater 4.3.7
|
248 |
-
|
249 |
-
= 1.9.11 =
|
250 |
-
*Release Date - 10 February 2019*
|
251 |
-
|
252 |
-
* Fixed compatibility with [WooCommerce Multilingual](https://wordpress.org/plugins/woocommerce-multilingual/) plugin version greater 4.3.7
|
253 |
-
* Added 'tinvwl-wc-cart-fragments' filter to disable wc-cart-fragments from 3rd party code
|
254 |
-
* Added unique IDs for Wishlist menu options to avoid any incompatibility issues with another plugin options
|
255 |
-
|
256 |
-
= 1.9.10 =
|
257 |
-
*Release Date - 1 February 2019*
|
258 |
-
|
259 |
-
* Fixed compatibility issue for WooCommerce prior 3.2 version
|
260 |
-
* Added compatibility with WooCommerce Custom Fields plugin
|
261 |
-
|
262 |
-
= 1.9.9 =
|
263 |
-
*Release Date - 9 January 2019*
|
264 |
-
|
265 |
-
* Added the ability to apply Wishlist on a front page and a shop page
|
266 |
-
* Added share Wishlist via WhatsApp option
|
267 |
-
* Added "Copy Wishlist URL to clipboard" option
|
268 |
-
|
269 |
-
= 1.9.8 =
|
270 |
-
*Release Date - 2 January 2019*
|
271 |
-
|
272 |
-
* Updated add to cart error description
|
273 |
-
* Fixed PHP 7.3 notices
|
274 |
-
|
275 |
-
= 1.9.7 =
|
276 |
-
*Release Date - 7 December 2018*
|
277 |
-
|
278 |
-
* WordPress 5.0 compatibility
|
279 |
-
|
280 |
-
= 1.9.6 =
|
281 |
-
*Release Date - 30 November 2018*
|
282 |
-
|
283 |
-
* Restrict WooCommerce templates filter to plugin templates only
|
284 |
-
|
285 |
-
= 1.9.5 =
|
286 |
-
*Release Date - 20 November 2018*
|
287 |
-
|
288 |
-
* Fixed product counter state
|
289 |
-
* Fixed an issue with infinite loop if the default WooCommerce My Account page was applied as a Wishlist page
|
290 |
-
|
291 |
-
= 1.9.4 =
|
292 |
-
*Release Date - 12 November 2018*
|
293 |
-
|
294 |
-
* Added parameters for "add to wishlist" button markup filter
|
295 |
-
|
296 |
-
= 1.9.3 =
|
297 |
-
*Release Date - 1 November 2018*
|
298 |
-
|
299 |
-
* Fixed an issue with product name in WooCommerce notice if add to cart validation failed
|
300 |
-
* Improved compatibility with [WooCommerce Product Add-ons](https://woocommerce.com/products/product-add-ons/?aff=3955) plugin
|
301 |
-
|
302 |
-
= 1.9.2 =
|
303 |
-
*Release Date - 24 October 2018*
|
304 |
-
|
305 |
-
* WooCommerce 3.5.x support
|
306 |
-
* Improved compatibility with [WooCommerce Product Bundles](https://woocommerce.com/products/product-bundles/?aff=3955) plugin
|
307 |
-
|
308 |
-
= 1.9.1 =
|
309 |
-
*Release Date - 23 October 2018*
|
310 |
-
|
311 |
-
* Removed button hidden inputs for better compatibility with custom themes
|
312 |
-
* Added a new option to hide zero value in a counter if wishlist is empty
|
313 |
-
|
314 |
-
= 1.9.0 =
|
315 |
-
*Release Date - 17 October 2018*
|
316 |
-
|
317 |
-
* Fixed no cache issue for WooCommerce versions below 3.2.4
|
318 |
-
* Added redirect to a previous page after login when "Require Login" option is enabled
|
319 |
-
* Added an option to add the wishlist counter into a menu
|
320 |
-
* Improved compatibility with [WooCommerce Subscriptions](https://woocommerce.com/products/woocommerce-subscriptions/?aff=3955) plugin
|
321 |
-
* Improved compatibility with [WooCommerce Product Bundles](https://woocommerce.com/products/product-bundles/?aff=3955) plugin
|
322 |
-
* Improved compatibility with [WooCommerce Composite Products](https://woocommerce.com/products/composite-products/?aff=3955) plugin
|
323 |
-
|
324 |
-
= 1.8.17 =
|
325 |
-
*Release Date - 16 September 2018*
|
326 |
-
|
327 |
-
* Improved compatibility with [YITH WooCommerce Product Add-Ons](https://wordpress.org/plugins/yith-woocommerce-product-add-ons/) plugin
|
328 |
-
|
329 |
-
= 1.8.16 =
|
330 |
-
*Release Date - 14 September 2018*
|
331 |
-
|
332 |
-
* Fixed an issue with cart and checkout redirect during bulk add to cart process from a wishlist
|
333 |
-
* Fixed an issue with loading main frontend javascript file when button loaded with AJAX
|
334 |
-
* Improved compatibility with [YITH WooCommerce Product Add-Ons](https://wordpress.org/plugins/yith-woocommerce-product-add-ons/) plugin
|
335 |
-
|
336 |
-
= 1.8.15 =
|
337 |
-
*Release Date - 04 September 2018*
|
338 |
-
|
339 |
-
* Fixed an issue with trashed and deleted products count
|
340 |
-
* Fixed mobile menu wishlist products counter issue for OceanWP theme
|
341 |
-
* Minor CSS fixes
|
342 |
-
|
343 |
-
= 1.8.14 =
|
344 |
-
*Release Date - 29 August 2018*
|
345 |
-
|
346 |
-
* Fixed fatal errors when 3rd party code using global product object outside a loop
|
347 |
-
|
348 |
-
= 1.8.13 =
|
349 |
-
*Release Date - 25 August 2018*
|
350 |
-
|
351 |
-
* Fixed database fields type issue
|
352 |
-
|
353 |
-
= 1.8.12 =
|
354 |
-
*Release Date - 16 August 2018*
|
355 |
-
|
356 |
-
* Fixed PHP fatal error on plugin activation
|
357 |
-
|
358 |
-
= 1.8.11 =
|
359 |
-
*Release Date - 15 August 2018*
|
360 |
-
|
361 |
-
* Fixed pluggable function load order
|
362 |
-
* Added icon animation on wishlist events loading
|
363 |
-
* Improved product counter synchronization between browser windows
|
364 |
-
|
365 |
-
= 1.8.10 =
|
366 |
-
*Release Date - 13 August 2018*
|
367 |
-
|
368 |
-
* Fixed "wishlist not found" issue when a guest browsing empty wishlist page
|
369 |
-
* Fixed "product in wishlist" button state for a variable product type
|
370 |
-
* Fixed issue with products counter update on product(s) removed from a wishlist
|
371 |
-
* Fixed fatal errors when 3rd party code using global product object outside a loop
|
372 |
-
* Fixed fatal error in upgrading method for PHP prior 5.5 versions
|
373 |
-
|
374 |
-
= 1.8.9 =
|
375 |
-
*Release Date - 30 July 2018*
|
376 |
-
|
377 |
-
* Added "add to wishlist" button type settings backward compatibility
|
378 |
-
|
379 |
-
= 1.8.8 =
|
380 |
-
*Release Date - 29 July 2018*
|
381 |
-
|
382 |
-
* Added wishlist button custom CSS class options
|
383 |
-
* Added "Use font color" option for buttons icon color options
|
384 |
-
* Added compatibility with [Google Tag Manager for WordPress](https://wordpress.org/plugins/duracelltomi-google-tag-manager/) plugin
|
385 |
-
* Added filter `tinvwl_wishlist_products_counter` to allow change the value of wishlist products counter from a 3rd party code
|
386 |
-
* Added `tinvwl-load_frontend` filter to conditionally load wishlist frontend from 3rd party plugins.
|
387 |
-
* Improved loading of front-end assets
|
388 |
-
* Removed button type options
|
389 |
-
|
390 |
-
= 1.8.7 =
|
391 |
-
*Release Date - 25 July 2018*
|
392 |
-
|
393 |
-
* Added a prefix for wishlist button class name for better compatibility with themes
|
394 |
-
|
395 |
-
|
396 |
-
= 1.8.6 =
|
397 |
-
*Release Date - 18 July 2018*
|
398 |
-
|
399 |
-
* Added custom capabilities for dashboard pages
|
400 |
-
|
401 |
-
= 1.8.5 =
|
402 |
-
*Release Date - 16 July 2018*
|
403 |
-
|
404 |
-
* Fixed a wishlist button issue for out of stock variable products
|
405 |
-
|
406 |
-
= 1.8.4 =
|
407 |
-
*Release Date - 10 July 2018*
|
408 |
-
|
409 |
-
* Fixed above thumbnail hook priority on a product listing page
|
410 |
-
* Fixed an issue when "Add to Cart" button displayed for products without selected variations in a Wishlist table
|
411 |
-
* Added a notice with instructions if Setup Wizard was skipped
|
412 |
-
|
413 |
-
= 1.8.3 =
|
414 |
-
*Release Date - 04 July 2018*
|
415 |
-
|
416 |
-
* Improved "Style Options":
|
417 |
-
* Removed some options related to Premium version
|
418 |
-
* Fixed some options
|
419 |
-
* Added styles for Share buttons
|
420 |
-
* Added options to change the "Add to Wishlist" Button Icon size and color
|
421 |
-
* Overall code cleanup
|
422 |
-
|
423 |
-
= 1.8.2 =
|
424 |
-
*Release Date - 01 July 2018*
|
425 |
-
|
426 |
-
* Fixed an issue with "add to wishlist" button on product listing in OceanWP theme
|
427 |
-
* Fixed issues with predefined skin
|
428 |
-
* Added "add to wishlist" icon size option to predefined skin
|
429 |
-
|
430 |
-
= 1.8.1 =
|
431 |
-
*Release Date - 30 June 2018*
|
432 |
-
|
433 |
-
* Fixed "add to wishlist" icons position
|
434 |
-
* Code cleanup
|
435 |
-
|
436 |
-
= 1.8.0 =
|
437 |
-
*Release Date - 28 June 2018*
|
438 |
-
|
439 |
-
* Icon images replaced with custom webfont
|
440 |
-
* Code cleanup
|
441 |
-
|
442 |
-
= 1.7.4 =
|
443 |
-
*Release Date - 26 June 2018*
|
444 |
-
|
445 |
-
* Added an option to redirect directly to the checkout page when product(s) added to cart from a wishlist
|
446 |
-
* Added is_wishlist() conditional function that returns true on a wishlist page
|
447 |
-
* Added hooks for different events:
|
448 |
-
* `tinvwl_wishlist_created` - triggering when a wishlist created
|
449 |
-
* `tinvwl_product_added` - triggering when product added to a wishlist
|
450 |
-
* `tinvwl_product_removed` - triggering when product removed from a wishlist
|
451 |
-
* `tinvwl_product_added_to_cart` - triggering when product added to cart from a wishlist
|
452 |
-
* `tinvwl_product_purchased` - triggering when product purchased from a wishlist
|
453 |
-
|
454 |
-
= 1.7.3 =
|
455 |
-
*Release Date - 22 June 2018*
|
456 |
-
|
457 |
-
* Fixed WC_Cache method compatibility for WooCommerce prior to 3.2.0
|
458 |
-
|
459 |
-
= 1.7.2 =
|
460 |
-
*Release Date - 21 June 2018*
|
461 |
-
|
462 |
-
* Fixed WooCommerce templates location issue
|
463 |
-
* Fixed JavaScript condition for products custom attributes
|
464 |
-
* Improved compatibility with [WooCommerce Composite Products](https://woocommerce.com/products/composite-products/?aff=3955) plugin
|
465 |
-
* Improved compatibility with [WooCommerce Product Add-ons](https://woocommerce.com/products/product-add-ons/?aff=3955) plugin
|
466 |
-
* Improved compatibility with [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/), [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/), [WP Rocket](https://wp-rocket.me/) plugins
|
467 |
-
|
468 |
-
= 1.7.1 =
|
469 |
-
*Release Date - 01 June 2018*
|
470 |
-
|
471 |
-
* WooCommerce 3.4.x support
|
472 |
-
* Fixed compatibility issue with Font-Awesome 5+ library used in some themes
|
473 |
-
* Fixed JS issue with WooCommerce plugin versions less than 3.0.0
|
474 |
-
* Improved compatibility with [Personalized Product Option Manager](https://wordpress.org/plugins/woocommerce-product-addon/) plugin:
|
475 |
-
* Fixed "Add to Wishlist" button position issue
|
476 |
-
* Fixed PHP notices
|
477 |
-
* Added support for [WooCommerce Catalog Visibility Options](https://woocommerce.com/products/catalog-visibility-options/?aff=3955) plugin
|
478 |
-
* Added support for [WooCommerce Product Add-ons](https://woocommerce.com/products/product-add-ons/?aff=3955) plugin
|
479 |
-
|
480 |
-
= 1.7.0 =
|
481 |
-
*Release Date - 10 May 2018*
|
482 |
-
|
483 |
-
* Fixed an Issue when "Remove Product" button disappears on mobile devices and tablets
|
484 |
-
* Fixed "input-group" class compatibility issue with Bootstratp 4
|
485 |
-
* Date of products addition changed to WP local time instead of server time
|
486 |
-
* Freemius SDK removed completely from plugin
|
487 |
-
* Added an alert when items or action are not selected before applying bulk actions on a Wishlist page
|
488 |
-
* Improved compatibility with OceanWP WordPress theme
|
489 |
-
|
490 |
-
= 1.6.2 =
|
491 |
-
*Release Date - 04 March 2018*
|
492 |
-
|
493 |
-
* Added support for [YITH WooCommerce Product Add-Ons](https://wordpress.org/plugins/yith-woocommerce-product-add-ons/) plugin
|
494 |
-
* Removed background checks for missed actions inside WooCommerce templates.
|
495 |
-
|
496 |
-
= 1.6.1 =
|
497 |
-
*Release Date - 01 March 2018*
|
498 |
-
|
499 |
-
* Fixed an issue with deprecated function create_function(); on PHP 7.2+
|
500 |
-
* Fixed an issue with duplicated products in Wishlist
|
501 |
-
* Fixed an issue with empty wishlists in database and added cleanup on plugin upgrade
|
502 |
-
* Fixed an issue when variable products were not removed from wishlist after adding to cart
|
503 |
-
* Fixed PHP undefined notices in Wishlist table
|
504 |
-
* Fixed warnings for non-existent products in Wishlist
|
505 |
-
* Added new option "Show button text" that allows displaying the only add to wishlist icon
|
506 |
-
* Added custom classes for buttons
|
507 |
-
* Added "nofollow" attribute for button links
|
508 |
-
* Improved compatibility with [WP Multilang](https://wordpress.org/plugins/wp-multilang/) plugin
|
509 |
-
* Improved compatibility with [WooCommerce Multilingual](https://wordpress.org/plugins/woocommerce-multilingual/) plugin
|
510 |
-
* Improved compatibility with [Personalized Product Option Manager](https://wordpress.org/plugins/woocommerce-product-addon/) plugin
|
511 |
-
|
512 |
-
= 1.6.0 =
|
513 |
-
*Release Date - 08 February 2018*
|
514 |
-
|
515 |
-
* Fixed Fatal error: if $product is not WooCommerce product
|
516 |
-
* Fixed an issue when "Add to Wishlist" button didn't appear on a product details page for products without price
|
517 |
-
* Fixed text domains for some strings
|
518 |
-
* Fixed an issue with displaying SKU attribute after adding products to Wishlist from a catalog
|
519 |
-
* Added filters <i>tinvwl_addtowishlist_login_page</i> and <i>tinvwl_addtowishlist_return_ajax</i> that will be helpful to override "Require Login" popup.
|
520 |
-
* Improved variable products processing when adding to Wishlist
|
521 |
-
* Improved compatibility with WooCommerce 3.3.x
|
522 |
-
* Added support for [WP Multilang](https://wordpress.org/plugins/wp-multilang/) plugin
|
523 |
-
* Added support for [WooCommerce TM Extra Product Options](https://codecanyon.net/item/woocommerce-extra-product-options/7908619?ref=olegnax) plugin
|
524 |
-
|
525 |
-
= 1.5.14 =
|
526 |
-
*Release Date - 14 December 2017*
|
527 |
-
|
528 |
-
* Fixed an issue when empty wishlist is created once a guest visits the shop page
|
529 |
-
* Added new option "Require Login" that disallows guests to add products to a Wishlist until they sign-in
|
530 |
-
* Improved Wishlist Products Counter functionality
|
531 |
-
|
532 |
-
= 1.5.13 =
|
533 |
-
*Release Date - 02 December 2017*
|
534 |
-
|
535 |
-
* Fixed compatibility with activations of some plugins (rare case)
|
536 |
-
* Fixed translation typo
|
537 |
-
|
538 |
-
= 1.5.12 =
|
539 |
-
*Release Date - 01 December 2017*
|
540 |
-
|
541 |
-
* Fixed SQL query to avoid an issue when Wishlist title has an apostrophe
|
542 |
-
* Fixed an issue with duplicated call to WC AJAX fragments
|
543 |
-
* Improved performance for custom styles
|
544 |
-
* Added filter 'tinvwl_allow_addtowishlist_single_product' that helps to show/hide the "Add to Wishlist" button for specific products on a single products page
|
545 |
-
* Translation improvements:
|
546 |
-
* Corrected some texts
|
547 |
-
* Corrected some typos
|
548 |
-
* Removed some strings that do not require translation from .pot file
|
549 |
-
|
550 |
-
= 1.5.11 =
|
551 |
-
*Release Date - 21 November 2017*
|
552 |
-
|
553 |
-
* Fixed JavaScript frontend compatibility issue
|
554 |
-
|
555 |
-
= 1.5.10 =
|
556 |
-
*Release Date - 21 November 2017*
|
557 |
-
|
558 |
-
* Fixed JavaScript frontend issue
|
559 |
-
|
560 |
-
= 1.5.9 =
|
561 |
-
*Release Date - 21 November 2017*
|
562 |
-
|
563 |
-
* Fixed Wishlist Products Counter issue when the wrong number of products was displaying if cache is enabled
|
564 |
-
* Fixed an issue with [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/) plugin
|
565 |
-
* Fixed an issue with wrong file path after website migration
|
566 |
-
* Fixed an issue with extra scheduled cleanup events
|
567 |
-
* Fixed an issue with reset some settings after plugin update
|
568 |
-
* Added support for [WP Fastest Cache](https://wordpress.org/plugins/wp-fastest-cache/) plugin
|
569 |
-
|
570 |
-
= 1.5.8 =
|
571 |
-
*Release Date - 07 November 2017*
|
572 |
-
|
573 |
-
* Improved Wishlists storage functionality (empty wishlists that do not have a user will be removed after 7 days)
|
574 |
-
* Fixed an issue with the wrong metadata after sharing Wishlist on Facebook
|
575 |
-
* Added "Reset to Defaults" option in the admin panel
|
576 |
-
* Added an option to show the "Add to Wishlist" button above product thumbnail
|
577 |
-
* An option to change social icons from dark to white was moved to "Social Networks Sharing Options" section
|
578 |
-
* Added support for [Comet Cache](https://wordpress.org/plugins/comet-cache/) plugin
|
579 |
-
|
580 |
-
= 1.5.7 =
|
581 |
-
*Release Date - 21 October 2017*
|
582 |
-
|
583 |
-
* Fixed an issue with fonts not applying in Wishlist if "Use Theme Style" option is enabled
|
584 |
-
* Fixed an issue with transferring products between guest and user wishlists used on the same device/machine in the same browser.
|
585 |
-
* Fixed an issue with empty pop up window after clicking Share Wishlist by Email button
|
586 |
-
* Internal improvements:
|
587 |
-
* Variable product (without predefined variations applied by default) added from products listing page will be always substituted with the product added from details page (with selected variations).
|
588 |
-
* Improved [WooCommerce Composite Products](https://woocommerce.com/products/composite-products/?aff=3955) plugin support:
|
589 |
-
* Fixed individual price calculation with components
|
590 |
-
* Improved [Polylang](https://wordpress.org/plugins/polylang/) plugin support
|
591 |
-
|
592 |
-
= 1.5.6 =
|
593 |
-
*Release Date - 20 September 2017*
|
594 |
-
|
595 |
-
* Fixed an issue with transferring products between guest and customer wishlists after signing in or logout.
|
596 |
-
* Fixed an issue when it's not possible to remove products from wishlist as a guest
|
597 |
-
* Fixed an issue with adding a product variations to wishlist
|
598 |
-
* Improved [WooCommerce Product Bundles](https://woocommerce.com/products/product-bundles/?aff=3955) plugin support:
|
599 |
-
* Fixed an issue with displaying product custom meta attributes
|
600 |
-
* Improved [WPML](https://wpml.org/?aid=9393&affiliate_key=9xzbMQnIyxHE) plugin compatibility:
|
601 |
-
* Fixed an issue with "Remove/Add" button text when switching languages
|
602 |
-
|
603 |
-
= 1.5.5 =
|
604 |
-
*Release Date - 11 September 2017*
|
605 |
-
|
606 |
-
* Improved [WooCommerce Product Bundles](https://woocommerce.com/products/product-bundles/?aff=3955) plugin support:
|
607 |
-
* Fixed and issue when product variations was not applied in bundled products
|
608 |
-
* Fixed an issue with products visibility on a Wishlist page
|
609 |
-
* Fixed text domains for some strings
|
610 |
-
* Added arguments for filter that make possible overriding popup notices
|
611 |
-
|
612 |
-
= 1.5.4 =
|
613 |
-
*Release Date - 07 September 2017*
|
614 |
-
|
615 |
-
* Added notice for variable products (if no variation applied by default) when adding to cart from Wishlist page.
|
616 |
-
* Fixed an issue when products could not be added to cart from shared Wishlist
|
617 |
-
* Fixed an issue with redirect to cart page after successful product addition
|
618 |
-
* Fixed an issue with "Plain" permalinks structure
|
619 |
-
|
620 |
-
= 1.5.3 =
|
621 |
-
*Release Date - 30 August 2017*
|
622 |
-
|
623 |
-
* Improved [WPML](https://wpml.org/?aid=9393&affiliate_key=9xzbMQnIyxHE) Compatibility
|
624 |
-
* Added minified version of FontAwesome library
|
625 |
-
* Added support for plugins/WooCommerce add-ons:
|
626 |
-
* WooCommerce Personalized Product Option
|
627 |
-
* [YITH WooCommerce Product Bundles](https://yithemes.com/themes/plugins/yith-woocommerce-product-bundles/?refer_id=1033256)
|
628 |
-
|
629 |
-
= 1.5.2 =
|
630 |
-
*Release Date - 23 August 2017*
|
631 |
-
|
632 |
-
* Fixed an issue when variation has additional attribute(s) with any value
|
633 |
-
|
634 |
-
= 1.5.1 =
|
635 |
-
*Release Date - 14 August 2017*
|
636 |
-
|
637 |
-
* Fixed a fatal error on Dashboard menu
|
638 |
-
* Minor CSS fixes
|
639 |
-
* Added support for plugins/WooCommerce add-ons:
|
640 |
-
* [WooCommerce Quantity Increment](https://wordpress.org/plugins/woocommerce-quantity-increment/)
|
641 |
-
|
642 |
-
= 1.5.0 =
|
643 |
-
*Release Date - 11 August 2017*
|
644 |
-
|
645 |
-
* Added an option to allow users remove products from a wishlist on the second click
|
646 |
-
* Added the ability to load custom translation files
|
647 |
-
* Overall frontend performance optimization
|
648 |
-
* Added support for plugins/WooCommerce add-ons that use custom meta:
|
649 |
-
* [WooCommerce Gift Cards](https://wordpress.org/plugins/gift-cards-for-woocommerce/)
|
650 |
-
* [WooCommerce Bookings](https://woocommerce.com/products/woocommerce-bookings/?aff=3955)
|
651 |
-
* [WooCommerce Subscriptions](https://woocommerce.com/products/woocommerce-subscriptions/?aff=3955)
|
652 |
-
* [WooCommerce Composite Products](https://woocommerce.com/products/composite-products/?aff=3955)
|
653 |
-
* [WooCommerce Product Bundles](https://woocommerce.com/products/product-bundles/?aff=3955)
|
654 |
-
* [WooCommerce Mix and Match](https://woocommerce.com/products/woocommerce-mix-and-match-products/?aff=3955)
|
655 |
-
* [WooCommerce Gravity Forms Product Add-Ons](https://woocommerce.com/products/gravity-forms-add-ons/?aff=3955)
|
656 |
-
|
657 |
-
= 1.4.0 =
|
658 |
-
*Release Date - 14 July 2017*
|
659 |
-
|
660 |
-
* Added "Add to Wishlist" button for a catalog page
|
661 |
-
* Added the ability to remove product from a Wishlist on the second click
|
662 |
-
* Added an option to show/hide a popup with successful or error notices after adding or removing products from a Wishlist
|
663 |
-
* Added "Wishlist Products counter" shortcode & widget
|
664 |
-
* Added some missing settings descriptions in the admin panel
|
665 |
-
|
666 |
-
= 1.3.4 =
|
667 |
-
*Release Date - 08 May 2017*
|
668 |
-
|
669 |
-
* Fixed critical issue when plugin activated by TGMPA class
|
670 |
-
* Fixed few PHP notices
|
671 |
-
* Cleanup of the code
|
672 |
-
|
673 |
-
= 1.3.3 =
|
674 |
-
*Release Date - 07 May 2017*
|
675 |
-
|
676 |
-
* Improved [WPML](https://wpml.org/?aid=9393&affiliate_key=9xzbMQnIyxHE) compatibility (fixed an issue with URL formats)
|
677 |
-
* Fixed issues with deprecated hooks related to WooCommerce 3.0.5
|
678 |
-
* Added [Polylang](https://wordpress.org/plugins/polylang/) plugin support
|
679 |
-
* Added new option that allows product automatic removal when it's added to cart by anyone
|
680 |
-
|
681 |
-
|
682 |
-
= 1.3.2 =
|
683 |
-
*Release Date - 27 April 2017*
|
684 |
-
|
685 |
-
* Fixed extra redirect to Setup Wizard
|
686 |
-
* Improved theme compatibility tests performance
|
687 |
-
|
688 |
-
= 1.3.1 =
|
689 |
-
*Release Date - 26 April 2017*
|
690 |
-
|
691 |
-
* Improved theme compatibility tests for shared hosts
|
692 |
-
* Improved compatibility for WooCommerce 2 & 3
|
693 |
-
|
694 |
-
= 1.3.0 =
|
695 |
-
*Release Date - 24 April 2017*
|
696 |
-
|
697 |
-
* Fixed [WPML](https://wpml.org/?aid=9393&affiliate_key=9xzbMQnIyxHE) string translations issue
|
698 |
-
* Added theme compatibility notices
|
699 |
-
* Wishlist custom item meta hidden from order
|
700 |
-
* Added compatibility with [WooCommerce Gift Cards](https://wordpress.org/plugins/gift-cards-for-woocommerce/)
|
701 |
-
|
702 |
-
= 1.2.1 =
|
703 |
-
*Release Date - 08 April 2017*
|
704 |
-
|
705 |
-
* Fixed critical error in 'add to wishlist' shortcode for WooCommerce 3.0+
|
706 |
-
|
707 |
-
= 1.2.0 =
|
708 |
-
*Release Date - 07 April 2017*
|
709 |
-
|
710 |
-
* WooCommerce 3.0+ support
|
711 |
-
* Added template overrides check for WooCommerce system report
|
712 |
-
|
713 |
-
= 1.1.14 =
|
714 |
-
*Release Date - 04 April 2017*
|
715 |
-
|
716 |
-
* Fixed multiple issues with [WPML](https://wpml.org/?aid=9393&affiliate_key=9xzbMQnIyxHE) support.
|
717 |
-
|
718 |
-
= 1.1.13 =
|
719 |
-
*Release Date - 16 March 2017*
|
720 |
-
|
721 |
-
* Fixed an issue when the Wishlist was not refreshed after the product is removed or added to cart by the unauthenticated user.
|
722 |
-
|
723 |
-
= 1.1.12 =
|
724 |
-
*Release Date - 05 March 2017*
|
725 |
-
|
726 |
-
* Added "Contact Us" page on the plugin menu
|
727 |
-
* Added the usage stats opt-in to help us improve the plugin
|
728 |
-
* Fixed some translations
|
729 |
-
|
730 |
-
= 1.1.11 =
|
731 |
-
*Release Date - 03 March 2017*
|
732 |
-
|
733 |
-
* Fixed an issue with external products link
|
734 |
-
|
735 |
-
|
736 |
-
= 1.1.10 =
|
737 |
-
*Release Date - 02 March 2017*
|
738 |
-
|
739 |
-
* The Setup Wizard enhancements
|
740 |
-
* Added new hooks for wishlist create|update|delete and wishlist product add|update|remove events
|
741 |
-
|
742 |
-
= 1.1.9 =
|
743 |
-
*Release Date - 26 February 2017*
|
744 |
-
|
745 |
-
* Fixed an issue with [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/) compatibility
|
746 |
-
* Added public functions
|
747 |
-
|
748 |
-
= 1.1.8 =
|
749 |
-
*Release Date - 03 February 2017*
|
750 |
-
|
751 |
-
* Fixed an issue with "Add to Wishlist" function in a quick view popup (Compatibility with plugins that provide QuickView functionality)
|
752 |
-
* Added JavaScript alert for the "Add to Wishlist" button on a single product page when no variations are selected
|
753 |
-
|
754 |
-
|
755 |
-
= 1.1.7 =
|
756 |
-
*Release Date - 30 January 2017*
|
757 |
-
|
758 |
-
* Fixed an issue when maximum 10 products can be added to cart from a Wishlist page using the "Add all to cart" button
|
759 |
-
|
760 |
-
|
761 |
-
= 1.1.6 =
|
762 |
-
*Release Date - 27 January 2017*
|
763 |
-
|
764 |
-
* Fixed class loading critical error after plugin activation
|
765 |
-
|
766 |
-
|
767 |
-
= 1.1.5 =
|
768 |
-
*Release Date - 10 January 2017*
|
769 |
-
|
770 |
-
* Fixed issue with empty wishlist page
|
771 |
-
* Fixed issue with wrong product quantity on add to cart event from wishlist
|
772 |
-
|
773 |
-
|
774 |
-
= 1.1.4 =
|
775 |
-
*Release Date - 12 December 2016*
|
776 |
-
|
777 |
-
* Fixed issue with translations
|
778 |
-
|
779 |
-
|
780 |
-
= 1.1.3 =
|
781 |
-
*Release Date - 09 December 2016*
|
782 |
-
|
783 |
-
* Fixed issues with pagination
|
784 |
-
* Added support for WordPress 4.7
|
785 |
-
|
786 |
-
|
787 |
-
= 1.1.2 =
|
788 |
-
*Release Date - 23 November 2016*
|
789 |
-
|
790 |
-
* Added minified versions of public CSS
|
791 |
-
* Fixed issue with sharing buttons for non-logged users
|
792 |
-
* Fixed issue with pagination URLs for guests
|
793 |
-
* Removed Genericicons fonts
|
794 |
-
|
795 |
-
|
796 |
-
= 1.1.1 =
|
797 |
-
*Release Date - 08 November 2016*
|
798 |
-
|
799 |
-
* Fixed issue with upgrade from free to premium version
|
800 |
-
|
801 |
-
|
802 |
-
= 1.1.0 =
|
803 |
-
*Release Date - 11 October 2016*
|
804 |
-
|
805 |
-
* Added support for [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/) plugin
|
806 |
-
* Added support for [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/) plugin
|
807 |
-
* Added support for [WooCommerce Gravity Forms Product Add-Ons](https://woocommerce.com/products/gravity-forms-add-ons/?aff=3955)
|
808 |
-
* Added option to show link to Wishlist on My Account page
|
809 |
-
* Added minimized versions of JS
|
810 |
-
|
811 |
-
|
812 |
-
= 1.0.0 =
|
813 |
-
*Release Date - 22 September 2016*
|
814 |
-
|
815 |
-
* Initial release
|
816 |
-
|
817 |
-
|
818 |
-
== Translations ==
|
819 |
-
Want to add a new language to WooCommerce Wishlist Plugin? You can contribute via [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/ti-woocommerce-wishlist).
|
820 |
-
|
821 |
-
|
822 |
-
== Suggestions ==
|
823 |
-
You are excited from the "WooCommerce Wishlist" plugin and want to contribute? Get involved at our [GitHub repository](https://github.com/TemplateInvaders/ti-woocommerce-wishlist)
|
824 |
-
|
825 |
-
|
826 |
-
== Documentation ==
|
827 |
-
Full documentation is available [here](https://templateinvaders.com/documentation/ti-woocommerce-wishlist-free/?utm_source=wordpressorg&utm_content=documentation).
|
828 |
|
1 |
=== TI WooCommerce Wishlist Plugin ===
|
2 |
Contributors: templateinvaders
|
|
|
3 |
Tags: wishlist, woocommerce, woocommerce wishlist, e-commerce, ecommerce
|
4 |
+
Requires at least: 4.7
|
5 |
Tested up to: 5.2
|
6 |
+
Stable tag: 1.13.0
|
7 |
License: GPLv3
|
8 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
13 |
== Description ==
|
14 |
|
15 |
= Increase Sales and Conversions =
|
|
|
16 |
|
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 increasing amount of your site visitors, conversion and as a result sales.
|
18 |
+
|
19 |
+
🔗 [Live Preview #1](https://wishlist2.templateinvaders.com/?utm_source=wordpressorg&utm_content=preview)
|
20 |
+
🔗 [Live Preview #2](https://wishlist3.templateinvaders.com/?utm_source=wordpressorg&utm_content=preview)
|
21 |
+
🔗 [Live Preview #3](https://wishlist1.templateinvaders.com/?utm_source=wordpressorg&utm_content=preview)
|
22 |
|
23 |
🔗 [View documentation](https://templateinvaders.com/documentation/ti-woocommerce-wishlist-free/?utm_source=wordpressorg&utm_content=documentation)
|
24 |
|
34 |
+ Redirect to wishlist page after adding items to the wishlist
|
35 |
+ Customizable wishlist table columns
|
36 |
+ Share wishlist on social channels (Facebook, Twitter, Pinterest, Google+, WhatsApp, email)
|
37 |
+
+ Fully Customizable Appearance
|
38 |
+
+ Custom CSS styles
|
39 |
+ Responsive & Retina Ready
|
40 |
+
+ Translation ready
|
41 |
+ [WPML](https://wpml.org/?aid=9393&affiliate_key=9xzbMQnIyxHE) Support
|
42 |
+ Product variations Support
|
43 |
|
86 |
= GDPR Ready =
|
87 |
The WooCommerce Wishlist plugin does not collect any personal data from website visitors which makes it GDPR compliant.
|
88 |
|
89 |
+
== Translations ==
|
90 |
+
Want to add a new language to WooCommerce Wishlist Plugin? You can contribute via [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/ti-woocommerce-wishlist).
|
91 |
+
|
92 |
+
|
93 |
+
== Suggestions ==
|
94 |
+
You are excited from the "WooCommerce Wishlist" plugin and want to contribute? Get involved at our [GitHub repository](https://github.com/TemplateInvaders/ti-woocommerce-wishlist)
|
95 |
+
|
96 |
+
|
97 |
+
== Documentation ==
|
98 |
+
Full documentation is available [here](https://templateinvaders.com/documentation/ti-woocommerce-wishlist-free/?utm_source=wordpressorg&utm_content=documentation).
|
99 |
+
|
100 |
== Installation ==
|
101 |
|
102 |
+
There are few ways to install TI WooCommerce Wishlist Plugin:
|
103 |
|
104 |
= 1. From WordPress admin panel: =
|
105 |
|
133 |
|
134 |
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)
|
135 |
|
136 |
+
[REST API documentation](https://templateinvaders.com/api/wishlist/?utm_source=wordpressorg&utm_content=documentation_faq)
|
137 |
+
|
138 |
= Where can I get support or talk to other users? =
|
139 |
|
140 |
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.
|
157 |
|
158 |
|
159 |
== Changelog ==
|
160 |
+
= 1.13.0 =
|
161 |
+
*Release Date - 15 July 2019*
|
162 |
+
|
163 |
+
* Added wishlist [REST API](https://templateinvaders.com/api/wishlist/?utm_source=wordpressorg&utm_content=changelog)
|
164 |
+
* Refactored filters and actions
|
165 |
+
* Prevent plugin network wide activation
|
166 |
+
* Fixed an issue with deleted products in frontend templates
|
167 |
+
* Fixed wishlist products query issue on multilingual setup
|
168 |
+
* TM Product Options plugin integration updated
|
169 |
+
|
170 |
= 1.12.3 =
|
171 |
*Release Date - 17 May 2019*
|
172 |
|
231 |
* Fixed an issue with removing products from wishlist when added to cart for WooCommerce prior 3.x versions.
|
232 |
* Fixed an issue when the wizard add multiple shortcodes to an exists page
|
233 |
|
234 |
+
[See changelog for all versions](https://raw.githubusercontent.com/TemplateInvaders/ti-woocommerce-wishlist/master/changelog.txt).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
|
templates/ti-addedtowishlist-dialogbox.php
CHANGED
@@ -22,7 +22,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
22 |
<?php if ( isset( $wishlist_url ) ) : ?>
|
23 |
<button class="button tinvwl_button_view tinvwl-btn-onclick"
|
24 |
data-url="<?php echo esc_url( $wishlist_url ); ?>" type="button"><i
|
25 |
-
class="ftinvwl ftinvwl-heart-o"></i><?php echo esc_html( apply_filters( '
|
26 |
</button>
|
27 |
<?php endif; ?>
|
28 |
<?php if ( isset( $dialog_custom_url ) && isset( $dialog_custom_html ) ) : ?>
|
22 |
<?php if ( isset( $wishlist_url ) ) : ?>
|
23 |
<button class="button tinvwl_button_view tinvwl-btn-onclick"
|
24 |
data-url="<?php echo esc_url( $wishlist_url ); ?>" type="button"><i
|
25 |
+
class="ftinvwl ftinvwl-heart-o"></i><?php echo esc_html( apply_filters( 'tinvwl_view_wishlist_text', tinv_get_option( 'general', 'text_browse' ) ) ); ?>
|
26 |
</button>
|
27 |
<?php endif; ?>
|
28 |
<?php if ( isset( $dialog_custom_url ) && isset( $dialog_custom_html ) ) : ?>
|
templates/ti-addtowishlist.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* The Template for displaying add to wishlist product button.
|
4 |
*
|
5 |
-
* @version 1.
|
6 |
* @package TInvWishlist\Template
|
7 |
*/
|
8 |
|
@@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
12 |
wp_enqueue_script( 'tinvwl' );
|
13 |
?>
|
14 |
<div class="tinv-wraper woocommerce tinv-wishlist <?php echo esc_attr( $class_postion ) ?>">
|
15 |
-
<?php do_action( '
|
16 |
-
<?php do_action( '
|
17 |
<div class="tinvwl-tooltip"><?php echo esc_html( tinv_get_option( 'add_to_wishlist' . ( $loop ? '_catalog' : '' ), 'text' ) ); ?></div>
|
18 |
</div>
|
2 |
/**
|
3 |
* The Template for displaying add to wishlist product button.
|
4 |
*
|
5 |
+
* @version 1.13.0
|
6 |
* @package TInvWishlist\Template
|
7 |
*/
|
8 |
|
12 |
wp_enqueue_script( 'tinvwl' );
|
13 |
?>
|
14 |
<div class="tinv-wraper woocommerce tinv-wishlist <?php echo esc_attr( $class_postion ) ?>">
|
15 |
+
<?php do_action( 'tinvwl_wishlist_addtowishlist_button' ); ?>
|
16 |
+
<?php do_action( 'tinvwl_wishlist_addtowishlist_dialogbox' ); ?>
|
17 |
<div class="tinvwl-tooltip"><?php echo esc_html( tinv_get_option( 'add_to_wishlist' . ( $loop ? '_catalog' : '' ), 'text' ) ); ?></div>
|
18 |
</div>
|
templates/ti-wishlist-user.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* The Template for displaying wishlist if a current user not an owner.
|
4 |
*
|
5 |
-
* @version 1.
|
6 |
* @package TInvWishlist\Template
|
7 |
*/
|
8 |
|
@@ -61,6 +61,10 @@ wp_enqueue_script( 'tinvwl' );
|
|
61 |
|
62 |
foreach ( $products as $wl_product ) {
|
63 |
|
|
|
|
|
|
|
|
|
64 |
// override global product data.
|
65 |
$product = apply_filters( 'tinvwl_wishlist_item', $wl_product['data'] );
|
66 |
// override global post data.
|
2 |
/**
|
3 |
* The Template for displaying wishlist if a current user not an owner.
|
4 |
*
|
5 |
+
* @version 1.13.0
|
6 |
* @package TInvWishlist\Template
|
7 |
*/
|
8 |
|
61 |
|
62 |
foreach ( $products as $wl_product ) {
|
63 |
|
64 |
+
if ( empty( $wl_product['data'] ) ) {
|
65 |
+
continue;
|
66 |
+
}
|
67 |
+
|
68 |
// override global product data.
|
69 |
$product = apply_filters( 'tinvwl_wishlist_item', $wl_product['data'] );
|
70 |
// override global post data.
|
templates/ti-wishlist.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* The Template for displaying wishlist if a current user is owner.
|
4 |
*
|
5 |
-
* @version 1.
|
6 |
* @package TInvWishlist\Template
|
7 |
*/
|
8 |
|
@@ -62,6 +62,10 @@ wp_enqueue_script( 'tinvwl' );
|
|
62 |
|
63 |
foreach ( $products as $wl_product ) {
|
64 |
|
|
|
|
|
|
|
|
|
65 |
// override global product data.
|
66 |
$product = apply_filters( 'tinvwl_wishlist_item', $wl_product['data'] );
|
67 |
// override global post data.
|
2 |
/**
|
3 |
* The Template for displaying wishlist if a current user is owner.
|
4 |
*
|
5 |
+
* @version 1.13.0
|
6 |
* @package TInvWishlist\Template
|
7 |
*/
|
8 |
|
62 |
|
63 |
foreach ( $products as $wl_product ) {
|
64 |
|
65 |
+
if ( empty( $wl_product['data'] ) ) {
|
66 |
+
continue;
|
67 |
+
}
|
68 |
+
|
69 |
// override global product data.
|
70 |
$product = apply_filters( 'tinvwl_wishlist_item', $wl_product['data'] );
|
71 |
// override global post data.
|
ti-woocommerce-wishlist.php
CHANGED
@@ -1,253 +1,253 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* TI WooCommerce Wishlist Plugin.
|
4 |
-
* Plugin Name: TI WooCommerce Wishlist Plugin
|
5 |
-
* Plugin URI: https://wordpress.org/plugins/ti-woocommerce-wishlist/
|
6 |
-
* Description: Wishlist functionality for your WooCommerce store.
|
7 |
-
* Version: 1.
|
8 |
-
* Requires at least: 4.5
|
9 |
-
* Tested up to: 5.2
|
10 |
-
* WC requires at least: 2.6
|
11 |
-
* WC tested up to: 3.6.
|
12 |
-
* Author: TemplateInvaders
|
13 |
-
* Author URI: https://templateinvaders.com/
|
14 |
-
* License: GPL-2.0+
|
15 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
16 |
-
* Text Domain: ti-woocommerce-wishlist
|
17 |
-
* Domain Path: /languages
|
18 |
-
*
|
19 |
-
* @package TInvWishlist
|
20 |
-
*/
|
21 |
-
|
22 |
-
// If this file is called directly, abort.
|
23 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
24 |
-
die;
|
25 |
-
}
|
26 |
-
|
27 |
-
// Define default path.
|
28 |
-
if ( ! defined( 'TINVWL_URL' ) ) {
|
29 |
-
define( 'TINVWL_URL', plugins_url( '/', __FILE__ ) );
|
30 |
-
}
|
31 |
-
if ( ! defined( 'TINVWL_PATH' ) ) {
|
32 |
-
define( 'TINVWL_PATH', plugin_dir_path( __FILE__ ) );
|
33 |
-
}
|
34 |
-
|
35 |
-
if ( ! defined( 'TINVWL_PREFIX' ) ) {
|
36 |
-
define( 'TINVWL_PREFIX', 'tinvwl' );
|
37 |
-
}
|
38 |
-
|
39 |
-
if ( ! defined( 'TINVWL_DOMAIN' ) ) {
|
40 |
-
define( 'TINVWL_DOMAIN', 'ti-woocommerce-wishlist' );
|
41 |
-
}
|
42 |
-
|
43 |
-
if ( ! defined( 'TINVWL_FVERSION' ) ) {
|
44 |
-
define( 'TINVWL_FVERSION', '1.
|
45 |
-
}
|
46 |
-
|
47 |
-
if ( ! defined( 'TINVWL_LOAD_FREE' ) ) {
|
48 |
-
define( 'TINVWL_LOAD_FREE', plugin_basename( __FILE__ ) );
|
49 |
-
}
|
50 |
-
|
51 |
-
if ( ! function_exists( 'tinv_array_merge' ) ) {
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Function to merge arrays with replacement options
|
55 |
-
*
|
56 |
-
* @param array $array1 Array.
|
57 |
-
* @param array $_ Array.
|
58 |
-
*
|
59 |
-
* @return array
|
60 |
-
*/
|
61 |
-
function tinv_array_merge( $array1, $_ = null ) {
|
62 |
-
if ( ! is_array( $array1 ) ) {
|
63 |
-
return $array1;
|
64 |
-
}
|
65 |
-
$args = func_get_args();
|
66 |
-
array_shift( $args );
|
67 |
-
foreach ( $args as $array2 ) {
|
68 |
-
if ( is_array( $array2 ) ) {
|
69 |
-
foreach ( $array2 as $key => $value ) {
|
70 |
-
$array1[ $key ] = $value;
|
71 |
-
}
|
72 |
-
}
|
73 |
-
}
|
74 |
-
|
75 |
-
return $array1;
|
76 |
-
}
|
77 |
-
}
|
78 |
-
|
79 |
-
|
80 |
-
if ( ! function_exists( 'tinv_get_option_defaults' ) ) {
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Extract default options from settings class
|
84 |
-
*
|
85 |
-
* @param string $category Name category settings.
|
86 |
-
*
|
87 |
-
* @return array
|
88 |
-
*/
|
89 |
-
function tinv_get_option_defaults( $category ) {
|
90 |
-
$dir = TINVWL_PATH . 'admin/settings/';
|
91 |
-
if ( ! file_exists( $dir ) || ! is_dir( $dir ) ) {
|
92 |
-
return array();
|
93 |
-
}
|
94 |
-
$files = scandir( $dir );
|
95 |
-
foreach ( $files as $key => $value ) {
|
96 |
-
if ( preg_match( '/\.class\.php$/i', $value ) ) {
|
97 |
-
$files[ $key ] = preg_replace( '/\.class\.php$/i', '', $value );
|
98 |
-
} else {
|
99 |
-
unset( $files[ $key ] );
|
100 |
-
}
|
101 |
-
}
|
102 |
-
$defaults = array();
|
103 |
-
foreach ( $files as $file ) {
|
104 |
-
$class = 'TInvWL_Admin_Settings_' . ucfirst( $file );
|
105 |
-
$class =
|
106 |
-
$class_methods = get_class_methods( $class );
|
107 |
-
foreach ( $class_methods as $method ) {
|
108 |
-
if ( preg_match( '/_data$/i', $method ) ) {
|
109 |
-
$settings = $class->get_defaults( $class->$method() );
|
110 |
-
$defaults = tinv_array_merge( $defaults, $settings );
|
111 |
-
}
|
112 |
-
}
|
113 |
-
}
|
114 |
-
if ( 'all' === $category ) {
|
115 |
-
return $defaults;
|
116 |
-
}
|
117 |
-
if ( array_key_exists( $category, $defaults ) ) {
|
118 |
-
return $defaults[ $category ];
|
119 |
-
}
|
120 |
-
|
121 |
-
return array();
|
122 |
-
}
|
123 |
-
} // End if().
|
124 |
-
|
125 |
-
if ( ! function_exists( 'activation_tinv_wishlist' ) ) {
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Activation plugin
|
129 |
-
*/
|
130 |
-
function activation_tinv_wishlist() {
|
131 |
-
if ( dependency_tinv_wishlist( false ) ) {
|
132 |
-
TInvWL_Activator::activate();
|
133 |
-
flush_rewrite_rules();
|
134 |
-
}
|
135 |
-
}
|
136 |
-
}
|
137 |
-
|
138 |
-
if ( ! function_exists( 'deactivation_tinv_wishlist' ) ) {
|
139 |
-
|
140 |
-
/**
|
141 |
-
* Deactivation plugin
|
142 |
-
*/
|
143 |
-
function deactivation_tinv_wishlist() {
|
144 |
-
flush_rewrite_rules();
|
145 |
-
}
|
146 |
-
}
|
147 |
-
|
148 |
-
if ( ! function_exists( 'uninstall_tinv_wishlist' ) ) {
|
149 |
-
|
150 |
-
/**
|
151 |
-
* Uninstall plugin
|
152 |
-
*/
|
153 |
-
function uninstall_tinv_wishlist() {
|
154 |
-
if ( ! defined( 'TINVWL_LOAD_PREMIUM' ) ) {
|
155 |
-
TInvWL_Activator::uninstall();
|
156 |
-
flush_rewrite_rules();
|
157 |
-
wp_clear_scheduled_hook( 'tinvwl_remove_without_author_wishlist' );
|
158 |
-
}
|
159 |
-
}
|
160 |
-
}
|
161 |
-
|
162 |
-
if ( function_exists( 'spl_autoload_register' ) && ! function_exists( 'autoload_tinv_wishlist' ) ) {
|
163 |
-
|
164 |
-
/**
|
165 |
-
* Autoloader class. If no function spl_autoload_register, then all the files will be required
|
166 |
-
*
|
167 |
-
* @param string $_class Required class name.
|
168 |
-
*
|
169 |
-
* @return boolean
|
170 |
-
*/
|
171 |
-
function autoload_tinv_wishlist( $_class ) {
|
172 |
-
$preffix = 'TInvWL';
|
173 |
-
$ext = '.php';
|
174 |
-
$class = explode( '_', $_class );
|
175 |
-
$object = array_shift( $class );
|
176 |
-
if ( $preffix !== $object ) {
|
177 |
-
return false;
|
178 |
-
}
|
179 |
-
if ( empty( $class ) ) {
|
180 |
-
$class = array( $preffix );
|
181 |
-
}
|
182 |
-
$basicclass = $class;
|
183 |
-
array_unshift( $class, 'includes' );
|
184 |
-
$classs = array(
|
185 |
-
TINVWL_PATH . strtolower( implode( DIRECTORY_SEPARATOR, $basicclass ) ),
|
186 |
-
TINVWL_PATH . strtolower( implode( DIRECTORY_SEPARATOR, $class ) ),
|
187 |
-
);
|
188 |
-
foreach ( $classs as $class ) {
|
189 |
-
foreach ( array( '.class', '.helper' ) as $suffix ) {
|
190 |
-
$filename = $class . $suffix . $ext;
|
191 |
-
if ( file_exists( $filename ) ) {
|
192 |
-
require_once $filename;
|
193 |
-
|
194 |
-
return true;
|
195 |
-
}
|
196 |
-
}
|
197 |
-
}
|
198 |
-
|
199 |
-
return false;
|
200 |
-
}
|
201 |
-
|
202 |
-
spl_autoload_register( 'autoload_tinv_wishlist' );
|
203 |
-
} // End if().
|
204 |
-
|
205 |
-
if ( ! function_exists( 'dependency_tinv_wishlist' ) ) {
|
206 |
-
|
207 |
-
/**
|
208 |
-
* Dependency plugin
|
209 |
-
*
|
210 |
-
* @param boolean $run For run hooks dependency or return error message.
|
211 |
-
*
|
212 |
-
* @return boolean
|
213 |
-
*/
|
214 |
-
function dependency_tinv_wishlist( $run = true ) {
|
215 |
-
$ext = new TInvWL_PluginExtend( null, __FILE__, TINVWL_PREFIX );
|
216 |
-
$ext->set_dependency( 'woocommerce/woocommerce.php', 'WooCommerce' )->need();
|
217 |
-
if ( $run ) {
|
218 |
-
$ext->run();
|
219 |
-
}
|
220 |
-
|
221 |
-
return $ext->status_dependency();
|
222 |
-
}
|
223 |
-
}
|
224 |
-
|
225 |
-
if ( ! function_exists( 'run_tinv_wishlist' ) ) {
|
226 |
-
|
227 |
-
/**
|
228 |
-
* Run plugin
|
229 |
-
*/
|
230 |
-
function run_tinv_wishlist() {
|
231 |
-
require_once TINVWL_PATH . 'tinv-wishlists-function.php';
|
232 |
-
require_once TINVWL_PATH . 'tinv-wishlists-function-integration.php';
|
233 |
-
|
234 |
-
if ( ! function_exists( 'is_plugin_active' ) ) {
|
235 |
-
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
236 |
-
}
|
237 |
-
if ( defined( 'TINVWL_LOAD_PREMIUM' ) && defined( 'TINVWL_LOAD_FREE' ) ) {
|
238 |
-
$redirect = tinv_wishlist_status( plugin_basename( __FILE__ ) );
|
239 |
-
if ( $redirect ) {
|
240 |
-
header( 'Location: ' . $redirect );
|
241 |
-
exit;
|
242 |
-
}
|
243 |
-
} elseif ( dependency_tinv_wishlist() ) {
|
244 |
-
$plugin = new TInvWL();
|
245 |
-
$plugin->run();
|
246 |
-
}
|
247 |
-
}
|
248 |
-
}
|
249 |
-
|
250 |
-
register_activation_hook( __FILE__, 'activation_tinv_wishlist' );
|
251 |
-
register_deactivation_hook( __FILE__, 'deactivation_tinv_wishlist' );
|
252 |
-
register_uninstall_hook( __FILE__, 'uninstall_tinv_wishlist' );
|
253 |
-
add_action( 'plugins_loaded', 'run_tinv_wishlist', 20 );
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* TI WooCommerce Wishlist Plugin.
|
4 |
+
* Plugin Name: TI WooCommerce Wishlist Plugin
|
5 |
+
* Plugin URI: https://wordpress.org/plugins/ti-woocommerce-wishlist/
|
6 |
+
* Description: Wishlist functionality for your WooCommerce store.
|
7 |
+
* Version: 1.13.0
|
8 |
+
* Requires at least: 4.5
|
9 |
+
* Tested up to: 5.2
|
10 |
+
* WC requires at least: 2.6
|
11 |
+
* WC tested up to: 3.6.3
|
12 |
+
* Author: TemplateInvaders
|
13 |
+
* Author URI: https://templateinvaders.com/
|
14 |
+
* License: GPL-2.0+
|
15 |
+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
16 |
+
* Text Domain: ti-woocommerce-wishlist
|
17 |
+
* Domain Path: /languages
|
18 |
+
*
|
19 |
+
* @package TInvWishlist
|
20 |
+
*/
|
21 |
+
|
22 |
+
// If this file is called directly, abort.
|
23 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
24 |
+
die;
|
25 |
+
}
|
26 |
+
|
27 |
+
// Define default path.
|
28 |
+
if ( ! defined( 'TINVWL_URL' ) ) {
|
29 |
+
define( 'TINVWL_URL', plugins_url( '/', __FILE__ ) );
|
30 |
+
}
|
31 |
+
if ( ! defined( 'TINVWL_PATH' ) ) {
|
32 |
+
define( 'TINVWL_PATH', plugin_dir_path( __FILE__ ) );
|
33 |
+
}
|
34 |
+
|
35 |
+
if ( ! defined( 'TINVWL_PREFIX' ) ) {
|
36 |
+
define( 'TINVWL_PREFIX', 'tinvwl' );
|
37 |
+
}
|
38 |
+
|
39 |
+
if ( ! defined( 'TINVWL_DOMAIN' ) ) {
|
40 |
+
define( 'TINVWL_DOMAIN', 'ti-woocommerce-wishlist' );
|
41 |
+
}
|
42 |
+
|
43 |
+
if ( ! defined( 'TINVWL_FVERSION' ) ) {
|
44 |
+
define( 'TINVWL_FVERSION', '1.13.0' );
|
45 |
+
}
|
46 |
+
|
47 |
+
if ( ! defined( 'TINVWL_LOAD_FREE' ) ) {
|
48 |
+
define( 'TINVWL_LOAD_FREE', plugin_basename( __FILE__ ) );
|
49 |
+
}
|
50 |
+
|
51 |
+
if ( ! function_exists( 'tinv_array_merge' ) ) {
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Function to merge arrays with replacement options
|
55 |
+
*
|
56 |
+
* @param array $array1 Array.
|
57 |
+
* @param array $_ Array.
|
58 |
+
*
|
59 |
+
* @return array
|
60 |
+
*/
|
61 |
+
function tinv_array_merge( $array1, $_ = null ) {
|
62 |
+
if ( ! is_array( $array1 ) ) {
|
63 |
+
return $array1;
|
64 |
+
}
|
65 |
+
$args = func_get_args();
|
66 |
+
array_shift( $args );
|
67 |
+
foreach ( $args as $array2 ) {
|
68 |
+
if ( is_array( $array2 ) ) {
|
69 |
+
foreach ( $array2 as $key => $value ) {
|
70 |
+
$array1[ $key ] = $value;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
return $array1;
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
|
80 |
+
if ( ! function_exists( 'tinv_get_option_defaults' ) ) {
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Extract default options from settings class
|
84 |
+
*
|
85 |
+
* @param string $category Name category settings.
|
86 |
+
*
|
87 |
+
* @return array
|
88 |
+
*/
|
89 |
+
function tinv_get_option_defaults( $category ) {
|
90 |
+
$dir = TINVWL_PATH . 'admin/settings/';
|
91 |
+
if ( ! file_exists( $dir ) || ! is_dir( $dir ) ) {
|
92 |
+
return array();
|
93 |
+
}
|
94 |
+
$files = scandir( $dir );
|
95 |
+
foreach ( $files as $key => $value ) {
|
96 |
+
if ( preg_match( '/\.class\.php$/i', $value ) ) {
|
97 |
+
$files[ $key ] = preg_replace( '/\.class\.php$/i', '', $value );
|
98 |
+
} else {
|
99 |
+
unset( $files[ $key ] );
|
100 |
+
}
|
101 |
+
}
|
102 |
+
$defaults = array();
|
103 |
+
foreach ( $files as $file ) {
|
104 |
+
$class = 'TInvWL_Admin_Settings_' . ucfirst( $file );
|
105 |
+
$class = $class::instance();
|
106 |
+
$class_methods = get_class_methods( $class );
|
107 |
+
foreach ( $class_methods as $method ) {
|
108 |
+
if ( preg_match( '/_data$/i', $method ) ) {
|
109 |
+
$settings = $class->get_defaults( $class->$method() );
|
110 |
+
$defaults = tinv_array_merge( $defaults, $settings );
|
111 |
+
}
|
112 |
+
}
|
113 |
+
}
|
114 |
+
if ( 'all' === $category ) {
|
115 |
+
return $defaults;
|
116 |
+
}
|
117 |
+
if ( array_key_exists( $category, $defaults ) ) {
|
118 |
+
return $defaults[ $category ];
|
119 |
+
}
|
120 |
+
|
121 |
+
return array();
|
122 |
+
}
|
123 |
+
} // End if().
|
124 |
+
|
125 |
+
if ( ! function_exists( 'activation_tinv_wishlist' ) ) {
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Activation plugin
|
129 |
+
*/
|
130 |
+
function activation_tinv_wishlist() {
|
131 |
+
if ( dependency_tinv_wishlist( false ) ) {
|
132 |
+
TInvWL_Activator::activate();
|
133 |
+
flush_rewrite_rules();
|
134 |
+
}
|
135 |
+
}
|
136 |
+
}
|
137 |
+
|
138 |
+
if ( ! function_exists( 'deactivation_tinv_wishlist' ) ) {
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Deactivation plugin
|
142 |
+
*/
|
143 |
+
function deactivation_tinv_wishlist() {
|
144 |
+
flush_rewrite_rules();
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
if ( ! function_exists( 'uninstall_tinv_wishlist' ) ) {
|
149 |
+
|
150 |
+
/**
|
151 |
+
* Uninstall plugin
|
152 |
+
*/
|
153 |
+
function uninstall_tinv_wishlist() {
|
154 |
+
if ( ! defined( 'TINVWL_LOAD_PREMIUM' ) ) {
|
155 |
+
TInvWL_Activator::uninstall();
|
156 |
+
flush_rewrite_rules();
|
157 |
+
wp_clear_scheduled_hook( 'tinvwl_remove_without_author_wishlist' );
|
158 |
+
}
|
159 |
+
}
|
160 |
+
}
|
161 |
+
|
162 |
+
if ( function_exists( 'spl_autoload_register' ) && ! function_exists( 'autoload_tinv_wishlist' ) ) {
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Autoloader class. If no function spl_autoload_register, then all the files will be required
|
166 |
+
*
|
167 |
+
* @param string $_class Required class name.
|
168 |
+
*
|
169 |
+
* @return boolean
|
170 |
+
*/
|
171 |
+
function autoload_tinv_wishlist( $_class ) {
|
172 |
+
$preffix = 'TInvWL';
|
173 |
+
$ext = '.php';
|
174 |
+
$class = explode( '_', $_class );
|
175 |
+
$object = array_shift( $class );
|
176 |
+
if ( $preffix !== $object ) {
|
177 |
+
return false;
|
178 |
+
}
|
179 |
+
if ( empty( $class ) ) {
|
180 |
+
$class = array( $preffix );
|
181 |
+
}
|
182 |
+
$basicclass = $class;
|
183 |
+
array_unshift( $class, 'includes' );
|
184 |
+
$classs = array(
|
185 |
+
TINVWL_PATH . strtolower( implode( DIRECTORY_SEPARATOR, $basicclass ) ),
|
186 |
+
TINVWL_PATH . strtolower( implode( DIRECTORY_SEPARATOR, $class ) ),
|
187 |
+
);
|
188 |
+
foreach ( $classs as $class ) {
|
189 |
+
foreach ( array( '.class', '.helper' ) as $suffix ) {
|
190 |
+
$filename = $class . $suffix . $ext;
|
191 |
+
if ( file_exists( $filename ) ) {
|
192 |
+
require_once $filename;
|
193 |
+
|
194 |
+
return true;
|
195 |
+
}
|
196 |
+
}
|
197 |
+
}
|
198 |
+
|
199 |
+
return false;
|
200 |
+
}
|
201 |
+
|
202 |
+
spl_autoload_register( 'autoload_tinv_wishlist' );
|
203 |
+
} // End if().
|
204 |
+
|
205 |
+
if ( ! function_exists( 'dependency_tinv_wishlist' ) ) {
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Dependency plugin
|
209 |
+
*
|
210 |
+
* @param boolean $run For run hooks dependency or return error message.
|
211 |
+
*
|
212 |
+
* @return boolean
|
213 |
+
*/
|
214 |
+
function dependency_tinv_wishlist( $run = true ) {
|
215 |
+
$ext = new TInvWL_PluginExtend( null, __FILE__, TINVWL_PREFIX );
|
216 |
+
$ext->set_dependency( 'woocommerce/woocommerce.php', 'WooCommerce' )->need();
|
217 |
+
if ( $run ) {
|
218 |
+
$ext->run();
|
219 |
+
}
|
220 |
+
|
221 |
+
return $ext->status_dependency();
|
222 |
+
}
|
223 |
+
}
|
224 |
+
|
225 |
+
if ( ! function_exists( 'run_tinv_wishlist' ) ) {
|
226 |
+
|
227 |
+
/**
|
228 |
+
* Run plugin
|
229 |
+
*/
|
230 |
+
function run_tinv_wishlist() {
|
231 |
+
require_once TINVWL_PATH . 'tinv-wishlists-function.php';
|
232 |
+
require_once TINVWL_PATH . 'tinv-wishlists-function-integration.php';
|
233 |
+
|
234 |
+
if ( ! function_exists( 'is_plugin_active' ) ) {
|
235 |
+
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
236 |
+
}
|
237 |
+
if ( defined( 'TINVWL_LOAD_PREMIUM' ) && defined( 'TINVWL_LOAD_FREE' ) || defined( 'TINVWL_LOAD_PREMIUM' ) && is_plugin_active_for_network( TINVWL_LOAD_PREMIUM ) || defined( 'TINVWL_LOAD_FREE' ) && is_plugin_active_for_network( TINVWL_LOAD_FREE ) ) {
|
238 |
+
$redirect = tinv_wishlist_status( plugin_basename( __FILE__ ) );
|
239 |
+
if ( $redirect ) {
|
240 |
+
header( 'Location: ' . $redirect );
|
241 |
+
exit;
|
242 |
+
}
|
243 |
+
} elseif ( dependency_tinv_wishlist() ) {
|
244 |
+
$plugin = new TInvWL();
|
245 |
+
$plugin->run();
|
246 |
+
}
|
247 |
+
}
|
248 |
+
}
|
249 |
+
|
250 |
+
register_activation_hook( __FILE__, 'activation_tinv_wishlist' );
|
251 |
+
register_deactivation_hook( __FILE__, 'deactivation_tinv_wishlist' );
|
252 |
+
register_uninstall_hook( __FILE__, 'uninstall_tinv_wishlist' );
|
253 |
+
add_action( 'plugins_loaded', 'run_tinv_wishlist', 20 );
|
tinv-wishlists-function-integration.php
CHANGED
@@ -119,8 +119,8 @@ if ( function_exists( 'tinvwl_comet_cache_reject' ) ) {
|
|
119 |
add_action( 'tinvwl_before_action_owner', 'tinvwl_comet_cache_reject' );
|
120 |
add_action( 'tinvwl_before_action_user', 'tinvwl_comet_cache_reject' );
|
121 |
add_action( 'tinvwl_addproduct_tocart', 'tinvwl_comet_cache_reject' );
|
122 |
-
add_action( '
|
123 |
-
add_action( '
|
124 |
}
|
125 |
|
126 |
if ( ! function_exists( 'gf_productaddon_support' ) ) {
|
@@ -1504,19 +1504,24 @@ if ( ! function_exists( 'tinv_wishlist_metasupport_woocommerce_tm_extra_product_
|
|
1504 |
* @return array
|
1505 |
*/
|
1506 |
function tinv_wishlist_metasupport_woocommerce_tm_extra_product_options( $meta, $product_id, $variation_id ) {
|
1507 |
-
if ( array_key_exists( 'tcaddtocart', $meta ) &&
|
1508 |
-
$
|
1509 |
-
|
|
|
|
|
|
|
|
|
|
|
1510 |
$post_data = array();
|
1511 |
foreach ( $meta as $key => $value ) {
|
1512 |
$post_data[ $key ] = $value['display'];
|
1513 |
}
|
1514 |
|
1515 |
-
$cart_class = version_compare(
|
1516 |
|
1517 |
$cart_item = $cart_class->add_cart_item_data_helper( array(), $product_id, $post_data );
|
1518 |
|
1519 |
-
if ( 'normal' ==
|
1520 |
$cart_item['quantity'] = 1;
|
1521 |
$cart_item['data'] = wc_get_product( $variation_id ? $variation_id : $product_id );
|
1522 |
$cart_item['tm_cart_item_key'] = '';
|
@@ -1557,29 +1562,36 @@ if ( ! function_exists( 'tinvwl_item_price_woocommerce_tm_extra_product_options'
|
|
1557 |
* @return string
|
1558 |
*/
|
1559 |
function tinvwl_item_price_woocommerce_tm_extra_product_options( $price, $wl_product, $product ) {
|
1560 |
-
if ( array_key_exists( 'tcaddtocart', (array) @$wl_product['meta'] ) &&
|
1561 |
-
|
1562 |
-
$
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
$
|
1568 |
-
$
|
1569 |
-
$
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
$
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1578 |
}
|
1579 |
}
|
1580 |
-
}
|
1581 |
|
1582 |
-
|
|
|
1583 |
}
|
1584 |
}
|
1585 |
|
@@ -1604,23 +1616,25 @@ if ( ! function_exists( 'TII18n' ) ) {
|
|
1604 |
// WP Multilang string translations.
|
1605 |
if ( function_exists( 'wpm_translate_string' ) ) {
|
1606 |
|
1607 |
-
add_filter( '
|
1608 |
-
add_filter( '
|
1609 |
-
add_filter( '
|
1610 |
-
add_filter( '
|
1611 |
-
add_filter( '
|
|
|
|
|
|
|
|
|
1612 |
|
1613 |
-
add_filter( 'tinvwl-add_to_wishlist_catalog-text', 'wpm_translate_string' );
|
1614 |
-
add_filter( 'tinvwl-add_to_wishlist_catalog-text_remove', 'wpm_translate_string' );
|
1615 |
|
1616 |
-
add_filter( '
|
1617 |
|
1618 |
-
add_filter( '
|
1619 |
-
add_filter( '
|
1620 |
|
1621 |
-
add_filter( '
|
1622 |
|
1623 |
-
add_filter( '
|
1624 |
|
1625 |
} // End if().
|
1626 |
|
@@ -2149,7 +2163,7 @@ if ( ! function_exists( 'tinv_wishlist_qty_woo_advanced_qty' ) ) {
|
|
2149 |
$args = $advanced_qty->qty_input_args( array(
|
2150 |
'min_value' => 1,
|
2151 |
'max_value' => '',
|
2152 |
-
'step' => 1
|
2153 |
), $product );
|
2154 |
|
2155 |
$quantity = $args['input_value'];
|
@@ -2212,8 +2226,6 @@ if ( ! function_exists( 'tinv_wishlist_item_meta_woocommerce_custom_product_addo
|
|
2212 |
$form = new WCPA_Form();
|
2213 |
$frontend = new WCPA_Front_End();
|
2214 |
$data = array();
|
2215 |
-
|
2216 |
-
|
2217 |
$post_ids = $form->get_form_ids( $product_id );
|
2218 |
|
2219 |
if ( wcpa_get_option( 'form_loading_order_by_date' ) === true ) {
|
@@ -2237,9 +2249,7 @@ if ( ! function_exists( 'tinv_wishlist_item_meta_woocommerce_custom_product_addo
|
|
2237 |
}
|
2238 |
}
|
2239 |
|
2240 |
-
|
2241 |
foreach ( $data as $v ) {
|
2242 |
-
|
2243 |
$form_data = clone $v;
|
2244 |
unset( $form_data->values ); //avoid saving large number of data
|
2245 |
unset( $form_data->className ); //avoid saving no use data
|
@@ -2576,14 +2586,14 @@ if ( defined( 'myCRED_VERSION' ) ) {
|
|
2576 |
<div class="form-group">
|
2577 |
<label for="<?php echo $this->field_id( array(
|
2578 |
'tinvwl_added',
|
2579 |
-
'limit'
|
2580 |
) ); ?>"><?php _e( 'Limit', 'ti-woocommerce-wishlist' ); ?></label>
|
2581 |
<?php echo $this->hook_limit_setting( $this->field_name( array(
|
2582 |
'tinvwl_added',
|
2583 |
-
'limit'
|
2584 |
) ), $this->field_id( array(
|
2585 |
'tinvwl_added',
|
2586 |
-
'limit'
|
2587 |
) ), $prefs['tinvwl_added']['limit'] ); ?>
|
2588 |
</div>
|
2589 |
</div>
|
@@ -2599,7 +2609,7 @@ if ( defined( 'myCRED_VERSION' ) ) {
|
|
2599 |
class="form-control"/>
|
2600 |
<span class="description"><?php echo $this->available_template_tags( array(
|
2601 |
'general',
|
2602 |
-
'post'
|
2603 |
) ); ?></span>
|
2604 |
</div>
|
2605 |
</div>
|
@@ -2621,11 +2631,11 @@ if ( defined( 'myCRED_VERSION' ) ) {
|
|
2621 |
<div class="form-group">
|
2622 |
<label for="<?php echo $this->field_id( array(
|
2623 |
'tinvwl_purchased',
|
2624 |
-
'limit'
|
2625 |
) ); ?>"><?php _e( 'Limit', 'ti-woocommerce-wishlist' ); ?></label>
|
2626 |
<?php echo $this->hook_limit_setting( $this->field_name( array(
|
2627 |
'tinvwl_purchased',
|
2628 |
-
'limit'
|
2629 |
) ), $this->field_id( array(
|
2630 |
'tinvwl_purchased',
|
2631 |
'limit',
|
119 |
add_action( 'tinvwl_before_action_owner', 'tinvwl_comet_cache_reject' );
|
120 |
add_action( 'tinvwl_before_action_user', 'tinvwl_comet_cache_reject' );
|
121 |
add_action( 'tinvwl_addproduct_tocart', 'tinvwl_comet_cache_reject' );
|
122 |
+
add_action( 'tinvwl_wishlist_addtowishlist_button', 'tinvwl_comet_cache_reject' );
|
123 |
+
add_action( 'tinvwl_wishlist_addtowishlist_dialogbox', 'tinvwl_comet_cache_reject' );
|
124 |
}
|
125 |
|
126 |
if ( ! function_exists( 'gf_productaddon_support' ) ) {
|
1504 |
* @return array
|
1505 |
*/
|
1506 |
function tinv_wishlist_metasupport_woocommerce_tm_extra_product_options( $meta, $product_id, $variation_id ) {
|
1507 |
+
if ( array_key_exists( 'tcaddtocart', $meta ) && ( defined( 'THEMECOMPLETE_EPO_VERSION' ) || defined( 'TM_EPO_VERSION' ) ) ) {
|
1508 |
+
$api = defined( 'THEMECOMPLETE_EPO_VERSION' ) ? THEMECOMPLETE_EPO_API() : TM_EPO_API();
|
1509 |
+
$core = defined( 'THEMECOMPLETE_EPO_VERSION' ) ? THEMECOMPLETE_EPO() : TM_EPO();
|
1510 |
+
$version = defined( 'THEMECOMPLETE_EPO_VERSION' ) ? THEMECOMPLETE_EPO_VERSION : TM_EPO_VERSION;
|
1511 |
+
$cart = defined( 'THEMECOMPLETE_EPO_VERSION' ) ? THEMECOMPLETE_EPO_CART() : TM_EPO_CART();
|
1512 |
+
|
1513 |
+
$has_epo = $api->has_options( $product_id );
|
1514 |
+
if ( $api->is_valid_options( $has_epo ) ) {
|
1515 |
$post_data = array();
|
1516 |
foreach ( $meta as $key => $value ) {
|
1517 |
$post_data[ $key ] = $value['display'];
|
1518 |
}
|
1519 |
|
1520 |
+
$cart_class = version_compare( $version, '4.8.0', '<' ) ? $core : $cart;
|
1521 |
|
1522 |
$cart_item = $cart_class->add_cart_item_data_helper( array(), $product_id, $post_data );
|
1523 |
|
1524 |
+
if ( 'normal' == $core->tm_epo_hide_options_in_cart && 'advanced' != $core->tm_epo_cart_field_display && ! empty( $cart_item['tmcartepo'] ) ) {
|
1525 |
$cart_item['quantity'] = 1;
|
1526 |
$cart_item['data'] = wc_get_product( $variation_id ? $variation_id : $product_id );
|
1527 |
$cart_item['tm_cart_item_key'] = '';
|
1562 |
* @return string
|
1563 |
*/
|
1564 |
function tinvwl_item_price_woocommerce_tm_extra_product_options( $price, $wl_product, $product ) {
|
1565 |
+
if ( array_key_exists( 'tcaddtocart', (array) @$wl_product['meta'] ) && ( defined( 'THEMECOMPLETE_EPO_VERSION' ) || defined( 'TM_EPO_VERSION' ) ) ) {
|
1566 |
+
|
1567 |
+
$api = defined( 'THEMECOMPLETE_EPO_VERSION' ) ? THEMECOMPLETE_EPO_API() : TM_EPO_API();
|
1568 |
+
$core = defined( 'THEMECOMPLETE_EPO_VERSION' ) ? THEMECOMPLETE_EPO() : TM_EPO();
|
1569 |
+
$version = defined( 'THEMECOMPLETE_EPO_VERSION' ) ? THEMECOMPLETE_EPO_VERSION : TM_EPO_VERSION;
|
1570 |
+
$cart = defined( 'THEMECOMPLETE_EPO_VERSION' ) ? THEMECOMPLETE_EPO_CART() : TM_EPO_CART();
|
1571 |
+
if ( $core->tm_epo_hide_options_in_cart == 'normal' ) {
|
1572 |
+
$product_id = $wl_product['product_id'];
|
1573 |
+
$has_epo = $api->has_options( $product_id );
|
1574 |
+
if ( $api->is_valid_options( $has_epo ) ) {
|
1575 |
+
|
1576 |
+
$cart_class = version_compare( $version, '4.8.0', '<' ) ? $core : $cart;
|
1577 |
+
|
1578 |
+
$cart_item = $cart_class->add_cart_item_data_helper( array(), $product_id, $wl_product['meta'] );
|
1579 |
+
$cart_item['quantity'] = 1;
|
1580 |
+
$cart_item['data'] = $product;
|
1581 |
+
|
1582 |
+
$product_price = apply_filters( 'wc_epo_add_cart_item_original_price', $cart_item['data']->get_price(), $cart_item );
|
1583 |
+
if ( ! empty( $cart_item['tmcartepo'] ) ) {
|
1584 |
+
$to_currency = version_compare( $version, '4.9.0', '<' ) ? tc_get_woocommerce_currency() : themecomplete_get_woocommerce_currency();
|
1585 |
+
foreach ( $cart_item['tmcartepo'] as $value ) {
|
1586 |
+
if ( array_key_exists( $to_currency, $value['price_per_currency'] ) ) {
|
1587 |
+
$value = floatval( $value['price_per_currency'][ $to_currency ] );
|
1588 |
+
$product_price += $value;
|
1589 |
+
}
|
1590 |
}
|
1591 |
}
|
|
|
1592 |
|
1593 |
+
$price = apply_filters( 'wc_tm_epo_ac_product_price', apply_filters( 'woocommerce_cart_item_price', $cart_class->get_price_for_cart( $product_price, $cart_item, '' ), $cart_item, '' ), '', $cart_item, $product, $product_id );
|
1594 |
+
}
|
1595 |
}
|
1596 |
}
|
1597 |
|
1616 |
// WP Multilang string translations.
|
1617 |
if ( function_exists( 'wpm_translate_string' ) ) {
|
1618 |
|
1619 |
+
add_filter( 'tinvwl_default_wishlist_title', 'wpm_translate_string' );
|
1620 |
+
add_filter( 'tinvwl_view_wishlist_text', 'wpm_translate_string' );
|
1621 |
+
add_filter( 'tinvwl_added_to_wishlist_text', 'wpm_translate_string' );
|
1622 |
+
add_filter( 'tinvwl_already_in_wishlist_text', 'wpm_translate_string' );
|
1623 |
+
add_filter( 'tinvwl_removed_from_wishlist_text', 'wpm_translate_string' );
|
1624 |
+
add_filter( 'tinvwl_remove_from_wishlist_text', 'wpm_translate_string' );
|
1625 |
+
|
1626 |
+
add_filter( 'tinvwl_added_to_wishlist_text_loop', 'wpm_translate_string' );
|
1627 |
+
add_filter( 'tinvwl_remove_from_wishlist_text_loop', 'wpm_translate_string' );
|
1628 |
|
|
|
|
|
1629 |
|
1630 |
+
add_filter( 'tinvwl_add_to_cart_text', 'wpm_translate_string' );
|
1631 |
|
1632 |
+
add_filter( 'tinvwl_add_selected_to_cart_text', 'wpm_translate_string' );
|
1633 |
+
add_filter( 'tinvwl_add_all_to_cart_text', 'wpm_translate_string' );
|
1634 |
|
1635 |
+
add_filter( 'tinvwl_share_on_text', 'wpm_translate_string' );
|
1636 |
|
1637 |
+
add_filter( 'tinvwl_wishlist_products_counter_text', 'wpm_translate_string' );
|
1638 |
|
1639 |
} // End if().
|
1640 |
|
2163 |
$args = $advanced_qty->qty_input_args( array(
|
2164 |
'min_value' => 1,
|
2165 |
'max_value' => '',
|
2166 |
+
'step' => 1,
|
2167 |
), $product );
|
2168 |
|
2169 |
$quantity = $args['input_value'];
|
2226 |
$form = new WCPA_Form();
|
2227 |
$frontend = new WCPA_Front_End();
|
2228 |
$data = array();
|
|
|
|
|
2229 |
$post_ids = $form->get_form_ids( $product_id );
|
2230 |
|
2231 |
if ( wcpa_get_option( 'form_loading_order_by_date' ) === true ) {
|
2249 |
}
|
2250 |
}
|
2251 |
|
|
|
2252 |
foreach ( $data as $v ) {
|
|
|
2253 |
$form_data = clone $v;
|
2254 |
unset( $form_data->values ); //avoid saving large number of data
|
2255 |
unset( $form_data->className ); //avoid saving no use data
|
2586 |
<div class="form-group">
|
2587 |
<label for="<?php echo $this->field_id( array(
|
2588 |
'tinvwl_added',
|
2589 |
+
'limit',
|
2590 |
) ); ?>"><?php _e( 'Limit', 'ti-woocommerce-wishlist' ); ?></label>
|
2591 |
<?php echo $this->hook_limit_setting( $this->field_name( array(
|
2592 |
'tinvwl_added',
|
2593 |
+
'limit',
|
2594 |
) ), $this->field_id( array(
|
2595 |
'tinvwl_added',
|
2596 |
+
'limit',
|
2597 |
) ), $prefs['tinvwl_added']['limit'] ); ?>
|
2598 |
</div>
|
2599 |
</div>
|
2609 |
class="form-control"/>
|
2610 |
<span class="description"><?php echo $this->available_template_tags( array(
|
2611 |
'general',
|
2612 |
+
'post',
|
2613 |
) ); ?></span>
|
2614 |
</div>
|
2615 |
</div>
|
2631 |
<div class="form-group">
|
2632 |
<label for="<?php echo $this->field_id( array(
|
2633 |
'tinvwl_purchased',
|
2634 |
+
'limit',
|
2635 |
) ); ?>"><?php _e( 'Limit', 'ti-woocommerce-wishlist' ); ?></label>
|
2636 |
<?php echo $this->hook_limit_setting( $this->field_name( array(
|
2637 |
'tinvwl_purchased',
|
2638 |
+
'limit',
|
2639 |
) ), $this->field_id( array(
|
2640 |
'tinvwl_purchased',
|
2641 |
'limit',
|
tinv-wishlists-function.php
CHANGED
@@ -265,7 +265,7 @@ if ( ! function_exists( 'tinv_wishlist_get_item_data' ) ) {
|
|
265 |
} // End if().
|
266 |
|
267 |
// Filter item data to allow 3rd parties to add more to the array.
|
268 |
-
$item_data = apply_filters( '
|
269 |
|
270 |
// Format item data ready to display.
|
271 |
foreach ( $item_data as $key => $data ) {
|
265 |
} // End if().
|
266 |
|
267 |
// Filter item data to allow 3rd parties to add more to the array.
|
268 |
+
$item_data = apply_filters( 'tinvwl_wishlist_get_item_data', $item_data, $product );
|
269 |
|
270 |
// Format item data ready to display.
|
271 |
foreach ( $item_data as $key => $data ) {
|