Hi @norbi223
You can add the below-mentioned codes inside the child theme functions.php file to remove the split shipping from the WooCommerce cart and checkout page.
#-- 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 the codes will help.
Cheers!
Hi @tanvirh,
Thank you for your answer i will want to buy the professional pack the code is same or different?
Hi @norbi223
The code will be different for the Dokan premium version. However, according to the forum guidelines, commercial products are not supported in these forums”.
So, if you have any queries, please contact us through the official support channel.
I hope this help.
Thanks!
Hi @norbi223
Glad to know that the above-shared information was helpful to you!
However, as the purpose of this topic has been served we are marking this as resolved. Feel free to open a new one for any further issues or queries.
Cheers!
this code works well :
#-- 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' );