Automattic\WooCommerce\Internal\Admin\ProductForm

FormFactory::get_items()private staticWC 1.0

Returns list of registered items.

Method of the class: FormFactory{}

No Hooks.

Return

Array. list of registered items.

Usage

$result = FormFactory::get_items( $type, $class_name, $sort_by = array(;

FormFactory::get_items() code WC 9.3.3

private static function get_items( $type, $class_name, $sort_by = array(
	'key'   => 'order',
	'order' => 'asc',
) ) {
	$item_list = self::get_item_list( $type );
	$class     = 'Automattic\\WooCommerce\\Internal\\Admin\\ProductForm\\' . $class_name;
	$items     = array_values( $item_list );
	if ( class_exists( $class ) && method_exists( $class, 'sort' ) ) {
		usort(
			$items,
			function ( $a, $b ) use ( $sort_by, $class ) {
				return $class::sort( $a, $b, $sort_by );
			}
		);
	}
	return $items;
}