Changeset 2513961
- Timestamp:
- 04/13/2021 09:32:59 AM (5 years ago)
- Location:
- woomotiv
- Files:
-
- 6 edited
- 11 copied
-
tags/3.0.0 (copied) (copied from woomotiv/trunk)
-
tags/3.0.0/freemius/assets/img/woomotiv.jpg (copied) (copied from woomotiv/trunk/freemius/assets/img/woomotiv.jpg)
-
tags/3.0.0/index.php (copied) (copied from woomotiv/trunk/index.php)
-
tags/3.0.0/js/front.js (copied) (copied from woomotiv/trunk/js/front.js)
-
tags/3.0.0/js/front.min.js (copied) (copied from woomotiv/trunk/js/front.min.js)
-
tags/3.0.0/lib/class-frontend.php (copied) (copied from woomotiv/trunk/lib/class-frontend.php)
-
tags/3.0.0/lib/config.php (copied) (copied from woomotiv/trunk/lib/config.php)
-
tags/3.0.0/lib/functions.php (copied) (copied from woomotiv/trunk/lib/functions.php)
-
tags/3.0.0/lib/hooks.php (copied) (copied from woomotiv/trunk/lib/hooks.php)
-
tags/3.0.0/readme.txt (copied) (copied from woomotiv/trunk/readme.txt)
-
tags/3.0.0/views/tabs/general.php (copied) (copied from woomotiv/trunk/views/tabs/general.php)
-
trunk/index.php (modified) (2 diffs)
-
trunk/js/front.js (modified) (7 diffs)
-
trunk/js/front.min.js (modified) (1 diff)
-
trunk/lib/class-popup.php (modified) (3 diffs)
-
trunk/lib/functions.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woomotiv/trunk/index.php
r2513764 r2513961 4 4 * Plugin Name: Woomotiv - Live Sales Notification for Woocommerce 5 5 * Description: Laverage social proof to increase trust, traffic and sales. 6 * Version: 3. 0.06 * Version: 3.1.0 7 7 * Author: Sabri Taieb 8 8 * Author Uri: https://delabon.com … … 18 18 19 19 # Defined 20 define( 'WOOMOTIV_VERSION', '3. 0.0' );20 define( 'WOOMOTIV_VERSION', '3.1.0' ); 21 21 define( 'WOOMOTIV_URL', plugins_url( '', __FILE__ ) ); 22 22 define( 'WOOMOTIV_DIR', __DIR__ ); -
woomotiv/trunk/js/front.js
r2513764 r2513961 23 23 custom: [], 24 24 }; 25 var isNoRepea Enabled = parseInt(woomotivObj.is_no_repeat_enabled);25 var isNoRepeatEnabled = parseInt(woomotivObj.is_no_repeat_enabled) === 1 && parseInt(woomotivObj.is_premium) === 1 ? 1 : 0; 26 26 var excludedOrdersKey = 'woomotiv_seen_orders_' + woomotivObj.site_hash; 27 27 var excludedReviewsKey = 'woomotiv_seen_reviews_' + woomotivObj.site_hash; … … 168 168 if( ! items.eq( cindex ).length ){ 169 169 170 if( isNoRepea Enabled ){170 if( isNoRepeatEnabled ){ 171 171 excluded.orders = getExcludedOrdersFromStorage(); 172 172 excluded.reviews = getExcludedReviewsFromStorage(); … … 236 236 excluded.orders.push(orderId); 237 237 238 if( ! isNoRepea Enabled ) return;238 if( ! isNoRepeatEnabled ) return; 239 239 240 240 var orders = getExcludedOrdersFromStorage(); … … 266 266 excluded.reviews.push(reviewId); 267 267 268 if( ! isNoRepea Enabled ) return;268 if( ! isNoRepeatEnabled ) return; 269 269 270 270 var reviews = getExcludedReviewsFromStorage(); … … 296 296 excluded.custom.push( id ); 297 297 298 if( ! isNoRepea Enabled ) return;298 if( ! isNoRepeatEnabled ) return; 299 299 300 300 var customPops = getExcludedCustomPopsFromStorage(); … … 392 392 if( response.data.length === 0 ){ 393 393 394 if( isNoRepea Enabled ){394 if( isNoRepeatEnabled ){ 395 395 clearLocalStorage(); 396 396 } … … 504 504 505 505 // No-repeat is disabled, lets clear the local storage 506 if( ! isNoRepea Enabled ){506 if( ! isNoRepeatEnabled ){ 507 507 clearLocalStorage(); 508 508 } -
woomotiv/trunk/js/front.min.js
r2513764 r2513961 1 !function(o){o(window);var i,a,n=o("body"),r=woomotivObj.nonce,s=woomotivObj.ajax_url,m=!0,c=!1,d=!1,l=1e3*parseInt(woomotivObj.interval),f=1e3*parseInt(woomotivObj.hide),u=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,w=window.cancelAnimationFrame||window.mozCancelAnimationFrame,v={orders:[],reviews:[],custom:[]},p= parseInt(woomotivObj.is_no_repeat_enabled),h="woomotiv_seen_orders_"+woomotivObj.site_hash,b="woomotiv_seen_reviews_"+woomotivObj.site_hash,_="woomotiv_seen_custompop_"+woomotivObj.site_hash,t=function(){var t,e=document.createElement("fakeelement"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in o)if(void 0!==e.style[t])return o[t]}(),e=function(){var t,e=document.createElement("fakeelement"),o={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(t in o)if(void 0!==e.style[t])return o[t]}(),g=(function(){var t,e=document.createElement("fakeelement"),o={transition:"transitionstart",OTransition:"oTransitionStart",MozTransition:"transitionstart",WebkitTransition:"webkitTransitionStart"};for(t in o)if(void 0!==e.style[t])return}(),function(){var t,e=document.createElement("fakeelement"),o={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"animationstart",WebkitAnimation:"webkitAnimationStart"};for(t in o)if(void 0!==e.style[t])return}(),["fade","slideup","slidedown","slideright","slideleft"]),k=(g.indexOf(woomotivObj.animation),-1!=g.indexOf(woomotivObj.animation)?t:e);function T(t,e){return(e="object"==typeof e?e:{}).action="woomotiv_"+t,e.hasOwnProperty("nonce")||(e.nonce=r),o.ajax({type:"POST",url:s,data:e})}function O(m){m=parseInt(m),i.eq(m).length||(p&&(v.orders=j(),v.reviews=I(),v.custom=y()),A(v));var u=i.eq(m);u.addClass("wmt-current"),u.one(k,function(){var e,o,n,t,i,a,r,s;u.is('[data-type="order"]')?(a=parseInt(u.attr("data-order")),v.orders=v.orders.filter(function(t){return t!=a}),v.orders.push(a),p&&(r=j(),s=!1,r.map(function(t){t==a&&(s=!0)}),s||(r.push(a),localStorage.setItem(h,r.join(","))))):u.is('[data-type="review"]')?(n=parseInt(u.attr("data-review")),v.reviews=v.reviews.filter(function(t){return t!=n}),v.reviews.push(n),p&&(t=I(),i=!1,t.map(function(t){t==n&&(i=!0)}),i||(t.push(n),localStorage.setItem(b,t.join(","))))):u.is('[data-type="custom"]')&&(e=parseInt(u.attr("data-id")),v.custom=v.custom.filter(function(t){return t!=e}),v.custom.push(e),p&&(t=y(),o=!1,t.map(function(t){t==e&&(o=!0)}),o||(t.push(e),localStorage.setItem(_,t.join(","))))),d=setTimeout(function(){u.removeClass("wmt-current"),u.one(k,function(){c=setTimeout(function(){O(m+1)},l)})},f)})}function j(){var t=localStorage.getItem(h);return(t=t?t.split(","):[]).filter(function(t){return""!==t})}function I(){var t=localStorage.getItem(b);return(t=t?t.split(","):[]).filter(function(t){return""!==t})}function y(){var t=localStorage.getItem(_);return(t=t?t.split(","):[]).filter(function(t){return""!==t})}function S(){localStorage.removeItem(h),localStorage.removeItem(b),localStorage.removeItem(_)}function A(e){T("get_items",{excluded:e}).done(function(t){if(t.hasOwnProperty("data")&&(0!==t.data.length||!m)){if(m=!1,0===t.data.length&&(p&&S(),e.orders=[],e.reviews=[],e.custom=[],A(e)),localStorage.getItem("woomotiv_pause_date_"+woomotivObj.site_hash))if(new Date(localStorage.getItem("woomotiv_pause_date_"+woomotivObj.site_hash))>new Date)return;i&&i.remove(),t.data.map(function(t){n.append(t.markup)}),i=o(".woomotiv-popup"),setTimeout(function(){a=u(function(){O(0)})},parseInt(l/2)),i.on("mouseenter",function(t){o(this).off(k),clearTimeout(c),clearTimeout(d),w(a)}),i.on("mouseleave",function(t){var e=i.filter(".wmt-current"),o=e.data("index"),n=parseInt(f/2);void 0!==o&&(setTimeout(function(){e.removeClass("wmt-current")},n),setTimeout(function(){a=u(function(){O(e.data("index")+1)})},f+f))}),i.find(".woomotiv-close").on("click",function(t){i.remove(),localStorage.setItem("woomotiv_pause_date_"+woomotivObj.site_hash,function(t,e,o){function n(){i.getDate()!=t.getDate()&&i.setDate(0)}var i=new Date(t);switch(e.toLowerCase()){case"year":i.setFullYear(i.getFullYear()+o),n();break;case"quarter":i.setMonth(i.getMonth()+3*o),n();break;case"month":i.setMonth(i.getMonth()+o),n();break;case"week":i.setDate(i.getDate()+7*o);break;case"day":i.setDate(i.getDate()+o);break;case"hour":i.setTime(i.getTime()+36e5*o);break;case"minute":i.setTime(i.getTime()+6e4*o);break;case"second":i.setTime(i.getTime()+1e3*o);break;default:i=void 0}return i}(new Date,"minute",30))}),i.on("click",function(t){t.preventDefault();var e=o(this),t={};"order"===e.data("type")?(t.type="order",t.product_id=e.data("product")):"review"===e.data("type")?(t.type="review",t.product_id=e.data("product")):(t.type="custom",t.id=e.data("id")),T("update_stats",t).done(function(t){1!=woomotivObj.disable_link&&(location.href=e.find(".woomotiv-link").attr("href"))})})}})}p?(v.orders=j(),v.reviews=I(),v.custom=y()):S(),A(v)}(jQuery);1 !function(o){o(window);var i,a,n=o("body"),r=woomotivObj.nonce,s=woomotivObj.ajax_url,m=!0,c=!1,d=!1,l=1e3*parseInt(woomotivObj.interval),f=1e3*parseInt(woomotivObj.hide),u=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,w=window.cancelAnimationFrame||window.mozCancelAnimationFrame,v={orders:[],reviews:[],custom:[]},p=1===parseInt(woomotivObj.is_no_repeat_enabled)&&1===parseInt(woomotivObj.is_premium)?1:0,b="woomotiv_seen_orders_"+woomotivObj.site_hash,h="woomotiv_seen_reviews_"+woomotivObj.site_hash,_="woomotiv_seen_custompop_"+woomotivObj.site_hash,t=function(){var t,e=document.createElement("fakeelement"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in o)if(void 0!==e.style[t])return o[t]}(),e=function(){var t,e=document.createElement("fakeelement"),o={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(t in o)if(void 0!==e.style[t])return o[t]}(),g=(function(){var t,e=document.createElement("fakeelement"),o={transition:"transitionstart",OTransition:"oTransitionStart",MozTransition:"transitionstart",WebkitTransition:"webkitTransitionStart"};for(t in o)if(void 0!==e.style[t])return}(),function(){var t,e=document.createElement("fakeelement"),o={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"animationstart",WebkitAnimation:"webkitAnimationStart"};for(t in o)if(void 0!==e.style[t])return}(),["fade","slideup","slidedown","slideright","slideleft"]),k=(g.indexOf(woomotivObj.animation),-1!=g.indexOf(woomotivObj.animation)?t:e);function O(t,e){return(e="object"==typeof e?e:{}).action="woomotiv_"+t,e.hasOwnProperty("nonce")||(e.nonce=r),o.ajax({type:"POST",url:s,data:e})}function T(m){m=parseInt(m),i.eq(m).length||(p&&(v.orders=j(),v.reviews=I(),v.custom=y()),A(v));var u=i.eq(m);u.addClass("wmt-current"),u.one(k,function(){var e,o,n,t,i,a,r,s;u.is('[data-type="order"]')?(a=parseInt(u.attr("data-order")),v.orders=v.orders.filter(function(t){return t!=a}),v.orders.push(a),p&&(r=j(),s=!1,r.map(function(t){t==a&&(s=!0)}),s||(r.push(a),localStorage.setItem(b,r.join(","))))):u.is('[data-type="review"]')?(n=parseInt(u.attr("data-review")),v.reviews=v.reviews.filter(function(t){return t!=n}),v.reviews.push(n),p&&(t=I(),i=!1,t.map(function(t){t==n&&(i=!0)}),i||(t.push(n),localStorage.setItem(h,t.join(","))))):u.is('[data-type="custom"]')&&(e=parseInt(u.attr("data-id")),v.custom=v.custom.filter(function(t){return t!=e}),v.custom.push(e),p&&(t=y(),o=!1,t.map(function(t){t==e&&(o=!0)}),o||(t.push(e),localStorage.setItem(_,t.join(","))))),d=setTimeout(function(){u.removeClass("wmt-current"),u.one(k,function(){c=setTimeout(function(){T(m+1)},l)})},f)})}function j(){var t=localStorage.getItem(b);return(t=t?t.split(","):[]).filter(function(t){return""!==t})}function I(){var t=localStorage.getItem(h);return(t=t?t.split(","):[]).filter(function(t){return""!==t})}function y(){var t=localStorage.getItem(_);return(t=t?t.split(","):[]).filter(function(t){return""!==t})}function S(){localStorage.removeItem(b),localStorage.removeItem(h),localStorage.removeItem(_)}function A(e){O("get_items",{excluded:e}).done(function(t){if(t.hasOwnProperty("data")&&(0!==t.data.length||!m)){if(m=!1,0===t.data.length&&(p&&S(),e.orders=[],e.reviews=[],e.custom=[],A(e)),localStorage.getItem("woomotiv_pause_date_"+woomotivObj.site_hash))if(new Date(localStorage.getItem("woomotiv_pause_date_"+woomotivObj.site_hash))>new Date)return;i&&i.remove(),t.data.map(function(t){n.append(t.markup)}),i=o(".woomotiv-popup"),setTimeout(function(){a=u(function(){T(0)})},parseInt(l/2)),i.on("mouseenter",function(t){o(this).off(k),clearTimeout(c),clearTimeout(d),w(a)}),i.on("mouseleave",function(t){var e=i.filter(".wmt-current"),o=e.data("index"),n=parseInt(f/2);void 0!==o&&(setTimeout(function(){e.removeClass("wmt-current")},n),setTimeout(function(){a=u(function(){T(e.data("index")+1)})},f+f))}),i.find(".woomotiv-close").on("click",function(t){i.remove(),localStorage.setItem("woomotiv_pause_date_"+woomotivObj.site_hash,function(t,e,o){function n(){i.getDate()!=t.getDate()&&i.setDate(0)}var i=new Date(t);switch(e.toLowerCase()){case"year":i.setFullYear(i.getFullYear()+o),n();break;case"quarter":i.setMonth(i.getMonth()+3*o),n();break;case"month":i.setMonth(i.getMonth()+o),n();break;case"week":i.setDate(i.getDate()+7*o);break;case"day":i.setDate(i.getDate()+o);break;case"hour":i.setTime(i.getTime()+36e5*o);break;case"minute":i.setTime(i.getTime()+6e4*o);break;case"second":i.setTime(i.getTime()+1e3*o);break;default:i=void 0}return i}(new Date,"minute",30))}),i.on("click",function(t){t.preventDefault();var e=o(this),t={};"order"===e.data("type")?(t.type="order",t.product_id=e.data("product")):"review"===e.data("type")?(t.type="review",t.product_id=e.data("product")):(t.type="custom",t.id=e.data("id")),O("update_stats",t).done(function(t){1!=woomotivObj.disable_link&&(location.href=e.find(".woomotiv-link").attr("href"))})})}})}p?(v.orders=j(),v.reviews=I(),v.custom=y()):S(),A(v)}(jQuery); -
woomotiv/trunk/lib/class-popup.php
r2199296 r2513961 33 33 private function setProduct(){ 34 34 35 $thumbnail_size = apply_filters('woomotiv_product_image_size_filter', 'thumbnail'); 35 36 $this->data[ 'product' ] = array(); 36 37 … … 42 43 'url' => get_permalink( $this->product->get_id() ), 43 44 'thumbnail_id' => get_post_thumbnail_id( $this->product->get_id() ), 44 'thumbnail_src' => wp_get_attachment_image_src( get_post_thumbnail_id( $this->product->get_id() ), 'thumbnail'),45 'thumbnail_img' => wp_get_attachment_image( get_post_thumbnail_id( $this->product->get_id() ), 'thumbnail'),45 'thumbnail_src' => wp_get_attachment_image_src( get_post_thumbnail_id( $this->product->get_id() ), $thumbnail_size ), 46 'thumbnail_img' => wp_get_attachment_image( get_post_thumbnail_id( $this->product->get_id() ), $thumbnail_size ), 46 47 ); 47 48 … … 49 50 if( $this->product->get_parent_id() ){ 50 51 $product['thumbnail_id'] = get_post_thumbnail_id( $this->product->get_parent_id() ); 51 $product['thumbnail_src'] = wp_get_attachment_image_src( get_post_thumbnail_id( $this->product->get_parent_id() ), 'thumbnail');52 $product['thumbnail_img'] = wp_get_attachment_image( get_post_thumbnail_id( $this->product->get_parent_id() ), 'thumbnail');52 $product['thumbnail_src'] = wp_get_attachment_image_src( get_post_thumbnail_id( $this->product->get_parent_id() ), $thumbnail_size ); 53 $product['thumbnail_img'] = wp_get_attachment_image( get_post_thumbnail_id( $this->product->get_parent_id() ), $thumbnail_size ); 53 54 } 54 55 -
woomotiv/trunk/lib/functions.php
r2513764 r2513961 187 187 ); 188 188 } 189 // Mysql ORDER BY RAND() returns a cached query after the first time 190 if ( $is_random ) { 191 shuffle( $orders ); 192 } 189 193 return $orders; 190 194 } … … 199 203 { 200 204 $excluded_reviews = ( !is_array( $excluded_reviews ) ? [] : $excluded_reviews ); 205 $is_random = ( woomotiv()->config->woomotiv_display_order === 'random_sales' ? true : false ); 201 206 /** Only Premium */ 202 207 if ( wmv_fs()->is_free_plan() ) { -
woomotiv/trunk/readme.txt
r2513764 r2513961 3 3 Requires at least: 4.6 4 4 Tested up to: 5.7.0 5 Stable tag: 3. 0.05 Stable tag: 3.1.0 6 6 Requires PHP: 5.6 7 7 Tags: woocommerce notification, woocommerce sales notification, woocommerce sales popup, marketing, boost sales, boost conversion … … 101 101 == Changelog == 102 102 103 = 3.1.0 = 104 105 * Updated random sales/reviews functionality 106 103 107 = 3.0.0 = 104 108
Note: See TracChangeset
for help on using the changeset viewer.