I believe because:
the_ID() : Display the ID of the current item in the WordPress Loop.
and
get_the_ID() : Retrieve the ID of the current item in the WordPress
Loop.
So the_ID()
displays the post ID.
Try to use get_the_ID()
Related Posts:
- Display “add to cart” button on every listing in product category page?
- Display child categories in WooCommerce
- Category index featured image
- Get parrent category name
- Do not show sub categories in the loop on archive-product.php
- How to make product image inherit from category image
- Show the parent taxonomy by creating shortcode in woocommerce?
- How to get related category/categories in WordPress archive page
- Can I set a default featured image for a category?
- Retrieve Product category ‘NAME’ by product category ID – WooCommerce?
- Decreasing the Memory Consumption of a WordPress Site?
- How can I make post fields required in WordPress?
- What’s the URL for a category archive?
- Reflect nested categories in appearance > menus
- Display posts links from a category group by year
- Display list of Sub-Categories and the posts they contain, within one main Category
- Sort category page with custom field
- How to create tabled index of posts in a certain category
- Remove child products from woocommerce category page [closed]
- Root level category, tag, author and archive pages to work
- Category Specific Archive
- How to have Multiple Archives Widgets, one archive widget per category (in a different page)?
- How to select product category while adding new product in woocommerce? [closed]
- “Sticky” posts for each category (archive.php)
- Remove word “Category” from WooCommerce product page [closed]
- Remove Archive Headline and Archive Intro Text fields on category and tag archive pages in WordPress Admin with Genesis framework
- 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
- Add Product categories to WordPress menu without losing hierarchy
- Custom page for WooCommerce’s /product-category/
- Getting categories id for all products in cart
- get_cat_ID() not wokring
- Different excerpt styles per category, but chronological
- WooCommerce duplicate sub categories and product slugs
- How to make a Thumbnails Mosaic
- WooCommerce IF statements not working
- Linking products to categories
- products nested by subcategories in a current category archive
- Multiple Domain Names – One WP Install (non-Multisite) – Default Each Domain name to Product Category WooCommerce
- Show archives by year from just one category
- Archive.php filtered by pre-determined category
- How do I call posts with a certain tag?
- Hide woocommerce category name from specific pages
- Category being displayed without base parmalink
- How can I define a custom archive for childs of a specific category?
- Remove product category placeholder image (Woocomerce)
- Categories for each brands
- Unwanted Duplicate Product Categories in WooCommerce
- Customize WordPress widget – Product Category
- 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]
- List a maximum of ‘x’ product categories with qty of ‘y’ in each column
- 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
- How can i change what one category displays?
- Show different menu on each woocommerce category page
- How to display post in custom file not in archive file?
- Media (images, videos, etc.) not showing on Category page
- WordPress monthly archive category specific
- Archive filtering
- Show Secondary Sidebar on Category pages (archive)
- How to add icon over specific thumb
- Rebuilding a Site: How to Show Several Category Posts in Woo Framework Theme?
- Display post thumbnail for specific category outside the loop
- Add multiple orderby with pre get posts
- WooCommerce shared categories
- How to show given products only using product id array from specific category page in woocommerce
- Shop Category Pages missing s
- WooCommerce REST API not returning the default products category
- How to show WooCommerce Categories on ‘shop’ page instead of products?
- When creating a new product, auto assign it to all custom taxonomy woocommerce
- Get WooCommerce product category list in functions.php
- How Can I Display the Category Description in a Theme with no Category.php or Archive.php?
- WooCommerce showing active product categories on single product page
- How to display custom fields as table in Woocommerce
- How do I merge WooCommerce categories with the same name?
- How to add excerpt and read more button to category archive page
- How to hide/remove featured images in particular categories post?
- product_cat image url from database
- Woocommerce product catalog, products with different description
- WooCommerce – Get products from category right before deleting category
- How to display products with multiple conditions, product_id and category_id
- custom browse by
- Categories and Tags Conflict after Woocommerce Installation
- get_the_terms_list output last child only
- Category archives
- How can I add a Categories page link to a menu? [closed]
- How to enable admins/editors to set a featured image for specific category?
- 2 loops in archive.php (one for each category)
- Category Archives: Show posts categorized in parent category only
- All post of child category not in top category
- Woocommerce – Display product category of product in Orders page
- Changing Woocommerce categories programatically
- how to implement next/prev within category archive?
- How to link ACF relationship field to the new Query block in Full Site Editing
- Restricted category in Woocommerce [closed]