WordPress at Your Fingertips
function is not described

WC_Cart_Fees::generate_id() private WC 1.0

Generate a unique ID for the fee being added.

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

No Hooks.


String. fee key.


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

Code of WC_Cart_Fees::generate_id() WC 5.7.1

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