Skip to content

Commit

Permalink
fix: Invalid return value for commission rate validate method (#2490)
Browse files Browse the repository at this point in the history
  • Loading branch information
devAsadNur authored Dec 27, 2024
1 parent dbaf57c commit 58b74f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/Commission.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 58b74f1

Please sign in to comment.