Woocommerce Aramex shipping plugin is calculating rate depending on dimensions
-
I wanted to connect my wordpress website with Aramex API so I bought a plugin called “Woocommerce Aramex shipping”
I was surprised that it is calculating the rates depending on product dimensions not on its weight.
I tried to edit its code so I changed this:$params['ShipmentDetails']['ActualWeight'] = array('Value' => WC()->cart->cart_contents_weight, 'Unit' => get_option( 'woocommerce_weight_unit')); $params['ShipmentDetails']['ChargeableWeight'] = array('Value' => WC()->cart->cart_contents_weight, 'Unit' => get_option( 'woocommerce_weight_unit')); $params['ShipmentDetails']['Dimensions']['Length'] = max($length); $params['ShipmentDetails']['Dimensions']['Width'] = max($width); $params['ShipmentDetails']['Dimensions']['Height'] = array_sum($defaultHeight); $params['ShipmentDetails']['Dimensions']['Unit'] = get_option( 'woocommerce_dimension_unit' );
and removed the length, width, and height lines from the code in order to send only the weight
It didn’t work and it is not returning an error message! only blank response is recieved.
Is there any solution to this problem?
Thank you ??
Resources:
Aramex Sample code:
https://www.aramex.com/content/uploads/109/232/42007/aramex-rates-calculator-api-sample-code.zip
- The topic ‘Woocommerce Aramex shipping plugin is calculating rate depending on dimensions’ is closed to new replies.