I am building a site for a client and for a lot of their products, instead of being able to buy them they want an "Enquire now" button. This is an additional button that opens a popup, which I know how to create. What I am stuck with is the default behaviour of woocommerce.

I have variable products and most of the variations have no price, but the add to cart button and the quantity selector still shows up (even if you land on the product and no variation is selected). What I want to achieve is that it is hidden by default when you land on a variable product and you have no variations selected, and also is hidden if you select a variation that has no price or unavailable.

Is there a way I can do these? Some hooks for the initial load and for javascript (for the update).

  • Yoou have some problems in additional plugins, theme or settings. Standard WooCommerce behaviour does not allow to select variation wihtout hte price. Try to add to cart "Red" variation on my test site: test.kagg.eu/product/quia-qui-atque-quia-magnam – KAGG Design Jan 20 '18 at 9:21
  • In the end if I hit "Add to Cart" it gives me the error. What I need is disabling the button or hiding it when a price is not available. – Arpad from KD Web Jan 23 '18 at 7:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.