If you want to add / show some custom data like post meta or similar, you can use one of our hooks. An example:

 add_filter( 'woocommerce_pdf_catalog_before_product_information_categories', 'show_case_pack_in_pdf', 10, 2);
 function show_case_pack_in_pdf ($html, $id) {
 	
 	$product = wc_get_product($id);
 	$pid= $product->get_id();

 	$case_pack = get_post_meta($pid,'case_pack',true); 

	$html = 'Case Pack: ' . $case_pack;

	return $html;
 }

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée.