You can resolve this issue by simply specifying the taxonomy you want to display.
$dropdown = wp_dropdown_categories(
array(
'name' => 'category_id[]',
'hide_empty' => false,
'echo' => false,
// Set taxonomy for product categories.
'taxonomy' => 'product_cat',
) );
Before posting here, you should at least do some research on how this code snippet worked for ‘post’, you would’ve found your answer yourself.
Reference :
-
wp_dropdown_categories() from WordPress codex.
Related Posts:
- Force category choice before creating new post?
- Retrieve Product category ‘NAME’ by product category ID – WooCommerce?
- Programmatically create product category and add thumbnail in woocommerce
- Create product category and keyword search form in woocommerce? [closed]
- Add search to list of categories in post editor
- Remove child products from woocommerce category page [closed]
- Use get_term_children to get the sub category of a parent category for the current post
- Hide uncategorized products from the shop page
- Remove word “Category” from WooCommerce product page [closed]
- Filtering search results
- WooCommerce change category url and product base
- Output link to category from WP_Query loop of woocommerce products
- display woocommerce all category title on home page
- Add Icons to the Product Category Sidebar Widget WooCommerce
- How to get product count with respect to categories in WooComerce
- Hide tag and category boxes from the post editor
- Custom page for WooCommerce’s /product-category/
- Get woocommerce catogry
- get_cat_ID() not wokring
- Display child categories in WooCommerce
- WooCommerce duplicate sub categories and product slugs
- Set post categories to include parents when setting child category
- WooCommerce IF statements not working
- Linking products to categories
- Warning: sizeof (): Parameter must be an array or an object that implements Countable, On products pages
- Omit specific product categories from WooCommerce shortcode
- Multiple Domain Names – One WP Install (non-Multisite) – Default Each Domain name to Product Category WooCommerce
- Hide woocommerce category name from specific pages
- Hide woocommerce category name from specific pages
- need to add custom field in more products
- How to redefine the sorting of product categories by menu_order?
- Pagination is not working properly in Product Category/Tag pages
- Best way of getting WooCommerce category path
- How to recreate a copy of a product category in WooCommerce? [closed]
- Get parrent category name
- Sorting category products not working
- Categories for each brands
- WordPress/Woocommerce only show category in shop to a single role
- WooCommerce – How to show specific category first-rest of products-specific category last
- Woocommerce custom category page with pagination [closed]
- Categories are not listing their respective products
- Display single category name in woocommerce loop
- Include WooCommerce product to all child categories
- woocommerce related products by specific categories [closed]
- Do not show sub categories in the loop on archive-product.php
- List a maximum of ‘x’ product categories with qty of ‘y’ in each column
- Display all product tags associated with a specific product category
- How to access deleted term inside delete_product_cat action
- Apply WordPress function on specific woocommerce product categories only
- Grandchild Term Things Grandfather Term is It’s Parent
- Woocommerce filter function not updating
- Adding custom ID field to the categories
- How can i change what one category displays?
- How to display product with two condition, category and brand taxonomy
- Show different menu on each woocommerce category page
- Template for product-category page [closed]
- WooCommerce shared categories
- displaying the last product comment in the woocommerce category
- category description not showing in my woocommerce
- How to make product image inherit from category image
- How to show given products only using product id array from specific category page in woocommerce
- Shop Category Pages missing s
- How to set acf color field as background color to product category
- How to target all woocommerce categories that don’t have any subcategories in them?
- Hide Some Categories in Post Editor
- WooCommerce REST API not returning the default products category
- Show the parent taxonomy by creating shortcode in woocommerce?
- How to add all subcategories as submenu in WordPress menu
- How to edit woocommerce sub-category page
- When creating a new product, auto assign it to all custom taxonomy woocommerce
- Get WooCommerce product category list in functions.php
- in post content shortcode works, but hardcoded in same page template doesn’t?
- How to fix 404 error in pagination in categories of woocommerce with common url base /shop/?
- How to display custom fields as table in Woocommerce
- How do I merge WooCommerce categories with the same name?
- Woocommerce Category Sort Dropdown
- Woocommerce: all products of all categories instead products of one category
- How to delete WooCommerce categories in bulk that only have one product
- Product Category page showing all products
- How to load terms of a custom taxonomy of a product in woocommerce cart page
- product_cat image url from database
- Woocommerce change tag_id to name
- WooCommerce – Get products from category right before deleting category
- How to display products with multiple conditions, product_id and category_id
- Categories and Tags Conflict after Woocommerce Installation
- How to get related category/categories in WordPress archive page
- Category menu that filters out empty categories
- Custom Woocommerce Category view
- Displaying categories and subcategories without link
- Sorting Woocommerce products by category and attributes
- Woocommerce custom taxonomy order
- Update wordpress menu with woocommerce products
- How to get Woocomerce categories count
- Woocommerce – Display product category of product in Orders page
- Changing Woocommerce categories programatically
- Categories and products woocommerce wordpress
- Function to reference post meta in place of category Woocommerce
- category id (term_id) in url instead of slug
- Products showing up in subcategory when they shouldn’t
- Adding 400 product categories with their hierarchy to a navigation menu