Skip reports if no product is found

This commit is contained in:
Mike Jolley 2017-04-07 16:08:06 +01:00
parent 84c96046f0
commit e14eb70814
1 changed files with 4 additions and 0 deletions

View File

@ -80,6 +80,10 @@ class WC_Report_Stock extends WP_List_Table {
$product = wc_get_product( $item->id );
}
if ( ! $product ) {
return;
}
switch ( $column_name ) {
case 'product' :