Get more for your money each Wednesday with big savings on selected extensions. Shop this week's deals.
Product Icon

FedEx Shipping Method for WooCommerce

by Woo
Get shipping rates from the FedEx API which handles both domestic and international parcels.

Add filter hook to change or override weight

As per our client’s requirement, we needed a way to modify the weight of the product when shipping request is processed. We needed a way to add or override the product weight with a custom field value from WooCommerce Extra Product Options. To achieve this we have added a custom filter hook in Shipping plugin where it’s retrieving the Product weight.

The following filter is added to the plugin

apply_filters( ‘epoms_calculated_option_weight_for_shipping’, wc_get_weight( $values[‘data’]->get_weight(), ‘lbs’ ), $values, ‘lbs’ )

woocommerce-shipping-fedex/includes/class-wc-shipping-fedex.php
Line 471, 567

Author

Current Status

Open

Last updated: January 27, 2020

0 comments

Log in to comment on this feature request.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.