Open Close Pro Hook
-
Hi there,
I use the pro plugin and I need to know what hook can I use to show or hide a class?
For example right now I have a piece of JS+PHP code that check if it’s between X and Y hours and it will trigger the code.
My goal is to get automatically this information via Open Hours to avoid having to recode this each time I change my shop hours.if(current_time('H:i') >= '11:30' && current_time('H:i') <= '22:33'){ echo "<script type=\"text/javascript\">var d = new Date(); var dayOfWeek = d.getDay(); if(dayOfWeek >= 0 && dayOfWeek <= 6) { var x = document.getElementsByClassName('progress'); var i; for (i = 0; i < x.length; i++) { x[i].style.display = 'block'; } } </script>"; }
Thank you!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Open Close Pro Hook’ is closed to new replies.