• Resolved alexdex

    (@alexdex)


    Hi, Is there any way that the tax invoice for “canceled order” could have a word saying “canceled” or remark on it?

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Contributor Darren Peyou

    (@dpeyou)

    Hi @alexdex,

    You can do so with this code snippet:

    add_action( 'wpo_wcpdf_after_order_details', 'wpo_wcpdf_order_notes', 10, 2 );
    function wpo_wcpdf_order_notes ($template_type, $order) {
       	
    	// get status
    	$status = $order->get_status();
    	
    	// if status is "cancelled", return your custom text OR just the status
    	if ($status == "cancelled") {
    	?>
    	<div class="custom-text">
                <?php echo '<div>' . ucfirst($status) . '</div>'; ?>
    	</div>
    <?php }
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Cancel Order Remark’ is closed to new replies.