Open galbaras opened 7 years ago
@galbaras That is really hard to make it better because as you know AMP have complex and a log of validation roles! and the current version is the perfect way that we made it in the development time!
Do you any suggestion to make it available because we can not use JS?
The best thing I can suggest is reaching out to the WooCommerce team and collaborating with them. Maybe you can also get ideas from https://wordpress.org/plugins/amp-woocommerce/, although I haven't checked it, or from https://codecanyon.net/item/wp-amp-accelerated-mobile-pages-for-wordpress-and-woocommerce/16278608, if you can get it.
Generally speaking, my approach would be to use WooCommerce hooks and replace JS-based elements with HTML ones. Since simply products already work, you only need to replace variation-related hooks.
I have a feeling that this will give your plugin a much wider distribution.
When displaying products with several variations, both the shop page and the single product pages only show an "add to cart" button. When clicking it, WooCommerce prints a notice saying "Please choose product options...".