WC_Admin_Assets::is_order_meta_box_screen()privateWC 1.0

Helper function to determine whether the current screen is an order edit screen.

Method of the class: WC_Admin_Assets{}

No Hooks.

Return

true|false. Whether the current screen is an order edit screen.

Usage

// private - for code of main (parent) class only
$result = $this->is_order_meta_box_screen( $screen_id );
$screen_id(string) (required)
Screen ID.

WC_Admin_Assets::is_order_meta_box_screen() code WC 9.0.1

private function is_order_meta_box_screen( $screen_id ) {
	$screen_id = str_replace( 'edit-', '', $screen_id );

	$types_with_metaboxes_screen_ids = array_filter(
		array_map(
			'wc_get_page_screen_id',
			wc_get_order_types( 'order-meta-boxes' )
		)
	);

	return in_array( $screen_id, $types_with_metaboxes_screen_ids, true );
}