WC_Post_Data::get_post_type()private staticWC 1.0

Get the post type for a given post.

Метод класса: WC_Post_Data{}

Хуков нет.

Возвращает

Строку. The post type.

Использование

$result = WC_Post_Data::get_post_type( $id );
$id(int) (обязательный)
The post id.

Код WC_Post_Data::get_post_type() WC 8.7.0

private static function get_post_type( $id ) {
	return wc_get_container()->get( LegacyProxy::class )->call_function( 'get_post_type', $id );
}