How to handle WordPress/WooCommerce notice display logic?
So WooCommerce has various functions to handle notices pretty easily within any front-end hooks, similarly, Wordpress has various functions to handle notices pretty easily within any back-end hooks. Due to both WooCommerce and Wordpress needing to be used to display notices for both sides of a plugin I’m working on, I decided to try to make a class for handling both front-end and back-end notices more easily. This was easy until I got to handling both front-end and back-end AJAX functions. AJAX functions seem to require an additional step on the JS side to actually display any notices created within the AJAX function.
Ajax Call with Separate WooCommerce PHP Function
I am trying to build a custom page where user fills his product criteria by clicking on/off switch buttons and then when user clicks a “Submit” button, the desired product will be visible using a custom woocommerce shortcode.