Automattic\WooCommerce\Admin\Features\Blueprint\Exporters
ExportWCShipping::get_terms()
Retrieve term data based on provided classes.
Метод класса: ExportWCShipping{}
Хуков нет.
Возвращает
Массив
. Retrieved term data.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_terms( $classes ): array;
- $classes(массив) (обязательный)
- List of classes with term IDs.
Код ExportWCShipping::get_terms() ExportWCShipping::get terms WC 9.8.5
protected function get_terms( array $classes ): array { global $wpdb; $term_ids = array_map( fn( $term ) => (int) $term['term_id'], $classes ); $term_ids = implode( ', ', $term_ids ); return ! empty( $term_ids ) ? $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}terms WHERE term_id IN (%s)", $term_ids ), ARRAY_A ) : array(); }