• Resolved papawheelie

    (@papawheelie)


    Hi,

    I am following the documentation and trying to retrieve the order details based on the Sequential Order Numner.

    When I execute the code:

    $order_id = wc_sequential_order_numbers()->find_order_by_order_number( $order_number );

    I receive the following error:
    Call to undefined function wc_sequential_order_numbers()

    I am trying to run this on a custom PHP page. All other WooCommerce functions work.

    Can you please assist?

Viewing 1 replies (of 1 total)
  • Plugin Author SkyVerge

    (@skyverge)

    Hey @papawheelie, it sounds like you’re running your code too early, so this function isn’t defined yet. Try hooking into a later action (plugins_loaded should work), and I’d recommend adding a function_exists() check just for sanity 🙂

    Cheers,
    Beka

Viewing 1 replies (of 1 total)
  • The topic ‘Call to undefined function’ is closed to new replies.