Skip to content

Instantly share code, notes, and snippets.

@alex-authlab
Created August 18, 2020 08:08
Show Gist options
  • Save alex-authlab/d19ea4d42690d5509742f57613c05229 to your computer and use it in GitHub Desktop.
Save alex-authlab/d19ea4d42690d5509742f57613c05229 to your computer and use it in GitHub Desktop.
WP Pay Form Important Hooks
/* PAYMENT */
// Executes when payment is failed
do_action('wppayform/form_payment_failed', $submission, $transaction, $form, $charge, $type);
// Executes when stripe payment is failed
do_action('wppayform/form_payment_stripe_failed', $submission, $transaction, $form, $charge, $type);
// Executes when paypal payment is processing
do_action('wppayform/form_payment_processing_paypal', $submission, $transaction, $transaction->form_id, $data);
// Executes after paypal payment success
do_action('wppayform/form_payment_success_paypal', $submission, $transaction, $transaction->form_id, $data);
// Executes after stripe payment success
do_action('wppayform/form_payment_success_stripe', $submission, $transaction, $submission->form_id, $session);
/* SUBSCRIPTION */
//Executes after successful subscription
do_action('wppayform/form_recurring_subscribed', $submission, $subscriptions, $submission->form_id);
//Executes after successful subscription in paypal
do_action('wppayform/form_recurring_subscribed_paypal', $submission, $subscribedItems, $submission->form_id);
//Executes after successful subscription in stripe
do_action('wppayform/form_recurring_subscribed_stripe', $submission, $subscriptions, $submission->form_id);
/* FORM SUBMISSION */
// Executes after form submission completion
do_action('wppayform/after_form_submission_complete', $submission, $formId);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment