I Solved it by my Self
$args = array(
'hierarchical' => 1,
'show_option_none' => '',
'hide_empty' => 0,
'parent' => $number = 16,
'taxonomy' => 'product_cat'
);
$subcats = get_categories($args);
echo '<div class="wooc_sclist">';
foreach ($subcats as $sc) {
$link = get_term_link($sc->slug, $sc->taxonomy);
echo '<ul><a href="' . $link . '">' . $sc->name . '</a>'.$sc->term_id;
$args2 = get_terms('product_cat',array(
'child_of' => $sc->term_id,
'hierarchical' => 1,
'hide_empty' => 1,
));
foreach ($args2 as $subsubCats) {
$SubLinks = get_term_link($subsubCats->slug, $subsubCats->taxonomy);
echo '<li>sub - <a href=" . $SubLinks . ">' . $subsubCats->name . '</a></li>';
}
echo '</ul>';
}
echo '</div>';
wp_reset_query();
Related Posts:
- How to display product price of the product in loop
- How to disable Woocommerce password recovery and use the default WordPress password reset page?
- Limit users to one active subscription in WooCommerce Subscriptions? [closed]
- How do I add a text input field for customers to leave a note on a single WooCommerce product page?
- WooCommerce add_to_cart() with custom price [closed]
- Declaring custom woocommerce product type as virtual / downloadable only [closed]
- How to remove_action inside class [duplicate]
- Redirect if current user is logged out and current page is /my-account
- WooCommerce HTML after short description if product is in specific category
- How to get total count for each star rating?
- WooCommerce Apply Coupon to order AFTER taxes
- Rewriting Woocommerce Product Filters To URL Segments
- Auto update cart after quantity change
- echo product id and product_item_key in cart [closed]
- Redirect the single product page link to the shop page
- Is WooCommerce updates for WordPress necessary? [closed]
- How can I display *only* the child category of a product?
- Save and display selected product option and cost as cart item data in WooCommerce
- How to implement Handling Fee like the Shipping on Cart and Checkout page on WooCommerce [closed]
- why featured product not updated in postmeta table in woocommerce?
- How to remove product base from WooCommerce product permalinks
- woocommerce image product add a class and data-src attributes
- Woo create order only after payment done
- Change Category Widget Dropdown List Select Name
- wooCommerce checkout page State / County (optional) validate not working
- WooCommerce – Multiple meta query not working
- Quantity on the product card and subtotal disappear [closed]
- Admin access for custom user capabilities
- Display product category taxonomy terms in WooCommerce shop loop
- WooCommerce limited role
- Skip WooCommerce 4.5.x onboarding with WP-CLI [closed]
- Woocommerce Moving Review Below add to cart breaks button
- WP All Import manual Cron
- Automatically making a newly saved payment method default in WooCommerce
- WooCommerce update_shipping_method ajax call wipes shipping method set on non-checkout page [closed]
- Refund from wooCommerce with stripe [closed]
- Download permission for non-purchased products
- Display FREE for $0 products in woocommerce ++++ [closed]
- How to add existing categories into a post using wp_insert_post
- create comment box in woo-commerce shop order [closed]
- Product variation attributes does not appear as it should in the cart – woocommerce [closed]
- Woocommerce: how to know if the customer is canceled the order or the shop owner? [closed]
- WooCommerce Hook: Content get’s displayed twice and not AFTER the order total
- Have I got this IF Statement correct?
- WooCommerce Price Filter not working? [closed]
- Adding Buy Button to Blog Post (Woocommerce) [closed]
- How to replace WooCommerce Product Gallery Trigger icon using PHP/CSS? [closed]
- Cancelled orders move to Trash automatically in Woocommerce – how to disable?
- Adding Field in WooCommerce
- Woocommerce Sort by default variation price
- Add Name and SKU Main Product to Secondary Product to Cart
- WooCommerce set default product sort to product description (content) [closed]
- Synchronise Renewals on existing subscriptions [closed]
- Add rewrite rule to make Woocommerce product category page seo friendly
- How to show the urls inside the simple product when the customer buys it?
- Custom template – query issues
- Sort downloads by most recently purchased first in my account WooCommerce [closed]
- Hide shipping method in woocommerce if custom checkbox field is selected
- add the attribute value above the english product title
- How to add woocommerce products header title in woocommerce_breadcrumb hook to function.php
- Can I create categories or attribute contain more than 70,000?
- Format decimals of get_price_html
- apply_filter and add_filter conflict
- Return product list based on current product attribute
- Getting in an exception for get product detail by id in woocommerce REST api
- How to make wocommerce shop products same heigt
- Woocommerce Variation product added twice to cart
- Woocommerce Ajax add to cart redirect to homepage
- How to merge 2 accounts with same email address after merge of 2 woocommerce databases
- Temporary access to page with URL sent to email
- How to save a Woocomerce metabox input as a metadata field
- How do you programatically add a booking item to the cart?
- populating extra field with woocommerce categories
- Woocommerce Shop Manager Capabilities
- customize src attribute in woocommerce single product image
- How to tell woocommerce slider to use thumbnails
- Add customer name to woocommerce email-header.php heading
- woocommerce sort by dropdown styling
- Mysql query – amount spent by customer
- Integration widget Mondial Relay Js
- How to change the link of product menu from wordpress admin panel
- Custom Registration Fields woocommerce
- Change wp-login.php? Problem with .htaccess password protection and multi user shop
- Conditional email recipient based off Shipping Method [closed]
- Save Woocomerce discount as percentage to database
- Show pop up message for specific categoryies
- How to bypass Woocommerce checkout validation from the plugin? [closed]
- Category with description and thumbnail
- Custom product loop avoiding duplicates
- Woocommerce – Remove ‘Buy Product’ Button + Make Product Thumbnails Clickable
- Issue with Woocommerce and extra field in orders data
- How to show detailed order history on woocommerce product page [closed]
- Give auto discount to upsells products
- Making product image in woocommerce invoice linkable [closed]
- How to dublicate WC Product title to shortdescription field? [closed]
- Add Additional 3 buttons next to “Add to cart” button in woocommerce product page
- Change variants URL
- Use a woocommerce hook to create a table and populate it with a query
- Woocommerce product and category in url [closed]
- Display product categories + child-categories on a single product page