Can I add ACF field data as WC order item meta?

Home Forums Ticket Products Event Tickets Plus Can I add ACF field data as WC order item meta?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1191108
    Dan
    Participant

    I’m using Event Tickets Plus for my users to purchase course tickets thru WooCommerce, but I’m running into an issue. I need to have certain strings attached to the order item meta of each course. I’d like to store these strings as Advanced Custom Fields data on the post that my event ticket is added to. If I’m not understanding this correctly, here’s the workflow I’d like.

    – Admin would store strings in 2 fields on a single-course post using Advanced Custom Fields
    – User would purchase a ticket to a course
    – On checkout, those 2 fields would be sent as order_item_meta, collected by Zapier

    As far as I can tell, something like wc_add_order_item_meta() wouldn’t work because I’m skipping that step.

    Any help in figuring this out would be appreciated.

    #1191840
    Geoff
    Member

    Hi Dan,

    Happy Monday and I hope you had a great weekend. 🙂

    That’s a great question. To be honest, I think using ACF might be too touch for this specific use case. The custom field is excellent for adding more information to a published event/ticket/etc. but that information us not necessary associated with with the event/ticket after submission.

    Do you think it would be cleaner to use the custom field feature in Events Calendar PRO instead? The reason I ask is because that would allow to (1) create the two custom fields, (2) allow people to purchase a ticket, then (3) fetch the information associated with the given event for use in the integration you are building.

    Then again, that might not be ideal for you because then it ties you to making tickets on events posts instead of the default Pages and Posts it looks like you’re using now.

    All this to say that it is really tough to associate an ACF field with a ticket and then relate that order meta.

    However, another idea might be to add custom meta to your WooCommerce order form — that would allow you to collect the information needed in the checkout process, which is then associated with a ticket.

    Sorry I don’t have a concrete answer for you, but I hope this at least helps get the ball rolling.

    Cheers,
    Geoff

    #1202043
    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 ‘Can I add ACF field data as WC order item meta?’ is closed to new replies.