mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
use == comparison
This commit is contained in:
parent
164b74fdcb
commit
efca8ba27d
1 changed files with 5 additions and 5 deletions
|
@ -1081,8 +1081,8 @@ class SmartButton implements SmartButtonInterface {
|
||||||
* @return bool true if is 0, otherwise false.
|
* @return bool true if is 0, otherwise false.
|
||||||
*/
|
*/
|
||||||
protected function is_cart_price_total_zero(): bool {
|
protected function is_cart_price_total_zero(): bool {
|
||||||
$cart_total = WC()->cart->get_cart_contents_total();
|
// phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
|
||||||
return ! ( $cart_total > 0 );
|
return WC()->cart->get_cart_contents_total() == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1095,9 +1095,9 @@ class SmartButton implements SmartButtonInterface {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$product = wc_get_product();
|
$product = wc_get_product();
|
||||||
$product_price = $product ? $product->get_price() : 0;
|
|
||||||
|
|
||||||
return ! ( (float) $product_price > 0 );
|
// phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
|
||||||
|
return $product && $product->get_price() == 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue