WordPress at a glance
function is not described

wc_let_to_num() WC 1.0

Notation to numbers.

This function transforms the php.ini notation for numbers (like '2M') to an integer.

No Hooks.

Return

Int. Nothing.

Usage

wc_let_to_num( $size );
$size(string) (required)
Size value.

Code of wc_let_to_num() WC 5.3.0

<?php
function wc_let_to_num( $size ) {
	$l   = substr( $size, -1 );
	$ret = (int) substr( $size, 0, -1 );
	switch ( strtoupper( $l ) ) {
		case 'P':
			$ret *= 1024;
			// No break.
		case 'T':
			$ret *= 1024;
			// No break.
		case 'G':
			$ret *= 1024;
			// No break.
		case 'M':
			$ret *= 1024;
			// No break.
		case 'K':
			$ret *= 1024;
			// No break.
	}
	return $ret;
}