The Wordpress plugin I am using calls the invoice due date using the php:
<p><?php wpi_invoice_due_date2(); ?></p>
this then displays as one column
<p>Due Date: 10 May 2019</p>
I am looking to keep this in line with the rest of the template and to do this, I need to add a style to the date but am unsure how to achieve this.
I have created an override to the plugin to allow me to style things.
As you will see below, I have added a '' to the Due Date text. however, this is not consistent with the rest of the page, and what makes it more difficult is that this row and the rows above are all wrapped in the same element.
I could probably ammend the to make things work, however, I am keen to find out if there is a work around for this.
if ( !function_exists('wpi_invoice_due_date') ) {
function wpi_invoice_due_date2( $args = "" ) {
global $invoice;
$defaults = array(
'return' => false,
'text' => __('<span class="duebold">Due Date:</span> ', ud_get_wp_invoice()->domain),
'format' => 'd F Y'
);
extract( wp_parse_args($args, $defaults) );
if ( empty( $invoice['due_date_year'] )
|| empty( $invoice['due_date_month'] )
|| empty( $invoice['due_date_day'] ) ) return;
if ( !$return ) {
echo $text.date($format, strtotime( $invoice['due_date_day'].'-'.$invoice['due_date_month'].'-'.$invoice['due_date_year'] ));
return;
}
return $text.date($format, strtotime( $invoice['due_date_day'].'-'.$invoice['due_date_month'].'-'.$invoice['due_date_year'] ));
}
I have added the span in this line:
'text' => __('<span class="duebold">Due Date:</span> ', ud_get_wp_invoice()->domain),
However, it is what comes after Due date that I would like to change
Currently I have
Invoice Number: 1111111
Invoice Amount: £120.00
Due Date: 01 March 2019
Ideally, I would like
Invoice Number: 1111111
Invoice Amount: £120.00
Due Date: 01 March 2019