Commit 28e5ba5b authored by Nahla Shiri's avatar Nahla Shiri

subcat fiche technique

parent 0ea3dfba
......@@ -18,8 +18,11 @@ $fiche_num = str_pad($nb_fiche, 6, "0", STR_PAD_LEFT);
$product_id = $_GET['product_id'];
$variation_id = $_GET['variation_id'];
$file_title = "";
$product_cats = wp_get_post_terms($product_id, 'product_cat');
$file_title.=$product_cats[1]->name;
$parent_cat = wp_get_post_terms($product_id, 'product_cat', array( 'parent' => 0,'fields' => 'ids' ));
$sub_cat = wp_get_post_terms($product_id, 'product_cat', array( 'parent' =>$parent_cat[0],'fields' => 'names' ));
$file_title.=$sub_cat[0];
//fiche variable
if($variation_id !='undefined'){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment