WordPress at Your Fingertips
function is not described

WC_Admin::include_admin_body_class() public WC 4.2.0

Include admin classes.

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

No Hooks.

Return

String.

Usage

$WC_Admin = new WC_Admin();
$WC_Admin->include_admin_body_class( $classes );
$classes(string) (required)
Body classes string.

Changelog

Since 4.2.0 Introduced.

Code of WC_Admin::include_admin_body_class() WC 5.9.0

public function include_admin_body_class( $classes ) {
	if ( in_array( array( 'wc-wp-version-gte-53', 'wc-wp-version-gte-55' ), explode( ' ', $classes ), true ) ) {
		return $classes;
	}

	$raw_version   = get_bloginfo( 'version' );
	$version_parts = explode( '-', $raw_version );
	$version       = count( $version_parts ) > 1 ? $version_parts[0] : $raw_version;

	// Add WP 5.3+ compatibility class.
	if ( $raw_version && version_compare( $version, '5.3', '>=' ) ) {
		$classes .= ' wc-wp-version-gte-53';
	}

	// Add WP 5.5+ compatibility class.
	if ( $raw_version && version_compare( $version, '5.5', '>=' ) ) {
		$classes .= ' wc-wp-version-gte-55';
	}

	return $classes;
}