# After\_submissions hook does not work

**URL:** <https://community.gravityforms.com/t/after-submissions-hook-does-not-work/13793>\
**Category:** Get Help\
**Tags:** gform\_after\_submission\
**Created:** [November 3, 2022, 12:52pm UTC](https://community.gravityforms.com/t/after-submissions-hook-does-not-work/13793 "2022-11-03T12:52:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pacoosunaa](https://avatars.discourse-cdn.com/v4/letter/p/71e660/32.png) [@pacoosunaa](https://community.gravityforms.com/u/pacoosunaa)\
**Post date:** [November 3, 2022, 12:52pm UTC](https://community.gravityforms.com/t/after-submissions-hook-does-not-work/13793/1 "2022-11-03T12:52:52Z")

</div>

I am adding a new file and folder inside wp-plugins with the code below, but it is not working:

\<?php add\_action('gform\_after\_submission', 'after\_submission', 10, 2); function after\_submission($entry, $form) { $url = 'https://hook.eu1.make.com/...'; $info = ['name' =\> $entry[1], ]; $args = ['method' =\> 'POST', 'body' =\> $info,]; wp\_remote\_post($url, $args); what can I do?

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [November 3, 2022, 5:19pm UTC](https://community.gravityforms.com/t/after-submissions-hook-does-not-work/13793/2 "2022-11-03T17:19:59Z")

</div>

Hi Francisco. Adding that to a file and a folder inside wp-plugins is not correct. This is PHP code that can be added to your theme functions.php file, or you can use a plugin such as this one to keep the code separate from the theme: [Code Snippets – WordPress plugin | WordPress.org](https://wordpress.org/plugins/code-snippets/%E2%80%8B%E2%80%8B%E2%80%8B%E2%80%8B)

Please see this article for additional information on placing PHP snippets: [https://docs.gravityforms.com/where-do-i-put-this-code/#h-php](https://docs.gravityforms.com/where-do-i-put-this-code/#h-php)

That information applies to your placement of the code using gform\_after\_submission. Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)\
**Post date:** [December 3, 2022, 5:20pm UTC](https://community.gravityforms.com/t/after-submissions-hook-does-not-work/13793/3 "2022-12-03T17:20:40Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
