From 86e40cf56881b11a313d18f1339a8b80d65a4333 Mon Sep 17 00:00:00 2001 From: Asad Nur Date: Thu, 19 Dec 2024 15:59:06 +0600 Subject: [PATCH] fix: Invalid return value for commission rate validate method --- includes/Commission.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Commission.php b/includes/Commission.php index 9490e787f5..edaf94e4fe 100644 --- a/includes/Commission.php +++ b/includes/Commission.php @@ -287,7 +287,7 @@ public function get_earning_by_order( $order, $context = 'seller' ) { */ public function validate_rate( $rate ) { if ( '' === $rate || ! is_numeric( $rate ) || $rate < 0 ) { - return null; + $rate = 0.0; } return (float) $rate;