How to Retrieving Return and Exchange Order Details

This section explains how developers can retrieve return and exchange order details using the available functions in the Return & Exchange Plugin.

1. Retrieve Return Order Details

Follow these simple steps to retrieve return order details using the get_data_by_order_id() function.

Function Overview

Function Name:

  • get_data_by_order_id( $order_id )

Parameters:

  • $order_id (int) – The WooCommerce order ID for which you want to retrieve return details.

Return Value:

  • (array) – An array of return request data objects associated with the given order ID.
  • Returns an empty array if no return data is found.

    2. Retrieve Exchange Order Details

    Follow these simple steps to retrieve exchange order details using the get_exchange_data_by_order_id() function.

    Function Overview

    Function Name:

    • get_exchange_data_by_order_id( $order_id )

    Parameters:

    • $order_id (int) – The WooCommerce order ID for which you want to retrieve exchange details.

    Return Value:

    • (array) – An array of exchange request data objects associated with the given order ID.
    • Returns an empty array if no exchange data is found.

    By following these steps, you can successfully retrieve and manage return and exchange order details in your custom functionality.

    $129.00

    Billed annually

    Buy Now