Answers for "is product category name page woocommerce"

PHP
0

woocommerce get product category name by id

$id = 42;
if( $term = get_term_by( 'id', $id, 'product_cat' ) ){
    echo $term->name;
}
Posted by: Guest on December-27-2021
0

Add Product Short Description To Product Category In WooCommerce

function webroom_add_short_description_in_product_categories() {
	global $product;
	if ( ! $product->get_short_description() ) return;
	?>
	<div itemprop="description">
		<?php echo apply_filters( 'woocommerce_short_description', $product->get_short_description() ) ?>
	</div>
	<?php
}
add_action('woocommerce_after_shop_loop_item_title', 'webroom_add_short_description_in_product_categories', 5);
Posted by: Guest on December-09-2021

Code answers related to "is product category name page woocommerce"

Browse Popular Code Answers by Language