This week, I am hacking on WooCommerce to convert “Add to Cart” buttons to prevent redirecting users to different pages. Here’s a great tutorial I used to accomplish this goal. Without page loads, users benefit from loading animations in understanding that something is happening that they otherwise cannot see.
Adding a loading class to buttons dims the button and shows a white spinning gear inside the button to the right of its label.
The default message is “Please Wait…” but you can provide your own text in the options array.
There are more examples on the plugin’s demos page.