Address possible PHP warning in report code

This commit is contained in:
Jorge A. Torres 2023-06-12 16:05:04 -03:00
parent 9a6005a355
commit eb3082e835
1 changed files with 1 additions and 1 deletions

View File

@ -512,7 +512,7 @@ class WC_Admin_Report {
}
if ( $data_key ) {
$prepared_data[ $time ][1] += $d->$data_key;
$prepared_data[ $time ][1] += is_numeric( $d->$data_key ) ? $d->$data_key : 0;
} else {
$prepared_data[ $time ][1] ++;
}