Home › Forums › Ticket Products › Community Tickets › Hide Global Stock & Editing template files.
- This topic has 5 replies, 4 voices, and was last updated 7 years, 2 months ago by Colm.
-
AuthorPosts
-
February 1, 2017 at 12:25 pm #1227770ColmParticipant
Hello!
I am using the PRO version of the plugin.
On submitting a new event; I give users an option to sell tickets.
Please confirm how I hide “Enable global stock” – I don’t want to show this.I have referred to your themer’s guide but am having trouble understanding if I am assigning edited template files correctly to my child theme. Please confirm each of the following copied locations are correct and will maintain changes on update.
/wp-content/plugins/the-events-calendar/src/views/single-event.php
has been copied to /wp-content/themes/x-child/tribe-events/the-events-calendar/src/views/single-event.php
—
/wp-content/plugins/the-events-calendar-community-events/src/views/community/edit-event.phphas been copied to /wp-content/themes/x-child/tribe-events/community/src/views/edit-event.php
—-
/wp-content/plugins/the-events-calendar-community-events/src/views/community/event-list.phphas been copied to /wp-content/themes/x-child/tribe-events/community/src/views/event-list.php
Thanks!
February 2, 2017 at 9:38 pm #1228712BarryMemberHi Colm,
Thanks for contacting us!
…has been copied to /wp-content/themes/x-child/tribe-events/the-events-calendar/src/views/single-event.php
That’s not quite right: please ditch the the-events-calendar/src/views part of the directory structure so that the template is located at:
themes/x-child/tribe-events/single-event.php
…has been copied to /wp-content/themes/x-child/tribe-events/community/src/views/edit-event.php
Similarly, ditch the src/views part of the structure so that your template path looks like:
themes/x-child/tribe-events/community/edit-event.php
Likewise for your final example.
Please confirm each of the following copied locations are correct and will maintain changes on update.
So long as your theme is not updated that is true (and I’m assuming it’s a custom child theme you are in control of here – so you should be just fine) 🙂
Does that answer your questions?
February 6, 2017 at 12:46 pm #1230145ColmParticipantThanks! Could you please shed some light on the first part of my topic – On submitting a new event; I give users an option to sell tickets.
Please confirm how I hide “Enable global stock” from the Submit Event page – I don’t want to show this option and I cannot hide through CSS.
Thanks!
February 6, 2017 at 4:32 pm #1230246BarryMemberHi Colm,
The best way to achieve that may be a PHP snippet, which you could then add to a custom plugin or even to your theme’s functions.php file:
function community_tickets_turn_off_global_stock_option( $enabled ) { if ( ! function_exists( 'tribe_is_community_edit_event_page' ) ) { return $enabled; } if ( ! tribe_is_community_edit_event_page() ) { return $enabled; } return false; } add_filter( 'tribe_tickets_woo_enable_global_stock', 'community_tickets_turn_off_global_stock_option' );
Does that help?
February 28, 2017 at 8:35 am #1246974Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Hide Global Stock & Editing template files.’ is closed to new replies.