WordPress at a glance
function is not described

wc_get_chosen_shipping_method_ids() WC 2.6.2

Gets chosen shipping method IDs from chosen_shipping_methods session, without instance IDs.

No Hooks.

Return

String[]. Nothing.

Usage

wc_get_chosen_shipping_method_ids();

Changelog

Since 2.6.2 Introduced.

Code of wc_get_chosen_shipping_method_ids() WC 5.3.0

<?php
function wc_get_chosen_shipping_method_ids() {
	$method_ids     = array();
	$chosen_methods = WC()->session->get( 'chosen_shipping_methods', array() );
	foreach ( $chosen_methods as $chosen_method ) {
		$chosen_method = explode( ':', $chosen_method );
		$method_ids[]  = current( $chosen_method );
	}
	return $method_ids;
}