I am trying to:
In the content template for single product I use the [wpv-woo-buy-options] short code.
I have some products which are sold individually (online courses) and some other product can be bought in quantity. According to woocommerce documentation using the product setting "Inventory->Sold individually" allows to show/hide the quantity input, but the short code ignores this setting.
Further customization can be done using the filter "woocommerce_is_sold_individually", but that is also not working. If I implement that filter, regardless of what I return, the quantity input is not shown.
Link to a page where the issue can be seen:
enlace oculto
I expected to see:
No quantity input
Instead, I got:
The quantity input is displayed
Hi, I just ran a quick test locally and a Product marked "Sold Individually" does not include a quantity select field on my test, so there must be something configured differently in our setups. Can you try the following troubleshooting steps?
- Make sure WordPress, your theme, and plugins are up-to-date.
- Temporarily switch to a default theme like Twenty Seventeen and deactivate all plugins except Toolset and WooCommerce.
- Test again. Is the quantity field still displayed? If not, reactivate your theme and other plugins one by one until the conflict is revealed.
- If the quantity field is still displayed, tell me more about this Product:
- Is it a simple product, a variable product, something else?
- Is the inventory managed at an item level, and how many are in stock?
- Please copy + paste all the code you have in the Product Content Template for me to review.
After just switching to Twenty Seventeen the template behaved as expected.
Apparently the problem is Porto. Instead of hiding the quantity field, the theme shows it but disable the field so the quantity selected is 1 and cannot be changed.
Will start a ticket with the theme provider.
Thanks.