Hi @hanikey,
Thanks for reaching out.
Helping out with custom coding of this nature is outside the scope of support that our staff can help out with here, although I would recommend the following:
- Running the exact question you’re asking, along with the code provided, through an AI platform like ChatGPT for recommendations/changes to your code;
- Checking whether there are existing plugins in the WordPress plugin repository that might be doing that already.
- Joining our WooCommerce Slack community (it does have a developer channel where you can ask coding questions): https://woo.com/community-slack/
Hope it helps!
Hi @hanikey
In addition to what my colleague replied, and speaking in general terms, the easiest would be to hide that field with custom CSS (assuming this is on the single product page). The body tag should contain the product type as a classname. You could then use that unique classname to hide the quantity field on the single product page for specific product types.
Hope it helps.
@ckadenge thanks for your response, i will try out your third suggestion, which is the slack community. I’ve tried AI but as it is that Gpt only use what’s in it’s archive to answer, so it hasn’t been of help. It seems i’m the first person trying such.
@riaanknoetze thanks for your feedback, i will also give that a try.
i’ve finally solved the issue by following another method to recreate the product type
Hi @hanikey
I’m glad you were able to find a solution to your inquiry here and thanks for sharing it with the community too! 🙂
Should you have further inquiries, kindly create a new topic here.
Thanks!