Automatically mark authorized orders as "complete"
-
Hello,
In an Authorize-then-Capture mode (authorize now but settle later), does the plug-in support automatic marking of the authorized and approved orders as “Complete” to show in WooCommerce, so that the admin does not have to manually mark every order?
Thank you in advance!
-
This plugin does not support marking the order as complete in capture later
In fact you will have to capture funds from Stripe dashboard if you are using plugin in Authorize Only mode
i am however working on showing a capture button on order page for authorized order to capture the funds directly from order page instead of logging in stripe dashboard each time to capture funds
However marking order as complete is a manual process i believe after the item has been shipped
BTW what type of product are you selling
Thanks for the explanation.
We’re selling both virtual goods and physical goods (to be shipped by our fulfillment partner), which is why we need the “capture later” option at time of shipment.
Right now we are on Authorize.net AIM and not able to automatically mark as Complete, which forces a manual reconciliation process.
Ok i have a link Here
That you can put in functions.php but i think this is nice feature and i should add it to my plugin
Capture later will allow you to capture till 7 days but a button in order page would be nice to capture funds
I have taken your request i will try to implement it on this plugin and ask you to check do u know coding etc so i can give you pastebin link and you can update the plugin for automatically marking as complete let me know
for now you can add code from above link i gave to mark virtual order complete
Let me know if following code when added to functions.php of theme works i just checked and it turns virtual product to completed on payment
but i have a question how doest your code determines if its virtual then authorize and charge at same time ?
add_filter( 'woocommerce_payment_complete_order_status', 'virtual_order_payment_complete_order_status', 10, 2 ); function virtual_order_payment_complete_order_status( $order_status, $order_id ) { $order = new WC_Order( $order_id ); if ( 'processing' == $order_status && ( 'on-hold' == $order->status || 'pending' == $order->status || 'failed' == $order->status ) ) { $virtual_order = null; if ( count( $order->get_items() ) > 0 ) { foreach( $order->get_items() as $item ) { if ( 'line_item' == $item['type'] ) { $_product = $order->get_product_from_item( $item ); if ( ! $_product->is_virtual() ) { // once we've found one non-virtual product we know we're done, break out of the loop $virtual_order = false; break; } else { $virtual_order = true; } } } } // virtual order, mark as completed if ( $virtual_order ) { return 'completed'; } } // non-virtual order, return original status return $order_status; }Thank you!
I will pass onto our developer, but just to follow up:
For virtual products, we can authorize and capture then and there, because they are digital video, etc.
It is only for the physical products (that we have inventory for) that we need to authorize now, capture later.
I presume the same script above would work with Physical Products, right? We have a process to capture the completed orders later.
It will be slightly fishy to manage as Stripe Gateway uses only one of either auth&capture same time or auth now capture later
so your developer might have to tweak the payment gateway to detect if order item is virtual do auth & capture immediately
but if its physical use auth now & capture later
The code pasted above just marks authorized & captured payments as Completed for **Virtual** products but keeps other physical etc in processing mode
NOW AS YOU SAID π
you have process to capture completed orders later for physical goods that process will continue to work in that case you dont need to make any change to payment gateway
Please feel free to ask if still any thing is not clear as it will help anyone other reding this thread
I Had an observation and that is i created a virtual product and i created an order on my local machine in Auth & Capture mode as well as Auth now capture later mode and i found order status is changing to Completed
So if its a virtual product its Order status was changed to Completed and For Non virtual it remained as processing
My woo commerce version is 2.4.6 wp version if 4.3 plugin version 1.0.5
Now For physical goods you will have to manually change order status To Completed once you capture charge from stripe dashboard for authorized (Auth) before
BUT if the plugin mode is in authorize only ( auth now capture later ) the order status will change to Completed for virtual products but you will have to capture charge in stripe dashboard for virtual orders as well
However if an order contains one virtual and one physical item the order status remains in Processing mode in BOTH ( Auth now capture later as well as AUth and capture now mode)
If you still need any suggestion feel free to update the thread
The topic ‘Automatically mark authorized orders as "complete"’ is closed to new replies.