Skip to content

Instantly share code, notes, and snippets.

@luiseduardobraschi
Last active April 4, 2019 15:56
Show Gist options
  • Save luiseduardobraschi/a46e4865058ece361c67faf2ff080e12 to your computer and use it in GitHub Desktop.
Save luiseduardobraschi/a46e4865058ece361c67faf2ff080e12 to your computer and use it in GitHub Desktop.
Disable package splitting in Dokan Pro
<?php
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' );
add_filter( 'woocommerce_shipping_methods', function($methods){
unset( $methods['dokan_vendor_shipping'] );
return $methods;
}, 11 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment