Show up custom field | WordPress.org

[ad_1]

Hi @arthrnvrn,

The easiest way to achieve it is using the {{product_custom_field::META_KEY}} placeholder, within the Product item column block in the customizer, included in Premium Templates:

However, if you have some PHP knowledge, you can take advantage of the PDF template action hooks and write a code snippet to achieve it.

Here’s an example as reference:

add_action( 'wpo_wcpdf_after_item_meta', function( $template_type, $item, $order ) {
	if ( isset( $item['product'] ) && ! empty( $your_custom_field = $item['product']->get_meta( 'your_custom_field' ) ) ) {
		echo '<div class="custom-field">Your Custom field: '.$your_custom_field.'</div>';
	}
}, 10, 3 );

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer