wc_get_path_define_tokens()WC 1.0

Fetches an array containing all of the configurable path constants to be used in tokenization.

Hooks from the function

Return

Array. The key is the define and the path is the constant.

Usage

wc_get_path_define_tokens();

wc_get_path_define_tokens() code WC 8.7.0

function wc_get_path_define_tokens() {
	$defines = array(
		'ABSPATH',
		'WP_CONTENT_DIR',
		'WP_PLUGIN_DIR',
		'WPMU_PLUGIN_DIR',
		'PLUGINDIR',
		'WP_THEME_DIR',
	);

	$path_tokens = array();
	foreach ( $defines as $define ) {
		if ( defined( $define ) ) {
			$path_tokens[ $define ] = constant( $define );
		}
	}

	return apply_filters( 'woocommerce_get_path_define_tokens', $path_tokens );
}