mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Use the cart price calculating method inside the handler.
This commit is contained in:
parent
f46341466f
commit
515a06542e
1 changed files with 3 additions and 3 deletions
|
@ -361,11 +361,11 @@ class SmartButton implements SmartButtonInterface {
|
||||||
) {
|
) {
|
||||||
add_action(
|
add_action(
|
||||||
$this->mini_cart_button_renderer_hook(),
|
$this->mini_cart_button_renderer_hook(),
|
||||||
static function () {
|
function () {
|
||||||
// phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
|
if ( $this->is_cart_price_total_zero() ) {
|
||||||
if ( WC()->cart->get_cart_contents_total() == 0 ) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<p
|
echo '<p
|
||||||
id="ppc-button-minicart"
|
id="ppc-button-minicart"
|
||||||
class="woocommerce-mini-cart__buttons buttons"
|
class="woocommerce-mini-cart__buttons buttons"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue