Open remcotolsma opened 10 months ago
Hmm, the faq seems a bit unclear indeed. Sounds like gpui_wait_for_payment
always needs to be used to make GP Unique ID "wait for payment".
We've had contact with @spivurno in the past (2020) regarding compatibility between Pronamic Pay and GP Unique ID and have added the pronamic_pay_gravityforms_delay_actions
filter back then. In response we received:
Amazing! I'll dig in this week. Thanks for the follow-up!
…but I'm not sure if this has ever been implemented within GP Unique ID. It's a pity that GP Unique ID cannot work with the delayed payment support:
Would be nice if we don't have to mention the Gist anymore in the future!
Internal Help Scout ticket: https://secure.helpscout.net/conversation/1149426959/19687
Solution from Gravity Wiz:
add_action( 'gform_ideal_fulfillment', function( $entry ) {
$form = GFAPI::get_form( $entry['form_id'] );
foreach ( $form['fields'] as $field ) {
if ( $field->get_input_type() != 'uid' ) {
continue;
}
$value = gp_unique_id()->get_unique( $form['id'], $field, 5, array(), $entry, false ); // last param as false to trigger Unique ID generation even for spam entries
$entry[ $field['id'] ] = $value;
GFAPI::update_entry( $entry );
}
}, 9 );
Internal Help Scout ticket: https://secure.helpscout.net/conversation/1149426959/19687
If I search for "GP Unique ID" within our support system, I get 21 results. Should we consider adding support for the "GP Unique ID" plugin (perk)? Now sometimes we throw the following gist over the fence: https://gist.github.com/rvdsteege/6b0afe10f81b1bc99d335ff484206fa9. According to the FAQ at https://gravitywiz.com/documentation/gravity-forms-unique-id/#can-unique-id-generation-be-delayed-until-after-payment-is-approved I would expect it to be already should work.
Based on this FAQ you get the impression that it should work automatically, or should a programmer still hook into the
gpui_wait_for_payment
filter with custom code? A user of the Pronamic Pay plugin may inquire with Gravity Wiz how this works, see following ticket:Internal HelpScout ticket: https://secure.helpscout.net/conversation/2457184606/26664/
I did see that the "GP Unique ID" plugin is equipped with specific code for the Gravity Forms PayPal add-on: https://github.com/pronamic/gp-unique-id/blob/main/includes/class-gf-field-unique-id.php#L43-L45
The "GP Unique ID" plugin also doesn't seem to work with Gravity Forms feeds, but with a "Unique ID" field, which is probably why it doesn't work as I would expect.
CC @rvdsteege