• Resolved wiredmark

    (@wiredmark)


    Hey there,

    I am using the simpay_charge_created action and I need to retrieve the ID of the Simple Pay form I just submitted in there. Is there a function that I can use, like get_simpay_form_id() or something like that?

    Thank you very much!

Viewing 1 replies (of 1 total)
  • Plugin Author Spencer Finnell

    (@spencerfinnell)

    Hey @wiredmark

    You can use the following to retrieve the form ID:

    
    add_action( 'simpay_charge_created', function( $charge ) {
    	global $simpay_form;
    
    	$form_id = $simpay_form->id;
    
    	// Use $form_id...
    } );
    

    I hope that helps!

    Spencer

Viewing 1 replies (of 1 total)
  • The topic ‘Getting form ID in functions.php’ is closed to new replies.