Looking for some assistance in returning values from Woocommerce "Edit Product Category" page. Able to display fields with the "Edit Product Category" page, but I haven't figured out how to return the value. Here is my register code. Need help to return the value of the id.
add_filter( 'rwmb_meta_boxes', 'bodie_register_meta_boxes' );
function bodie_register_meta_boxes( $meta_boxes )
{
$meta_boxes[] = array(
'title' => 'Standard Fields',
'taxonomies' => 'product_cat',
'fields' => array(
array(
'name' => __( 'Dark Overlay?', 'bodie_theme' ),
'id' => 'dark_overlay',
'type' => 'checkbox',
)
),
);
return $meta_boxes;
}
Failed
// echo get_post_meta($post->ID, 'dark_overlay', true);
// echo get_post_meta($term_id->ID, 'dark_overlay', true);