WordPress at Your Fingertips
function is not described

WC_Tracker::get_active_shipping_methods() private WC 1.0

Get a list of all active shipping methods.

{} It's a method of the class: WC_Tracker{}

No Hooks.

Return

Array.

Usage

$result = WC_Tracker::get_active_shipping_methods();

Code of WC_Tracker::get_active_shipping_methods() WC 5.9.0

private static function get_active_shipping_methods() {
	$active_methods   = array();
	$shipping_methods = WC()->shipping()->get_shipping_methods();
	foreach ( $shipping_methods as $id => $shipping_method ) {
		if ( isset( $shipping_method->enabled ) && 'yes' === $shipping_method->enabled ) {
			$active_methods[ $id ] = array(
				'title'      => $shipping_method->title,
				'tax_status' => $shipping_method->tax_status,
			);
		}
	}

	return $active_methods;
}