Snippets: Display WooCommerce Category Description Above Loop

Important: There is now a setting built-into the theme in the Customizer under the WooCommerce tab.

// I prefer to run edits on init, but you may not have to...
function my_edits_on_init() {

	// Disable subheading on product cats
	function my_disable_woo_category_subheading( $bool ) {
		if ( is_tax( 'product_cat' ) ) {
			$bool = false;
		}
		return $bool;
	}
	add_filter( 'wpex_post_subheading', 'my_disable_woo_category_subheading' );

	// Display description above loop
	function my_woo_category_description_above_loop( $bool ) {
		if ( is_tax( 'product_cat' ) ) {
			$bool = true;
		}
		return $bool;
	}
	add_filter( 'wpex_has_term_description_above_loop', 'my_woo_category_description_above_loop' );
}
add_action( 'init', 'my_edits_on_init' );
All PHP snippets should be added via a child theme's functions.php file.