mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +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.
|
||||
*/
|
||||
protected function is_cart_price_total_zero(): bool {
|
||||
$cart_total = WC()->cart->get_cart_contents_total();
|
||||
return ! ( $cart_total > 0 );
|
||||
// phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
|
||||
return WC()->cart->get_cart_contents_total() == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1095,9 +1095,9 @@ class SmartButton implements SmartButtonInterface {
|
|||
return false;
|
||||
}
|
||||
|
||||
$product = wc_get_product();
|
||||
$product_price = $product ? $product->get_price() : 0;
|
||||
$product = wc_get_product();
|
||||
|
||||
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