How to Remove Data from PDF Product?

Filter & Hooks Viewed: 737

If you want to remove data beside the options panel, you can always hook into WooCommerce functions. Then you can check if the $_GET parameter exists and apply the hook correctly.

Here is an example to remove the Weight from Additional Information only on the PDF Print Product:

function remove_weight_from_pdf($value) {
	if(isset($_GET['print-products'])) {
		$value = false;
	}

	return $value;
}
add_filter('woocommerce_product_get_weight', 'remove_weight_from_pdf', 10, 1);

Leave a Reply

Your email address will not be published. Required fields are marked *