hollosipeter

Untitled

May 19th, 2023
505
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.92 KB | Source Code | 0 0
  1. $form_id = 23868;
  2.  
  3. $entry_id = Forminator_API::add_form_entry( $form_id, $entry_meta );
  4.  
  5.   $entry = Forminator_API::get_entry( $form_id, $entry_id );
  6.   $entry_id = $entry->entry_id;
  7.  
  8. $tutor_nonce = wp_create_nonce('tutor_nonce_action');
  9. $ajax_nonce = wp_create_nonce('ajax_nonce_action');
  10.  
  11. // AJAX call
  12. $ajax_url = 'https://www.bachatasensual.hu/wp-admin/admin-post.php';
  13. $action = 'forminator_resend_notification_email';
  14. $ajax_params = array(
  15.     '_tutor_nonce' => $tutor_nonce,
  16.     'action' => $action,
  17.     'entry_id' => $entry_id,
  18.     '_ajax_nonce' => $ajax_nonce
  19. );
  20. $ajax_url_with_params = add_query_arg($ajax_params, $ajax_url);
  21.  
  22. $response = wp_remote_post(
  23.     $ajax_url_with_params,
  24.     array(
  25.         'method' => 'POST',
  26.         'timeout' => 45,
  27.         'redirection' => 0,
  28.         'blocking' => true,
  29.         'headers' => array(),
  30.         'body' => array(),
  31.         'cookies' => array(),
  32.     )
  33. );
Advertisement
Add Comment
Please, Sign In to add comment