WC_Post_Data::get_post_type
Get the post type for a given post.
Метод класса: WC_Post_Data{}
Хуков нет.
Возвращает
string. The post type.
Использование
$result = WC_Post_Data::get_post_type( $id );
- $id(int) (обязательный)
- The post id.
Код WC_Post_Data::get_post_type() WC Post Data::get post type WC 11.2.2
private static function get_post_type( $id ) {
return wc_get_container()->get( LegacyProxy::class )->call_function( 'get_post_type', $id );
}