Last active
July 16, 2019 13:13
-
-
Save jesseeproductions/5768685acc4cd48cdd81 to your computer and use it in GitHub Desktop.
WooCommerce Tickets - Set Catalog visibility to Catalog/search for all Tickets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* The Events Calendar - WooCommerce Tickets - Set Catalog visibility to Catalog/search for all Tickets | |
* Alternative Hooks: | |
* wootickets_after_update_ticket | |
* wootickets_after_create_ticke | |
* @version 3.12 | |
*/ | |
add_action( 'wootickets_after_save_ticket', 'tribe_events_woo_change_visibility' ); | |
function tribe_events_woo_change_visibility( $ticket_ID ) { | |
update_post_meta( $ticket_ID, '_visibility', 'visible' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now it's a taxonomy!
https://github.com/woocommerce/woocommerce/wiki/2.6.x-to-3.0.0-Developer-Migration-Notes#product-visibility-is-taxonomy-based-instead-of-meta-based