Skip to content

Instantly share code, notes, and snippets.

@bporcelli
Last active March 20, 2019 19:35
Show Gist options
  • Select an option

  • Save bporcelli/5019ec94747d69dee07e to your computer and use it in GitHub Desktop.

Select an option

Save bporcelli/5019ec94747d69dee07e to your computer and use it in GitHub Desktop.
Shows how to use the wootax_local_delivery_methods filter to register a custom delivery method.
/**
* Register the Custom Local Delivery method with WooTax
*/
function wootax_add_local_delivery_method( $methods ) {
$methods[] = 'custom_local_delivery'; // Detected on frontend
$methods[] = 'Custom Local Delivery'; // Detected on backend
return $methods;
}
add_filter( 'wootax_local_delivery_methods', 'wootax_add_local_delivery_method', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment