MercadoPago orders stay in “Processing” status in WooCommerce: causes and solutions

One of the most common issues WooCommerce users face when using the official MercadoPago plugin is that, even after a successful payment, the order remains stuck in “processing” and never moves to “completed”. In this article, we’ll explain why this happens, how to fix it, and include a code snippet to automatically change the order status in appropriate cases.

 

Why do orders remain in the “Processing” state?

WooCommerce handles order statuses based on the product type and payment:

  • If the product is not virtual or downloadable, the order moves to “processing” after a successful payment.
  • If the product is virtual and downloadable, WooCommerce automatically sets the order to “completed”.
  • However, if the payment confirmation process fails (e.g. the webhook doesn’t respond), the order may remain in “processing” even if MercadoPago approved the payment.

 

Common causes of the problem

  1. Webhook misconfiguration or failure
    • The webhook is responsible for telling WooCommerce that the payment was successful. If it’s not properly configured or fails, the order won’t update.
    • Check the configuration in your MercadoPago notifications panel.
    • Ensure it points to the correct URL: https://yoursite.com/?wc-api=wc_gateway_mercadopago
  2. Physical products
    • WooCommerce will never automatically complete an order that contains physical products, as it assumes they need manual shipping.
  3. Plugin or theme conflicts
    • Security, caching, or custom checkout plugins can interfere with MercadoPago’s notifications.
  4. Bugs in the MercadoPago plugin
    • In some cases, the plugin may misinterpret the server’s response or fail to associate the correct order_id with the payment_id.

 

How to identify the problem

  1. Enable WooCommerce logs
    • Go to WooCommerce > Status > Logs in your dashboard.
    • Select a log file starting with mercadopago and check for errors or webhook responses.
    • For more information on how to use logs, check out this article: How to use WooCommerce logs in your plugins.
  2. Test with virtual and downloadable products
    • Try creating a test product marked as both virtual and downloadable. If that order is completed automatically, the system is working as expected—just not for physical products.

 

Optional solution: force MercadoPago orders to “completed”

If your products don’t require manual processing (e.g. digital licenses, access codes, or downloads that are not marked as downloadable), you can force WooCommerce to complete the order right after a successful MercadoPago payment.

Add this snippet to your theme’s functions.phpfile or a custom plugin:

<?php
add_action( 'woocommerce_thankyou', function ( $orderId ) {
    $order = wc_get_order( $orderId );
    
    if ( ! $order ) {
        return;
    }

    if ( $order->get_payment_method() === 'mercadopago' && $order->has_status( 'processing' ) ) {
        $order->update_status( 'completed', 'Order manually completed after MercadoPago payment.' );
    }
} );
Only use this code if you’re sure your products don’t require shipping or manual handling. Otherwise, you may skip important fulfillment steps.

 

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Back to Top
0
Would love your thoughts, please comment.x
()
x