Skip to content

Instantly share code, notes, and snippets.

@ofernandolopes
Forked from luiseduardobraschi/functions.php
Created April 4, 2019 15:56
Show Gist options
  • Save ofernandolopes/4207aa45eb8d712dad14a62d4c775dce to your computer and use it in GitHub Desktop.
Save ofernandolopes/4207aa45eb8d712dad14a62d4c775dce 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