From 58b74f1b33836c53dba38f365efbaa00789b5a1a Mon Sep 17 00:00:00 2001 From: Asad Nur <30354772+devAsadNur@users.noreply.github.com> Date: Fri, 27 Dec 2024 10:36:46 +0600 Subject: [PATCH] fix: Invalid return value for commission rate validate method (#2490) --- 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;