WC_REST_System_Status_Tools_V2_Controller::get_printable_callback_name()
Get a printable name for a callback.
Method of the class: WC_REST_System_Status_Tools_V2_Controller{}
No Hooks.
Return
String
. A printable name for the callback.
Usage
// private - for code of main (parent) class only $result = $this->get_printable_callback_name( $callback, $default );
- $callback(mixed) (required)
- The callback to get a name for.
- $default(string) (required)
- The default name, to be returned when the callback is an inline function.
WC_REST_System_Status_Tools_V2_Controller::get_printable_callback_name() WC REST System Status Tools V2 Controller::get printable callback name code WC 9.7.1
private function get_printable_callback_name( $callback, $default ) { if ( is_array( $callback ) ) { return get_class( $callback[0] ) . '::' . $callback[1]; } if ( is_string( $callback ) ) { return $callback; } return $default; }