[...document.querySelectorAll('.click1')].forEach(item => {
item.addEventListener('mouseenter', function (e) {
e.target.closest('.block4').style.backgroundImage = 'url('/bitrix/images/icons/trustability_icon.svg')';
});
item.addEventListener('mouseleave', function (e) {
e.target.closest('.block4').style.backgroundImage = 'url('/bitrix/images/icons/trustability_icon.svg')';
});
})
add_filter( 'woocommerce_product_query_tax_query', 'wpcraft_exclude_products_by_wpqtq', 50, 2 );
function wpcraft_exclude_products_by_wpqtq( $tax_query, $query ) {
if( ! is_admin() ){
$tax_query[] = array(
'taxonomy' => 'product_cat', // 'product_tag' для тегов товаров
'field' => 'slug',
'terms' => array( 'furnitura' ), // 'slug_my_taxonomy' - слаг нужных таксономий через запятую (если несколько)
'operator' => 'NOT IN'
);
}
return $tax_query;
}