woocommerce_admin_order_data_after_billing_address

ACTION woocommerce\includes\admin\meta-boxes\class-wc-meta-box-order-data.php (ligne 553) github
Filter to customize the display of the currently selected customer for an order in the order edit page. This is the same filter used in the ajax call for customer search in the same metabox.
traduction française
Filtre permettant de personnaliser l'affichage du client actuellement sélectionné pour une commande dans la page d'édition de la commande. Il s'agit du même filtre que celui utilisé dans l'appel ajax pour la recherche de clients dans le même métabox.

Paramètres

Entrée :
$order
Sortie :
@param array @user_info An array containing one item with the name and email of the user currently selected as the customer for the order.

Utilisation

Ajouter des infos dans la page admin de commande

Afficher des données personnalisées dans l'admin WooCommerce

order-flow
// Ajouter des infos dans l'admin commande
add_action('woocommerce_admin_order_data_after_billing_address', 'afficher_infos_admin_commande', 10, 1);

function afficher_infos_admin_commande($order) {
    $custom_data = get_post_meta($order->get_id(), '_custom_field', true);
    
    if ($custom_data) {
        echo '
'; echo '

Informations personnalisées

'; echo '

Donnée custom: ' . esc_html($custom_data) . '

'; echo '
'; } }

Actualités

Chargement des actualités...