• Resolved obedience

    (@obedience)


    I want to disable the shipping cost for individual vendors and make it one shipping fee. But when I used the code provided in the previous support, it didn’t work and I still saw multiple shipping fees.

    Here’s the code I used. I injected it into my website running on Blocksy using WPCode plugin

    remove_filter( 'woocommerce_cart_shipping_packages', 'dokan_custom_split_shipping_packages' );
    remove_filter( 'woocommerce_shipping_package_name', 'dokan_change_shipping_pack_name');
    remove_action( 'woocommerce_checkout_create_order_shipping_item', 'dokan_add_shipping_pack_meta');

    What should I do to resolve this?

    • This topic was modified 2 years, 11 months ago by obedience.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @obedience,

    One major update of Dokan version 3.7.19 is the split shipping functionality in the Dokan Lite version. You will be able to use the split shipping functionality in the updated version of the Dokan Lite version.

    Regarding your request to disable the split shipping functionality, currently, any default option is unavailable to do so. However, I have a code snippet that you can apply to achieve this. Kindly apply the following code snippet to the functions.php the file of your child’s theme.

    function dokan_lite_remove_split_shipping() {
    	dokan_remove_hook_for_anonymous_class( 'woocommerce_cart_shipping_packages', 'WeDevs\Dokan\Shipping\Hooks', 'split_shipping_packages', 10 );
    	dokan_remove_hook_for_anonymous_class( 'woocommerce_checkout_create_order_shipping_item', 'WeDevs\Dokan\Shipping\Hooks', 'add_shipping_pack_meta', 10 );
    	dokan_remove_hook_for_anonymous_class( 'woocommerce_shipping_package_name', 'WeDevs\Dokan\Shipping\Hooks', 'change_shipping_pack_name', 10 );
    }
    add_action( 'wp_head', 'dokan_lite_remove_split_shipping' );
    
    

    Once you’ve added this code snippet, the split shipping functionality should be disabled.

    I hope this information will be helpful.

    Thanks!

    Thread Starter obedience

    (@obedience)

    Thank you so much. It worked!

    I had already used AI to generate a code that removes the split shipping and replaces it with a code that makes everything one. But this code is most efficient.

    Once again, thank you so much!

    Thread Starter obedience

    (@obedience)

    I’m closing the ticket now.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Multiple vendor shipping’ is closed to new replies.