WC_Cart_Fees::generate_id()privateWC 1.0

Generate a unique ID for the fee being added.

Method of the class: WC_Cart_Fees{}

No Hooks.

Return

String. fee key.

Usage

// private - for code of main (parent) class only
$result = $this->generate_id( $fee );
$fee(string) (required)
Fee object.

WC_Cart_Fees::generate_id() code WC 9.8.1

private function generate_id( $fee ) {
	return sanitize_title( $fee->name );
}