Size Guide not showing after update
-
Hi, after update the sizeguide is not showing on productpage. I have tryed disabling it and activating.
Please see one of the products here: https://www.repower.dk/vare-kategori/brugt-baerbar/
Hello,
This issue will be fixed in the nearest update, meanwhile please add this code to the functions.php fo the child theme:
function woodmart_sguide_display( $post_id = false ){
$post_id = ( $post_id ) ? $post_id : get_the_ID();
$sguide_post_id = get_post_meta( $post_id, 'woodmart_sguide_select' );
if ( isset( $sguide_post_id[0] ) && $sguide_post_id[0] == 'disable' ) return;
if ( isset( $sguide_post_id[0] ) && !empty( $sguide_post_id[0] ) ){
$sguide_post_id = $sguide_post_id[0];
}else{
$terms = wp_get_post_terms( $post_id, 'product_cat' );
if ( $terms ) {
foreach( $terms as $term ){
$sguide_post_meta = get_term_meta( $term->term_id, 'woodmart_chosen_sguide' );
if ( $sguide_post_meta[0] ) {
$sguide_post_id = $sguide_post_meta[0];
}else{
$sguide_post_id = false;
}
}
}
}
if ( $sguide_post_id ) {
$sguide_post = get_post( $sguide_post_id );
$size_tables = get_post_meta( $sguide_post_id, 'woodmart_sguide' );
woodmart_sguide_display_table_template( $sguide_post, $size_tables );
}
}
Best Regards
You are welcome! If you have any questions please feel free to contact us.
Best Regards
The topic ‘Size Guide not showing after update’ is closed to new replies.