I have created a custom taxonomy called "job_orders" to a products in woocommerce. I want to edit cart page and show then terms of job_orders inside cart table. currently I'm using the below script which echo all the terms , I want to show only the categories select in back end.I appreciate if anybody can help on this.
$terms = get_terms('job_orders','hide-empty=0&orderby=id'); //shuffle($terms); // dlete this line if you don't want it random. $sep = ''; foreach ( $terms as $term ) { if( ++$count > 60 ) break; // number of tags here. //echo $sep . ''.$term->name.''; echo $sep . $term->name; $sep = ', '; // Put your separator here. }
Above goes inside below woocommerce loop in cart.php
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) { }