Automattic\WooCommerce\Admin\API\Reports\PerformanceIndicators
Controller::get_stats_parts()
Returns the endpoint part of a stat request (prefix) and the actual stat total we want. To allow extensions to namespace (example: fue/emails/sent), we break on the last forward slash.
Метод класса: Controller{}
Хуков нет.
Возвращает
Массив
. Containing the prefix (endpoint) and suffix (stat).
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_stats_parts( $full_stat );
- $full_stat(строка) (обязательный)
- A stat request string like orders/avg_order_value or fue/emails/sent.
Код Controller::get_stats_parts() Controller::get stats parts WC 9.8.2
private function get_stats_parts( $full_stat ) { $endpoint = substr( $full_stat, 0, strrpos( $full_stat, '/' ) ); $stat = substr( $full_stat, ( strrpos( $full_stat, '/' ) + 1 ) ); return array( $endpoint, $stat, ); }