Php 如何获取WooCommerce的所有父类别
仅获取WooCommerce中的所有父类别,无帖子id。您可以使用Get\u术语作为:Php 如何获取WooCommerce的所有父类别,php,wordpress,content-management-system,Php,Wordpress,Content Management System,仅获取WooCommerce中的所有父类别,无帖子id。您可以使用Get\u术语作为: $terms = get_terms(['taxonomy' => 'product_cat','hide_empty' => false, 'parent' => 0]); 希望这能有所帮助。最后是一些简单有效的答案。。。
$terms = get_terms(['taxonomy' => 'product_cat','hide_empty' => false, 'parent' => 0]);
希望这能有所帮助。最后是一些简单有效的答案。。。