Support » Plugin: Autocomplete WooCommerce Orders » why failed, pending and on-hold orders are considered paid for virtual?

  • Resolved jooray

    (@jooray)


    Hi,

    I wanted to use this plugin, I checked the source code and I do not understand why on-hold, pending and failed are considered paid.

    I am talking about this code (line 79):

    ...( 'on-hold' == $order->get_status() || 'pending' == $order->get_status() || 'failed' == $order->get_status() )

    According to Woocommerce documentation, only “processing” is paid order status, so only this one should be marked “completed”.

    This way, if the payment fails, the downloadable/virtual product is delivered (by marking it complete) before the customer should receive it.

Viewing 1 replies (of 1 total)
  • I’ve made some slight alterations to the logic controlling this section. You’re right, we don’t really want to be checking the other statuses. Feel free to update your plugin and let me know if you’re still having any issues.

Viewing 1 replies (of 1 total)
  • The topic ‘why failed, pending and on-hold orders are considered paid for virtual?’ is closed to new replies.