i've been working a day for this, im so stress, can you help me retrieve woocommerce all categories in dropdown menu? here i want to retrieve in dropdown menu
how can i show all category in this var $woo_category, i use this code but its show wordpress categories not woocommerce
help me with this simple task,
Code:
$options[] = array(
"name" => "Featured section category",
"desc" => "Select the category that you would like to have displayed in Featured list on your homepage.",
"id" => $shortname."_story_category",
"std" => "Uncategorized",
"type" => "select",
"options" => $woo_category);
how can i show all category in this var $woo_category, i use this code but its show wordpress categories not woocommerce
Code:
$woo_categories = array();
$woo_categories_obj = get_categories( 'hide_empty=0' );
foreach ($woo_categories_obj as $woo_cat) {
$woo_categories[$woo_cat->cat_ID] = $woo_cat->cat_name;}
$categories_tmp = array_unshift($woo_categories, "Select a category:" );
help me with this simple task,