WC_Cart_Fees::generate_id │ private │ WC 1.0

Generate a unique ID for the fee being added.

Method of the class: WC_Cart_Fees{}

No Hooks.

Returns

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 11.1.2

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