woocommerce_register_shipping_method()WC 1.5.7

Register a shipping method.

No Hooks.

Return

null. Nothing (null).

Usage

woocommerce_register_shipping_method( $shipping_method );
$shipping_method(string|object) (required)
class name (string) or a class object.

Changelog

Since 1.5.7 Introduced.

woocommerce_register_shipping_method() code WC 8.9.0

function woocommerce_register_shipping_method( $shipping_method ) {
	WC()->shipping()->register_shipping_method( $shipping_method );
}