Support » Plugin: WooCommerce Weight Based Shipping » Disable weigh-based shipping when Payment method is Cash on Delivery

  • Resolved iconceptdeveloper

    (@iconceptdeveloper)


    Is there any way i could Disable weigh-based shipping when Payment method is Cash on Delivery ?

    i tried using this filter of woocommerce :

    add_filter( 'woocommerce_available_payment_gateways', 'my_custom_available_payment_gateways' );

    and put some condition but it’s seems impossible to unset the shipping method / or even the WC()->session->get('chosen_shipping_methods').

    i also tried using

    add_filter('woocommerce_package_rates', 'my_custom_display_shipping_method_based', 100);

    it works but only when page is loaded, but when the ajax when selecting payment method such as paypal / cash on delivery , weight based shipping is not disabled.

    Hope you could help me out here.

    PS: I’m using the free version

Viewing 1 replies (of 1 total)
  • Plugin Author Dan

    (@dangoodman)

    Hi,

    There is no built-in way to do that.

    To know how to do that with custom code please try contacting woocommerce support since that’s not specific to this plugin.

Viewing 1 replies (of 1 total)
  • The topic ‘Disable weigh-based shipping when Payment method is Cash on Delivery’ is closed to new replies.