Skip to content

Instantly share code, notes, and snippets.

@Njurus
Forked from GeoffEW/tickettoproducts.php
Created February 6, 2017 11:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Njurus/e73da7166307431ce3361ac1f3ab2a34 to your computer and use it in GitHub Desktop.
Save Njurus/e73da7166307431ce3361ac1f3ab2a34 to your computer and use it in GitHub Desktop.
Enable tickets to added to products
<?php
/* Tribe, allow products to be an option to add ticket to in 'Events > Tickets > Settings' */
/* WARNING: this brought issues to customers in the past, so activate at your own risk */
if ( class_exists('Tribe__Tickets_Plus__Commerce__WooCommerce__Main') ) {
remove_filter( 'tribe_tickets_settings_post_types', array( Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), 'exclude_product_post_type' ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment