WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Order status set to "On-Hold" (4 posts)

  1. sbernado
    Member
    Posted 10 months ago #

    Hello,

    New orders are being marked as on-hold, even though payment processing was successful.

    Details:

    - Using PayPal for payments
    - Using free Groups plugin from ITThinx
    - Using Groups for WooCommerce plugin (premium)

    This is a new site and my initial testing went fine using the PayPal Sandbox. But now, real customer orders are being placed on hold and they are not receiving their emails (download links, etc).

    Thank you for a great plugin. I appreciate any response.

    - Scott

    http://wordpress.org/extend/plugins/woocommerce/

  2. asimbawany
    Member
    Posted 10 months ago #

    I have the same problem on my site. only difference is, im using the 2checkout extention to take payments via 2co and all my orders are going to pending instead of processing.

  3. ehsan1111
    Member
    Posted 10 months ago #

    me too!

  4. ehsan1111
    Member
    Posted 10 months ago #

    did you test this hack:

    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;
    }

    not working for me :(

Reply

You must log in to post.

About this Plugin

About this Topic