As I was building out Texas Forever (Shameless plug: TexasForever.net has the greatest Texas Forever Shirts in the world), I ran into an issue with the Flatsome theme. When you were in the shopping cart and added a coupon code and then pressed “enter”, the page would refresh without actually applying the coupon code. The only way to actually apply the coupon for your Texas Forever shirt was to click the button.
That wouldn’t do at all, so I went code diving. The file we need to update is buried in /wp-content/themes/flatsome/woocommerce/cart/cart.php
Ideally, you are running a child theme of Flatsome. Assuming you are, just copy the file to your child theme to duplicate it, and then work on it there. If you are NOT, you can still edit the Flatsome theme file, but know that when you update the theme your change will be gone.
The solution itself is really simple: The theme author has a </form> tag out of place, so when you pressed enter in the shopping cart of TexasForever.net it interprets the ‘enter’ as being to submit the form to “Update Cart” and not to submit the form to apply the coupon code.
By moving the </form> tag from line 170 to line 148, the problem is solved and everything works as expected!