Решил так
add_action( 'wp_ajax_nopriv_click_total', 'click_total' );
add_action( 'wp_ajax_click_total', 'click_total' );
function click_total() {
$post = $_POST['post_id'];
$from = new DateTime('20200201');
$to = new DateTime('20200208');
$period = new DatePeriod($from, new DateInterval('P1D'), $to);
$arrayOfDates = array_map(
function($item){return $item->format('dmY') ;},
iterator_to_array($period)
);
$post = $_POST['post_id'];
foreach ($arrayOfDates as $d ) {
$post = $_POST['post_id'];
$res[] = get_post_meta($post, $d.'_click_block_2', true);
}
$total_summ = array_sum($res);
die($total_summ);
}