Can show the product description but the description can’t display over a page in pdf which inside <table>.
https://myweb.hk/wp-admin/admin-ajax.php?action=generate_wpo_wcpdf&document_type=invoice&order_ids=4710&_wpnonce=583ec8fd2f
You can see the second and third product item description can’t show all of them.
My invoice.php at below:
https://drive.google.com/file/d/1vhOEafEx1rge1yfQb4Drjd9KyJrve-v5/view?usp=sharing
table coding:
<table class=”order-details”>
<thead>
<tr>
<th class=”product”><?php _e(‘Product’, ‘woocommerce-pdf-invoices-packing-slips’ ); ?></th>
<th class=”quantity”><?php _e(‘Quantity’, ‘woocommerce-pdf-invoices-packing-slips’ ); ?></th>
<th class=”price”><?php _e(‘Price’, ‘woocommerce-pdf-invoices-packing-slips’ ); ?></th>
</tr>
</thead>
<tbody>
<?php $items = $this->get_order_items(); if( sizeof( $items ) > 0 ) : foreach( $items as $item_id => $item ) : ?>
<tr class=”<?php echo apply_filters( ‘wpo_wcpdf_item_row_class’, $item_id, $this->type, $this->order, $item_id ); ?>”>
<td class=”product”>
<?php $description_label = __( ‘Description’, ‘woocommerce-pdf-invoices-packing-slips’ ); // registering alternate label translation ?>
<span class=”item-name”><?php echo $item[‘name’]; ?></span>
<?php do_action( ‘wpo_wcpdf_before_item_meta’, $this->type, $item, $this->order ); ?>
<span class=”item-meta”><?php echo $item[‘meta’]; ?></span>
<div class=”meta”>
<?php
if (!empty($item[‘product’])) {
$_product = $item[‘product’]->is_type( ‘variation’ ) ? wc_get_product( $item[‘product’]->get_parent_id() ) : $item[‘product’];
if ( method_exists( $_product, ‘get_description’ ) ) {
echo ‘<div style=”word-wrap:break-word;”>’.$_product->get_description().'</div>’;
}
}
?>
<?php do_action( ‘wpo_wcpdf_after_item_meta’, $this->type, $item, $this->order ); ?>
</td>
<td class=”quantity”><?php echo $item[‘quantity’]; ?></td>
<td class=”price”><?php echo $item[‘order_price’]; ?></td>
</tr>
<?php endforeach; endif; ?>