WC_Shortcode_Products::set_tags_query_args()
Set tags query args.
Метод класса: WC_Shortcode_Products{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->set_tags_query_args( $query_args );
- $query_args(массив) (обязательный) (передается по ссылке — &)
- Query args.
Список изменений
С версии 3.3.0 | Введена. |
Код WC_Shortcode_Products::set_tags_query_args() WC Shortcode Products::set tags query args WC 9.6.1
protected function set_tags_query_args( &$query_args ) { if ( ! empty( $this->attributes['tag'] ) ) { $query_args['tax_query'][] = array( 'taxonomy' => 'product_tag', 'terms' => array_map( 'sanitize_title', explode( ',', $this->attributes['tag'] ) ), 'field' => 'slug', 'operator' => $this->attributes['tag_operator'], ); } }