Woocommerce total stock count for specific category - wordpress

I'm looking for small help. I'm using this function in function.php. When I use a shortcode [total-product] I'll get for example "We have a total of 1000 products in stock".
Using Get the count of all "In stock" products in WooCommerce code, takes a number of products from all categories, but I need to get number just only from specific categories - not from all together.
I don't know how to change the SQL query to select from specific categories, eg by ID.
Is there any chance of counting the number of product "in stock" according to specific categories? Something like (I have no idea about Database structure of WP tables):
AND category_id LIKE '100;101;...' // one or more category IDs

Related

Raise price of all products and product variations by category name in Woocommerce

I simply want to raise the price of all products and product variations in the category "T-Shirts" by 10%.
I have seen this question Woocommerce MySQL to update price of products in specific category
But therefore I need to find out the term_taxonomy_id of the category.
How do I achieve that?
Wordpress/Wocommerce DB structure is a mess.

How can I filter the total price number in woocommerce order list?

How can I filter the total price number in order list in My Account and also in admin order list?
i.e. I want to change html form of prices in these lists in woocommerce.

How to display the regular price in the order items table in the admin

This is the sale price that is displayed (excluding the VAT) in addition to the quantity and the total price and the VAT, for each item in the order items table.
I would like to display the regular price and the discount of the product item.
I checked in the WC_Order_Item_Product, but I could not find the information and I do not want to retrieve it from the related product attributes because that information can change.
I want the information that was active when the order was created.
I searched on this site and and googled a lot but could find any information. Is it even possible ?

How to select multiple wordpress item (woocommerce order) from multiple paginated page

Woocommerce order list has 50 orders per page. How can I select multiple orders from different pages.
Let's say I have 500 order list, by default Woocommerce paginate these order into 10 pages (50 order/page). I need to select order no 5, 150 and 400 (they aren't in a single page) to run bulk action like export. How can I achieve that?
One approach I am trying is to enter comma separated order number into the search field and then just select the result.
Is there any quick and better way to do that?

Custom loop for getting products flagged as new

I was looking for a way to build a custom loop to get the products flagged with the "new" label.
I could use the sort from the insert time, but that would always include a certain number of products, my goal here is to get those products that conform to the WooCommerce setting that says the product is considered new for a given number of days.
i have a free plugin - WooCommerce Product Badge, it has your requested feature to display "New" label with certain days defined.

Resources