woof_html_types_view_mselect
From ver.2.2.4/1.2.4 Using this hook it is possible to rewrite view of file: \views\html_types\mselect.php [...]
From ver.2.2.4/1.2.4 Using this hook it is possible to rewrite view of file: \views\html_types\mselect.php [...]
From ver.2.2.4/1.2.4 Using this hook it is possible to rewrite view of file: \views\html_types\radio.php [...]
From ver.2.2.4/1.2.4 Using this hook it is possible to rewrite view of file: \views\html_types\checkbox.php [...]
From ver.2.2.4/1.2.4 This hook is added for compatibility with other plugins.
From ver.2.2.4/1.2.4 This hook is added for compatibility with other plugins.
From ver.2.2.4/1.2.4 For displaying any business content on the top of the filtration results [...]
From v.2.2.4/1.2.4 Allows to add custom sort for catalog [...]
From v.2.2.4/1.2.4 Allows to place above the products any business html-message which is not redrawn by AJAX [...]
From v.2.2.4/1.2.4 For resizing images in woof step filter.
add_filter('woof_step_filter_img_size', function($size) {
$size = 'large'; //thumbnail, medium, large, full, array(200, 200)
//woocommerce_thumbnail ,woocommerce_single, woocommerce_gallery_thumbnail
return $size;
});
[...]
Allows to add any messages while user make filtration in AJAX mode. Example:
add_filter('woof_redraw_elements_after_ajax', function($fields, $query) {
ob_start();
if (isset($query->query) AND $query->query) {
$html = "<h1 class='entry-title'>Looks like you like the color:";
foreach ($query->query as $item) {
if (isset($item) AND $item = 'pa_color') {
$term = get_term_by('slug', $item, 'pa_color');
if (is_object($term)) {
$html .= $term->name;
}
}
}
echo $html, "!</h1>";
$fields = ob_get_contents();
}
ob_end_clean();
return $fields;
}, 999, 2);
In example above user gets message if select any color in the filter. By this logic you can any commercial suggestions for the user while they use filtration.
Be attentive with: