Version Description
- Updated: YITH WooCommerce Ajax Product Filter
- Updated: YITH WooCommerce Review Reminder
- Updated: YITH WooCommerce Multi Vendor
Download this release
Release Info
Developer | yithemes |
Plugin | YITH Essential Kit for WooCommerce #1 |
Version | 1.1.19 |
Comparing to | |
See all releases |
Code changes from version 1.1.18 to 1.1.19
- README.txt +8 -2
- init.php +1 -1
- modules/yith-woocommerce-ajax-navigation/assets/css/frontend.css +1 -1
- modules/yith-woocommerce-ajax-navigation/assets/js/yith-wcan-frontend.js +3 -0
- modules/yith-woocommerce-ajax-navigation/assets/js/yith-wcan-frontend.min.js +6 -5
- modules/yith-woocommerce-ajax-navigation/includes/class.yith-wcan-admin.php +1 -1
- modules/yith-woocommerce-ajax-navigation/includes/class.yith-wcan-frontend.php +15 -1
- modules/yith-woocommerce-ajax-navigation/init.php +2 -2
- modules/yith-woocommerce-product-vendors/assets/css/admin.css +2 -1
- modules/yith-woocommerce-product-vendors/assets/images/33-bg.png +0 -0
- modules/yith-woocommerce-product-vendors/assets/images/33-icon.png +0 -0
- modules/yith-woocommerce-product-vendors/assets/images/33.png +0 -0
- modules/yith-woocommerce-product-vendors/assets/images/34-bg.png +0 -0
- modules/yith-woocommerce-product-vendors/assets/images/34-icon.png +0 -0
- modules/yith-woocommerce-product-vendors/assets/images/34.png +0 -0
- modules/yith-woocommerce-product-vendors/assets/images/35-bg.png +0 -0
- modules/yith-woocommerce-product-vendors/assets/images/35-icon.png +0 -0
- modules/yith-woocommerce-product-vendors/assets/images/35.png +0 -0
- modules/yith-woocommerce-product-vendors/includes/class.yith-orders.php +8 -1
- modules/yith-woocommerce-product-vendors/includes/class.yith-vendor.php +11 -1
- modules/yith-woocommerce-product-vendors/includes/class.yith-vendors-admin.php +27 -5
- modules/yith-woocommerce-product-vendors/init.php +2 -2
- modules/yith-woocommerce-product-vendors/templates/admin/add-product-vendors-taxonomy.php +1 -3
- modules/yith-woocommerce-product-vendors/templates/admin/edit-product-vendors-taxonomy.php +9 -4
- modules/yith-woocommerce-product-vendors/templates/admin/premium.php +52 -4
- modules/yith-woocommerce-review-reminder/includes/admin/class-ywrr-ajax.php +13 -4
- modules/yith-woocommerce-review-reminder/includes/class-ywrr-emails.php +2 -2
- modules/yith-woocommerce-review-reminder/includes/class-ywrr-form-handler.php +13 -1
- modules/yith-woocommerce-review-reminder/includes/class-ywrr-schedule.php +10 -5
- modules/yith-woocommerce-review-reminder/includes/emails/class-ywrr-request-email.php +3 -3
- modules/yith-woocommerce-review-reminder/init.php +8 -2
- modules/yith-woocommerce-review-reminder/templates/emails/review-request.php +3 -4
README.txt
CHANGED
@@ -4,7 +4,7 @@ Contributors: yithemes
|
|
4 |
Tags: woocommerce,jetpack,woocommerce jetpack, essential, kit, plugins, plugin, product, e-commerce, ecommerce, commerce, shop, yith, yit, yithemes,yith woocommerce colors and labels variations, colors and labels variations,colors and labels variations jetpack,yith woocommerce zoom magnifier,zoom magnifier,zoom magnifier jetpack,yith woocommerce wishlist,wishlist,wishlist jetpack,yith woocommerce compare,compare,compare jetpack,yith woocommerce ajax product filter,ajax product filter,ajax product filter jetpack,yith woocommerce ajax search,ajax search,ajax search jetpack,yith woocommerce catalog mode,catalog mode,catalog mode jetpack,yith woocommerce order tracking,order tracking,order tracking jetpack, yith woocommerce advanced reviews,advanced reviews,advanced reviews jetpack,yith woocommerce badges management,badges management,badges management jetpack,yith woocommerce cart messages,cart messages,cart messages jetpack,yith woocommerce review reminder,review reminder,review reminder jetpack,yith woocommerce quick view,quick view,quick view jetpack,yith live chat,live chat,live chat jetpack,yith woocommerce eu vat,eu vat,eu vat jetpack,yith woocommerce mailchimp,mailchimp,mailchimp jetpack,yith woocommerce stripe,stripe, stripe jetpack,yith infinite scrolling,infinite scrolling,infinite scrolling jetpack,yith woocommerce request a quote,request a quote,request a quote jetpack,yith woocommerce waiting list,waiting list,waiting list jetpack,yith woocommerce tab manager,tab manager,tab manager jetpack,yith woocommerce multi vendor,multi vendor,multi vendor jetpack,product vendor,products vendor,products vendor jetpack, booster for woocommerce
|
5 |
Requires at least: 3.5.1
|
6 |
Tested up to: 4.4
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -151,6 +151,12 @@ YITH Essential Kit for WooCommerce #1 will add a new submenu called "YITH Essent
|
|
151 |
|
152 |
== Changelog ==
|
153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
= 1.1.18 =
|
155 |
|
156 |
* Updated: All YITH plugins to latest version
|
@@ -277,4 +283,4 @@ YITH Essential Kit for WooCommerce #1 will add a new submenu called "YITH Essent
|
|
277 |
|
278 |
== Upgrade Notice ==
|
279 |
|
280 |
-
Last Stable Tag 1.1.
|
4 |
Tags: woocommerce,jetpack,woocommerce jetpack, essential, kit, plugins, plugin, product, e-commerce, ecommerce, commerce, shop, yith, yit, yithemes,yith woocommerce colors and labels variations, colors and labels variations,colors and labels variations jetpack,yith woocommerce zoom magnifier,zoom magnifier,zoom magnifier jetpack,yith woocommerce wishlist,wishlist,wishlist jetpack,yith woocommerce compare,compare,compare jetpack,yith woocommerce ajax product filter,ajax product filter,ajax product filter jetpack,yith woocommerce ajax search,ajax search,ajax search jetpack,yith woocommerce catalog mode,catalog mode,catalog mode jetpack,yith woocommerce order tracking,order tracking,order tracking jetpack, yith woocommerce advanced reviews,advanced reviews,advanced reviews jetpack,yith woocommerce badges management,badges management,badges management jetpack,yith woocommerce cart messages,cart messages,cart messages jetpack,yith woocommerce review reminder,review reminder,review reminder jetpack,yith woocommerce quick view,quick view,quick view jetpack,yith live chat,live chat,live chat jetpack,yith woocommerce eu vat,eu vat,eu vat jetpack,yith woocommerce mailchimp,mailchimp,mailchimp jetpack,yith woocommerce stripe,stripe, stripe jetpack,yith infinite scrolling,infinite scrolling,infinite scrolling jetpack,yith woocommerce request a quote,request a quote,request a quote jetpack,yith woocommerce waiting list,waiting list,waiting list jetpack,yith woocommerce tab manager,tab manager,tab manager jetpack,yith woocommerce multi vendor,multi vendor,multi vendor jetpack,product vendor,products vendor,products vendor jetpack, booster for woocommerce
|
5 |
Requires at least: 3.5.1
|
6 |
Tested up to: 4.4
|
7 |
+
Stable tag: 1.1.19
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
151 |
|
152 |
== Changelog ==
|
153 |
|
154 |
+
= 1.1.19 =
|
155 |
+
|
156 |
+
* Updated: YITH WooCommerce Ajax Product Filter
|
157 |
+
* Updated: YITH WooCommerce Review Reminder
|
158 |
+
* Updated: YITH WooCommerce Multi Vendor
|
159 |
+
|
160 |
= 1.1.18 =
|
161 |
|
162 |
* Updated: All YITH plugins to latest version
|
283 |
|
284 |
== Upgrade Notice ==
|
285 |
|
286 |
+
Last Stable Tag 1.1.19
|
init.php
CHANGED
@@ -7,7 +7,7 @@ Text Domain: yith-essential-kit-for-woocommerce-1
|
|
7 |
Domain Path: /languages/
|
8 |
Author: YIThemes
|
9 |
Author URI: http://yithemes.com/
|
10 |
-
Version: 1.1.
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
Domain Path: /languages/
|
8 |
Author: YIThemes
|
9 |
Author URI: http://yithemes.com/
|
10 |
+
Version: 1.1.19
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) {
|
modules/yith-woocommerce-ajax-navigation/assets/css/frontend.css
CHANGED
@@ -267,7 +267,7 @@ a.yith-wcan-price-link.active:before {
|
|
267 |
border-radius: 50%;
|
268 |
}
|
269 |
|
270 |
-
.woocommerce .widget_price_filter .price_slider_amount button {
|
271 |
display: none;
|
272 |
}
|
273 |
|
267 |
border-radius: 50%;
|
268 |
}
|
269 |
|
270 |
+
.yith-wcan-pro.woocommerce .widget_price_filter .price_slider_amount button {
|
271 |
display: none;
|
272 |
}
|
273 |
|
modules/yith-woocommerce-ajax-navigation/assets/js/yith-wcan-frontend.js
CHANGED
@@ -187,6 +187,9 @@ jQuery(function ($) {
|
|
187 |
$(yith_wcan.pagination).empty();
|
188 |
}
|
189 |
|
|
|
|
|
|
|
190 |
//result count
|
191 |
if ($(response).find(yith_wcan.result_count).length > 0) {
|
192 |
$(yith_wcan.result_count).html($(response).find(yith_wcan.result_count).html()).show();
|
187 |
$(yith_wcan.pagination).empty();
|
188 |
}
|
189 |
|
190 |
+
// quantity fields
|
191 |
+
$('div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)').addClass('buttons_added').append('<input type="button" value="+" class="plus" />').prepend('<input type="button" value="-" class="minus" />');
|
192 |
+
|
193 |
//result count
|
194 |
if ($(response).find(yith_wcan.result_count).length > 0) {
|
195 |
$(yith_wcan.result_count).html($(response).find(yith_wcan.result_count).html()).show();
|
modules/yith-woocommerce-ajax-navigation/assets/js/yith-wcan-frontend.min.js
CHANGED
@@ -6,8 +6,9 @@ a.isArray(n.id)&&(n.id=n.id[0].substr(1));n.tag||(n.tag="div");n.vars=[];for(b=0
|
|
6 |
2),g=g.replace(d[l],p[k][c]);f=a.merge(f,v(g,b))}return a(f)};a.jseldom=function(h){if(2==arguments.length&&a.isPlainObject(arguments[1]))return w.apply(this,[arguments[0],[arguments[1]]]);if(1==arguments.length||2==arguments.length&&!a.isArray(arguments[1]))return v.apply(this,arguments);if(2==arguments.length)return w.apply(this,arguments)};var r=!1;a.fn.yith_wcan_ajax_filters=function(h,p){h.preventDefault();var b=p.href,d=a(p),f=d.hasClass("yith-wcan-reset-navigation");if("undefined"==typeof b&&
|
7 |
d.parents().hasClass("price_slider_wrapper")){d.parents("form");var k=window.location,g=k.origin+k.pathname,l=g!=k.href,c=a(".price_slider_amount #min_price").val(),m=a(".price_slider_amount #max_price").val(),b=k.href;1==l&&(b=u(b,"min_price"),b=u(b,"max_price"));b=b+(g==b?"?":"&")+a.param({min_price:c,max_price:m})}"select"==d.data("type")&&(d.parents("div.yith-woo-ajax-navigation").find("a.yit-wcan-select-open").removeClass("active"),d.parent().find("div.yith-wcan-select-wrapper").animate({visibility:"hidden",
|
8 |
opacity:0},300));a(yith_wcan.container).html("").addClass("yith-wcan-loading");a(document).trigger("yith-wcan-ajax-loading");"undefined"!=typeof yith_wcan_frontend&&a(yith_wcan.container).css("backgroundImage","url("+yith_wcan_frontend.loader_url+")");a(yith_wcan.pagination).hide();a(yith_wcan.result_count).hide();0!=r&&(r.abort(),r=!1);r=a.ajax({url:b,success:function(c){r=!1;a(yith_wcan.container).removeClass("yith-wcan-loading");0<a(c).find(yith_wcan.container).length?a(".yit-wcan-container").html(a(c).find(yith_wcan.container)):
|
9 |
-
a(".yit-wcan-container").html(a(c).find(".woocommerce-info"));0<a(c).find(yith_wcan.pagination).length?(0==a(yith_wcan.pagination).length&&a.jseldom(yith_wcan.pagination).insertAfter(a(yith_wcan.container)),a(yith_wcan.pagination).html(a(c).find(yith_wcan.pagination).html()).show()):a(yith_wcan.pagination).empty();
|
10 |
-
a(this),d=b.attr("id");b.html(a(c).find("#"+d).html());""==b.text()?b.hide():b.show()});navigator.userAgent.match(/msie/i)||window.history.pushState({pageTitle:c.pageTitle},"",b);a(document).trigger("ready");a(document).trigger("yith-wcan-ajax-filtered");
|
11 |
-
a(document).trigger("yith-wcan-ajax-reset-filtered")}}})};a(yith_wcan.container).wrap('<div class="yit-wcan-container"></div>');a(".woocommerce-info").wrap('<div class="yit-wcan-container"></div>');a(document).trigger("yith-wcan-wrapped");a(document).on("click",
|
12 |
-
function(h){
|
13 |
-
a
|
|
6 |
2),g=g.replace(d[l],p[k][c]);f=a.merge(f,v(g,b))}return a(f)};a.jseldom=function(h){if(2==arguments.length&&a.isPlainObject(arguments[1]))return w.apply(this,[arguments[0],[arguments[1]]]);if(1==arguments.length||2==arguments.length&&!a.isArray(arguments[1]))return v.apply(this,arguments);if(2==arguments.length)return w.apply(this,arguments)};var r=!1;a.fn.yith_wcan_ajax_filters=function(h,p){h.preventDefault();var b=p.href,d=a(p),f=d.hasClass("yith-wcan-reset-navigation");if("undefined"==typeof b&&
|
7 |
d.parents().hasClass("price_slider_wrapper")){d.parents("form");var k=window.location,g=k.origin+k.pathname,l=g!=k.href,c=a(".price_slider_amount #min_price").val(),m=a(".price_slider_amount #max_price").val(),b=k.href;1==l&&(b=u(b,"min_price"),b=u(b,"max_price"));b=b+(g==b?"?":"&")+a.param({min_price:c,max_price:m})}"select"==d.data("type")&&(d.parents("div.yith-woo-ajax-navigation").find("a.yit-wcan-select-open").removeClass("active"),d.parent().find("div.yith-wcan-select-wrapper").animate({visibility:"hidden",
|
8 |
opacity:0},300));a(yith_wcan.container).html("").addClass("yith-wcan-loading");a(document).trigger("yith-wcan-ajax-loading");"undefined"!=typeof yith_wcan_frontend&&a(yith_wcan.container).css("backgroundImage","url("+yith_wcan_frontend.loader_url+")");a(yith_wcan.pagination).hide();a(yith_wcan.result_count).hide();0!=r&&(r.abort(),r=!1);r=a.ajax({url:b,success:function(c){r=!1;a(yith_wcan.container).removeClass("yith-wcan-loading");0<a(c).find(yith_wcan.container).length?a(".yit-wcan-container").html(a(c).find(yith_wcan.container)):
|
9 |
+
a(".yit-wcan-container").html(a(c).find(".woocommerce-info"));0<a(c).find(yith_wcan.pagination).length?(0==a(yith_wcan.pagination).length&&a.jseldom(yith_wcan.pagination).insertAfter(a(yith_wcan.container)),a(yith_wcan.pagination).html(a(c).find(yith_wcan.pagination).html()).show()):a(yith_wcan.pagination).empty();a("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass("buttons_added").append('<input type="button" value="+" class="plus" />').prepend('<input type="button" value="-" class="minus" />');
|
10 |
+
0<a(c).find(yith_wcan.result_count).length&&a(yith_wcan.result_count).html(a(c).find(yith_wcan.result_count).html()).show();a(".yith-woo-ajax-navigation").add(".yith-wcan-sort-by").add(".yith-wcan-stock-on-sale").add(".yith-wcan-list-price-filter").each(function(){var b=a(this),d=b.attr("id");b.html(a(c).find("#"+d).html());""==b.text()?b.hide():b.show()});navigator.userAgent.match(/msie/i)||window.history.pushState({pageTitle:c.pageTitle},"",b);a(document).trigger("ready");a(document).trigger("yith-wcan-ajax-filtered");
|
11 |
+
if(f){var d=parseInt(a(yith_wcan.wc_price_slider.min_price).data("min")),g=parseInt(a(yith_wcan.wc_price_slider.max_price).data("max"));a(yith_wcan.wc_price_slider.wrapper).slider("values",[d,g]);a(document.body).trigger("price_slider_slide",[d,g]);a(document).trigger("yith-wcan-ajax-reset-filtered")}}})};a(yith_wcan.container).wrap('<div class="yit-wcan-container"></div>');a(".woocommerce-info").wrap('<div class="yit-wcan-container"></div>');a(document).trigger("yith-wcan-wrapped");a(document).on("click",
|
12 |
+
".yith-wcan a",function(h){a(this).yith_wcan_ajax_filters(h,this)});var t=function(){a("div.yith-wcan-select-wrapper").animate({visibility:"hidden",opacity:0},0);a("a.yit-wcan-select-open").removeClass("active")};a(document).on("click","a.yit-wcan-select-open.active",function(h){h.preventDefault();a(this).parent().find("div.yith-wcan-select-wrapper").css("z-index","-1").animate({visibility:"hidden",opacity:0},300);a(this).parent().find("a.yit-wcan-select-open").removeClass("active")});a(document).on("click",
|
13 |
+
"a.yit-wcan-select-open:not(.active)",function(h){h.preventDefault();a(this).parent().find("div.yith-wcan-select-wrapper").css("z-index","1").animate({visibility:"visible",opacity:1},300);a(this).parent().find("a.yit-wcan-select-open").addClass("active")});a(document).on("ready yith-wcan-ajax-filtered",function(){a("div.yith-wcan-select-wrapper ul.yith-wcan-select li.chosen");t();a("div.yith-wcan-select-wrapper").each(function(){var h="";a(this).find("ul.yith-wcan-select li.chosen").each(function(){h+=
|
14 |
+
a(this).text()+", "});h=h.substring(0,h.length-2);""!=h&&a(this).parent().find("a.yit-wcan-select-open").text(h)})});a(document).on("ready",t);a("body").on("click",function(h){a(h.target).hasClass("yit-wcan-select-open")||t()})});
|
modules/yith-woocommerce-ajax-navigation/includes/class.yith-wcan-admin.php
CHANGED
@@ -157,7 +157,7 @@ if ( ! class_exists( 'YITH_WCAN_Admin' ) ) {
|
|
157 |
|
158 |
/* === Fixed: not updated theme === */
|
159 |
if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
160 |
-
require_once(
|
161 |
}
|
162 |
|
163 |
$this->_panel = new YIT_Plugin_Panel( $args );
|
157 |
|
158 |
/* === Fixed: not updated theme === */
|
159 |
if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
160 |
+
require_once( 'plugin-fw/lib/yit-plugin-panel-wc.php' );
|
161 |
}
|
162 |
|
163 |
$this->_panel = new YIT_Plugin_Panel( $args );
|
modules/yith-woocommerce-ajax-navigation/includes/class.yith-wcan-frontend.php
CHANGED
@@ -41,6 +41,8 @@ if ( ! class_exists( 'YITH_WCAN_Frontend' ) ) {
|
|
41 |
|
42 |
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
|
43 |
|
|
|
|
|
44 |
// YITH WCAN Loaded
|
45 |
do_action( 'yith_wcan_loaded' );
|
46 |
}
|
@@ -138,6 +140,18 @@ if ( ! class_exists( 'YITH_WCAN_Frontend' ) ) {
|
|
138 |
}
|
139 |
}
|
140 |
|
141 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
}
|
143 |
}
|
41 |
|
42 |
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
|
43 |
|
44 |
+
add_action( 'body_class', array( $this, 'body_class' ) );
|
45 |
+
|
46 |
// YITH WCAN Loaded
|
47 |
do_action( 'yith_wcan_loaded' );
|
48 |
}
|
140 |
}
|
141 |
}
|
142 |
|
143 |
+
/**
|
144 |
+
* Add a body class(es)
|
145 |
+
*
|
146 |
+
* @param $classes The classes array
|
147 |
+
*
|
148 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
149 |
+
* @since 1.0
|
150 |
+
* @return array
|
151 |
+
*/
|
152 |
+
public function body_class( $classes ) {
|
153 |
+
$classes[] = apply_filters( 'yith_wcan_body_class', 'yith-wcan-free' );
|
154 |
+
return $classes;
|
155 |
+
}
|
156 |
}
|
157 |
}
|
modules/yith-woocommerce-ajax-navigation/init.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: YITH WooCommerce Ajax Product Filter
|
4 |
* Plugin URI: http://yithemes.com/
|
5 |
* Description: YITH WooCommerce Ajax Product Filter offers the perfect way to filter all the products of your shop.
|
6 |
-
* Version: 2.7.
|
7 |
* Author: yithemes
|
8 |
* Author URI: http://yithemes.com/
|
9 |
* Text Domain: yith_wc_ajxnav
|
@@ -64,7 +64,7 @@ load_plugin_textdomain( 'yith-woocommerce-ajax-navigation', false, dirname( plug
|
|
64 |
! defined( 'YITH_WCAN' ) && define( 'YITH_WCAN', true );
|
65 |
! defined( 'YITH_WCAN_URL' ) && define( 'YITH_WCAN_URL', plugin_dir_url( __FILE__ ) );
|
66 |
! defined( 'YITH_WCAN_DIR' ) && define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
|
67 |
-
! defined( 'YITH_WCAN_VERSION' ) && define( 'YITH_WCAN_VERSION', '2.7.
|
68 |
! defined( 'YITH_WCAN_FREE_INIT') && define( 'YITH_WCAN_FREE_INIT', plugin_basename( __FILE__ ) );
|
69 |
! defined( 'YITH_WCAN_FILE' ) && define( 'YITH_WCAN_FILE', __FILE__ );
|
70 |
|
3 |
* Plugin Name: YITH WooCommerce Ajax Product Filter
|
4 |
* Plugin URI: http://yithemes.com/
|
5 |
* Description: YITH WooCommerce Ajax Product Filter offers the perfect way to filter all the products of your shop.
|
6 |
+
* Version: 2.7.6
|
7 |
* Author: yithemes
|
8 |
* Author URI: http://yithemes.com/
|
9 |
* Text Domain: yith_wc_ajxnav
|
64 |
! defined( 'YITH_WCAN' ) && define( 'YITH_WCAN', true );
|
65 |
! defined( 'YITH_WCAN_URL' ) && define( 'YITH_WCAN_URL', plugin_dir_url( __FILE__ ) );
|
66 |
! defined( 'YITH_WCAN_DIR' ) && define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
|
67 |
+
! defined( 'YITH_WCAN_VERSION' ) && define( 'YITH_WCAN_VERSION', '2.7.6' );
|
68 |
! defined( 'YITH_WCAN_FREE_INIT') && define( 'YITH_WCAN_FREE_INIT', plugin_basename( __FILE__ ) );
|
69 |
! defined( 'YITH_WCAN_FILE' ) && define( 'YITH_WCAN_FILE', __FILE__ );
|
70 |
|
modules/yith-woocommerce-product-vendors/assets/css/admin.css
CHANGED
@@ -10,7 +10,8 @@
|
|
10 |
}
|
11 |
|
12 |
label.yith_vendor_enable_selling_label,
|
13 |
-
label.yith_vendor_skip_revision_label
|
|
|
14 |
display: inline;
|
15 |
}
|
16 |
|
10 |
}
|
11 |
|
12 |
label.yith_vendor_enable_selling_label,
|
13 |
+
label.yith_vendor_skip_revision_label,
|
14 |
+
label.yith_vendor_enable_featured_products_label {
|
15 |
display: inline;
|
16 |
}
|
17 |
|
modules/yith-woocommerce-product-vendors/assets/images/33-bg.png
ADDED
Binary file
|
modules/yith-woocommerce-product-vendors/assets/images/33-icon.png
ADDED
Binary file
|
modules/yith-woocommerce-product-vendors/assets/images/33.png
ADDED
Binary file
|
modules/yith-woocommerce-product-vendors/assets/images/34-bg.png
ADDED
Binary file
|
modules/yith-woocommerce-product-vendors/assets/images/34-icon.png
ADDED
Binary file
|
modules/yith-woocommerce-product-vendors/assets/images/34.png
ADDED
Binary file
|
modules/yith-woocommerce-product-vendors/assets/images/35-bg.png
ADDED
Binary file
|
modules/yith-woocommerce-product-vendors/assets/images/35-icon.png
ADDED
Binary file
|
modules/yith-woocommerce-product-vendors/assets/images/35.png
ADDED
Binary file
|
modules/yith-woocommerce-product-vendors/includes/class.yith-orders.php
CHANGED
@@ -1261,7 +1261,14 @@ if ( ! class_exists ( 'YITH_Orders' ) ) {
|
|
1261 |
* Check for new order email
|
1262 |
*/
|
1263 |
public function woocommerce_email_enabled_new_order ( $enabled, $object ) {
|
1264 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1265 |
}
|
1266 |
|
1267 |
/**
|
1261 |
* Check for new order email
|
1262 |
*/
|
1263 |
public function woocommerce_email_enabled_new_order ( $enabled, $object ) {
|
1264 |
+
$is_editpost_action = ! empty( $_POST['action'] ) && 'editpost' == $_POST['action'];
|
1265 |
+
if( $is_editpost_action ){
|
1266 |
+
$vendor = yith_get_vendor( 'current', 'user' );
|
1267 |
+
if( $vendor->is_valid() && $vendor->has_limited_access() ){
|
1268 |
+
return $enabled;
|
1269 |
+
}
|
1270 |
+
}
|
1271 |
+
return $enabled && is_a ( $object, 'WC_Order' ) && wp_get_post_parent_id ( $object->id ) != 0 && ! $is_editpost_action ? false : $enabled;
|
1272 |
}
|
1273 |
|
1274 |
/**
|
modules/yith-woocommerce-product-vendors/includes/class.yith-vendor.php
CHANGED
@@ -36,6 +36,8 @@ if ( ! class_exists ( 'YITH_Vendor' ) ) {
|
|
36 |
* @property string $show_gravatar
|
37 |
* @property int|string $commission
|
38 |
* @property string $vat
|
|
|
|
|
39 |
*/
|
40 |
class YITH_Vendor {
|
41 |
|
@@ -302,7 +304,11 @@ if ( ! class_exists ( 'YITH_Vendor' ) ) {
|
|
302 |
$term_properties = array ();
|
303 |
|
304 |
foreach ( $this->_changed as $property => $value ) {
|
305 |
-
|
|
|
|
|
|
|
|
|
306 |
if ( in_array ( $property, array ( 'name', 'slug', 'description' ) ) ) {
|
307 |
$term_properties[ $property ] = $value;
|
308 |
} else {
|
@@ -734,6 +740,10 @@ if ( ! class_exists ( 'YITH_Vendor' ) ) {
|
|
734 |
public function is_on_vacation () {
|
735 |
return function_exists ( 'YITH_Vendor_Vacation' ) ? YITH_Vendor_Vacation ()->vendor_is_on_vacation ( $this ) : false;
|
736 |
}
|
|
|
|
|
|
|
|
|
737 |
}
|
738 |
}
|
739 |
|
36 |
* @property string $show_gravatar
|
37 |
* @property int|string $commission
|
38 |
* @property string $vat
|
39 |
+
* @property string $featured_products
|
40 |
+
*
|
41 |
*/
|
42 |
class YITH_Vendor {
|
43 |
|
304 |
$term_properties = array ();
|
305 |
|
306 |
foreach ( $this->_changed as $property => $value ) {
|
307 |
+
|
308 |
+
if( $property != 'description' ){
|
309 |
+
$value = ! is_array ( $value ) ? wc_clean ( $value ) : $value;
|
310 |
+
}
|
311 |
+
|
312 |
if ( in_array ( $property, array ( 'name', 'slug', 'description' ) ) ) {
|
313 |
$term_properties[ $property ] = $value;
|
314 |
} else {
|
740 |
public function is_on_vacation () {
|
741 |
return function_exists ( 'YITH_Vendor_Vacation' ) ? YITH_Vendor_Vacation ()->vendor_is_on_vacation ( $this ) : false;
|
742 |
}
|
743 |
+
|
744 |
+
public function featured_products_management(){
|
745 |
+
return ! empty( $this->featured_products ) ? $this->featured_products : get_option( 'yith_wpv_vendors_option_featured_management', 'no' );
|
746 |
+
}
|
747 |
}
|
748 |
}
|
749 |
|
modules/yith-woocommerce-product-vendors/includes/class.yith-vendors-admin.php
CHANGED
@@ -477,13 +477,14 @@ if ( !class_exists( 'YITH_Vendors_Admin' ) ) {
|
|
477 |
$owner = get_userdata( $vendor->get_owner() );
|
478 |
$owner_display = $owner instanceof WP_User ? $owner->display_name . '(#' . $owner->ID . ' - ' . $owner->user_email . ')' : '';
|
479 |
$vendor_owner = ! empty( $owner_display ) ? esc_html( $owner->display_name ) . ' (#' . absint( $owner->ID ) . ' – ' . esc_html( $owner->user_email ) . ')' : '';
|
|
|
480 |
|
481 |
$args = apply_filters( 'yith_edit_taxonomy_args', array(
|
482 |
-
'owner_id' => $
|
483 |
'owner' => $vendor_owner,
|
484 |
'vendor_admins' => array(
|
485 |
'selected' => $this->format_vendor_admins_for_select2( $vendor ),
|
486 |
-
'value' => implode( ',', array_diff( $vendor->get_admins(), array( $
|
487 |
),
|
488 |
'vendor' => $vendor
|
489 |
) );
|
@@ -585,7 +586,13 @@ if ( !class_exists( 'YITH_Vendors_Admin' ) ) {
|
|
585 |
|
586 |
// set values
|
587 |
foreach ( $post_value as $key => $value ) {
|
588 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
}
|
590 |
|
591 |
// add vendor registrantion date
|
@@ -607,19 +614,34 @@ if ( !class_exists( 'YITH_Vendors_Admin' ) ) {
|
|
607 |
}
|
608 |
|
609 |
// Remove current owner and update it
|
610 |
-
if ( !empty( $post_value['owner'] ) && $owner != $post_value['owner'] ) {
|
611 |
delete_user_meta( $owner, $usermeta_owner );
|
612 |
update_user_meta( intval( $post_value['owner'] ), $usermeta_owner, $vendor->id );
|
613 |
$owner = intval( $post_value['owner'] );
|
614 |
}
|
615 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
616 |
//Add Vendor Owner
|
617 |
if ( ! isset( $post_value['admins'] ) ) {
|
618 |
$post_value['admins'] = array( $owner );
|
619 |
} else {
|
620 |
$temp_admins = $post_value['admins'];
|
621 |
$post_value['admins'] = explode( ',', $temp_admins );
|
622 |
-
|
|
|
|
|
|
|
|
|
623 |
}
|
624 |
|
625 |
// Only add selected admins
|
477 |
$owner = get_userdata( $vendor->get_owner() );
|
478 |
$owner_display = $owner instanceof WP_User ? $owner->display_name . '(#' . $owner->ID . ' - ' . $owner->user_email . ')' : '';
|
479 |
$vendor_owner = ! empty( $owner_display ) ? esc_html( $owner->display_name ) . ' (#' . absint( $owner->ID ) . ' – ' . esc_html( $owner->user_email ) . ')' : '';
|
480 |
+
$owner_id = $owner instanceof WP_User ? $owner->ID : '';
|
481 |
|
482 |
$args = apply_filters( 'yith_edit_taxonomy_args', array(
|
483 |
+
'owner_id' => $owner_id,
|
484 |
'owner' => $vendor_owner,
|
485 |
'vendor_admins' => array(
|
486 |
'selected' => $this->format_vendor_admins_for_select2( $vendor ),
|
487 |
+
'value' => implode( ',', array_diff( $vendor->get_admins(), array( $owner_id ) ) )
|
488 |
),
|
489 |
'vendor' => $vendor
|
490 |
) );
|
586 |
|
587 |
// set values
|
588 |
foreach ( $post_value as $key => $value ) {
|
589 |
+
if( $key == 'description' ){
|
590 |
+
$vendor->$key = $value;
|
591 |
+
}
|
592 |
+
|
593 |
+
else {
|
594 |
+
$vendor->$key = !is_array( $value ) ? wc_clean( $value ) : $value;
|
595 |
+
}
|
596 |
}
|
597 |
|
598 |
// add vendor registrantion date
|
614 |
}
|
615 |
|
616 |
// Remove current owner and update it
|
617 |
+
if ( ! empty( $post_value['owner'] ) && $owner != $post_value['owner'] ) {
|
618 |
delete_user_meta( $owner, $usermeta_owner );
|
619 |
update_user_meta( intval( $post_value['owner'] ), $usermeta_owner, $vendor->id );
|
620 |
$owner = intval( $post_value['owner'] );
|
621 |
}
|
622 |
|
623 |
+
elseif( empty( $post_value['owner'] ) ) {
|
624 |
+
delete_user_meta( $owner, $usermeta_owner );
|
625 |
+
delete_user_meta( $owner, $usermeta_admin );
|
626 |
+
$user = get_user_by( 'id', $user_id );
|
627 |
+
if ( $user instanceof WP_User ) {
|
628 |
+
$user->remove_role( YITH_Vendors()->get_role_name() );
|
629 |
+
$user->add_role( 'customer' );
|
630 |
+
}
|
631 |
+
$owner = '';
|
632 |
+
}
|
633 |
+
|
634 |
//Add Vendor Owner
|
635 |
if ( ! isset( $post_value['admins'] ) ) {
|
636 |
$post_value['admins'] = array( $owner );
|
637 |
} else {
|
638 |
$temp_admins = $post_value['admins'];
|
639 |
$post_value['admins'] = explode( ',', $temp_admins );
|
640 |
+
|
641 |
+
if( ! empty( $owner ) ){
|
642 |
+
$post_value['admins'][] = $owner;
|
643 |
+
}
|
644 |
+
|
645 |
}
|
646 |
|
647 |
// Only add selected admins
|
modules/yith-woocommerce-product-vendors/init.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://yithemes.com/themes/plugins/yith-woocommerce-product-vendors/
|
|
5 |
Description: YITH WooCommerce Multi Vendor is a plugin explicitly developed to switch your website into a platform hosting more than one shop.
|
6 |
Author: yithemes
|
7 |
Text Domain: yith_wc_product_vendors
|
8 |
-
Version: 1.9.
|
9 |
Author URI: http://yithemes.com/
|
10 |
*/
|
11 |
|
@@ -46,7 +46,7 @@ if ( ! function_exists( 'WC' ) ) {
|
|
46 |
if ( defined( 'YITH_WPV_VERSION' ) ) {
|
47 |
return;
|
48 |
} else {
|
49 |
-
define( 'YITH_WPV_VERSION', '1.9.
|
50 |
}
|
51 |
|
52 |
if ( ! defined( 'YITH_WPV_DB_VERSION' ) ) {
|
5 |
Description: YITH WooCommerce Multi Vendor is a plugin explicitly developed to switch your website into a platform hosting more than one shop.
|
6 |
Author: yithemes
|
7 |
Text Domain: yith_wc_product_vendors
|
8 |
+
Version: 1.9.2
|
9 |
Author URI: http://yithemes.com/
|
10 |
*/
|
11 |
|
46 |
if ( defined( 'YITH_WPV_VERSION' ) ) {
|
47 |
return;
|
48 |
} else {
|
49 |
+
define( 'YITH_WPV_VERSION', '1.9.2' );
|
50 |
}
|
51 |
|
52 |
if ( ! defined( 'YITH_WPV_DB_VERSION' ) ) {
|
modules/yith-woocommerce-product-vendors/templates/admin/add-product-vendors-taxonomy.php
CHANGED
@@ -10,9 +10,7 @@
|
|
10 |
?>
|
11 |
<div class="form-field yith-choosen">
|
12 |
<label for="yith_vendor_owner"><?php _e( 'Vendor Shop Owner', 'yith_wc_product_vendors' ); ?></label>
|
13 |
-
<
|
14 |
-
<option></option>
|
15 |
-
</select>
|
16 |
<br />
|
17 |
<span class="description"><?php _e( 'User that can manage products in this vendor shop and view sale reports.', 'yith_wc_product_vendors' ); ?></span>
|
18 |
</div>
|
10 |
?>
|
11 |
<div class="form-field yith-choosen">
|
12 |
<label for="yith_vendor_owner"><?php _e( 'Vendor Shop Owner', 'yith_wc_product_vendors' ); ?></label>
|
13 |
+
<input type="hidden" class="wc-customer-search" id="key_user" name="yith_vendor_data[owner]" data-placeholder="<?php esc_attr_e( 'Search for a customer…', 'woocommerce' ); ?>" data-allow_clear="true" />
|
|
|
|
|
14 |
<br />
|
15 |
<span class="description"><?php _e( 'User that can manage products in this vendor shop and view sale reports.', 'yith_wc_product_vendors' ); ?></span>
|
16 |
</div>
|
modules/yith-woocommerce-product-vendors/templates/admin/edit-product-vendors-taxonomy.php
CHANGED
@@ -10,12 +10,17 @@
|
|
10 |
?>
|
11 |
<tr class="form-field yith-choosen">
|
12 |
<th scope="row" valign="top">
|
13 |
-
<label for="
|
14 |
</th>
|
15 |
<td>
|
16 |
-
<
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
19 |
<br />
|
20 |
<span class="description"><?php _e( 'User that can manage products in this shop and view sale reports.', 'yith_wc_product_vendors' ); ?></span>
|
21 |
</td>
|
10 |
?>
|
11 |
<tr class="form-field yith-choosen">
|
12 |
<th scope="row" valign="top">
|
13 |
+
<label for="key_user"><?php _e( 'Vendor Shop Owner', 'yith_wc_product_vendors' ); ?></label>
|
14 |
</th>
|
15 |
<td>
|
16 |
+
<input type="hidden"
|
17 |
+
class="wc-customer-search"
|
18 |
+
id="key_user"
|
19 |
+
name="yith_vendor_data[owner]"
|
20 |
+
data-placeholder="<?php esc_attr_e( 'Search for a shop owner…', 'yith_wc_product_vendors' ); ?>"
|
21 |
+
data-selected="<?php echo esc_attr( $owner ); ?>"
|
22 |
+
value="<?php echo esc_attr( $owner_id ); ?>"
|
23 |
+
data-allow_clear="true" />
|
24 |
<br />
|
25 |
<span class="description"><?php _e( 'User that can manage products in this shop and view sale reports.', 'yith_wc_product_vendors' ); ?></span>
|
26 |
</td>
|
modules/yith-woocommerce-product-vendors/templates/admin/premium.php
CHANGED
@@ -300,7 +300,7 @@
|
|
300 |
<h2><?php _e('Direct product sale','yith_wc_product_vendors');?></h2>
|
301 |
</div>
|
302 |
<p>
|
303 |
-
<?php echo sprintf( __( 'Thanks to the %s
|
304 |
</p>
|
305 |
</div>
|
306 |
</div>
|
@@ -382,7 +382,7 @@
|
|
382 |
<h2><?php _e('COUPON CREATION','yith_wc_product_vendors');?></h2>
|
383 |
</div>
|
384 |
<p>
|
385 |
-
<?php echo sprintf( __('With the option %s
|
386 |
</p>
|
387 |
</div>
|
388 |
<div class="col-1">
|
@@ -402,7 +402,7 @@
|
|
402 |
<h2><?php _e('REVIEWS','yith_wc_product_vendors');?></h2>
|
403 |
</div>
|
404 |
<p>
|
405 |
-
<?php echo sprintf( __(' Just like coupons, this option is tailored on the need to manage reviews and it has been added to the premium version of the plugin. Activating the %s
|
406 |
</p>
|
407 |
</div>
|
408 |
</div>
|
@@ -536,7 +536,7 @@
|
|
536 |
<h2><?php _e('RESTRICTED NUMBER OF PRODUCTS','yith_wc_product_vendors');?></h2>
|
537 |
</div>
|
538 |
<p>
|
539 |
-
<?php _e( 'The option
|
540 |
</p>
|
541 |
</div>
|
542 |
</div>
|
@@ -784,6 +784,54 @@
|
|
784 |
</div>
|
785 |
</div>
|
786 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
787 |
|
788 |
<div class="section section-cta section-odd">
|
789 |
<div class="landing-container">
|
300 |
<h2><?php _e('Direct product sale','yith_wc_product_vendors');?></h2>
|
301 |
</div>
|
302 |
<p>
|
303 |
+
<?php echo sprintf( __( 'Thanks to the %s"Skip Admin review"%s option, vendors can publish new products without the store administrator approval. This option can be applied to all the vendor shops, or just to the selected ones.', 'yith_wc_product_vendors' ), '<b>', '</b>');?>
|
304 |
</p>
|
305 |
</div>
|
306 |
</div>
|
382 |
<h2><?php _e('COUPON CREATION','yith_wc_product_vendors');?></h2>
|
383 |
</div>
|
384 |
<p>
|
385 |
+
<?php echo sprintf( __('With the option %s "Enable coupon management" %s, the vendors of your shop can create coupons regarding the products they own. A nice innovation to offer to your vendor-users.','yith_wc_product_vendors'),'<b>','</b>' );?>
|
386 |
</p>
|
387 |
</div>
|
388 |
<div class="col-1">
|
402 |
<h2><?php _e('REVIEWS','yith_wc_product_vendors');?></h2>
|
403 |
</div>
|
404 |
<p>
|
405 |
+
<?php echo sprintf( __(' Just like coupons, this option is tailored on the need to manage reviews and it has been added to the premium version of the plugin. Activating the %s"Enable review management"%s option from the option panel of the plugin, vendors will be free to manage the reviews of the products they own, and act with the same privileges of the administrator of the store.','yith_wc_product_vendors'),'<b>','</b>' )?>
|
406 |
</p>
|
407 |
</div>
|
408 |
</div>
|
536 |
<h2><?php _e('RESTRICTED NUMBER OF PRODUCTS','yith_wc_product_vendors');?></h2>
|
537 |
</div>
|
538 |
<p>
|
539 |
+
<?php _e( 'The option "Enable product amount limit" has been conceived to whoever would like to limit the creation of products of the shop vendors, with the freedom to indicate a specific maximum number of products that each vendor can create.','yith_wc_product_vendors' );?>
|
540 |
</p>
|
541 |
</div>
|
542 |
</div>
|
784 |
</div>
|
785 |
</div>
|
786 |
</div>
|
787 |
+
<div class="section section-odd clear" style="background: url(<?php echo YITH_WPV_URL ?>assets/images/33-bg.png) no-repeat #f1f1f1; background-position: 15% 100%">
|
788 |
+
<div class="landing-container">
|
789 |
+
<div class="col-2">
|
790 |
+
<div class="section-title">
|
791 |
+
<img src="<?php echo YITH_WPV_URL ?>assets/images/33-icon.png" alt="Icon"/>
|
792 |
+
<h2><?php _e('LEGAL NOTES','yith_wc_product_vendors');?></h2>
|
793 |
+
</div>
|
794 |
+
<p>
|
795 |
+
<?php _e( 'Each vendor of your shop can insert important legal notes in their reserved area, which will be shown with the other profile information in vendor detail page.','yith_wc_product_vendors' )?>
|
796 |
+
</p>
|
797 |
+
</div>
|
798 |
+
<div class="col-1">
|
799 |
+
<img src="<?php echo YITH_WPV_URL ?>assets/images/33.png" alt="Screenshot"/>
|
800 |
+
</div>
|
801 |
+
</div>
|
802 |
+
</div>
|
803 |
+
<div class="section section-even clear"style="background: url(<?php echo YITH_WPV_URL ?>assets/images/34-bg.png) no-repeat #fff; background-position: 85% 100%">
|
804 |
+
<div class="landing-container">
|
805 |
+
<div class="col-1">
|
806 |
+
<img src="<?php echo YITH_WPV_URL ?>assets/images/34.png" alt="Screenshot"/>
|
807 |
+
</div>
|
808 |
+
<div class="col-2">
|
809 |
+
<div class="section-title">
|
810 |
+
<img src="<?php echo YITH_WPV_URL ?>assets/images/34-icon.png" alt="icon"/>
|
811 |
+
<h2><?php _e('IBAN/BIC','yith_wc_product_vendors'); ?></h2>
|
812 |
+
</div>
|
813 |
+
<p>
|
814 |
+
<?php _e( 'By giving your users the possibility to add their IBAN/BIC code, it will be much easier to pay their commissions by bank transfer when requested. ','yith_wc_product_vendors' )?>
|
815 |
+
</p>
|
816 |
+
</div>
|
817 |
+
</div>
|
818 |
+
</div>
|
819 |
+
<div class="section section-odd clear" style="background: url(<?php echo YITH_WPV_URL ?>assets/images/35-bg.png) no-repeat #f1f1f1; background-position: 15% 100%">
|
820 |
+
<div class="landing-container">
|
821 |
+
<div class="col-2">
|
822 |
+
<div class="section-title">
|
823 |
+
<img src="<?php echo YITH_WPV_URL ?>assets/images/35-icon.png" alt="Icon"/>
|
824 |
+
<h2><?php _e('TERMS AND CONDITIONS','yith_wc_product_vendors');?></h2>
|
825 |
+
</div>
|
826 |
+
<p>
|
827 |
+
<?php _e( 'Ask to users who wish to become vendors in your shop, to accept "terms and conditions" during their registration, which, in case of non-acceptance, could not be completed.','yith_wc_product_vendors' )?>
|
828 |
+
</p>
|
829 |
+
</div>
|
830 |
+
<div class="col-1">
|
831 |
+
<img src="<?php echo YITH_WPV_URL ?>assets/images/35.png" alt="Screenshot"/>
|
832 |
+
</div>
|
833 |
+
</div>
|
834 |
+
</div>
|
835 |
|
836 |
<div class="section section-cta section-odd">
|
837 |
<div class="landing-container">
|
modules/yith-woocommerce-review-reminder/includes/admin/class-ywrr-ajax.php
CHANGED
@@ -80,11 +80,20 @@ if ( !class_exists( 'YWRR_Ajax' ) ) {
|
|
80 |
|
81 |
try {
|
82 |
|
83 |
-
$wc_email
|
84 |
-
$email
|
85 |
-
$email->trigger( 0, $test_items, $days, $test_email, $template );
|
86 |
|
87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
} catch ( Exception $e ) {
|
90 |
|
80 |
|
81 |
try {
|
82 |
|
83 |
+
$wc_email = WC_Emails::instance();
|
84 |
+
$email = $wc_email->emails['YWRR_Request_Mail'];
|
85 |
+
$email_result = $email->trigger( 0, $test_items, $days, $test_email, $template );
|
86 |
|
87 |
+
if ( !$email_result ) {
|
88 |
+
|
89 |
+
wp_send_json( array( 'error' => __( 'There was an error while sending the email', 'yith-woocommerce-review-reminder' ) ) );
|
90 |
+
|
91 |
+
}
|
92 |
+
else {
|
93 |
+
|
94 |
+
wp_send_json( true );
|
95 |
+
|
96 |
+
}
|
97 |
|
98 |
} catch ( Exception $e ) {
|
99 |
|
modules/yith-woocommerce-review-reminder/includes/class-ywrr-emails.php
CHANGED
@@ -72,7 +72,7 @@ if ( !class_exists( 'YWRR_Emails' ) ) {
|
|
72 |
* @param $items_to_review
|
73 |
* @param $stored_items
|
74 |
*
|
75 |
-
* @return
|
76 |
* @author Alberto Ruggiero
|
77 |
*/
|
78 |
public function send_email( $order_id, $days, $items_to_review = array(), $stored_items = array() ) {
|
@@ -109,7 +109,7 @@ if ( !class_exists( 'YWRR_Emails' ) ) {
|
|
109 |
$wc_email = WC_Emails::instance();
|
110 |
$email = $wc_email->emails['YWRR_Request_Mail'];
|
111 |
|
112 |
-
$email->trigger( $order_id, $list, $days );
|
113 |
|
114 |
}
|
115 |
|
72 |
* @param $items_to_review
|
73 |
* @param $stored_items
|
74 |
*
|
75 |
+
* @return bool
|
76 |
* @author Alberto Ruggiero
|
77 |
*/
|
78 |
public function send_email( $order_id, $days, $items_to_review = array(), $stored_items = array() ) {
|
109 |
$wc_email = WC_Emails::instance();
|
110 |
$email = $wc_email->emails['YWRR_Request_Mail'];
|
111 |
|
112 |
+
return $email->trigger( $order_id, $list, $days );
|
113 |
|
114 |
}
|
115 |
|
modules/yith-woocommerce-review-reminder/includes/class-ywrr-form-handler.php
CHANGED
@@ -91,7 +91,19 @@ if ( !class_exists( 'YWRR_Form_Handler' ) ) {
|
|
91 |
$wc_email = WC_Emails::instance();
|
92 |
$email = $wc_email->emails['YWRR_Unsubscribe_Mail'];
|
93 |
|
94 |
-
$email->trigger( $customer_email );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
|
96 |
wc_add_notice( __( 'An email has been sent with your request', 'yith-woocommerce-review-reminder' ) );
|
97 |
wp_safe_redirect( get_permalink( get_option( 'ywrr_unsubscribe_page_id' ) ) );
|
91 |
$wc_email = WC_Emails::instance();
|
92 |
$email = $wc_email->emails['YWRR_Unsubscribe_Mail'];
|
93 |
|
94 |
+
$email_result = $email->trigger( $customer_email );
|
95 |
+
|
96 |
+
if ( !$email_result ) {
|
97 |
+
|
98 |
+
wc_add_notice( __( 'There was an error while sending the email', 'yith-woocommerce-review-reminder' ), 'error' );
|
99 |
+
|
100 |
+
}
|
101 |
+
else {
|
102 |
+
|
103 |
+
wc_add_notice( __( 'An email has been sent with your request', 'yith-woocommerce-review-reminder' ) );
|
104 |
+
wp_safe_redirect( get_permalink( get_option( 'ywrr_unsubscribe_page_id' ) ) );
|
105 |
+
|
106 |
+
}
|
107 |
|
108 |
wc_add_notice( __( 'An email has been sent with your request', 'yith-woocommerce-review-reminder' ) );
|
109 |
wp_safe_redirect( get_permalink( get_option( 'ywrr_unsubscribe_page_id' ) ) );
|
modules/yith-woocommerce-review-reminder/includes/class-ywrr-schedule.php
CHANGED
@@ -178,12 +178,17 @@ if ( !class_exists( 'YWRR_Schedule' ) ) {
|
|
178 |
foreach ( $orders as $item ) {
|
179 |
$list = maybe_unserialize( $item->request_items );
|
180 |
|
181 |
-
$today
|
182 |
-
$pay_date
|
183 |
-
$days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
|
185 |
-
YWRR_Emails()->send_email( $item->order_id, $days->days, array(), $list );
|
186 |
-
$this->change_schedule_status( $item->order_id, 'sent' );
|
187 |
}
|
188 |
|
189 |
}
|
178 |
foreach ( $orders as $item ) {
|
179 |
$list = maybe_unserialize( $item->request_items );
|
180 |
|
181 |
+
$today = new DateTime( current_time( 'mysql' ) );
|
182 |
+
$pay_date = new DateTime( $item->order_date );
|
183 |
+
$days = $pay_date->diff( $today );
|
184 |
+
$email_result = YWRR_Emails()->send_email( $item->order_id, $days->days, array(), $list );
|
185 |
+
|
186 |
+
if ( $email_result ) {
|
187 |
+
|
188 |
+
$this->change_schedule_status( $item->order_id, 'sent' );
|
189 |
+
|
190 |
+
}
|
191 |
|
|
|
|
|
192 |
}
|
193 |
|
194 |
}
|
modules/yith-woocommerce-review-reminder/includes/emails/class-ywrr-request-email.php
CHANGED
@@ -77,7 +77,7 @@ if ( !class_exists( 'YWRR_Request_Mail' ) ) {
|
|
77 |
* @param $test_email
|
78 |
* @param $template
|
79 |
*
|
80 |
-
* @return
|
81 |
* @author Alberto Ruggiero
|
82 |
*/
|
83 |
public function trigger( $order_id, $item_list, $days_ago, $test_email = '', $template = false ) {
|
@@ -108,10 +108,10 @@ if ( !class_exists( 'YWRR_Request_Mail' ) ) {
|
|
108 |
}
|
109 |
|
110 |
if ( !$this->get_recipient() ) {
|
111 |
-
return;
|
112 |
}
|
113 |
|
114 |
-
$this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), "" );
|
115 |
}
|
116 |
|
117 |
/**
|
77 |
* @param $test_email
|
78 |
* @param $template
|
79 |
*
|
80 |
+
* @return bool
|
81 |
* @author Alberto Ruggiero
|
82 |
*/
|
83 |
public function trigger( $order_id, $item_list, $days_ago, $test_email = '', $template = false ) {
|
108 |
}
|
109 |
|
110 |
if ( !$this->get_recipient() ) {
|
111 |
+
return false;
|
112 |
}
|
113 |
|
114 |
+
return $this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), "" );
|
115 |
}
|
116 |
|
117 |
/**
|
modules/yith-woocommerce-review-reminder/init.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://yithemes.com/themes/plugins/yith-woocommerce-review-reminder
|
|
5 |
Description: Send a review reminder to the customers over WooCommerce.
|
6 |
Author: Yithemes
|
7 |
Text Domain: yith-woocommerce-review-reminder
|
8 |
-
Version: 1.1.
|
9 |
Author URI: http://yithemes.com/
|
10 |
*/
|
11 |
|
@@ -34,7 +34,7 @@ function ywrr_install_free_admin_notice() {
|
|
34 |
}
|
35 |
|
36 |
if ( !defined( 'YWRR_VERSION' ) ) {
|
37 |
-
define( 'YWRR_VERSION', '1.1.
|
38 |
}
|
39 |
|
40 |
if ( !defined( 'YWRR_FREE_INIT' ) ) {
|
@@ -61,6 +61,12 @@ if ( !defined( 'YWRR_TEMPLATE_PATH' ) ) {
|
|
61 |
define( 'YWRR_TEMPLATE_PATH', YWRR_DIR . 'templates/' );
|
62 |
}
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
function ywrr_init() {
|
65 |
|
66 |
/* Load YWRR text domain */
|
5 |
Description: Send a review reminder to the customers over WooCommerce.
|
6 |
Author: Yithemes
|
7 |
Text Domain: yith-woocommerce-review-reminder
|
8 |
+
Version: 1.1.6
|
9 |
Author URI: http://yithemes.com/
|
10 |
*/
|
11 |
|
34 |
}
|
35 |
|
36 |
if ( !defined( 'YWRR_VERSION' ) ) {
|
37 |
+
define( 'YWRR_VERSION', '1.1.6' );
|
38 |
}
|
39 |
|
40 |
if ( !defined( 'YWRR_FREE_INIT' ) ) {
|
61 |
define( 'YWRR_TEMPLATE_PATH', YWRR_DIR . 'templates/' );
|
62 |
}
|
63 |
|
64 |
+
/* Plugin Framework Version Check */
|
65 |
+
if ( !function_exists( 'yit_maybe_plugin_fw_loader' ) && file_exists( YWRR_DIR . 'plugin-fw/init.php' ) ) {
|
66 |
+
require_once( YWRR_DIR . 'plugin-fw/init.php' );
|
67 |
+
}
|
68 |
+
yit_maybe_plugin_fw_loader( YWRR_DIR );
|
69 |
+
|
70 |
function ywrr_init() {
|
71 |
|
72 |
/* Load YWRR text domain */
|
modules/yith-woocommerce-review-reminder/templates/emails/review-request.php
CHANGED
@@ -20,7 +20,6 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
20 |
* @since 1.0.0
|
21 |
* @author Your Inspiration Themes
|
22 |
*/
|
23 |
-
global $YWRR_Review_Reminder;
|
24 |
|
25 |
if ( !$order ) {
|
26 |
|
@@ -52,7 +51,7 @@ $query_args = array(
|
|
52 |
$unsubscribe = esc_url( add_query_arg( $query_args, get_permalink( get_option( 'ywrr_unsubscribe_page_id' ) ) ) );
|
53 |
|
54 |
|
55 |
-
$review_list =
|
56 |
|
57 |
$find = array(
|
58 |
'{customer_name}',
|
@@ -82,7 +81,7 @@ $mail_body = str_replace( $find, $replace, apply_filters( 'wpml_translate_single
|
|
82 |
|
83 |
if ( defined( 'YITH_WCET_PREMIUM' ) && get_option( 'ywrr_mail_template_enable' ) == 'yes' ) {
|
84 |
|
85 |
-
do_action( '
|
86 |
|
87 |
}
|
88 |
else {
|
@@ -99,7 +98,7 @@ else {
|
|
99 |
|
100 |
if ( defined( 'YITH_WCET_PREMIUM' ) && get_option( 'ywrr_mail_template_enable' ) == 'yes' ) {
|
101 |
|
102 |
-
do_action( '
|
103 |
|
104 |
}
|
105 |
else {
|
20 |
* @since 1.0.0
|
21 |
* @author Your Inspiration Themes
|
22 |
*/
|
|
|
23 |
|
24 |
if ( !$order ) {
|
25 |
|
51 |
$unsubscribe = esc_url( add_query_arg( $query_args, get_permalink( get_option( 'ywrr_unsubscribe_page_id' ) ) ) );
|
52 |
|
53 |
|
54 |
+
$review_list = YITH_WRR()->ywrr_email_items_list( $item_list, $template );
|
55 |
|
56 |
$find = array(
|
57 |
'{customer_name}',
|
81 |
|
82 |
if ( defined( 'YITH_WCET_PREMIUM' ) && get_option( 'ywrr_mail_template_enable' ) == 'yes' ) {
|
83 |
|
84 |
+
do_action( 'woocommerce_email_header', $email_heading, $email );
|
85 |
|
86 |
}
|
87 |
else {
|
98 |
|
99 |
if ( defined( 'YITH_WCET_PREMIUM' ) && get_option( 'ywrr_mail_template_enable' ) == 'yes' ) {
|
100 |
|
101 |
+
do_action( 'woocommerce_email_footer', $email, array( '<a class="ywrr-unsubscribe-link" href="' . $unsubscribe . '">' . get_option( 'ywrr_mail_unsubscribe_text' ) . '</a>' ) );
|
102 |
|
103 |
}
|
104 |
else {
|