Comments Tessera Multimedia started the conversationFebruary 20, 2019 at 3:52pmHello,is possible to disabled automaticly the booking option when event starts?Best Regards, 877Zhivko repliedFebruary 24, 2019 at 2:20pmHi,Add this code in your theme functions.php file: add_action('wp_footer', function() { ?> <script type="text/javascript"> (function ($) { $('.stec').on('onEventToggleOpen', function (e, m) { var now = Math.floor(new Date().getTime() / 1000); if (parseInt(m.event.start_date_timestamp, 10) + parseInt(m.repeatOffset, 10) < now) { m.$instance.find('.stec-layout-event.active').find('.stec-form-booking').remove(); } }); })(jQuery); </script> <?php}); add_action('stec_single_after_content', function() { ?> <script type="text/javascript"> (function ($) { var now = Math.floor(new Date().getTime() / 1000); var eventTime = window.moment(stecSingleEvent.start_date).add(stecSingleOptions.repeat_offset, 'seconds').unix(); if (eventTime < now) { $('.stec-form-booking').remove(); } })(jQuery); </script> <?php}); Stachethemes Developer Sign in to reply ...
Hello,
is possible to disabled automaticly the booking option when event starts?
Best Regards,
Hi,
Add this code in your theme functions.php file:
Stachethemes Developer