• Resolved astrolabb

    (@astrolabb)


    Hi ! thanks for reading this message !

    After paiement and validation, users need to refresh “order received” page to see the serial number on the bottom of the page.

    thanks for your help

    astro

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello @astrolabb,

    thank you for your message and for using my plugin.

    Which payment gateway are you using? Does this happen with all payment gateways?

    Thread Starter astrolabb

    (@astrolabb)

    Hi ! thanks for your message

    I use “PayPal Checkout” for payment. i don’t have check with others gateways

    @astrolabb,

    can you please try? It could be that it’s specific to this payment gateway. Could you also send me the link to the plugin so that I can try it on my end?

    Thread Starter astrolabb

    (@astrolabb)

    i have the same result with Paypal classic

    just after paypal :

    link 1

    after validation (“Commander”)
    link 2

    and after refresh of this order received page
    link 3

    Serial Numbers are created only when the order status is “complete” so i use in function.php

    add_action( ‘woocommerce_thankyou’, ‘custom_woocommerce_auto_complete_order’ );
    function custom_woocommerce_auto_complete_order( $order_id ) {
    if ( ! $order_id ) {
    return;
    }

    $order = wc_get_order( $order_id );
    $order->update_status( ‘completed’ );
    }

    plugins :
    Woocommerce : Version 3.8.1
    License Manager for WooCommerce : Version 2.1.2
    WordPress : Version 5.3.2

    template : twenty seventeen

    thanks you for your help

    • This reply was modified 4 years, 11 months ago by astrolabb.
    • This reply was modified 4 years, 11 months ago by astrolabb.

    @astrolabb,

    seems like your reply got removed? I received an email but I don’t see it here anymore.

    PS: Try increasing the priority on your custom_woocommerce_auto_complete_order hook, something like this:

    add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order', 1, 1 );
    function custom_woocommerce_auto_complete_order( $order_id ) { 
        if ( ! $order_id ) {
            return;
        }
    
        $order = wc_get_order( $order_id );
        $order->update_status( 'completed' );
    }
    Thread Starter astrolabb

    (@astrolabb)

    Whouaaaa ! GG WP ! it works like a charm !

    thanks a lot !

    @astrolabb

    Hooray, it worked! ??

    Absolutely no problem, if you need anything else – do let me know.

    PS: I would also be extremely thankful if you could take some time out of your day to write a plugin review. These reviews really help the plugin to grow and mean a lot to me personally. Here’s the link:

    https://www.ads-software.com/support/plugin/license-manager-for-woocommerce/reviews/#new-post

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘need to refresh “order-received” page to see the serial number’ is closed to new replies.