I am using WooCommerce PDF Invoices plugin to create an invoice.
Problem: I need to change the shop address on the invoice depending on the customer selected country on checkout page.
I have failed to get a working solution, at the moment I made this example:
$customer_shipping_country = WC()->customer->get_shipping_country();
if(!empty($customer_shipping_country)){
if ($customer_shipping_country == "England") {
//change shop address to x
} elseif ($customer_shipping_country == "France") {
//change shop address to y
}
}
Am I on the right track or?
a) to change the invoice template
b) build a hook into functions.php