• Resolved csem

    (@csem)


    Hello

    I have face one issue related to product category.

    When i have add new product at that time it is autometic assign in some random category

    Note : In Admin –> Product edit only one category is checked this is Uncategorized

    So why other are come in debug

    I have use this code for check response
    $prod_cat_args = array( ‘taxonomy’=>’product_cat’,’orderby’=>’name’,’empty’=> 0);
    $woo_categories = get_categories( $prod_cat_args );

Viewing 7 replies - 1 through 7 (of 7 total)
  • Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    The “Uncategorized” category is the default category that is auto-assigned now if no other categories are selected. It’s the same behavior as WordPress core for “posts”.

    I’m not sure I follow what you mean by the last part. Could you explain a bit more what you mean by “So why other are come in debug”?

    Thread Starter csem

    (@csem)

    Yes Your are right “Uncategorized” category is default.

    But why some random category assign. ?

    In admin only Uncategorized is Checked other are unchecked.

    Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    Just explained why this happens…

    This is the default behavior now, it is the same with how Posts work in WordPress.

    The category is a default, and will be auto-assigned if the product does not have another category attached to it. You can rename this category if you want to, or assign another category to the product.

    • This reply was modified 6 years, 8 months ago by Caleb Burks.

    I understand uncategorized is default, but how can we change another category to default so we can delete this one?

    Plugin Contributor Gerhard Potgieter

    (@kloon)

    You cannot delete it, same as with the default WordPress one for posts. You can, however, rename it as Caleb explained.

    No this is incorrect. With WordPress I can assign another existing category as default and then delete this uncategorized one. Can this not be done with Woocoomerce?

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    Even if you do that ^ you still have an “uncategorized” category. Renaming it will have the same effect. There is no UI provided to change default to another.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Why product category assign automatic’ is closed to new replies.