YITH WooCommerce Quick View - Version 1.3.8

Version Description

Released Apr 02 - 2019

  • New: Support to WooCommerce 3.6.0 RC1
  • Update: Plugin Core
  • Fix: Style issue on Storefront theme
Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Quick View
Version 1.3.8
Comparing to
See all releases

Code changes from version 1.3.7 to 1.3.8

README.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: yithemes
3
  Tags: woocommerce, quick view, woocommerce quick view, products quick view
4
  Requires at least: 4.0
5
- Tested up to: 5.0
6
- Stable tag: 1.3.7
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -42,75 +42,81 @@ Full documentation is available [here](http://yithemes.com/docs-plugins/yith-woo
42
 
43
  == Changelog ==
44
 
 
 
 
 
 
 
45
  = 1.3.7 = Released Feb 21 - 2019
46
 
47
- * New: Support to WooCommerce 3.5.5.
48
- * New: Support to WordPress 5.1.0.
49
- * Update: Plugin Core.
50
- * Fix: Conflict with YITH WooCommerce Gift Card form in checkout page.
51
 
52
  = 1.3.6 = Released Dec 06 - 2018
53
 
54
- * New: Support to WooCommerce 3.5.2.
55
- * New: Support to WordPress 5.0.0.
56
- * Update: Plugin Core.
57
 
58
  = 1.3.5 = Released Oct 24 - 2018
59
 
60
- * New: Support to WooCommerce 3.5.0.
61
- * Update: Plugin Core.
62
 
63
  = 1.3.4 = Released Oct 05 - 2018
64
 
65
- * New: Support to WooCommerce 3.5.0 RC1.
66
- * New: Compatibility with YITH WooCommerce Gift Card.
67
- * Update: Plugin Core.
68
 
69
  = 1.3.3 = Released Sep 27 - 2018
70
 
71
- * Update: Plugin Core.
72
- * Dev: New filter "yith_wcqv_show_quick_view_button".
73
 
74
  = 1.3.2 = Released Sep 12 - 2018
75
 
76
- * New: Support to WooCommerce 3.4.5.
77
- * New: Support to WordPress 4.9.8.
78
- * Update: Plugin Core.
79
- * Fix: Now is possible use shortcode [yith_quick_view] without specify the "product_id" parameter.
80
 
81
  = 1.3.1 = Released May 30 - 2018
82
 
83
- * New: Support to WooCommerce 3.4.0.
84
- * New: Support to WordPress 4.9.6.
85
- * Update: Plugin Core.
86
- * Fix: Product image zoom in Quick View modal.
87
- * Fix: Removed redirect to single product page after add to cart.
88
- * Fix: WPML compatibility issue.
89
 
90
  = 1.3.0 = Released Feb 01 - 2018
91
 
92
- * New: Support to WooCommerce 3.3.0.
93
- * New: Support to WordPress 4.9.2.
94
- * Update: Plugin Core.
95
 
96
  = 1.2.2 = Released Oct 11 - 2017
97
 
98
- * New: Support to WooCommerce 3.2.0 RC2.
99
- * New: Support to WordPress 4.8.2.
100
- * Fix: Compatibility issue with YITH WooCommerce Product Bundles.
101
- * Update: Plugin Core.
102
 
103
  = 1.2.1 = Released Apr 05 - 2017
104
 
105
- * Fix: Compatibility issue with YITH WooCommerce Wishlist.
106
- * Update: Plugin Core.
107
 
108
  = 1.2.0 = Released Mar 31 - 2017
109
 
110
- * New: Support to WordPress 4.7.3.
111
- * New: Support to WooCommerce 3.0.0 RC2.
112
- * New: Shortcode [yith_quick_view product_id="" label=""] for print "quick view" button of specified product.
113
- * Update: Plugin Core.
114
 
115
  = 1.1.4 = Released Oct 24 - 2016
116
 
@@ -205,9 +211,8 @@ Or, if you have created your own language pack, or have an update for an existin
205
 
206
  == Upgrade notice ==
207
 
208
- = 1.3.7 = Released Feb 21 - 2019
209
 
210
- * New: Support to WooCommerce 3.5.5.
211
- * New: Support to WordPress 5.1.0.
212
- * Update: Plugin Core.
213
- * Fix: Conflict with YITH WooCommerce Gift Card form in checkout page.
2
  Contributors: yithemes
3
  Tags: woocommerce, quick view, woocommerce quick view, products quick view
4
  Requires at least: 4.0
5
+ Tested up to: 5.1
6
+ Stable tag: 1.3.8
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
42
 
43
  == Changelog ==
44
 
45
+ = 1.3.8 = Released Apr 02 - 2019
46
+
47
+ * New: Support to WooCommerce 3.6.0 RC1
48
+ * Update: Plugin Core
49
+ * Fix: Style issue on Storefront theme
50
+
51
  = 1.3.7 = Released Feb 21 - 2019
52
 
53
+ * New: Support to WooCommerce 3.5.5
54
+ * New: Support to WordPress 5.1.0
55
+ * Update: Plugin Core
56
+ * Fix: Conflict with YITH WooCommerce Gift Card form in checkout page
57
 
58
  = 1.3.6 = Released Dec 06 - 2018
59
 
60
+ * New: Support to WooCommerce 3.5.2
61
+ * New: Support to WordPress 5.0.0
62
+ * Update: Plugin Core
63
 
64
  = 1.3.5 = Released Oct 24 - 2018
65
 
66
+ * New: Support to WooCommerce 3.5.0
67
+ * Update: Plugin Core
68
 
69
  = 1.3.4 = Released Oct 05 - 2018
70
 
71
+ * New: Support to WooCommerce 3.5.0 RC1
72
+ * New: Compatibility with YITH WooCommerce Gift Card
73
+ * Update: Plugin Core
74
 
75
  = 1.3.3 = Released Sep 27 - 2018
76
 
77
+ * Update: Plugin Core
78
+ * Dev: New filter "yith_wcqv_show_quick_view_button"
79
 
80
  = 1.3.2 = Released Sep 12 - 2018
81
 
82
+ * New: Support to WooCommerce 3.4.5
83
+ * New: Support to WordPress 4.9.8
84
+ * Update: Plugin Core
85
+ * Fix: Now is possible use shortcode [yith_quick_view] without specify the "product_id" parameter
86
 
87
  = 1.3.1 = Released May 30 - 2018
88
 
89
+ * New: Support to WooCommerce 3.4.0
90
+ * New: Support to WordPress 4.9.6
91
+ * Update: Plugin Core
92
+ * Fix: Product image zoom in Quick View modal
93
+ * Fix: Removed redirect to single product page after add to cart
94
+ * Fix: WPML compatibility issue
95
 
96
  = 1.3.0 = Released Feb 01 - 2018
97
 
98
+ * New: Support to WooCommerce 3.3.0
99
+ * New: Support to WordPress 4.9.2
100
+ * Update: Plugin Core
101
 
102
  = 1.2.2 = Released Oct 11 - 2017
103
 
104
+ * New: Support to WooCommerce 3.2.0 RC2
105
+ * New: Support to WordPress 4.8.2
106
+ * Fix: Compatibility issue with YITH WooCommerce Product Bundles
107
+ * Update: Plugin Core
108
 
109
  = 1.2.1 = Released Apr 05 - 2017
110
 
111
+ * Fix: Compatibility issue with YITH WooCommerce Wishlist
112
+ * Update: Plugin Core
113
 
114
  = 1.2.0 = Released Mar 31 - 2017
115
 
116
+ * New: Support to WordPress 4.7.3
117
+ * New: Support to WooCommerce 3.0.0 RC2
118
+ * New: Shortcode [yith_quick_view product_id="" label=""] for print "quick view" button of specified product
119
+ * Update: Plugin Core
120
 
121
  = 1.1.4 = Released Oct 24 - 2016
122
 
211
 
212
  == Upgrade notice ==
213
 
214
+ = 1.3.8 = Released Apr 02 - 2019
215
 
216
+ * New: Support to WooCommerce 3.6.0 RC1
217
+ * Update: Plugin Core
218
+ * Fix: Style issue on Storefront theme
 
assets/css/yith-quick-view.css CHANGED
@@ -114,6 +114,7 @@ html.yith-quick-view-is-open body {
114
  width: 40%;
115
  float: left;
116
  opacity: 1 !important;
 
117
  }
118
  #yith-quick-view-content div.summary {
119
  margin: 0;
114
  width: 40%;
115
  float: left;
116
  opacity: 1 !important;
117
+ margin: 0;
118
  }
119
  #yith-quick-view-content div.summary {
120
  margin: 0;
includes/class.yith-wcqv-admin.php CHANGED
@@ -65,15 +65,6 @@ if ( ! class_exists( 'YITH_WCQV_Admin' ) ) {
65
  */
66
  protected $_panel_page = 'yith_wcqv_panel';
67
 
68
- /**
69
- * Various links
70
- *
71
- * @var string
72
- * @access public
73
- * @since 1.0.0
74
- */
75
- public $doc_url = 'https://docs.yithemes.com/yith-woocommerce-quick-view/';
76
-
77
  /**
78
  * Returns single instance of the class
79
  *
65
  */
66
  protected $_panel_page = 'yith_wcqv_panel';
67
 
 
 
 
 
 
 
 
 
 
68
  /**
69
  * Returns single instance of the class
70
  *
init.php CHANGED
@@ -3,17 +3,17 @@
3
  * Plugin Name: YITH WooCommerce Quick View
4
  * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-quick-view
5
  * Description: The <code><strong>YITH WooCommerce Quick View</strong></code> plugin allows your customers to have a quick look about products. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
- * Version: 1.3.7
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-quick-view
10
  * Domain Path: /languages/
11
  * WC requires at least: 2.5.0
12
- * WC tested up to: 3.5.0
13
  *
14
  * @author YITH
15
  * @package YITH WooCommerce Quick View
16
- * @version 1.3.7
17
  */
18
  /* Copyright 2015 Your Inspiration Themes (email : plugins@yithemes.com)
19
 
@@ -61,7 +61,7 @@ register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
61
 
62
 
63
  if ( ! defined( 'YITH_WCQV_VERSION' ) ){
64
- define( 'YITH_WCQV_VERSION', '1.3.7' );
65
  }
66
 
67
  if ( ! defined( 'YITH_WCQV_FREE_INIT' ) ) {
3
  * Plugin Name: YITH WooCommerce Quick View
4
  * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-quick-view
5
  * Description: The <code><strong>YITH WooCommerce Quick View</strong></code> plugin allows your customers to have a quick look about products. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
+ * Version: 1.3.8
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-quick-view
10
  * Domain Path: /languages/
11
  * WC requires at least: 2.5.0
12
+ * WC tested up to: 3.6.0
13
  *
14
  * @author YITH
15
  * @package YITH WooCommerce Quick View
16
+ * @version 1.3.8
17
  */
18
  /* Copyright 2015 Your Inspiration Themes (email : plugins@yithemes.com)
19
 
61
 
62
 
63
  if ( ! defined( 'YITH_WCQV_VERSION' ) ){
64
+ define( 'YITH_WCQV_VERSION', '1.3.8' );
65
  }
66
 
67
  if ( ! defined( 'YITH_WCQV_FREE_INIT' ) ) {
plugin-fw/assets/css/admin.css CHANGED
@@ -53,6 +53,27 @@
53
  display: block;
54
  }
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  /*-----------------------
57
  YITH Plugins Columns
58
  ------------------------*/
53
  display: block;
54
  }
55
 
56
+ /*-----------------------
57
+ YITH FEEDS
58
+ ------------------------*/
59
+
60
+ .yith-feeds-logo{
61
+ display: table-cell;
62
+ background: #005b7c;
63
+ padding: 5px;
64
+ border-radius: 50%;
65
+ margin-right: 10px;
66
+ vertical-align: text-bottom;
67
+ width: 18px;
68
+ height: auto;
69
+ vertical-align: middle;
70
+ }
71
+
72
+ .yith-feeds-plugin-name{
73
+ display: table-cell;
74
+ vertical-align: middle;
75
+ }
76
+
77
  /*-----------------------
78
  YITH Plugins Columns
79
  ------------------------*/
plugin-fw/assets/css/yit-upgrader.css CHANGED
@@ -15,4 +15,8 @@
15
  overflow-y : auto;
16
  z-index : 999;
17
  background: #fcfcfc;
 
 
 
 
18
  }
15
  overflow-y : auto;
16
  z-index : 999;
17
  background: #fcfcfc;
18
+ }
19
+
20
+ .yith-updating:before{
21
+ animation: rotation 2s infinite linear;
22
  }
plugin-fw/assets/js/yith-dashboard.js ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($) {
2
+ // bind a button or a link to open the dialog
3
+ $('.yith-last-changelog').click(function(e) {
4
+ e.preventDefault();
5
+ var inlineId = $( this ).data( 'changelogid' ),
6
+ inlineModal = $('#' + inlineId),
7
+ plugininfo = $( this ).data( 'plugininfo' ),
8
+ b = {},
9
+ close_function = function() { $( this ).dialog( "close" ); };
10
+
11
+ b[yith_dashboard.buttons.close] = close_function;
12
+
13
+ // initalise the dialog
14
+ inlineModal.dialog({
15
+ title: plugininfo,
16
+ dialogClass: 'wp-dialog',
17
+ autoOpen: false,
18
+ draggable: false,
19
+ width: 'auto',
20
+ modal: true,
21
+ resizable: false,
22
+ closeOnEscape: true,
23
+ position: {
24
+ my: "center",
25
+ at: "center",
26
+ of: window
27
+ },
28
+ buttons: b,
29
+ show: {
30
+ effect: "blind",
31
+ duration: 1000
32
+ },
33
+ open: function () {
34
+ // close dialog by clicking the overlay behind it
35
+ $('.ui-widget-overlay').bind('click', function(){
36
+ inlineModal.dialog('close');
37
+ })
38
+ },
39
+ create: function () {
40
+ // style fix for WordPress admin
41
+ $('.ui-dialog-titlebar-close').addClass('ui-button');
42
+ },
43
+ });
44
+
45
+ inlineModal.dialog('open');
46
+ });
47
+ })(jQuery);
plugin-fw/assets/js/yith-dashboard.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ (function(a){a(".yith-last-changelog").click(function(b){b.preventDefault();b=a(this).data("changelogid");var c=a("#"+b);b=a(this).data("plugininfo");var d={};d[yith_dashboard.buttons.close]=function(){a(this).dialog("close")};c.dialog({title:b,dialogClass:"wp-dialog",autoOpen:!1,draggable:!1,width:"auto",modal:!0,resizable:!1,closeOnEscape:!0,position:{my:"center",at:"center",of:window},buttons:d,show:{effect:"blind",duration:1E3},open:function(){a(".ui-widget-overlay").bind("click",function(){c.dialog("close")})},
2
+ create:function(){a(".ui-dialog-titlebar-close").addClass("ui-button")}});c.dialog("open")})})(jQuery);
plugin-fw/assets/js/yith-update-plugins.js ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * This file belongs to the YIT Framework.
3
+ *
4
+ * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
5
+ * that is bundled with this package in the file LICENSE.txt.
6
+ * It is also available through the world-wide-web at this URL:
7
+ * http://www.gnu.org/licenses/gpl-3.0.txt
8
+ */
9
+ (function ( $ ) {
10
+ $(document).on( 'click', 'a.yith-update-link', function(event){
11
+ var t = $(this),
12
+ p_wrapper = t.parent('p');
13
+
14
+ event.preventDefault();
15
+ $.ajax({
16
+ type: 'POST',
17
+ url: yith_plugin_fw.ajaxurl,
18
+ data: {
19
+ 'action': "update-plugin",
20
+ 'plugin': t.data('plugin'),
21
+ 'slug': t.data('slug'),
22
+ 'name': t.data('name'),
23
+ '_ajax_nonce': yith_plugin_fw.ajax_nonce
24
+ },
25
+ beforeSend: function(){
26
+ p_wrapper.text( yith_plugin_fw.l10n.updating.replace( '%s', t.data('name') ) );
27
+ p_wrapper.addClass( 'yith-updating' );
28
+ },
29
+ success: function (response) {
30
+ p_wrapper.removeClass( 'yith-updating' ).addClass( 'yith-updated' );
31
+ var notice_wrapper = p_wrapper.parent('div');
32
+ notice_wrapper.removeClass( 'notice-warning' ),
33
+ result_text = '';
34
+
35
+ if( response.success === true ){
36
+ notice_wrapper.addClass('notice-success updated-message').removeClass( 'update-message' );
37
+ result_text = yith_plugin_fw.l10n.updated;
38
+ }
39
+
40
+ else {
41
+ notice_wrapper.addClass('notice-error');
42
+ result_text = yith_plugin_fw.l10n.failed;
43
+ }
44
+
45
+ p_wrapper.text( result_text.replace( '%s', t.data('name') ) );
46
+ }
47
+ });
48
+ });
49
+ })( jQuery );
plugin-fw/assets/js/yith-update-plugins.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ (function(b){b(document).on("click","a.yith-update-link",function(e){var a=b(this),c=a.parent("p");e.preventDefault();b.ajax({type:"POST",url:yith_plugin_fw.ajaxurl,data:{action:"update-plugin",plugin:a.data("plugin"),slug:a.data("slug"),name:a.data("name"),_ajax_nonce:yith_plugin_fw.ajax_nonce},beforeSend:function(){c.text(yith_plugin_fw.l10n.updating.replace("%s",a.data("name")));c.addClass("yith-updating")},success:function(b){c.removeClass("yith-updating").addClass("yith-updated");var d=c.parent("div");
2
+ d.removeClass("notice-warning");result_text="";!0===b.success?(d.addClass("notice-success updated-message").removeClass("update-message"),result_text=yith_plugin_fw.l10n.updated):(d.addClass("notice-error"),result_text=yith_plugin_fw.l10n.failed);c.text(result_text.replace("%s",a.data("name")))}})})})(jQuery);
plugin-fw/init.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
- * Version: 3.1.21
5
  * Author: YITHEMES
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
  * @author Your Inspiration Themes
10
- * @version 3.1.21
11
  */
12
  /**
13
  * This file belongs to the YIT Plugin Framework.
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
+ * Version: 3.1.28
5
  * Author: YITHEMES
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
  * @author Your Inspiration Themes
10
+ * @version 3.1.26
11
  */
12
  /**
13
  * This file belongs to the YIT Plugin Framework.
plugin-fw/lib/promo/yith-promo.php CHANGED
@@ -32,10 +32,10 @@ if( ! function_exists( 'yith_plugin_fw_promo_notices' ) ){
32
 
33
  if ( ! is_wp_error( $remote_data ) && isset( $remote_data['response']['code'] ) && '200' == $remote_data['response']['code'] ) {
34
  $promo_data = @simplexml_load_string( $remote_data['body'] );
 
35
 
36
  if( true === $create_transient ){
37
  $is_membership_user = false;
38
- $license = YIT_Plugin_Licence()->get_licence();
39
  $xml_expiry_date = '';
40
 
41
  if( is_array( $license ) && apply_filters( 'yith_plugin_fw_check_for_membership_user', true ) ){
@@ -102,6 +102,7 @@ if( ! function_exists( 'yith_plugin_fw_promo_notices' ) ){
102
  $banner = isset( $promo->banner ) ? $promo->banner : '';
103
  $style = $link = '';
104
  $show_notice = false;
 
105
 
106
  if( ! empty( $border_color ) ){
107
  $style .= "border-left-color: {$border_color};";
@@ -129,7 +130,7 @@ if( ! function_exists( 'yith_plugin_fw_promo_notices' ) ){
129
 
130
  if( ! empty( $url ) && ! empty( $url_label )) {
131
  $promo_id .= $url . $url_label;
132
- $link = sprintf( '<a href="%s" target="_blank">%s</a>', $url, $url_label );
133
  $show_notice = true;
134
  }
135
 
@@ -150,7 +151,7 @@ if( ! function_exists( 'yith_plugin_fw_promo_notices' ) ){
150
  if ( true === $show_notice ) :
151
  wp_enqueue_script( 'yith-promo' );
152
  ?>
153
- <div id="<?php echo $unique_promo_id; ?>" class="yith-notice-is-dismissible notice notice-yith notice-alt is-dismissible" style="<?php echo $style; ?>" data-expiry= <?php echo $promo->end_date; ?>>
154
  <p>
155
  <?php if( ! empty( $banner ) ) { printf( '%s', $banner ); } ?>
156
  <?php printf( "%s %s %s", $title, $description, $link ); ?>
32
 
33
  if ( ! is_wp_error( $remote_data ) && isset( $remote_data['response']['code'] ) && '200' == $remote_data['response']['code'] ) {
34
  $promo_data = @simplexml_load_string( $remote_data['body'] );
35
+ $license = YIT_Plugin_Licence()->get_licence();
36
 
37
  if( true === $create_transient ){
38
  $is_membership_user = false;
 
39
  $xml_expiry_date = '';
40
 
41
  if( is_array( $license ) && apply_filters( 'yith_plugin_fw_check_for_membership_user', true ) ){
102
  $banner = isset( $promo->banner ) ? $promo->banner : '';
103
  $style = $link = '';
104
  $show_notice = false;
105
+ $original_promo_id = $promo_id;
106
 
107
  if( ! empty( $border_color ) ){
108
  $style .= "border-left-color: {$border_color};";
130
 
131
  if( ! empty( $url ) && ! empty( $url_label )) {
132
  $promo_id .= $url . $url_label;
133
+ $link = sprintf( '<a class="yith-promo-url" href="%s" target="_blank">%s</a>', $url, $url_label );
134
  $show_notice = true;
135
  }
136
 
151
  if ( true === $show_notice ) :
152
  wp_enqueue_script( 'yith-promo' );
153
  ?>
154
+ <div id="<?php echo $unique_promo_id; ?>" class="yith-notice-is-dismissible notice notice-yith notice-alt is-dismissible <?php echo $original_promo_id;?>" style="<?php echo $style; ?>" data-expiry="<?php echo $promo->end_date; ?>">
155
  <p>
156
  <?php if( ! empty( $banner ) ) { printf( '%s', $banner ); } ?>
157
  <?php printf( "%s %s %s", $title, $description, $link ); ?>
plugin-fw/lib/yit-upgrade.php CHANGED
@@ -140,7 +140,7 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
140
 
141
  $error = false;
142
  if ( ! is_wp_error( $remote_xml ) && isset( $remote_xml['response']['code'] ) && '200' == $remote_xml['response']['code'] ) {
143
- $plugin_remote_info = @simplexml_load_string( $remote_xml['body'] );
144
  if ( $plugin_remote_info ) {
145
  $info['Latest'] = (string) $plugin_remote_info->latest;
146
  $info['changelog'] = (string) $plugin_remote_info->changelog;
@@ -214,7 +214,7 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
214
  'details_url' => $details_url,
215
  'strings' => $strings,
216
  );
217
- $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
218
 
219
  if( defined( 'YIT_CORE_PLUGIN_URL' ) ){
220
  yit_enqueue_script( 'yit-multisite-updater', YIT_CORE_PLUGIN_URL . '/assets/js/multisite-updater' . $suffix . '.js', array( 'jquery' ), false, true );
@@ -226,7 +226,24 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
226
  public function admin_enqueue_scripts() {
227
  global $pagenow;
228
  if ( 'plugins.php' === $pagenow && defined( 'YIT_CORE_PLUGIN_URL' ) ) {
 
229
  wp_enqueue_style( 'yit-upgrader', YIT_CORE_PLUGIN_URL . '/assets/css/yit-upgrader.css' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
  }
231
  }
232
 
@@ -454,7 +471,7 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
454
 
455
  if ( ! is_wp_error( $remote_xml ) && isset( $remote_xml['response']['code'] ) && '200' == $remote_xml['response']['code'] ) {
456
 
457
- $plugin_remote_info = @simplexml_load_string( $remote_xml['body'] );
458
 
459
  if ( $plugin_remote_info ) {
460
  $wrong_current_version_check = version_compare( $plugin['info']['Version'], $plugin_remote_info->latest, '>' );
@@ -514,8 +531,10 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
514
  */
515
  public function plugin_update_row() {
516
 
517
- $current = get_site_transient( 'update_plugins' );
518
- $init = str_replace( 'after_plugin_row_', '', current_filter() );
 
 
519
 
520
  if ( ! isset( $current->response[ $init ] ) ) {
521
  return false;
@@ -537,7 +556,7 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
537
  global $wp_version;
538
  $is_wp_4_6 = version_compare( $wp_version, '4.6', '>=' );
539
 
540
- echo '<tr class="plugin-update-tr active' . ( is_plugin_active( $init ) ? ' active' : '' ) . '"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange">';
541
 
542
  echo '<div class="update-message' . ( $is_wp_4_6 ? ' notice inline notice-warning notice-alt' : '' ) . '">';
543
 
@@ -556,7 +575,7 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
556
  }
557
 
558
  else {
559
- printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox yit-changelog-button open-plugin-details-modal" title="%3$s">View version %4$s details</a> or <a href="%5$s">update now</a>.', 'yith-plugin-fw' ), $this->_plugins[ $init ]['info']['Name'], esc_url( $details_url ), esc_attr( $this->_plugins[ $init ]['info']['Name'] ), $r->new_version, wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $init, 'upgrade-plugin_' . $init ) );
560
  }
561
 
562
  if( version_compare( $this->_plugins[ $init ]['info']['Version'] , $r->new_version, '>' ) ){
140
 
141
  $error = false;
142
  if ( ! is_wp_error( $remote_xml ) && isset( $remote_xml['response']['code'] ) && '200' == $remote_xml['response']['code'] ) {
143
+ $plugin_remote_info = function_exists( 'simplexml_load_string' ) ? @simplexml_load_string( $remote_xml['body'] ) : false;
144
  if ( $plugin_remote_info ) {
145
  $info['Latest'] = (string) $plugin_remote_info->latest;
146
  $info['changelog'] = (string) $plugin_remote_info->changelog;
214
  'details_url' => $details_url,
215
  'strings' => $strings,
216
  );
217
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
218
 
219
  if( defined( 'YIT_CORE_PLUGIN_URL' ) ){
220
  yit_enqueue_script( 'yit-multisite-updater', YIT_CORE_PLUGIN_URL . '/assets/js/multisite-updater' . $suffix . '.js', array( 'jquery' ), false, true );
226
  public function admin_enqueue_scripts() {
227
  global $pagenow;
228
  if ( 'plugins.php' === $pagenow && defined( 'YIT_CORE_PLUGIN_URL' ) ) {
229
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
230
  wp_enqueue_style( 'yit-upgrader', YIT_CORE_PLUGIN_URL . '/assets/css/yit-upgrader.css' );
231
+ wp_enqueue_script( 'yith-update-plugins', YIT_CORE_PLUGIN_URL . '/assets/js/yith-update-plugins' . $suffix . '.js', array( 'jquery' ), false, true );
232
+
233
+ $update_plugins_localized = array(
234
+ 'ajax_nonce' => wp_create_nonce( 'updates' ),
235
+ 'ajaxurl' => admin_url( 'admin-ajax.php', 'relative' ),
236
+ 'l10n' => array(
237
+ /* translators: %s: Plugin name and version */
238
+ 'updating' => _x( 'Updating %s...', 'plugin-fw', 'yith-plugin-fw' ), // No ellipsis.
239
+ /* translators: %s: Plugin name and version */
240
+ 'updated' => _x( '%s updated!', 'plugin-fw', 'yith-plugin-fw' ),
241
+ /* translators: %s: Plugin name and version */
242
+ 'failed' => _x( '%s update failed', 'plugin-fw', 'yith-plugin-fw' ),
243
+ ),
244
+ );
245
+
246
+ wp_localize_script( 'yith-update-plugins', 'yith_plugin_fw', $update_plugins_localized );
247
  }
248
  }
249
 
471
 
472
  if ( ! is_wp_error( $remote_xml ) && isset( $remote_xml['response']['code'] ) && '200' == $remote_xml['response']['code'] ) {
473
 
474
+ $plugin_remote_info = function_exists( 'simplexml_load_string' ) ? @simplexml_load_string( $remote_xml['body'] ) : false;
475
 
476
  if ( $plugin_remote_info ) {
477
  $wrong_current_version_check = version_compare( $plugin['info']['Version'], $plugin_remote_info->latest, '>' );
531
  */
532
  public function plugin_update_row() {
533
 
534
+ $current = get_site_transient( 'update_plugins' );
535
+ $init = str_replace( 'after_plugin_row_', '', current_filter() );
536
+ $update_now_class = apply_filters( 'yith_plugin_fw_update_now_class', '' );
537
+ $update_now_class = trim( $update_now_class . ' yith-update-link update-link' );
538
 
539
  if ( ! isset( $current->response[ $init ] ) ) {
540
  return false;
556
  global $wp_version;
557
  $is_wp_4_6 = version_compare( $wp_version, '4.6', '>=' );
558
 
559
+ echo '<tr class="plugin-update-tr' . ( is_plugin_active( $init ) ? ' active' : '' ) . '"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange">';
560
 
561
  echo '<div class="update-message' . ( $is_wp_4_6 ? ' notice inline notice-warning notice-alt' : '' ) . '">';
562
 
575
  }
576
 
577
  else {
578
+ printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox yit-changelog-button open-plugin-details-modal" title="%3$s">View version %4$s details</a> or <a href="%5$s" class="%6$s" data-plugin="%7$s" data-slug="%8$s" data-name="%1$s">update now</a>.', 'yith-plugin-fw' ), $this->_plugins[ $init ]['info']['Name'], esc_url( $details_url ), esc_attr( $this->_plugins[ $init ]['info']['Name'] ), $r->new_version, wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $init, 'upgrade-plugin_' . $init ), $update_now_class, $init, $this->_plugins[ $init ]['slug'] );
579
  }
580
 
581
  if( version_compare( $this->_plugins[ $init ]['info']['Version'] , $r->new_version, '>' ) ){
plugin-fw/lib/yith-dashboard.php CHANGED
@@ -26,7 +26,7 @@ if( ! class_exists( 'YITH_Dashboard' ) ){
26
  * @access protected
27
  * @since 1.0.0
28
  */
29
- static protected $_products_feed = 'https://yithemes.com/feed/?post_type=product';
30
  static protected $_blog_feed = 'https://yithemes.com/feed/';
31
 
32
  /**
@@ -37,8 +37,8 @@ if( ! class_exists( 'YITH_Dashboard' ) ){
37
  * @access public
38
  */
39
  public static function dashboard_widget_setup() {
40
- wp_add_dashboard_widget( 'yith_dashboard_products_news', __( 'New YITH products' , 'yith-plugin-fw' ), 'YITH_Dashboard::dashboard_products_news' );
41
- wp_add_dashboard_widget( 'yith_dashboard_blog_news', __( 'News from the YITH Blog' , 'yith-plugin-fw' ), 'YITH_Dashboard::dashboard_blog_news' );
42
  }
43
 
44
 
@@ -50,10 +50,67 @@ if( ! class_exists( 'YITH_Dashboard' ) ){
50
  * @access public
51
  */
52
  public static function dashboard_products_news() {
53
- $args = array( 'show_author' => 0, 'show_date' => 1, 'show_summary' => 1, 'items'=> 3 );
54
- wp_widget_rss_output( static::$_products_feed, $args );
55
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
 
 
 
 
 
57
 
58
  /**
59
  * Blog news Widget
@@ -64,11 +121,36 @@ if( ! class_exists( 'YITH_Dashboard' ) ){
64
  */
65
  public static function dashboard_blog_news() {
66
  $args = array( 'show_author' => 0, 'show_date' => 1, 'show_summary' => 1, 'items'=> 3 );
67
- wp_widget_rss_output( static::$_blog_feed, $args );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  }
69
  }
 
70
  if( apply_filters( 'yith_plugin_fw_show_dashboard_widgets', true ) ){
71
  add_action( 'wp_dashboard_setup', 'YITH_Dashboard::dashboard_widget_setup' );
 
72
  }
73
  }
74
 
26
  * @access protected
27
  * @since 1.0.0
28
  */
29
+ static protected $_products_feed = 'https://yithemes.com/latest-updates/feeds/';
30
  static protected $_blog_feed = 'https://yithemes.com/feed/';
31
 
32
  /**
37
  * @access public
38
  */
39
  public static function dashboard_widget_setup() {
40
+ wp_add_dashboard_widget( 'yith_dashboard_products_news', __( 'YITH Latest Updates' , 'yith-plugin-fw' ), 'YITH_Dashboard::dashboard_products_news' );
41
+ wp_add_dashboard_widget( 'yith_dashboard_blog_news', __( 'Latest news from YITH Blog' , 'yith-plugin-fw' ), 'YITH_Dashboard::dashboard_blog_news' );
42
  }
43
 
44
 
50
  * @access public
51
  */
52
  public static function dashboard_products_news() {
53
+ $items = 10;
54
+ $rss = static::$_products_feed;
55
+ if ( is_string( $rss ) ) {
56
+ $rss = fetch_feed( $rss );
57
+ } elseif ( is_array( $rss ) && isset( $rss['url'] ) ) {
58
+ $rss = fetch_feed( $rss['url'] );
59
+ } elseif ( ! is_object( $rss ) ) {
60
+ return;
61
+ }
62
+
63
+ if ( is_wp_error( $rss ) ) {
64
+ if ( is_admin() || current_user_can( 'manage_options' ) ) {
65
+ echo '<p><strong>' . __( 'RSS Error:', 'yith-plugin-fw' ) . '</strong> ' . $rss->get_error_message() . '</p>';
66
+ }
67
+ return;
68
+ }
69
+
70
+ if ( ! $rss->get_item_quantity() ) {
71
+ echo '<ul><li>' . __( 'An error has occurred, which probably means the feed is down. Try again later.', 'yith-plugin-fw' ) . '</li></ul>';
72
+ $rss->__destruct();
73
+ unset( $rss );
74
+ return;
75
+ }
76
+
77
+ $last_updates = $rss->get_items( 0, $items );
78
+ $html_classes = 'rsswidget yith-update-feeds';
79
+ $output = '';
80
+
81
+ if( count( $last_updates ) > 0 ){
82
+ $output = '<ul class="yith-update-feeds">';
83
+ }
84
+
85
+ foreach ( $last_updates as $last_update ) {
86
+ /**
87
+ * @var $last_update \SimplePie_Item
88
+ */
89
+ $output .= '<li class="yith-update-feed">';
90
+ $date = $last_update->get_date( 'U' );
91
+ $date_i18n = ! empty( $date ) ? date_i18n( get_option( 'date_format' ), $date ) : '';
92
+ $html_date = ! empty( $date_i18n ) ? ' <span class="rss-date">' . date_i18n( get_option( 'date_format' ), $date ) . '</span>' : '';
93
+ $output .= sprintf( '<a target="_blank" href="%s" class="%s">%s</a> %s', $last_update->get_permalink(), $html_classes, $last_update->get_title(), $html_date );
94
+ $changelog = $last_update->get_description();
95
+
96
+ if( ! empty( $changelog ) ){
97
+ //add_thickbox();
98
+ $output .= ' - ';
99
+ $output .= sprintf( '<a class="yith-last-changelog" href="#" data-changelogid="%s" data-plugininfo="%s">%s</a>', $last_update->get_id( true ), $last_update->get_title(), _x( 'View Changelog', 'Plugin FW', 'yith-plugin-fw' ) );
100
+ $output .= sprintf( '<div style="display: none;" id="%s"><div style="display: table;"><img class="yith-feeds-logo" src="%s" /><h3 class="yith-feeds-plugin-name"><span style="font-weight: normal;">%s</span> %s</h3></div><p>%s</p></div>', $last_update->get_id( true ), yith_plugin_fw_get_default_logo(), _x( 'Latest update released on', 'Plugin FW', 'yith-plugin-fw' ), $date_i18n, $changelog );
101
+ }
102
+
103
+ $output .= '</li>';
104
+ }
105
+
106
+ if( ! empty( $output ) ){
107
+ $output .= '</ul>';
108
+ }
109
 
110
+ echo $output;
111
+ $rss->__destruct();
112
+ unset( $rss );
113
+ }
114
 
115
  /**
116
  * Blog news Widget
121
  */
122
  public static function dashboard_blog_news() {
123
  $args = array( 'show_author' => 0, 'show_date' => 1, 'show_summary' => 1, 'items'=> 3 );
124
+ $feed = static::$_blog_feed;
125
+ wp_widget_rss_output( $feed, $args );
126
+ }
127
+
128
+ /**
129
+ * Enqueue Styles and Scripts for View Last Changelog widget
130
+ *
131
+ * @return void
132
+ * @since 1.0.0
133
+ * @access public
134
+ */
135
+ public static function enqueue_scripts(){
136
+ if( function_exists( 'get_current_screen' ) && 'dashboard' == get_current_screen()->id ){
137
+ $script_path = defined( 'YIT_CORE_PLUGIN_URL' ) ? YIT_CORE_PLUGIN_URL : get_template_directory_uri() . '/core/plugin-fw';
138
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
139
+ wp_enqueue_script( 'yith-dashboard', $script_path . '/assets/js/yith-dashboard' . $suffix . '.js', array( 'jquery-ui-dialog' ), '1.0.0', true );
140
+ wp_enqueue_style( 'wp-jquery-ui-dialog' );
141
+ $l10n = array(
142
+ 'buttons' => array(
143
+ 'close' => _x( 'Close', 'Button label', 'yith-plugin-fw' )
144
+ )
145
+ );
146
+ wp_localize_script( 'yith-dashboard', 'yith_dashboard', $l10n );
147
+ }
148
  }
149
  }
150
+
151
  if( apply_filters( 'yith_plugin_fw_show_dashboard_widgets', true ) ){
152
  add_action( 'wp_dashboard_setup', 'YITH_Dashboard::dashboard_widget_setup' );
153
+ add_action( 'admin_enqueue_scripts', 'YITH_Dashboard::enqueue_scripts', 20 );
154
  }
155
  }
156
 
plugin-fw/licence/assets/js/yit-licence.js CHANGED
@@ -69,7 +69,7 @@
69
  if ( false === error ) {
70
  jQuery.ajax( {
71
  type : 'POST',
72
- url : ajaxurl,
73
  data : data,
74
  success: function ( response ) {
75
 
69
  if ( false === error ) {
70
  jQuery.ajax( {
71
  type : 'POST',
72
+ url : typeof ajaxurl != 'undefined' ? ajaxurl : yith_ajax.url,
73
  data : data,
74
  success: function ( response ) {
75
 
plugin-fw/licence/assets/js/yit-licence.min.js CHANGED
@@ -1 +1,8 @@
1
- !function(e){var a=function(){var i=e(".licence-activation"),s=e(".licence-check"),d=e(".licence-deactive");i.on("click",function(i,s){i.preventDefault();var d,c=e(this),r=c.data("formid"),l=e("#"+r),u=l.serialize(),F=e(l).find(".message"),t=e(l).find(".message-wrapper"),n=l.find(".user-email"),o=l.find(".licence-key"),p=l.find(".user-email").val(),v=l.find(".licence-key").val(),C=!1,x=new Array,m=l.find(".product-row"),D=e(".licence-activation"),f=e("#products-to-active").find(".spinner");if(F.empty(),t.removeClass("visible"),n.removeClass("require"),o.removeClass("require"),m.removeClass("error"),f.addClass("show"),c.add(D).prop("disabled",!0).addClass("clicked"),""!==p&&(d=p,new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i).test(d))||(C=!0,n.addClass("require"),x[x.length]=licence_message.email),""===v&&(C=!0,x[x.length]=licence_message.license_key,o.addClass("require")),!1===C)jQuery.ajax({type:"POST",url:ajaxurl,data:u,success:function(i){f.removeClass("show"),c.add(D).prop("disabled",!1).removeClass("clicked"),!0===i.activated?(e(".product-licence-activation").empty().replaceWith(i.template),a()):!1!==i&&void 0!==i.error?(F.text(i.error),t.addClass("visible"),m.addClass("error")):(F.text(licence_message.server),t.addClass("visible"),m.addClass("error")),void 0!==i.debug&&console.log(i.debug)}});else{if(1==x.length)F.text(licence_message.error.replace("%field%",x[0])),t.addClass("visible"),m.addClass("error");else{for(var h=licence_message.errors,b=0;b<x.length;b++)h=h.replace("%field_"+(b+1)+"%",x[b]),t.addClass("visible");F.text(h),t.addClass("visible"),m.addClass("error")}f.removeClass("show"),c.add(D).prop("disabled",!1).removeClass("clicked")}}),s.on("click",function(i){i.preventDefault();var s=e(this),d=e("#licence-check-update"),c=d.serialize();s.prop("disabled",!0).addClass("clicked"),d.find("div.spinner").addClass("show"),jQuery.ajax({type:"POST",url:ajaxurl,data:c,success:function(i){e(".product-licence-activation").empty().replaceWith(i.template),a()}})}),d.on("click",function(i){if(i.preventDefault(),1==(1==script_info.is_debug||confirm(licence_message.are_you_sure))){var s=e(this),d=s.data("licence-key"),c=s.data("licence-email"),r=s.data("product-init"),l=s.data("action"),u=e(".licence-renew"),F=e(".licence-deactive"),t=e("#yith-licence-notice"),n=e(".activated-table");s.add(u).add(F).prop("disabled",!0).addClass("clicked"),e("#activated-products").find(".spinner").addClass("show"),jQuery.ajax({type:"POST",url:ajaxurl,data:{action:l,licence_key:d,email:c,product_init:r},success:function(i){t.css("maxWidth",n.width()),0==i?(t.find("p.yith-licence-notice-message").html(licence_message.server),t.removeClass("notice-success").addClass("notice-error visible"),s.add(u).add(F).add(u).prop("disabled",!1).removeClass("clicked"),e("#activated-products").find(".spinner").removeClass("show")):(0==i.activated&&(e(".product-licence-activation").empty().replaceWith(i.template),a()),void 0!==i.error&&(t.find("p.yith-licence-notice-message").html(i.error),t.removeClass("notice-success").addClass("notice-error visible"),s.add(u).add(F).add(u).prop("disabled",!1).removeClass("clicked"),e("#activated-products").find(".spinner").removeClass("show")))}})}})};a(),e("body").on("click",".yit-changelog-button",function(a){e("#TB_window").remove()})}(jQuery);
 
 
 
 
 
 
 
1
+ (function(b){var t=function(c){c.on("click",function(k,e){k.preventDefault();var c=b(this),a=c.data("formid"),d=b("#"+a),f=d.serialize(),h=b(d).find(".message"),g=b(d).find(".message-wrapper"),l=d.find(".user-email"),u=d.find(".licence-key"),v=d.find(".user-email").val(),t=d.find(".licence-key").val(),n=!1;a=[];var p=d.find(".product-row"),q=b(".licence-activation"),r=b("#products-to-active").find(".spinner");h.empty();g.removeClass("visible");l.removeClass("require");u.removeClass("require");p.removeClass("error");
2
+ r.addClass("show");c.add(q).prop("disabled",!0).addClass("clicked");""!==v&&(new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i)).test(v)||
3
+ (n=!0,l.addClass("require"),a[a.length]=licence_message.email);""===t&&(n=!0,a[a.length]=licence_message.license_key,u.addClass("require"));if(!1===n)jQuery.ajax({type:"POST",url:"undefined"!=typeof ajaxurl?ajaxurl:yith_ajax.url,data:f,success:function(a){r.removeClass("show");c.add(q).prop("disabled",!1).removeClass("clicked");!0===a.activated?(b(".product-licence-activation").empty().replaceWith(a.template),m()):(!1!==a&&"undefined"!==typeof a.error?h.text(a.error):h.text(licence_message.server),
4
+ g.addClass("visible"),p.addClass("error"));"undefined"!==typeof a.debug&&console.log(a.debug)}});else{if(1==a.length)h.text(licence_message.error.replace("%field%",a[0]));else{d=licence_message.errors;for(f=0;f<a.length;f++)d=d.replace("%field_"+(f+1)+"%",a[f]),g.addClass("visible");h.text(d)}g.addClass("visible");p.addClass("error");r.removeClass("show");c.add(q).prop("disabled",!1).removeClass("clicked")}})},w=function(c){c.on("click",function(c){c.preventDefault();c=b(this);var e=b("#licence-check-update"),
5
+ k=e.serialize();c.prop("disabled",!0).addClass("clicked");e.find("div.spinner").addClass("show");jQuery.ajax({type:"POST",url:ajaxurl,data:k,success:function(a){b(".product-licence-activation").empty().replaceWith(a.template);m()}})})},x=function(c){c.on("click",function(c){c.preventDefault();if(1==(1==script_info.is_debug?!0:confirm(licence_message.are_you_sure))){var e=b(this);c=e.data("licence-key");var k=e.data("licence-email"),a=e.data("product-init"),d=e.data("action"),f=b(".licence-renew"),
6
+ h=b(".licence-deactive"),g=b("#yith-licence-notice"),l=b(".activated-table");e.add(f).add(h).prop("disabled",!0).addClass("clicked");b("#activated-products").find(".spinner").addClass("show");jQuery.ajax({type:"POST",url:ajaxurl,data:{action:d,licence_key:c,email:k,product_init:a},success:function(a){g.css("maxWidth",l.width());0==a?(g.find("p.yith-licence-notice-message").html(licence_message.server),g.removeClass("notice-success").addClass("notice-error visible"),e.add(f).add(h).add(f).prop("disabled",
7
+ !1).removeClass("clicked"),b("#activated-products").find(".spinner").removeClass("show")):(0==a.activated&&(b(".product-licence-activation").empty().replaceWith(a.template),m()),"undefined"!=typeof a.error&&(g.find("p.yith-licence-notice-message").html(a.error),g.removeClass("notice-success").addClass("notice-error visible"),e.add(f).add(h).add(f).prop("disabled",!1).removeClass("clicked"),b("#activated-products").find(".spinner").removeClass("show")))}})}})},m=function(){var c=b(".licence-activation"),
8
+ k=b(".licence-check"),e=b(".licence-deactive");t(c);w(k);x(e)};m();b("body").on("click",".yit-changelog-button",function(c){b("#TB_window").remove()})})(jQuery);
plugin-fw/licence/lib/yit-licence.php CHANGED
@@ -191,6 +191,11 @@ if ( !class_exists( 'YIT_Licence' ) ) {
191
  )
192
  );
193
 
 
 
 
 
 
194
  /* Enqueue Scripts only in Licence Activation page of plugins and themes */
195
  if ( strpos( get_current_screen()->id, 'yith_plugins_activation' ) !== false || strpos( get_current_screen()->id, 'yit_panel_license' ) !== false ) {
196
  wp_enqueue_script( 'yit-licence' );
191
  )
192
  );
193
 
194
+ wp_localize_script( 'yit-licence', 'yith_ajax', array(
195
+ 'url' => admin_url( 'admin-ajax.php', 'relative' )
196
+ )
197
+ );
198
+
199
  /* Enqueue Scripts only in Licence Activation page of plugins and themes */
200
  if ( strpos( get_current_screen()->id, 'yith_plugins_activation' ) !== false || strpos( get_current_screen()->id, 'yit_panel_license' ) !== false ) {
201
  wp_enqueue_script( 'yit-licence' );