WordPress at Your Fingertips
function is not described

WC_Eval_Math::debugPrintCallingFunction() private WC 1.0

Prints the file name, function name, and line number which called your function (not this function, then one that called it to begin with)

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

No Hooks.

Return

null. Nothing.

Usage

$result = WC_Eval_Math::debugPrintCallingFunction();

Code of WC_Eval_Math::debugPrintCallingFunction() WC 5.8.0

private static function debugPrintCallingFunction() {
	$file = 'n/a';
	$func = 'n/a';
	$line = 'n/a';
	$debugTrace = debug_backtrace();
	if ( isset( $debugTrace[1] ) ) {
		$file = $debugTrace[1]['file'] ? $debugTrace[1]['file'] : 'n/a';
		$line = $debugTrace[1]['line'] ? $debugTrace[1]['line'] : 'n/a';
	}
	if ( isset( $debugTrace[2] ) ) {
		$func = $debugTrace[2]['function'] ? $debugTrace[2]['function'] : 'n/a';
	}
	echo "\n$file, $func, $line\n";
}