testing progress
This commit is contained in:
@@ -1488,7 +1488,6 @@ class TWP_Admin {
|
||||
</td>
|
||||
<td>
|
||||
<button class="button" onclick="editWorkflow(<?php echo $workflow->id; ?>)">Edit</button>
|
||||
<button class="button" onclick="testWorkflow(<?php echo $workflow->id; ?>)">Test</button>
|
||||
<button class="button" onclick="deleteWorkflow(<?php echo $workflow->id; ?>)">Delete</button>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -2970,29 +2969,6 @@ class TWP_Admin {
|
||||
wp_send_json_success(array('success' => $result));
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX handler for test call
|
||||
*/
|
||||
public function ajax_test_call() {
|
||||
check_ajax_referer('twp_ajax_nonce', 'nonce');
|
||||
|
||||
if (!current_user_can('manage_options')) {
|
||||
wp_die('Unauthorized');
|
||||
}
|
||||
|
||||
$to_number = sanitize_text_field($_POST['to_number']);
|
||||
$workflow_id = intval($_POST['workflow_id']);
|
||||
|
||||
$twilio = new TWP_Twilio_API();
|
||||
|
||||
$twiml_url = home_url('/wp-json/twilio-webhook/v1/voice');
|
||||
$twiml_url = add_query_arg('workflow_id', $workflow_id, $twiml_url);
|
||||
|
||||
$result = $twilio->make_call($to_number, $twiml_url);
|
||||
|
||||
wp_send_json_success($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX handler for getting phone numbers
|
||||
*/
|
||||
|
Reference in New Issue
Block a user