Home Forums Theme Support Dokan Dokan category widget on seller store

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  towhid 4 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #31070

    stephane
    Member
    Post count: 22

    hello,
    on my WC category i have some hidden slugs = hidden products category (customer can't see it)
    i have a theme function to do that
    /*————————————————————————————————–
    Don't show Catagories –
    ————————————————————————————————–*/
    add_filter( ‘get_terms', ‘get_subcategory_terms', 10, 3 );
    function get_subcategory_terms( $terms, $taxonomies, $args ) {
    $new_terms = array();
    // if a product category and on the shop page
    if ( in_array( ‘product_cat', $taxonomies ) && ! is_admin() ) {
    foreach ( $terms as $key => $term ) {
    if ( ! in_array( $term->slug, array( ‘xxxx' ) ) )
    if ( ! in_array( $term->slug, array( ‘xxxxx' ) ) )
    if ( ! in_array( $term->slug, array( ‘xxxx' ) ) )
    if ( ! in_array( $term->slug, array( ‘xxxxx' ) ) )
    if ( ! in_array( $term->slug, array( ‘xxxxxx' ) ) )
    {
    $new_terms[] = $term;
    }
    }
    $terms = $new_terms;
    }
    return $terms;
    }

    ————————————————————————————————–
    in dokan category widget on seller store this slugs are not hidden,
    please can you help me to fix this ?

    thanks
    Stéphane

    #31152

    towhid
    Participant
    Post count: 4505

    Hello Stephane,

    Can you specify form where your hidden the category? Is it from Admin's Dashboard Category Panel or did you create any function? If it from any function what you create please provide me.

    Thank You.

    🙂

    #31257

    stephane
    Member
    Post count: 22
    This reply has been marked as private.
    #31848

    towhid
    Participant
    Post count: 4505

    Hello Stephane,

    Sorry for late reply. Please allow us some time. This code function will work or not after testing I will let you know.

    Thank You 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Dokan category widget on seller store’ is closed to new replies.