Currently I have classes that will happen weekly for 6 times. So, I created a recurring event that will repeat for 6 times. However, I noticed that users can still purchase ticket eventhough the class has started on its first week. How can I make the ticket sales to end whenever the class is starting its first week?
add_action('wp_footer', function() { ?> <script type="text/javascript"> (function ($) { if (typeof $.stecExtend !== 'function') { return; } $('.stec').on('onEventToggleOpen', function (e, data) { if (parseInt(data.repeatOffset, 10) > 0) { data.$instance.find('.stec-layout-event.active .stec-form-booking').before('<p>The booking has to be made on the first class date</p>'); data.$instance.find('.stec-layout-event.active .stec-form-booking').remove(); } }); })(jQuery); </script> <?php });
Hi Support,
Currently I have classes that will happen weekly for 6 times. So, I created a recurring event that will repeat for 6 times. However, I noticed that users can still purchase ticket eventhough the class has started on its first week. How can I make the ticket sales to end whenever the class is starting its first week?
Hi,
Add this code to your theme functions.php file at the bottom:
This code basically looks if the event is recurrent and if so it will remove the booking form.
Stachethemes Developer
Hi, the code works and it removes the booking form. But can I have it displays a message like 'The booking has to be made on the first class date' ?
Thank you.
Edit the code to:
Stachethemes Developer
Have you been updating your theme after entering the code?
Stachethemes Support
My Time Zone is GMT+3
Envato Profile | Facebook | Twitter | Newsletter | Rate & Review
No I haven't updated the theme.
Hi Support,
Is the developer well? Sorry to push you but my problem is kinda urgent because my website is now live and customers are coming in.
Hope you get better soon,
Thank you.
Hi,
Could you provide me with ftp to check it out?
Stachethemes Developer
Host name: itrainkids.com
Username: [email protected]
Password: stachethemes2019
Hi,
Sorry for the delay.
I've cleared your site cache and the problem should be resolved.
Stachethemes Developer