Skip to content

Commit

Permalink
Check if WC Admin is active before showing message
Browse files Browse the repository at this point in the history
  • Loading branch information
roykho committed Feb 10, 2021
1 parent dcbbde1 commit 315c4de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion includes/admin/views/html-admin-page-reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

?>
<div class="wrap woocommerce">
<?php if ( WC()->is_wc_admin_active() ) { ?>
<div id="message" class="error inline" style="margin-top:30px">
<p>
<strong>
Expand All @@ -19,6 +20,7 @@
</strong>
</p>
</div>
<?php } ?>
<nav class="nav-tab-wrapper woo-nav-tab-wrapper">
<?php
foreach ( $reports as $key => $report_group ) {
Expand All @@ -33,7 +35,7 @@
?>
</nav>
<?php
if ( sizeof( $reports[ $current_tab ]['reports'] ) > 1 ) {
if ( count( $reports[ $current_tab ]['reports'] ) > 1 ) {
?>
<ul class="subsubsub">
<li>
Expand Down

0 comments on commit 315c4de

Please sign in to comment.