How to add unique classes in body tags?
This code is showing how to add a archive-child/archive-parent classes in Woocommerce product category pages using display_type option.
add_filter( 'body_class', function( $classes ){ $object = get_queried_object(); if( get_woocommerce_term_meta( $object->term_id, 'display_type', true ) != 'subcategories' ){ $classes[] = 'archive-child'; }else{ $classes[] = 'archive-parent'; } return $classes; });