• Hello,

    I hope you are all doing well. I’m seeking assistance with setting up Dokan on my online store. Currently, I’m using Dokan to manage multiple vendors on my platform, but I’ve encountered a challenge regarding shipping rates.

    My goal is to establish a single shipping rate for customers, regardless of whether they purchase products from one or multiple vendors in the store. However, so far, I’ve struggled to find a way to configure this in Dokan.

    I’ve tried searching online and consulting Dokan’s official documentation, but I haven’t been able to find a clear solution to this problem.

    They gave me this fragment of code but it didn’t work (I pasted it in both the functions.pjp of my child thema and my parent thema and it didn’t work) this was the fragment they provided me:

    Hi there,

    Please try again with the following code. The previous one didn’t work probably due to not placing it correctly. — Remove Split Shipping | Dokan Lite —

    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’ );

    I hope this will work. Kindly let us know how it goes.

    Best regards,

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hello @yedi1501,

    To address the need for removing split shipping from your Dokan plugin-powered marketplace, default options are inadequate. Previous attempts to resolve this via custom code snippets have proven unsuccessful. I am providing an updated custom code snippet for implementation. Kindly insert the following snippet into your function.php file.

    #-- Remove Split Shipping | Dokan Lite --#
    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( 'init', 'dokan_lite_remove_split_shipping' );

    Please imply the code snippet and let me know your feedback on this.

    Thanks!

Viewing 1 replies (of 1 total)

The topic ‘[NSFW] split shipping problem’ is closed to new replies.