• Resolved mrmattrice

    (@mrmattrice)


    I have a plugin that is just updating a discord server with orders. The problem is they are returning the Order ID using $order_id not the custom numbers. I have flipped all the instances to $order_number, and they are still returning the order id. You have an idea how to make this function? and Thank you for your assistance.

    functions.php (3 hits)
    Line 3: function ppsndw_woo_discord_request( $webhookurl, $order_id, $status, $order_value, $products ){
    Line 22: “url” => admin_url( ‘post.php?post=’ . $order_id . ‘&action=edit’),
    Line 35: “value” => $order_id,
    woocommerce.php (3 hits)
    Line 3: function ppsndw_woo_status_trigger( $order_id ){
    Line 5: $order = new WC_Order( $order_id );
    Line 31: $order_id,

Viewing 1 replies (of 1 total)
  • Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @mrmattrice,

    Thanks for reaching out.

    As per our understanding, the plugin that you are using returns post_id instead of our sequential number. Unfortunately, this cannot be fixed at our end alone. We suggest you to use $order->get_order_number() instead of referencing $order->id or $order->get_id() when fetching order data.

Viewing 1 replies (of 1 total)
  • The topic ‘Returning order ID, instead of custom number’ is closed to new replies.