This is what you’re looking for ??
/**
* Display the payment status after order data
*/
add_action( 'wpo_wcpdf_after_order_data', 'wpo_wcpdf_paid_unpaid', 10, 2 );
function wpo_wcpdf_paid_unpaid ( $template_type, $order ) {
if ( $template_type == 'invoice' ) {
$payment_status = $order->is_paid() ? 'Paid' : 'Unpaid';
?>
<tr class="payment-status">
<td>Payment Status:</td>
<td><?php echo $payment_status; ?></td>
</tr>
<?php
}
}
How to use hooks
-
This reply was modified 2 years, 12 months ago by Darren Peyou.
-
This reply was modified 2 years, 12 months ago by Darren Peyou.
-
This reply was modified 2 years, 12 months ago by Darren Peyou.