Woocommerce stock quantity display no longer working - wordpress

Since updating to the latest version of WooCommerce, the stock quantity display no longer works. Before in the variation description box we could paste
Stock Qty: [variation_stock id="15869"]
and the quantity would display under the product.
Since the update all information in the description box has disappeared. When we reinstate it, it doesn't take long for it to disappear again.
This is pretty disastrous considering we've got 1900 variations. Anyone know idea how to fix this problem please?

Related

Show a product price based on product ID in WordPress

This might be a stupid question, but have searched quite a lot and have still not found a way for this.
I use Wordpress, WooCommerce and Elementor on my webshop.
I update my prices about once a month. A lot of places I have a price written as texteditor or headline, and want to change that to be price coming from system.
I have tried some different ways, but so far I could not manage to make it work.
Any ideas?
I have tried use product lists, I can get the price based on product ID, but cannot style it.
I have tried with CSS shortcode, but could not make it work.
There is Product Price fields in Wordpress, but cannot make them work.

In woocommerce making an admin invoice where i change the price manually

if I sell a product from the backend, not from the shop front-end, I would like to change the price for this order only, not in the product table.
I have searched for variable-price products but cannot find anything that fits my needs.
I found variations and discount rules but I just want to change the price when I make an invoice from the backend, maybe through a dummy product where I can change the description too.
Anyone an idea if this is possible?
With the POS systems I support (Chromis) or in front accounting this is possible.
BTW if someone has a link to a WooCommerce-forum where users help users I would be happy.
Regards,
Jan
thanks for the reaction.
I have got an answer from another forum, in Woocommerce one has to enter the order first and afterwords the price is editable.
You cannot see this straight away, first you must put the mouse in the part with the positions, then the pencil to edit appears.
Not the most elegant way but usable.
And i did found more forums.
Regards,
Jan

hide product categories and / or subcategories if the products in them are out of stock

Is it possible to hide product categories and / or subcategories if the products in them are out of stock please?
So for example I have the ‘Out of stock visibility – Hide out of stock items from the catalog’ in Woocommerce settings checked, so out of stock products are not being displayed.
However I also have a category for ‘Elektra Comic Books’ that has two subcategories:
Elektra Vol 3 (2014)
Elektra: Black, White & Blood (2022)
Elektra Vol 3 (2014) has a comic in stock, but Elektra: Black, White & Blood (2022) has no comics in stock and displays the ‘No products were found matching your selection.’ message when entered.
Is there some code I can use so that the Elektra: Black, White & Blood (2022) subcategory (or any other subcategory that has no products in stock) is not displayed, but if new stock is added it will become visible / available again?
I've found this question wordpress woocommerce hide "out of stock" products category which seems to be pretty much what I'm after, but the answer is a link to the answer for something else and I can't work out how to adapt it to my needs... I'm not convinced it would work.
I've also tried combining a couple of unrelated fixes for hiding categories in widgets and trying to adapt them... but it is well beyond my abilities haha!
Edit: So I've found this plugin: woocommerce-hide-empty-categories-shop
It sounds like it's exactly what I'm after, but it's a few years old and gives a fatal error when I try to use it.
I've left a comment for the author, so hopefully they'll be able to update it... though it seems a request for an update was mentioned a while ago.
Anyone here think they might be able to work out what needs changing?
Any help would be very much appreciated!
Kind regards,
JP

Woocommerce Price Not Showing

I think this is a weird situation. Usually Woocommerce is a normal plugin, when I install it and Voila Ecommerce ready to use. But, when I install it in my staging server, the price never appear.
I try to debug, I print out all value on $product variable. All information I need is placed in there except "price", but regular price appear. If I put "Sale Price", the price appear, ofcourse 2 prices appear, regular and sale. So the function "$product->get_price_html()" was empty. I have tried to downgrade the Woocommerce version, the result is the same. Unlucky me. You can see it on dev.skripptek.com/kulkulfarm/shop
One problem more, if I use variations, it couldn't saved.
product dashboard
I put sale price at above, and below is null.
I have to googled it, and no one have my problems. It make me stressed and crazy. Is anyone have some problem with me? Please help, it's been 3 days.
Additional information
I already debugged Woocommerce. The "price" is never filled with value when I fill the regular price in DB, but when I fill sale price, the "price" filled automaticly with value.
When I try edit product with quick edit, price is also filled with value but not if I edit directly in edit post. Maybe someone in Automattic can help me with this?
Solved
I update this description, it is solved actually see and expand the comments below. Not sure why it happen, it is just happened in my staging server but in production working fine. Maybe need reinstall the WordPress installation or not compatible with apache version or mysql version.
I'm having a similar issue. It's been working fine with the current child theme (Dazzling) until towards the end of last year.
Products with variants however are behaving correctly. It's the simple product.. if I enter a new product and regular price, it doesn't show "add to cart" and on the previous multiple product listing screen it shows as "read more". If I put a sale price in, it works.
Also, If I remove/clear the sale price that was saved previously and save again, it still has the price I cleared. It's as if wordpress/woocommerce isn't updating the product on this section. All other areas, updating seems fine.
I did a temporary workaround, until this is resolved, by adding a sale price and scheduling it in the past.
I'm seeing a few posts about this issue and starting to suspect it an woocommerce/wordpress issue after an update? I can't be certain though.

woocommerce variation/add to cart not showing

so, I have coded a wordpress theme and integrated woocommerce with it. It has used only simple products for some time, and I was using a simple product to test codes, as it works fine. But I recently added a variation product and then, the add to cart button also gone ( variation select dropdown is there, but values are not bonded to drop down.
If anyone can give me a hint, showing what I have done wrong, that would be a big favor.
I just got the same issue and it solved when I manually entered a price for the variable products. Unfortunately I didn't find out yet why I have to enter it, even for the same value. But it fixed it.
Hope it helps !

Resources