Automattic\WooCommerce\Internal\Logging
RemoteLogger::normalize_paths()
Normalize file paths by replacing absolute paths with relative ones.
Method of the class: RemoteLogger{}
No Hooks.
Return
String
. The content with normalized paths.
Usage
// private - for code of main (parent) class only $result = $this->normalize_paths( $content ): string;
- $content(string) (required)
- The content containing paths to normalize.
RemoteLogger::normalize_paths() RemoteLogger::normalize paths code WC 9.6.0
private function normalize_paths( string $content ): string { $plugin_path = StringUtil::normalize_local_path_slashes( trailingslashit( dirname( WC_ABSPATH ) ) ); $wp_path = StringUtil::normalize_local_path_slashes( trailingslashit( ABSPATH ) ); return str_replace( array( $plugin_path, $wp_path ), array( './', './' ), $content ); }