Alter request data while creating label
Code Snippet 01: Alter data of Create Label request in FedEx.
The code gives flexibility to alter the value of existing nodes while triggering Create Label request.
Add the following code to your functions.php or any where relevant.
In the above code, $request contains request data which will be sent to FedEx while creating the label and $order parameter contains order data. This code is given for updating the phone number. PhoneNumber is changed to 123-123-1234 and request is returned.
Note: We do not recommend Adding a new node or Removing the existing nodes from the request data as this could result failure of related API calls.