Forum Replies Created
-
AuthorPosts
-
Naoya IshikawaParticipant
thank you for your reply.
Could you please tell me where to find the code that is changing the order number when the suborder is completed?
I want to check the part of the code and see if I can change it myselfNaoya IshikawaParticipantThe order status you want to change is a status that you personally created by another plugin.
If possible, I would like the order number to be in a personally created status and the suborder to be “in process” when the order is accepted. Is this possible?
However, the initial status of the suborder seems to copy the status of the order number.If not possible, when all the suborders associated with the order number are “completed”, instead of setting the order number status to “completed”, another, personally created status I want you to tell me if you can change it.
Naoya IshikawaParticipantThank you for your support.
I tested it here, but there are still duplicate tickets issued.
When I purchase a ticket issued by a vendor’s account with authority, it is still issued in duplicate.Naoya IshikawaParticipantThe attendees, which have the post type of “tribe_wooticket”, have a meta key that stores the WooCommerce product ID: “_tribe_wooticket_product”
You can see this being used in the following file: event-tickets-plus/src/Tribe/Commerce/WooCommerce/Main.php
Naoya IshikawaParticipantWe received the following answers from the creator of the plugin.
Apologies, but I’m not sure I understand your questions.
WooCommerce orders contain a list of the products in the order. You can get the products in an order with the following:
$order = wc_get_order( $order_id );
$items = $order->get_items();The plugins we are discussing are WooCommerce, Event Tickets and Event Tickets Plus.
Naoya IshikawaParticipantThis reply has been marked as private.Naoya IshikawaParticipantThis reply has been marked as private.Naoya IshikawaParticipantI’m afraid I don’t understand your question.
The tickets are created as WooCommerce products.
The orders created by WooCommerce are of the “shop_order” post type. The _tribe_has_tickets meta key is stored in the postmeta table associated with the post id of the order.
Naoya IshikawaParticipantI have received additional information from the plugin author and I will share it.
ーーーーーーーーーーーーーーーーーー
events hook into the “woocommerce_order_status_changed” action.
If you look at the “generate_tickets()” method, it contains multiple filters that could be hooked into. Also, check out the following two variables inside this method:
$already_generated
$already_dispatched
These control whether the attendee will get generated and ticket sent out. They are checking post meta attached to the order id. You may be able to hook into the “get_post_metadata” filter to control the returned values.
You would need to probably add some logic that is able to associate the two separate order IDs that your plugin is creating.
Naoya IshikawaParticipantThis reply has been marked as private.Naoya IshikawaParticipantThis reply has been marked as private.Naoya IshikawaParticipantThis reply has been marked as private.Naoya IshikawaParticipantThis reply has been marked as private.Naoya IshikawaParticipantThis reply has been marked as private.Naoya IshikawaParticipantThis reply has been marked as private. -
AuthorPosts