Singular_Order_Page::add_body_class( string $classes )

Add our custom Tickets Commerce Order Detail class to the body of the page.


Parameters

$classes

(string) (Required) The classes string for the body attribute.


Top ↑

Return

(mixed|string) The mutated classes string.


Top ↑

Source

File: src/Tickets/Commerce/Admin/Singular_Order_Page.php

	public function add_body_class( $classes ) {
		$screen = get_current_screen();

		// Check if we are on the single edit screen of the custom post type.
		if ( $screen && $screen->post_type === Order::POSTTYPE && $screen->base === 'post' ) {
			$classes .= ' tec-tickets-commerce-single-order';
		}

		return $classes;
	}

Top ↑

Changelog

Changelog
Version Description
5.13.3 Introduced.