mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +08:00
Cast price to float to avoid error in php 8+
This commit is contained in:
parent
5b0c11db27
commit
7b253c97f1
1 changed files with 1 additions and 1 deletions
|
@ -211,7 +211,7 @@ class SubscriptionsApiHandler {
|
|||
$subscription_plan = $this->billing_plans_endpoint->plan( $subscription_plan_id );
|
||||
|
||||
$price = $subscription_plan->billing_cycles()[0]->pricing_scheme()['fixed_price']['value'] ?? '';
|
||||
if ( $price && round( $price, 2 ) !== round( (float) $product->get_price(), 2 ) ) {
|
||||
if ( $price && round( (float) $price, 2 ) !== round( (float) $product->get_price(), 2 ) ) {
|
||||
$this->billing_plans_endpoint->update_pricing(
|
||||
$subscription_plan_id,
|
||||
$this->billing_cycle_factory->from_wc_product( $product )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue