WC_Admin_Reports::get_report() public WC 1.0
Get a report from our reports subfolder.
{} Это метод класса: WC_Admin_Reports{}
Хуки из метода
Возвращает
Null. Ничего.
Использование
$result = WC_Admin_Reports::get_report( $name );
- $name(строка) (обязательный)
Код WC_Admin_Reports::get_report() WC Admin Reports::get report WC 4.9.2
public static function get_report( $name ) {
$name = sanitize_title( str_replace( '_', '-', $name ) );
$class = 'WC_Report_' . str_replace( '-', '_', $name );
include_once apply_filters( 'wc_admin_reports_path', 'reports/class-wc-report-' . $name . '.php', $name, $class );
if ( ! class_exists( $class ) ) {
return;
}
$report = new $class();
$report->output_report();
}