Support » Plugin: Stripe Payments for WordPress - WP Simple Pay » Getting form ID in functions.php

  • Resolved 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 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!


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