• Resolved Hassan Hossinie

    (@onlinerir)


    Hello

    Since version 3.6.3 orders for other sellers are displayed in RESTAPI !!

    Please solve this problem.

    Thanks.`

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support sazdhossain

    (@sazdhossain)

    Hi @onlinerir

    I tried retrieving all orders using this API endpoint – /wp-json/dokan/v1/orders/ and it worked as expected. Could you share some details regarding the problems you are facing?

    Plugin Support Jahidul Hassan Mojumder

    (@jahidulhassan)

    Hi @onlinerir,

    Due to inactivity, we are marking this topic as resolved. Feel free to open a new one if you face any further issues.

    Thanks!

    Thread Starter Hassan Hossinie

    (@onlinerir)

    Hello

    Yes, it still has a problem
    Because when receiving orders, the seller’s ID is not set.

            $args = [
                'status'      => $request['status'],
                'order_date'  => $request['order_date'],
                'limit'       => $request['per_page'],
                'paged'       => isset( $request['page'] ) ? absint( $request['page'] ) : 1,
                'customer_id' => $request['customer_id'],
            ];
    
            $orders = dokan()->order->all( $args );

    dokan-lite/includes/REST/OrderController.php
    Line 420

    I put it like this and it was fixed

            $args = [
                'status'      => $request['status'],
                'order_date'  => $request['order_date'],
                'limit'       => $request['per_page'],
                'paged'       => isset( $request['page'] ) ? absint( $request['page'] ) : 1,
                'customer_id' => $request['customer_id'],
    	    'seller_id'   => get_current_user_id(), // <= Seller ID
            ];
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘View orders from other sellers in Rest Api’ is closed to new replies.