Woocommerce’s add_to_cart function returns false and doesn’t add anything to the cart [closed]

Finally solved the problem. The item wasn’t being added because the product didn’t have a price. That’s all.