Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $entry_id = Forminator_API::add_form_entry( $form_id, $entry_meta );
- if ($entry_id) {
- $admin_url = admin_url('admin-post.php');
- $action = 'forminator_resend_notification_email';
- $args = array(
- 'action' => $action,
- 'entry_id' => $entry_id,
- );
- $response = wp_remote_post($admin_url, array(
- 'method' => 'POST',
- 'timeout' => 45,
- 'redirection' => 0,
- 'blocking' => true,
- 'body' => $args,
- ));
- if (is_wp_error($response)) {
- $error_message = $response->get_error_message();
- echo "Hiba történt a POST kérés során: " . $error_message;
- } else {
- $response_code = wp_remote_retrieve_response_code($response);
- $response_body = wp_remote_retrieve_body($response);
- echo "Request code: " . $response_code;
- echo "Request answer: " . $response_body;
- }
- } else {
- // Error during creating Forminator entry.
- echo "Error during creating Forminator entry.";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment