Merge pull request #13557 from woocommerce/fix-13526-admin
Keep date compatibility in WC_Ajax::get_customer_details()
This commit is contained in:
commit
e5c753e757
|
@ -729,6 +729,10 @@ class WC_AJAX {
|
||||||
wc_deprecated_function( 'The woocommerce_found_customer_details filter', '2.7', 'woocommerce_found_customer_details' );
|
wc_deprecated_function( 'The woocommerce_found_customer_details filter', '2.7', 'woocommerce_found_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', $customer->get_data(), $customer, $user_id );
|
$customer_data = apply_filters( 'woocommerce_ajax_get_customer_details', $customer->get_data(), $customer, $user_id );
|
||||||
wp_send_json( $customer_data );
|
wp_send_json( $customer_data );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue