WooCommerce code edit

Hi guys, I’m trying to make an adjustment to the following code.

add_action( ‘woocommerce_cart_calculate_fees’,‘endo_handling_fee’ );
function endo_handling_fee() {
global $woocommerce;

 if ( is_admin() && ! defined( 'DOING_AJAX' ) )
      return;

 $fee = 5.00;
 $woocommerce->cart->add_fee( 'Handling', $fee, true, 'standard' );

}

I’m trying to included an exception to the fee if it’s coming from a specific shipping zone. Is that possible?
This was the closes thing I could find. Your help would be greatly appreciate!

Hi Ashley,

Thanks for reaching out.
To add a few extra fees based on the location in WooCommerce, please go through the following articles which may help you.


You can also try the free plugin available in the WordPress repository, for the same purposes.

Hope it helps.
Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.