Hide Global Stock & Editing template files.

Home Forums Ticket Products Community Tickets Hide Global Stock & Editing template files.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1227770
    Colm
    Participant

    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.php

    has 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.php

    has been copied to /wp-content/themes/x-child/tribe-events/community/src/views/event-list.php

    Thanks!

    #1228712
    Barry
    Member

    Hi 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?

    #1230145
    Colm
    Participant

    Thanks! 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!

    #1230246
    Barry
    Member

    Hi 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?

    #1246974
    Support Droid
    Keymaster

    Hey 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

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Hide Global Stock & Editing template files.’ is closed to new replies.