• Sometimes the function woocommerce_thankyou is not called, but sometimes works fine. Our code is:

    add_action(‘woocommerce_thankyou’, ‘send_order_information_for_delivery’, 999, 1);
    function send_order_information_for_delivery($order_id)
    {
    $order = wc_get_order($order_id);
    $order_items = $order->get_items();

    .
    .
    .
    }

    Any idea why sometimes doesn’t work?

    Thanks a lot!

    • This topic was modified 6 years, 8 months ago by llyunall.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator t-p

    (@t-p)

    I recommend asking at https://www.ads-software.com/support/plugin/woocommerce so the plugin’s developers and support community can help you with this.

    Thread Starter llyunall

    (@llyunall)

    Hello

    Thanks for your answer but this is not a plugin, is a custom method that we made in the file functions.php.

    The main objective of this method is to obtain the information of the purchase order and its items and to send them to another database through an API.

    The strange thing is that in some orders the method is not called.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sometimes the function woocommerce_thankyou is not called’ is closed to new replies.