Hi there,
of course it is – you’ll need to either use the REST API to retrieve the invoice(s) (see https://vendidero.de/dokument/invoices-rest-api) to an order or the PHP methods supplied by the StoreaBill package within woocommerce-germanized-pro/packages/storeabill to retrieve the information.
PS: Please use our help desk on support for out professional version: https://vendidero.de/dashboard/help-desk
Best,
Dennis
Thread Starter
User
(@lostguybrazil)
Hi Dennis, thank you for your answer. I was able to retrieve it – here’s the code for future reference.
Thanks!
$order_id = 1234;
$order = wc_get_order($order_id);
$invoice = wc_gzdp_get_order_last_invoice($order);
if ($invoice) {
// Invoice exists
echo "Invoice Created: True<br>";
// Get the invoice date
$invoice_date = $invoice->get_date_created();
echo "Invoice Date: " . $invoice_date->date('Y-m-d H:i:s') . "<br>";
// Get the invoice number
$invoice_number = $invoice->get_formatted_number();
echo "Invoice Number: " . $invoice_number . "<br>";
} else {
// No invoice found
echo "Invoice Created: False<br>";
}