Prevent SKU from being added to tickets

Home Forums Ticket Products Event Tickets Plus Prevent SKU from being added to tickets

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1163036
    keystoliteracy
    Participant

    Whenever I add a new ticket, I leave the SKU field blank.

    But after saving, when I go back to view the ticket, a SKU has been auto generated for it (order number – ticket name).

    How can I prevent this from happening?

    Thanks!

    #1163252
    keystoliteracy
    Participant

    I fixed it with this code

    function tribe_disable_sku_for_tickets( $ticket_id ) {
    	update_post_meta( $ticket_id, '_sku', '' );
    }
    add_action( 'wootickets_after_save_ticket', 'tribe_disable_sku_for_tickets' );
    #1163497
    Geoff
    Member

    Heck yeah, nice work Abby! I appreciate you both following up and sharing this with us and the community — super helpful. 🙂

    Cheers and have a great day. Definitely let us know if any other questions come up and we’d be happy to help.

    Geoff

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Prevent SKU from being added to tickets’ is closed to new replies.