Home › Forums › Ticket Products › Event Tickets Plus › Automatic Order Processing
- This topic has 7 replies, 3 voices, and was last updated 11 years, 2 months ago by Barry.
-
AuthorPosts
-
February 2, 2013 at 11:28 am #32019Thomas BlissParticipant
I saw the tutorial about order processing, but something didn’t work quite right or Im not configuring it correctly. If I have a free event, shouldn’t the order automatically complete?
Thank you for your response.
February 4, 2013 at 6:54 am #32050BarryMemberIs this in relation to WooTickets?
February 4, 2013 at 7:02 am #32053Thomas BlissParticipantYes Sorry.. in relation to WooTickets.
February 4, 2013 at 7:03 am #32055BarryMemberOK, just moving this across to our WooTickets forum and I’ll take a look at this.
February 4, 2013 at 8:00 am #32060ricardpanadesParticipantHi “Stranger” XD
Here is the solution that i found after a little hours for me and it will work for you now 😀 :
// ——— Autocomplete ——–
function mysite_hold($order_id) {
$order = new WC_Order( $order_id );
$order->update_status( ‘completed’ );
}
function mystie_processing($order_id) {
$order = new WC_Order( $order_id );
$order->update_status( ‘completed’ );
}
add_action( ‘woocommerce_order_status_on-hold’, ‘mysite_hold’);
add_action( ‘woocommerce_order_status_processing’, ‘mysite_processing’);Only copy and paste this code on you functions.php and all the orders will autocomplete and send the tickets.
I do it with my current project (hhtp://ilcircoitaliano.com) and works very well.
February 4, 2013 at 8:15 am #32065BarryMemberDoes Ricard’s solution work for you Thomas?
February 4, 2013 at 8:24 am #32066Thomas BlissParticipantIm not sure… I’ll have to send this over to someone that knows how to implement this code. Its beyond my knowledge.
February 4, 2013 at 9:03 am #32073BarryMemberOK. I think the rationale for this is that, if the ticket were physically shipped, you would still need to mark the order complete manually.
With that in mind (as discussed here and elsewhere) you could also try editing the product (in the WooCommerce product editor) and marking it as virtual and downloadable.
It then ought to automatically complete.
-
AuthorPosts
- The topic ‘Automatic Order Processing’ is closed to new replies.