public static function woocp_update_compare_widget() { //check_ajax_referer( 'woocp-compare-events', 'security' ); $result = WC_Compare_Functions::get_compare_list_html_widget(); echo json_encode($result); die; }