Merge pull request #2981 from maxrice/report-functions-patch
Allow class callbacks for report functions
This commit is contained in:
commit
1c28c481e3
|
@ -170,8 +170,8 @@ function woocommerce_reports() {
|
||||||
echo '<p>' . $chart['description'] . '</p>';
|
echo '<p>' . $chart['description'] . '</p>';
|
||||||
|
|
||||||
$func = $chart['function'];
|
$func = $chart['function'];
|
||||||
if ( $func && function_exists( $func ) )
|
if ( $func && ( is_callable( $func ) ) )
|
||||||
$func();
|
call_user_func( $func );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue