Skip to content

Instantly share code, notes, and snippets.

@rafsuntaskin
Created August 25, 2020 21:50
Show Gist options
  • Save rafsuntaskin/20f2221e5ffa0875b39974f39712fb75 to your computer and use it in GitHub Desktop.
Save rafsuntaskin/20f2221e5ffa0875b39974f39712fb75 to your computer and use it in GitHub Desktop.
Allow HTML in ticket description
<?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