Thanks @alexmigf very helpfull!
Have a great evening!
Yes indeed, the post meta is not destroyed when I disable a location.
I was not sure if this is a bug or a development choice.
I ran into it because I get data directly from the database to display in my theme.
What my sql-query does is:
I first retrieve all existing locations from the database and then look up the stock. This ensures that a location is also shown when it has no stock / is not activated for that product.
Hi @alexmigf
sorry for the late response, overlooked the email.
I disable the location in de sidebar (see image)
All the steps I take are:
- Create a product
- Link all locations in the side menu
- Fill in stock for all locations
- Delete link between 1 location and the product
Oops… that’s a basic wordpress function, and I didn’t thought about that. Thanks for the response!