Get a formatted billing address for the order.
Obtenir une adresse de facturation formatée pour la commande.
$this->get_address( 'billing'
Sortie :
@param string $empty_content Content to show if no address is present. @since 3.3.0. @return string
// Format adresse facturation
add_filter('woocommerce_order_formatted_billing_address', 'format_adresse_facturation', 10, 2);
function format_adresse_facturation($address, $order) {
// Ajouter le numéro de TVA si présent
$vat = get_post_meta($order->get_id(), '_billing_vat_number', true);
if ($vat) {
$address['vat'] = 'TVA : ' . $vat;
}
return $address;
}
Chargement des actualités...