Merge branch 'trunk' into PCP-417-new-feature---pay-upon-invoice

This commit is contained in:
dinamiko 2022-03-29 09:18:05 +02:00
commit 936c2d13cf
5 changed files with 10 additions and 7 deletions

View file

@ -7,6 +7,9 @@
* Fix - Incorrect TAX details on PayPal order overview #541
* Fix - "Place order" button looking unstyled in the Twenty Twenty-Two theme #478
* Fix - PayPal options available on minicart when adding subscription to the cart from shop page without vaulting enabled #518
* Fix - Buttons not visible on products page #551
* Fix - Buttons not visible in mini-cart #553
* Fix - PayPal button missing on pay for order page #555
* Enhancement - PayPal buttons loading time #533
* Enhancement - Improve payment token checking for subscriptions #525
* Enhancement - Add Spain and Italy to messaging #497

View file

@ -22,10 +22,6 @@ class MiniCartBootstap {
}
shouldRender() {
if (!this.gateway.can_save_vault_token) {
return;
}
return document.querySelector(this.gateway.button.mini_cart_wrapper) !== null
|| document.querySelector(this.gateway.hosted_fields.mini_cart_wrapper) !== null;
}

View file

@ -48,8 +48,8 @@ class SingleProductBootstap {
else if (document.querySelector('form.cart .woocommerce-Price-amount')) {
priceText = document.querySelector('form.cart .woocommerce-Price-amount').innerText;
}
else if (document.querySelector('.woocommerce-Price-amount')) {
priceText = document.querySelector('.woocommerce-Price-amount').innerText;
else if (document.querySelector('.product .woocommerce-Price-amount')) {
priceText = document.querySelector('.product .woocommerce-Price-amount').innerText;
}
const amount = parseFloat(priceText.replace(/([^\d,\.\s]*)/g, ''));
return amount === 0;

View file

@ -352,6 +352,8 @@ class SmartButton implements SmartButtonInterface {
);
}
add_action( $this->pay_order_renderer_hook(), array( $this, 'button_renderer' ), 10 );
if ( $this->is_cart_price_total_zero() ) {
return false;
}
@ -390,7 +392,6 @@ class SmartButton implements SmartButtonInterface {
}
add_action( $this->checkout_button_renderer_hook(), array( $this, 'button_renderer' ), 10 );
add_action( $this->pay_order_renderer_hook(), array( $this, 'button_renderer' ), 10 );
return true;
}

View file

@ -88,6 +88,9 @@ Follow the steps below to connect the plugin to your PayPal account:
* Fix - Incorrect TAX details on PayPal order overview #541
* Fix - "Place order" button looking unstyled in the Twenty Twenty-Two theme #478
* Fix - PayPal options available on minicart when adding subscription to the cart from shop page without vaulting enabled #518
* Fix - Buttons not visible on products page #551
* Fix - Buttons not visible in mini-cart #553
* Fix - PayPal button missing on pay for order page #555
* Enhancement - PayPal buttons loading time #533
* Enhancement - Improve payment token checking for subscriptions #525
* Enhancement - Add Spain and Italy to messaging #497