WooCommerce Direct Checkout - Version 2.1.9

Version Description

  • Fix. WooCommerce Stripe card form update
Download this release

Release Info

Developer quadlayers
Plugin Icon 128x128 WooCommerce Direct Checkout
Version 2.1.9
Comparing to
See all releases

Code changes from version 2.1.8 to 2.1.9

assets/qlwcdc.js CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * Version: 2.1.3
3
  */
4
 
5
  (function ($) {
@@ -88,6 +88,9 @@
88
  product_id = $form.find('[name=add-to-cart]').val() || 0,
89
  variation_id = $form.find('[name=variation_id]').val() || 0,
90
  quantity = $form.find('[name=quantity]').val() || 1,
 
 
 
91
  addons = $form.find('.wc-pao-addon-field').serialize().replace(/\%5B%5D/g, '[]') || 0;
92
 
93
  $button.attr('data-href', function (i, h) {
@@ -110,7 +113,17 @@
110
  $button.attr('data-href', $button.attr('data-href') + '&' + addons);
111
  }
112
 
113
- //console.log($button.attr('data-href'));
 
 
 
 
 
 
 
 
 
 
114
 
115
  if ($button.attr('data-href') != 'undefined') {
116
 
@@ -302,7 +315,7 @@
302
  },
303
  success: function (response) {
304
  if (response) {
305
- $('#order_review').html($(response).html());
306
  }
307
  },
308
  });
1
  /**
2
+ * Version: 2.1.4
3
  */
4
 
5
  (function ($) {
88
  product_id = $form.find('[name=add-to-cart]').val() || 0,
89
  variation_id = $form.find('[name=variation_id]').val() || 0,
90
  quantity = $form.find('[name=quantity]').val() || 1,
91
+ license_key = $form.find('[name=license_key]').val() || 1,
92
+ license_email = $form.find('[name=license_email]').val() || 1,
93
+ license_renewal = $form.find('[name=license_renewal]').val() || 1,
94
  addons = $form.find('.wc-pao-addon-field').serialize().replace(/\%5B%5D/g, '[]') || 0;
95
 
96
  $button.attr('data-href', function (i, h) {
113
  $button.attr('data-href', $button.attr('data-href') + '&' + addons);
114
  }
115
 
116
+ if (license_key) {
117
+ $button.attr('data-href', $button.attr('data-href') + '&license_key=' + license_key);
118
+ }
119
+
120
+ if (license_email) {
121
+ $button.attr('data-href', $button.attr('data-href') + '&license_email=' + license_email);
122
+ }
123
+
124
+ if (license_renewal) {
125
+ $button.attr('data-href', $button.attr('data-href') + '&license_renewal=' + license_renewal);
126
+ }
127
 
128
  if ($button.attr('data-href') != 'undefined') {
129
 
315
  },
316
  success: function (response) {
317
  if (response) {
318
+ $('#order_review').html($(response).html()).trigger('updated_checkout');
319
  }
320
  },
321
  });
assets/qlwcdc.min.js CHANGED
@@ -1 +1,2 @@
1
- (function(d){var c;var b=1000;var e=function(g){return g.is(".processing")||g.parents(".processing").length};var f=function(g){if(!e(g)){g.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:0.6}})}};var a=function(g){g.removeClass("processing").unblock()};d(document).on("click",".qlwcdc_quick_view",function(i){i.stopPropagation();i.preventDefault();var h=d(this).data("product_id"),g=d("#qlwcdc_quick_view_modal");if(h&&woocommerce_params.ajax_url){d.ajax({type:"post",url:woocommerce_params.ajax_url,data:{action:"qlwcdc_quick_view_modal",nonce:qlwcdc.nonce,product_id:h},complete:function(j){g.addClass("opening");setTimeout(function(){g.addClass("open");g.removeClass("opening")},50)},success:function(k){var j=d(k);j.find(".woocommerce-product-gallery").each(function(){d(this).wc_product_gallery()});j.on("click",".close",function(l){g.addClass("closing");setTimeout(function(){g.removeClass("open");g.removeClass("closing")},600)});g.find(".modal-content").replaceWith(j)}})}return false});d("#qlwcdc_quick_view_modal").on("click",function(h){var g=d(this);if(!g.closest(".modal-body").length){g.addClass("closing");setTimeout(function(){g.removeClass("open");g.removeClass("closing")},600)}});d(document).on("submit","form.cart",function(m){var j=d(m.delegateTarget.activeElement);if(j.hasClass("qlwcdc_quick_purchase")){var g=d(this),h=g.find("[name=add-to-cart]").val()||0,i=g.find("[name=variation_id]").val()||0,l=g.find("[name=quantity]").val()||1,k=g.find(".wc-pao-addon-field").serialize().replace(/\%5B%5D/g,"[]")||0;j.attr("data-href",function(n,o){if(o.indexOf("?")!=-1){j.attr("data-href",j.attr("data-href")+"&add-to-cart="+h)}else{j.attr("data-href",j.attr("data-href")+"?add-to-cart="+h)}});if(i){j.attr("data-href",j.attr("data-href")+"&variation_id="+i)}if(l){j.attr("data-href",j.attr("data-href")+"&quantity="+l)}if(k){j.attr("data-href",j.attr("data-href")+"&"+k)}if(j.attr("data-href")!="undefined"){window.location=j.attr("data-href");return false}}});d(document).on("keyup","#qlwcdc_order_coupon_code",function(j){var h=d(this),i=d(this).find('input[name="coupon_code"]'),g=i.val();if(c){clearTimeout(c)}if(!g){return}c=setTimeout(function(){if(h.is(".processing")){return false}h.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:0.6}});var k={security:wc_checkout_params.apply_coupon_nonce,coupon_code:g};d.ajax({type:"POST",url:wc_checkout_params.wc_ajax_url.toString().replace("%%endpoint%%","apply_coupon"),data:k,success:function(l){h.removeClass("processing").unblock();if(l){i.before(d(l).hide().fadeIn());setTimeout(function(){d(document.body).trigger("update_checkout",{update_shipping_method:false})},b*2)}},dataType:"html"});return false},b)});d("#order_review").on("change","input.qty",function(h){h.preventDefault();var g=d(this);setTimeout(function(){var i=g.attr("name").replace(/cart\[([\w]+)\]\[qty\]/g,"$1"),j=parseFloat(g.val());d.ajax({type:"post",url:woocommerce_params.ajax_url,data:{action:"qlwcdc_update_cart",nonce:qlwcdc.nonce,hash:i,quantity:j},beforeSend:function(k){f(d("#order_review"))},complete:function(k){a(d("#order_review"))},success:function(k){if(k){d("#order_review").html(d(k).html())}},})},400)});d("#order_review").on("click","a.remove",function(h){h.preventDefault();var g=d(this).data("cart_item_key");d.ajax({type:"post",url:woocommerce_params.ajax_url,data:{action:"qlwcdc_update_cart",nonce:qlwcdc.nonce,quantity:0,hash:g},beforeSend:function(i){f(d("#order_review"))},complete:function(i){a(d("#order_review"))},success:function(i){if(i){d("#order_review").html(d(i).html())}},})})})(jQuery);
 
1
+
2
+ (function(d){var c;var b=1000;var e=function(g){return g.is(".processing")||g.parents(".processing").length};var f=function(g){if(!e(g)){g.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:0.6}})}};var a=function(g){g.removeClass("processing").unblock()};d(document).on("click",".qlwcdc_quick_view",function(i){i.stopPropagation();i.preventDefault();var h=d(this).data("product_id"),g=d("#qlwcdc_quick_view_modal");if(h&&woocommerce_params.ajax_url){d.ajax({type:"post",url:woocommerce_params.ajax_url,data:{action:"qlwcdc_quick_view_modal",nonce:qlwcdc.nonce,product_id:h},complete:function(j){g.addClass("opening");setTimeout(function(){g.addClass("open");g.removeClass("opening")},50)},success:function(k){var j=d(k);j.find(".woocommerce-product-gallery").each(function(){d(this).wc_product_gallery()});j.on("click",".close",function(l){g.addClass("closing");setTimeout(function(){g.removeClass("open");g.removeClass("closing")},600)});g.find(".modal-content").replaceWith(j)}})}return false});d("#qlwcdc_quick_view_modal").on("click",function(h){var g=d(this);if(!g.closest(".modal-body").length){g.addClass("closing");setTimeout(function(){g.removeClass("open");g.removeClass("closing")},600)}});d(document).on("submit","form.cart",function(k){var g=d(k.delegateTarget.activeElement);if(g.hasClass("qlwcdc_quick_purchase")){var p=d(this),i=p.find("[name=add-to-cart]").val()||0,j=p.find("[name=variation_id]").val()||0,h=p.find("[name=quantity]").val()||1,l=p.find("[name=license_key]").val()||1,o=p.find("[name=license_email]").val()||1,n=p.find("[name=license_renewal]").val()||1,m=p.find(".wc-pao-addon-field").serialize().replace(/\%5B%5D/g,"[]")||0;g.attr("data-href",function(q,r){if(r.indexOf("?")!=-1){g.attr("data-href",g.attr("data-href")+"&add-to-cart="+i)}else{g.attr("data-href",g.attr("data-href")+"?add-to-cart="+i)}});if(j){g.attr("data-href",g.attr("data-href")+"&variation_id="+j)}if(h){g.attr("data-href",g.attr("data-href")+"&quantity="+h)}if(m){g.attr("data-href",g.attr("data-href")+"&"+m)}if(l){g.attr("data-href",g.attr("data-href")+"&license_key="+l)}if(o){g.attr("data-href",g.attr("data-href")+"&license_email="+o)}if(n){g.attr("data-href",g.attr("data-href")+"&license_renewal="+n)}if(g.attr("data-href")!="undefined"){window.location=g.attr("data-href");return false}}});d(document).on("keyup","#qlwcdc_order_coupon_code",function(j){var h=d(this),i=d(this).find('input[name="coupon_code"]'),g=i.val();if(c){clearTimeout(c)}if(!g){return}c=setTimeout(function(){if(h.is(".processing")){return false}h.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:0.6}});var k={security:wc_checkout_params.apply_coupon_nonce,coupon_code:g};d.ajax({type:"POST",url:wc_checkout_params.wc_ajax_url.toString().replace("%%endpoint%%","apply_coupon"),data:k,success:function(l){h.removeClass("processing").unblock();if(l){i.before(d(l).hide().fadeIn());setTimeout(function(){d(document.body).trigger("update_checkout",{update_shipping_method:false})},b*2)}},dataType:"html"});return false},b)});d("#order_review").on("change","input.qty",function(h){h.preventDefault();var g=d(this);setTimeout(function(){var i=g.attr("name").replace(/cart\[([\w]+)\]\[qty\]/g,"$1"),j=parseFloat(g.val());d.ajax({type:"post",url:woocommerce_params.ajax_url,data:{action:"qlwcdc_update_cart",nonce:qlwcdc.nonce,hash:i,quantity:j},beforeSend:function(k){f(d("#order_review"))},complete:function(k){a(d("#order_review"))},success:function(k){if(k){d("#order_review").html(d(k).html())}},})},400)});d("#order_review").on("click","a.remove",function(h){h.preventDefault();var g=d(this).data("cart_item_key");d.ajax({type:"post",url:woocommerce_params.ajax_url,data:{action:"qlwcdc_update_cart",nonce:qlwcdc.nonce,quantity:0,hash:g},beforeSend:function(i){f(d("#order_review"))},complete:function(i){a(d("#order_review"))},success:function(i){if(i){d("#order_review").html(d(i).html()).trigger("updated_checkout")}},})})})(jQuery);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://quadlayers.com/portfolio/woocommerce-direct-checkout/
4
  Tags: woocommerce, woocommerce ajax, woocommerce ajax cart, add to cart, woocommerce direct checkout, woocommerce quick buy, woocommerce remove checkout fields, woocommerce ajax single products, woocommerce one page checkout
5
  Requires at least: 4.8
6
  Tested up to: 5.2.2
7
- Stable tag: 2.1.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -12,7 +12,9 @@ Formerly "WooCommerce Direct Checkout". This plugin simplifies the entire WooCom
12
 
13
  == Description ==
14
 
15
- [WooCommerce Direct Checkout](https://quadlayers.com/portfolio/woocommerce-direct-checkout/) allows you to simplifies the checkout process by skipping the shopping cart page. The “Add to cart” button is added in each product to redirect customers to the checkout page. This can encourage buyers to shop more and quickly process the transaction, which can lead to a possible increase in sales.
 
 
16
 
17
  == Formerly WooCommerce Direct Checkout ==
18
 
@@ -47,7 +49,11 @@ The premium version of WooCommerce Direct Checkot allows to include a quick purc
47
 
48
  == Changelog ==
49
 
50
- = 2.1.8 = readme update
 
 
 
 
51
  * Fix. WooCommerce Direct Checkout data scaping
52
 
53
  = 2.1.7 =
4
  Tags: woocommerce, woocommerce ajax, woocommerce ajax cart, add to cart, woocommerce direct checkout, woocommerce quick buy, woocommerce remove checkout fields, woocommerce ajax single products, woocommerce one page checkout
5
  Requires at least: 4.8
6
  Tested up to: 5.2.2
7
+ Stable tag: 2.1.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
12
 
13
  == Description ==
14
 
15
+ [Premium](https://quadlayers.com/portfolio/woocommerce-direct-checkout/) | [Demo](https://quadlayers.com/woocommerce-direct/) | [Community](https://www.facebook.com/groups/quadlayers/)
16
+
17
+ WooCommerce Direct Checkout allows you to simplifies the checkout process by skipping the shopping cart page. The “Add to cart” button is added in each product to redirect customers to the checkout page. This can encourage buyers to shop more and quickly process the transaction, which can lead to a possible increase in sales.
18
 
19
  == Formerly WooCommerce Direct Checkout ==
20
 
49
 
50
  == Changelog ==
51
 
52
+ = 2.1.9 =
53
+ * Fix. WooCommerce Stripe card form update
54
+
55
+ = 2.1.8 =
56
+ * Improvement. readme update
57
  * Fix. WooCommerce Direct Checkout data scaping
58
 
59
  = 2.1.7 =
woocommerce-direct-checkout.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: WooCommerce Direct Checkout
4
  * Description: Simplifies the checkout process to improve your sales rate.
5
- * Version: 2.1.8
6
  * Author: QuadLayers
7
  * Author URI: https://www.quadlayers.com
8
  * Copyright: 2019 QuadLayers (https://www.quadlayers.com)
@@ -16,7 +16,7 @@ if (!defined('QLWCDC_PLUGIN_NAME')) {
16
  define('QLWCDC_PLUGIN_NAME', 'WooCommerce Direct Checkout');
17
  }
18
  if (!defined('QLWCDC_PLUGIN_VERSION')) {
19
- define('QLWCDC_PLUGIN_VERSION', '2.1.8');
20
  }
21
  if (!defined('QLWCDC_PLUGIN_FILE')) {
22
  define('QLWCDC_PLUGIN_FILE', __FILE__);
2
  /**
3
  * Plugin Name: WooCommerce Direct Checkout
4
  * Description: Simplifies the checkout process to improve your sales rate.
5
+ * Version: 2.1.9
6
  * Author: QuadLayers
7
  * Author URI: https://www.quadlayers.com
8
  * Copyright: 2019 QuadLayers (https://www.quadlayers.com)
16
  define('QLWCDC_PLUGIN_NAME', 'WooCommerce Direct Checkout');
17
  }
18
  if (!defined('QLWCDC_PLUGIN_VERSION')) {
19
+ define('QLWCDC_PLUGIN_VERSION', '2.1.9');
20
  }
21
  if (!defined('QLWCDC_PLUGIN_FILE')) {
22
  define('QLWCDC_PLUGIN_FILE', __FILE__);