so I'm trying to figure out how to show the categories under the product on this website:http://lauragdiaz.com/the-list/ The products are the brand (Alltruiest, BKIND etc.)
I tried to fix the code with this article: Get Order items and WC_Order_Item_Product in WooCommerce 3 But everytime I do it, it shows a fatal error in my code.
I'm not exactly sure what I'm doing wrong. The code I have right now which shows 'Array' is this one:
function skyverge_shop_display_skus() {
global $product;
if ( $product->get_category_ids() ) {
echo '<div class="product-meta">Catégorie: ' . $product->get_category_ids() . '</div>';
}
}
add_action( 'woocommerce_after_shop_loop_item', 'skyverge_shop_display_skus', 9 );
Where should I put the get_category_ids? and how to get the info to show?
Thank you!