Title: Feature Request
Last modified: August 30, 2016

---

# Feature Request

 *  Resolved [tsagent](https://wordpress.org/support/users/tsagent/)
 * (@tsagent)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/feature-request-383/)
 * Any thoughts on a hidden fee that would get added to shipping. I have a client
   that this would give a lot more control over shipping charges. (UPS)
 * [https://wordpress.org/plugins/woocommerce-product-fees/](https://wordpress.org/plugins/woocommerce-product-fees/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Caleb Burks](https://wordpress.org/support/users/icaleb/)
 * (@icaleb)
 * Automattic Happiness Engineer
 * [10 years, 7 months ago](https://wordpress.org/support/topic/feature-request-383/#post-6686436)
 * Hmm, that is a possibility I suppose. It would get tricky as you need to target
   a specific shipping method. So with UPS, you’d need to choose which exact method.
 * As an example, here is a short snippet for adding a cost onto FedEx Ground:
 *     ```
       function add_cost_to_shipping_rate( $rates, $package ) {
           $extra_cost  = '10';
   
           if ( isset( $rates['fedex:FEDEX_GROUND'] ) ) {
               $rate = $rates['fedex:FEDEX_GROUND'];
               $rate->cost = $rate->cost + $extra_cost;
           }
   
           return $rates;
       }
       add_filter( 'woocommerce_package_rates', 'add_cost_to_shipping_rate', 10, 2 );
       ```
   
 * I don’t think this is something suitable for the plugin’s core code, but I can
   add in a filter to allow you to stop the fee from being added and use the cost
   of the fee in a custom snippet like the above to add to a shipping cost.

Viewing 1 replies (of 1 total)

The topic ‘Feature Request’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-product-fees/assets/icon-128x128.jpg?rev=1296610)
 * [WooCommerce Product Fees](https://wordpress.org/plugins/woocommerce-product-fees/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-product-fees/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-product-fees/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-product-fees/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-product-fees/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-product-fees/reviews/)

## Tags

 * [shipping](https://wordpress.org/support/topic-tag/shipping/)

 * 1 reply
 * 2 participants
 * Last reply from: [Caleb Burks](https://wordpress.org/support/users/icaleb/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/feature-request-383/#post-6686436)
 * Status: resolved