Support » Plugin: Mollie Payments for WooCommerce » Autocomplete order

  • Resolved ry777

    (@ry777)


    Hello,

    Could you please tell me is there a way to automatically complete the order after successful processing ?

    Payment systems enabled are Ideal, and credit card.

    Maybe there is a option I didn’t catch or some script (actions) need to be added.

    I tried some actions but they didn’t work for this payments

    Thanks,

    Best Regards

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor davdebcom

    (@davdebcom)

    If a payment is completed at Mollie, the status will be set to “Processing” in WooCommerce. The change to “Processing” should happen automatically.

    After you processed the order (shipped the goods etc) you can manually change the status to “Completed”. If you want to change this automatically, there are plugins that do this, and code snippets:
    https://docs.woocommerce.com/document/automatically-complete-orders/

    Do be careful: if you change the status to “Processing” or “Completed” before Mollie sent the update to the website, the Mollie payment will not be processed correctly. So make sure you only update from “Processing” to another status, and not “Pending payment” to “Processing” for example.

    Let me know if this answers your question!

    Thank you very much , very helpful answer !

    For those who wonder how to adjust the code so that it will only auto-complete orders that are in ‘processing’, I have adjusted it here for you:

    
    /**
     * Auto Complete all WooCommerce orders.
     */
    add_action('woocommerce_order_status_processing', custom_process_complete_order);
    function custom_process_complete_order($order_id){
    	if ( ! $order_id ) {
            return;
        }
    
        $order = wc_get_order( $order_id );
        $order->update_status( 'completed' );
    }
    
    Plugin Contributor davdebcom

    (@davdebcom)

    Great, thank you for contributing!

    A note for everyone: the way the Mollie plugin handles orders with a status other then pending will change with the next version. It will now “sort of” ignore the order status and check if a Mollie payment with status “paid” has been processed for that order, if there hasn’t been, it will process the payment anyway.

    This should make the process more stable when users (that’s you) use code or plugins to change the order status in WooCommerce manually or automatically.

    Check:
    https://github.com/mollie/WooCommerce/issues/160

    Hi David,

    Thanks for the update and just saw the Mollie 2.8 release. Does that mean that orders that are now in “processing” will automatically get changed to “completed” in short amount of time?

    If so, do I have to remove the auto-complete code (above) from my client website? Its important for my client that the order gets “completed” within an hour or less.

    Plugin Contributor davdebcom

    (@davdebcom)

    No, the plugin will never change the status to wc-complete, always to wc-processing. But it will change the status to Processing more often now (less conflicts with other plugins).

    If you want to change it to wc-complete, you will have to keep doing this with a plugin or code. I do not recommend this unless you know what you are doing, this is not the default way to go for WooCommerce 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Autocomplete order’ is closed to new replies.