From 6a225dbe84d2cb007fdb42db4ea89ed9a30a98e8 Mon Sep 17 00:00:00 2001 From: kcppdevelopers Date: Mon, 2 Apr 2018 19:06:05 +0530 Subject: [PATCH] Smart Button : Minicart styling issues, ref #1072 --- .../class-wc-gateway-paypal-express-helper-angelleye.php | 8 ++++++++ assets/css/single.css | 4 ++-- assets/js/angelleye-in-context-checkout.js | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/angelleye-includes/express-checkout/class-wc-gateway-paypal-express-helper-angelleye.php b/angelleye-includes/express-checkout/class-wc-gateway-paypal-express-helper-angelleye.php index cc43f774c..f8b6262c7 100644 --- a/angelleye-includes/express-checkout/class-wc-gateway-paypal-express-helper-angelleye.php +++ b/angelleye-includes/express-checkout/class-wc-gateway-paypal-express-helper-angelleye.php @@ -108,6 +108,7 @@ public function __construct($version) { add_action('woocommerce_after_checkout_validation', array($this, 'angelleye_paypal_express_checkout_redirect_to_paypal'), 99, 2); } } + add_action('wp_head', array($this, 'angelleye_add_header_meta'), 0); add_action('woocommerce_add_to_cart_redirect', array($this, 'add_to_cart_redirect')); add_action('woocommerce_checkout_billing', array($this, 'ec_set_checkout_post_data')); add_action('woocommerce_available_payment_gateways', array($this, 'ec_disable_gateways')); @@ -1183,5 +1184,12 @@ public function angelleye_is_product_already_in_cart($product_id = 0, $quantity } return false; } + + public function angelleye_add_header_meta() { + if ($this->enable_in_context_checkout_flow === 'yes' && $this->enabled == 'yes' ) { + echo ''; + echo ''; + } + } } diff --git a/assets/css/single.css b/assets/css/single.css index 4f36a2ddc..5b4de2bc9 100644 --- a/assets/css/single.css +++ b/assets/css/single.css @@ -9,8 +9,8 @@ #paypal_ec_paypal_credit_button, #paypal_ec_button, .paypal_ec_textbutton { position: relative; } -.single_add_to_cart_button.disabled { - opacity: 0.2; +.angelleye_button_single.disabled { + opacity: 0.4; cursor: not-allowed; display: none; } diff --git a/assets/js/angelleye-in-context-checkout.js b/assets/js/angelleye-in-context-checkout.js index 7c8230f87..b4edb41e7 100644 --- a/assets/js/angelleye-in-context-checkout.js +++ b/assets/js/angelleye-in-context-checkout.js @@ -77,7 +77,7 @@ jQuery(function ($) { 'wc-paypal_express-new-payment-method': $("#wc-paypal_express-new-payment-method").is(':checked'), 'is_cc': '', 'product_id': $("input[name=add-to-cart]").val(), - 'variation_id': $("input[name=variation_id").val(), + 'variation_id': $("input[name=variation_id]").val(), 'request_from': 'JSv4', 'express_checkout' : 'true' };