• Resolved globalstd

    (@globalstd)


    Hello we are having payments in PayPal and they are not changing to completed when the users made that payment… This is urgent, please help!

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 15 total)
  • Same issue, somethings work and sometimes don’t. I can’t find a pattern, but sin some orders complete the orders correctly, in some orders not change the status and in some orders change the status to complete, then automatically (and i don’t know why) the status change again to processing and then again to complete…

    Adding my name to the list of users with problems… No matter what setting I use, Autocomplete does not work.

    Not work here too… it seems it become unseful plugin. Sad.
    Best option it’s to use pay version of woocommerce team but… but…

    Cheers

    in my desire of solution, i fond some piece of code then if your poroducts are “virtual”, check this :

    <?php
    /*
     * Plugin Name: Autocomplete virtual product
     * Plugin URI: https://rd-graphisme.com
     * Description: Change order status of virtual product after confirmation of pay
     * Version: 0.1
     * Author: RD Graphisme
     * Author URI: https://rd-graphisme.com
     * Copyright: (c) 2019 RD GRAPHISME
     * License: GNU General Public License v2.0
     * License URI: http://www.gnu.org/licenses/gpl-2.0.html
     * Text Domain: autocomplete virtual product for WC
    */
    
    add_action('woocommerce_order_status_changed', 'ts_auto_complete_virtual');
    
    function ts_auto_complete_virtual($order_id)
    {
    
    if ( ! $order_id ) {
    return;
    }
    
    global $product;
    $order = wc_get_order( $order_id );
    
    if ($order->data['status'] == 'processing') {
    
    $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 find one non-virtual product, break out of the loop
    $virtual_order = false;
    break;
    }
    else {
    $virtual_order = true;
    }
    }
    }
    }
    
    // if all are virtual products, mark as completed
    if ( $virtual_order ) {
    $order->update_status( 'completed' );
    }
    }
    }

    Put this in noetpadd++ and save as php
    Put in plugins folder

    Activate… and normally it work.

    Cheers

    I’m going to look into this issue and hope to push a fix this weekend. I haven’t been actively updating this plugin and can only apologise. Please check back over the next couple of days.

    Hi Liam looking at your post from two months ago I am still having the same issues mentioned by the other guys. Any suggestions, please. Like the others, this is of course urgent.

    @nijvyasforum Did u try my method ? small pieces of code ?

    Regards

    I’ve just pushed some updates for this plugin. If everyone is able to update it to the latest version and let me know if you’re still having issues, or if they’ve been resolved?

    @lesscro

    I didn’t try the code only because my knowledge of code is not good.

    @liammcarthur I have updated the plugin and will let you know how it fares. Thanks for your prompt action.

    @liammcarthur Just made a sale and the order showed that the payment was pending. That said I would have expected the client to contact me if the was not able to access the course. They have confirmed that they were able. to access the course on payment. I also notice there is a further update today which I have done.

    Is it possible that the payment/order does autocomplete but it does not physically change the status on Woocommerce orders to completed?

    @lesscro would changing the code cause the woo-commerce orders to physically show that the payment has completed?

    • This reply was modified 4 years, 3 months ago by nijvyasforum.
    • This reply was modified 4 years, 3 months ago by nijvyasforum.
    • This reply was modified 4 years, 3 months ago by nijvyasforum.
    • This reply was modified 4 years, 3 months ago by nijvyasforum.

    @nijvyasforum

    try this :

    <?php
    
    /**
     * Autocomplete Paid - All type of Orders (WC 2.2+ not sure about 4.x+)
     */
    
    add_filter( 'woocommerce_payment_complete_order_status', 'bryce_wc_autocomplete_paid_orders' );
    function bryce_wc_autocomplete_paid_orders( $order_status, $order_id ) {
    	
    	$order = wc_get_order( $order_id );
    
    	if ( $order_status == 'processing' && ( $order->status == 'on-hold' || $order->status == 'pending' || $order->status == 'failed' ) ) {
    		return 'completed';
    	}
    	
    	return $order_status;
    
    }
    • This reply was modified 4 years, 3 months ago by lesscro.

    Please update to the latest version and let me know how you get on.

    Hi Liam, I updated as requested but still no joy. 40 minutes after purchase the order still showed as pending.

    I just downloaded the plugin today. I’m having the same issue.

    The order notes show that the order has moved from processing to completed, however, that status still shows as processing.

    @liammcarthur am I correct in saying your plugin doesn’t specifically use the method:

    $order->update_status( 'completed' );

    I’m wondering if this is where the issue is?

    I will check that example in comparison and see if that works, as currently my Worldpay orders are stuck in “processing” (PayPal isnt stuck but that works without your plugin anyway)

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Order Status didn’t change automatically’ is closed to new replies.