Custom Generated WooCommerce SKU

Home Forums Ticket Products Event Tickets Plus Custom Generated WooCommerce SKU

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1571556
    Josh Kern
    Participant

    Is it possible to change the automatically generated WooCommerce sku? Is this automation handled by Event Tickets Plus? I\’d like to do something like the following: ticketname-eventname-startdateyear

    #1572880
    Sky
    Keymaster

    Hi there,

    Thanks for reaching out. I’d be happy to help with your question.

    There is not a built in way to change the automatic sku, but it is possible with some custom development. We are limited in the amount of support we can provide for customizations like this, but I may be able to get you pointed in the right direction.

    The SKU is automatically generated by the Event Tickets Plus plugin. Unfortunately, there is not a filter or other way to change the pattern it uses. However, there is a filter that can enable/disable automatically generating a sku. The filter is ‘event_tickets_woo_should_default_ticket_sku’ and if you passed this “false” it would not generate the sku. You could then apply your own logic to create the sku on your own. Check out the source code to see how this is done. wp-content/plugins/event-tickets-plus/src/Tribe/Commerce/WooCommerce/Main.php starting on line 909.

    It is just saving it to a post meta field. You might be able to hook into ‘event_tickets_after_woo_ticket’ (see line 1128 from the file above) and save your own custom sku there.

    I hope this helps! Let me know if you have additional questions about this.

    Thanks,
    Sky

    #1588741
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Custom Generated WooCommerce SKU’ is closed to new replies.