WC_REST_Reports_Controller::get_reports()
Get reports list.
Метод класса: WC_REST_Reports_Controller{}
Хуков нет.
Возвращает
Массив
.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_reports();
Список изменений
С версии 3.5.0 | Введена. |
Код WC_REST_Reports_Controller::get_reports() WC REST Reports Controller::get reports WC 7.7.0
protected function get_reports() { $reports = parent::get_reports(); $reports[] = array( 'slug' => 'orders/totals', 'description' => __( 'Orders totals.', 'woocommerce' ), ); $reports[] = array( 'slug' => 'products/totals', 'description' => __( 'Products totals.', 'woocommerce' ), ); $reports[] = array( 'slug' => 'customers/totals', 'description' => __( 'Customers totals.', 'woocommerce' ), ); $reports[] = array( 'slug' => 'coupons/totals', 'description' => __( 'Coupons totals.', 'woocommerce' ), ); $reports[] = array( 'slug' => 'reviews/totals', 'description' => __( 'Reviews totals.', 'woocommerce' ), ); $reports[] = array( 'slug' => 'categories/totals', 'description' => __( 'Categories totals.', 'woocommerce' ), ); $reports[] = array( 'slug' => 'tags/totals', 'description' => __( 'Tags totals.', 'woocommerce' ), ); $reports[] = array( 'slug' => 'attributes/totals', 'description' => __( 'Attributes totals.', 'woocommerce' ), ); return $reports; }