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>';
|
||||
|
||||
$func = $chart['function'];
|
||||
if ( $func && function_exists( $func ) )
|
||||
$func();
|
||||
if ( $func && ( is_callable( $func ) ) )
|
||||
call_user_func( $func );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue