Created
August 25, 2020 21:50
-
-
Save rafsuntaskin/20f2221e5ffa0875b39974f39712fb75 to your computer and use it in GitHub Desktop.
Allow HTML in ticket description
This file contains hidden or 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
<?php | |
// Allow (safe) HTML for ticket descriptions. | |
add_action( 'event_tickets_after_save_ticket', function( $post_id, $ticket, $raw_data, $class ) { | |
$post = get_post( $ticket->ID, ARRAY_A ); | |
$post['post_excerpt'] = $raw_data['ticket_description']; | |
wp_update_post( $post ); | |
}, 20, 4 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment