Search Knowledge Base by Keyword

Decoding Debug Data of WooCommerce UPS Plugin

Debug data has information that is helpful to identify any advanced code-level issues with the plugin. UPS debug data provide useful insights into the functioning of the UPS Plugin for WooCommerce in the following scenarios:

  1. Some/ All UPS services are not showing up on the cart page.
  2. Rates returned by the UPS plugin are not matching with the UPS calculator rates.

What information can be obtained from the WooCommerce UPS Plugin debug data?

1. UPS Account related information.

ups shipping label

2. Complete Origin Address.

origin

3. Complete Destination Address.
complete

4. Requested and received services. The service code is sent through the request.
other

5. Availability of the Shipping services.
response

 

6. Actual returned rates and negotiated rates (if Negotiated Rate is enabled in the plugin settings).
woocommerce debug7. Insurance rate, if insurance is enabled.

woocommerce debug8. Weights and Dimensions of the Package (Dimensions would be passed in the request only when box packing is selected in the settings page).

woocommerce debug9. Parcel Packing details.

woocommerce debugIn the above case, the Code “02” corresponds to the custom package described by the user.

10. If Box packing is enabled, debug data would reveal which box has been selected.

woocommerce debug

What are errors easily revealed by the debug data?

1. Missing weights.

woocommerce debug

If the above error is showing up, you are required to check whether every product in the cart has weight defined (in the respective product settings).

2. Invalid license number.

woocommerce debug

If the above error shows up, the “UPS Access Key” you have provided in the UPS settings page is wrong.

3. Missing dimensions in case of box packing.

woocommerce debugIn the above case, you need to specify dimensions for box packing.

4. Wrong postal code for either origin or destination.

woocommerce debug5. Missing address fields.

woocommerce debug6. A service is not available for a particular origin-destination combination.

woocommerce debug7. Server-related issues. In such cases either the response from UPS is empty or request is not sent.

8. Authorization error. Invalid Service code.

woocommerce debugIn case of the above error, it is advisable to recheck the UPS Account related information entered in the settings page.

9. Unpacked items. This happens when none of the defined boxes can fit the selected products.

woocommerce debug package

10. Reasons for rates mismatch in the WooCommerce UPS Plugin. There can be various reasons of rates not matching with the UPS rate calculator. These reasons are reflected well in the debug data.

  • If “Pack Items Individually” is selected, rates would be much higher than the UPS calculator.
  • “Weight-Based” packing too would give different rates based on the packaging type selected.
  • Different combinations of “Pickup Type ” and “Customer Classification” would give different rates. So, make sure that you select the right combination which is mentioned below.

Components of Debug Data

The entire UPS debug data can be broadly classified into two parts:

  1. Request
  2. Response

Depending on our purpose of debugging, Request and Response provide different information. Let’s look into both.

Request

UPS Request has the following information:

User’s UPS Account related information such as Access License Number, User Id, and Password.
This part of the request is meant to determine the allowed UPS services to the user.

woocommerce debug

Next part contains the actual request made to the API regarding rates and services.

The separate request is sent for each service.

woocommerce debugAlong with the specific data from each service, the debug request will have information regarding the following parameters as well:

Pickup Type: To obtain correct rates, the Customer Classification should be set to ‘Daily Rates’, if the pickup type is ‘Daily Pickup’. If the pickup type is anything other than ‘Daily Pickup’, the Customer Classification should be set to ‘Retail Rates’.
Customer Classification: If you are shipping from the United States, you can use the Customer Classification Code of UPS to retrieve rates. The available options in the drop-down are as follows:

  • Rates Associated with Shipper Number
  • Daily Rates
  • Retail Rates
  • Standard List Rates

woocommerce debug

Shipment: Shipment contains Shipper number which is basically UPS Account number, origin and destination address.

Service code: This refers to the service requested.

Package type: This part of the request message would say whether “UPS packaging” is used or “My Packaging” is used. Code “02” is used to denote “My Packaging”. Then come the dimensions and weight of the package.

Residential Address Indicator: This would be displayed in the Request if the “Residential” option is checked in the settings page.

woocommerce debug

Insured Value: The total insured value is shown in the request if “Insurance” is enabled on the plugin settings.

Negotiated Rates Indicator: This tag comes in the request, if “Negotiated Rates” is checked in the settings page.

woocommerce debugResponse

UPS Response has the following information:

  1. Response Status Code and Response Status Description  The value of Response Status Code is either 1 or 0 (1 corresponds to ‘Success’ and 0 corresponds to ‘Failure’). The value of the Response Status Description is either ‘Success’ or ‘Failure’.
  2. Details of the Shipping rate  If there is more than one item, the shipping rate is calculated according to the set parcel packing option. When the user is not eligible for negotiated rates, the response will be as the below screenshot:

woocommerce debug

Last Updated On September 24, 2018