ned to change UI of Questions and answers Open
-
-
Hi,
I want to make the “question and answer” tab more visible.
Ideally I would like to put it just underneath the product title or in that same div. See screenshot.
Can you tell me which .PHP file I need to edit? I cannot find the .PHP file with the product page.
Thankyou.
-
Hi,
using below code you can add the questions and answers tab after the product meta on single product page
//Remove tab from the list
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 99 );
function woo_remove_product_tabs( $tabs ) {
unset( $tabs['wcmp_customer_qna'] ); // Questions & Answers
return $tabs;
}
//adding tab ontent after the product meta on single product page
add_filter ('woocommerce_product_meta_end','wcmp_woocommerce_product_meta_end' );
function wcmp_woocommerce_product_meta_end() {
global $WCMp, $product;
$vendor = get_wcmp_product_vendors($product->get_id());
if ($vendor && apply_filters('wcmp_customer_questions_and_answers_enabled', true, $product->get_id())) {
$cust_qna_data = $WCMp->product_qna->get_Product_QNA($product->get_id(), array('sortby'=>'vote'));
echo '<br>';
$WCMp->template->get_template('wcmp-customer-qna-form.php', array('cust_qna_data' => $cust_qna_data));
}
}
Copy
Regards,
Please LOGIN to reply to this topic