Advertisement
Guest User

Untitled

a guest
Apr 18th, 2017
13
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. foreach ($cart_item['variation'] as $taxonomy => $variationSlug) {
  2.     $meta = get_post_meta($cart_item['variation_id'], 'attribute_' . $taxonomy, true);
  3.     $term = get_term_by('slug', $meta, $taxonomy);
  4.  
  5.     $variationTitle= ucfirst(str_replace("pa_",'', $taxonomy));
  6.     $variationName = $term->name;
  7.     $productTitle .= '<span class="festi-cart-product-variation-attribut">' . $variationTitle . ': '.$variationName .'</span>';
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement