Gravity form action in functions.php doesn't work

I’ve connected many Gravity Forms before, but never when using the Roots theme. This has always worked with any other setup I’ve used. I add something like the following to functions.php:

add_action( ‘gform_after_submission_1’, ‘post_to_third_party_1’, 10, 2 );
function post_to_third_party_1( $entry, $form ) {
[my function code here]

The code I’m using should submit the form data to an endpoint that I define. I’m using the same code I’ve used on dozens of sites, but with this theme in place, this action isn’t happening at all. I typically monitor the network and see the submission happen right after submitting the form, but I don’t see even an attempt to submit something here. This is normally an easy thing for me, but can’t figure out what I need to change to get it to work with Roots. I’ve also tried in the custom.php file which didn’t work. I’ve never had it fail to work in functions.php though.

Any ideas?

Is there a namespace at the top of the file?

I don’t see anything and a search for ‘namespace’ came back with nothing, so it doesn’t look like it, unless I’m missing something.

Generally people miss how namespaces work. I’m not sure of any other reason why your action wouldn’t be working. Unless it’s something like you used the wrong gform ID.

Yeah I can’t figure it out. The gform ID is correct, thats the part I do all the time. I’m not even sure that the theme is the issue but it is the only thing unique about this one.

Does Gravity record the submission itself? If you remove the custom function does it work normally?

Here’s a weird one: is the custom endpoint a sub domain and is that sub domain using the same certificate as the root? I’ve had weird issues with HSTS and sub domains and traffic like that. Reprovisioning with HSTS turned off for subdomains has helped. That’s just a guess though.