Skip to content

Instantly share code, notes, and snippets.

@mehulkaklotar
Created February 11, 2016 10:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mehulkaklotar/929b04de7f5dfa24760f to your computer and use it in GitHub Desktop.
Save mehulkaklotar/929b04de7f5dfa24760f to your computer and use it in GitHub Desktop.
woocommerce add custom shipping methods
/**
* Register a shipping method.
*
* Registers a shipping method ready to be loaded. Accepts a class name (string) or a class object.
*
* @package WooCommerce/Classes/Shipping
* @since 1.5.7
*/
function woocommerce_register_shipping_method( $shipping_method ) {
WC()->shipping->register_shipping_method( $shipping_method );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment