I want to ask everyone to know about WooCommerce WordPress. I have a page for list product WooCommerce, in there have information like title and price and button "Add to cart" when the cursor hovers to the product. I want to disable or hide the button when my point is insufficient for the product. Is it possible to do that? I am using plugin GamiPress – WooCommerce Points Gateway for payment with points
Above this example for a product (100 points)
Above this my current point (0 point)
2
Answers
Use remove_action() to remove add to cart in certain conditions.
You can add the disabled attribute on the button if points are insufficient for the product. For example, you can get the total points in the var pints and if the points are less than 100 you add disable attribute to the button.