Sending submission data to an API
-
Hi,
I’ve tried to extend the action module with my own module for sending the submission data to an API. I don’t want to create a separate plugin for that, so I’ve extended my functions.php file with this code:
<?php class NewsletterApi extends awsmug\Torro_Forms\Modules\Actions\Action { protected function bootstrap() { $this->slug = 'newsletter-api'; $this->title = 'Newsletter API'; } public function handle( $submission, $form ) { wp_die($submission); } } torro()->modules()->actions()->register( 'newsletterapi', 'NewsletterApi' );
For testing purposes I wanted to show the submission data after submitting the form with wp_die, but nothing happens.
Would be great if you can give me a hint!
Best,
Marc
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Sending submission data to an API’ is closed to new replies.