WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_AJAX::get_customer_details() WC 1.0

Get customer details via ajax.

Это метод класса: WC_AJAX

Хуки из метода
Возвращает

Null. Ничего.

Использование

$var = WC_AJAX::get_customer_details();

Код WC AJAX::get customer details: woocommerce/includes/class-wc-ajax.php WC 3.6.5

<?php
public static function get_customer_details() {
	check_ajax_referer( 'get-customer-details', 'security' );

	if ( ! current_user_can( 'edit_shop_orders' ) || ! isset( $_POST['user_id'] ) ) {
		wp_die( -1 );
	}

	$user_id  = absint( $_POST['user_id'] );
	$customer = new WC_Customer( $user_id );

	if ( has_filter( 'woocommerce_found_customer_details' ) ) {
		wc_deprecated_function( 'The woocommerce_found_customer_details filter', '3.0', 'woocommerce_ajax_get_customer_details' );
	}

	$data                  = $customer->get_data();
	$data['date_created']  = $data['date_created'] ? $data['date_created']->getTimestamp() : null;
	$data['date_modified'] = $data['date_modified'] ? $data['date_modified']->getTimestamp() : null;

	$customer_data = apply_filters( 'woocommerce_ajax_get_customer_details', $data, $customer, $user_id );
	wp_send_json( $customer_data );
}