Getting $entry values of Product Fields type using gform_after_submission

Hi,

I’m trying to use gform_after_submission to send data to a third party service. Everything fires off fine and I’m retrieving $entry values from my form field. (such as First name, Last name fields…).

The only $entry values I’m not receiving are from “product” type fields. I can see in the debugger the following:

"DEBUG --> GFCommon::get_calculation_value(): No value or non-numeric value available for field #90.2. Returning zero instead. "

So this is telling me there are no values for the product that use get_calculation_value() function during the process time of the gform_after_submission hook.

Please note I’ve also tried gform_post_submission and the same result occurs. Not working.

Is there any way to get the value from a “Product” field using a hook? I need to send the price of a product to a third party service.

Please take a look at my code here:
https://pastebin.com/byyEYnpn

2019-08-01 7:55:53.913749 - DEBUG --> GFCommon::get_calculation_value(): No value or non-numeric value available for field #90.2. Returning zero instead.

Add this logging line to your function (around line 6 is OK):

GFCommon::log_debug( __METHOD__ . '(): The Entry => ' . print_r( $entry, true ) );

Then, ensure logging is enabled:

Test the form and ensure your after submission code runs, then go back to look at the log and see what format the product fields have, in the entry. With that, you should be able to determine how to access the values. Share the link to the log that is generated if you need assistance.