Skip to content

Commit

Permalink
fix: check whether property exists or not (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
saimonh3 authored and sabbir1991 committed Aug 23, 2019
1 parent 8bd5402 commit 2c42e63
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions classes/template-dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ public function get_big_counter_widgets() {
return;
}

if ( ! (array) $this->orders_count ) {
return;
}

dokan_get_template_part( 'dashboard/big-counter-widget', '', array(
'pageviews' => $this->pageviews,
'orders_count' => $this->orders_count,
Expand All @@ -98,6 +102,10 @@ public function get_orders_widgets() {
return;
}

if ( ! (array) $this->orders_count ) {
return;
}

$order_data = array(
array(
'value' => $this->orders_count->{'wc-completed'},
Expand Down

0 comments on commit 2c42e63

Please sign in to comment.