After Update, Add to Cart Showing When Product not Purchasable
-
I updated my WooCommerce test store to 2.5.0. I have a variable product that I have used the “woocommerce_is_purchasable” filter to make said product not purchasable if the user is not logged in. This worked properly before the update–the Add to Cart button did not display if the user was not logged in. Now it displays, but does nothing if clicked (similar to the problem discussed in this thread).
In addition, before the update, the button did not display if no specific variable option had been selected. Since the update, the Add to Cart button appears even if no option has been selected. Nothing happens if the button is clicked, but the button should not be appearing at all.
Even if I remove the function that uses the “woocommerce_is_purchasable” filter to make the item not purchasable for non-logged-in users, the problem of the Add to Cart button appearing when no option has been selected persists.
I am using the filter in a similar way for some non-variable products, and for those it is working properly. The Read More button appears in product listings, and no Add to Cart button appears on the product pages. So maybe this problem is affecting variable products only.
I am using the latest version of the WooThemes Canvas theme.
- The topic ‘After Update, Add to Cart Showing When Product not Purchasable’ is closed to new replies.