HUSKY - WooCommerce Products Filter Professional


woof_seo_do_index

Hook woof_seo_do_index is for extension SEO URL . This is for more flexible indexing control. For example, the user does not want to index only red products:

add_filter('woof_seo_do_index', function ($do_index, $curr_url, $request_data) {

    if (isset($request_data['pa_color'])) {
        $colors = explode(',', $request_data['pa_color']);
        if (in_array('red', $colors)) {
            $do_index = false;
        }
    }

    return $do_index;
}, 10, 3);

 


Troubles? Ask for Support!