WC_Query::get_current_posts()
Get the posts (or the ids of the posts) found in the current WP loop.
Метод класса: WC_Query{}
Хуков нет.
Возвращает
Массив
. Array of posts or post ids.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_current_posts();
Код WC_Query::get_current_posts() WC Query::get current posts WC 8.7.0
protected function get_current_posts() { return $GLOBALS['wp_query']->posts; }