/** * Show product dimensions on category page */ add_action('woocommerce_after_shop_loop_item', 'cc_show_dimensions', 9); function cc_show_dimensions() { global $product; $dimensions = wc_format_dimensions($product->get_dimensions(false)); if ($product->has_dimensions()) { echo '
'; } }