woocommerce_get_order_address

FILTER woocommerce\includes\class-wc-order.php (ligne 990) github
Filter: 'woocommerce_get_order_address' Allow developers to change the returned value for an order's billing or shipping address.

Paramètres

Entrée :
array_merge( $this->data[ $address_type ], $this->get_prop( $address_type, 'view'
Sortie :
@param array  $address_data The raw address data merged with the data from get_prop.
@param string $address_type Type of address; 'billing' or 'shipping'.

Utilisation

// Modifier la valeur avec le filtre 'woocommerce_get_order_address'
add_filter('woocommerce_get_order_address', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre(array_merge( $this->data[ $address_type ]) {
    // Modifier la valeur
    return array_merge( $this->data[ $address_type ];
}

Actualités

Chargement des actualités...