Merge pull request #13557 from woocommerce/fix-13526-admin

Keep date compatibility in WC_Ajax::get_customer_details()
This commit is contained in:
Mike Jolley 2017-03-13 16:05:17 +00:00 committed by GitHub
commit e5c753e757
1 changed files with 4 additions and 0 deletions

View File

@ -729,6 +729,10 @@ class WC_AJAX {
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 );
wp_send_json( $customer_data );
}